An autoregressive filter is referred to as IIR (infinite impulse response) filter in signal processing.
You have several options to do that. In Matlab, one way is to use commands like
[b,a] = butter(n,wn); % Butterworth
[b,a] = cheby1(n,Rp,ws); % Chebyshev Type I
[b,a] = cheby2(n,Rs,ws); % Chebyshev Type II
[b,a] = ellip(n,Rp,Rs,ws); % elliptic
where wn
is the normalized cutoff, ws
is normalized edge frequency, and Rp
and Rs
are the ripples of passband and stopband in dB (for more details see the documentation). Then use filter
with the designed a
and b
.
If you want to design it yourself, your current analog filter can be a good starting point. You can use bilinear transformation to build your digital filter from an analog transfer function. Let's say your sampling period is $T$ (assume $T=1$ if it is just a series). Using this transform you should substitute $$s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}\tag{1}$$
in the analog $H(s)$, to find the digital filter. One can show that the relationship between the cutoff frequency of the analog filter ($\omega_a$) and that of the digital filter ($\omega_d$) is $$\omega_a=\frac{2}{T}\tan\frac{\omega_d T}{2}\tag{2}$$
So if your desired digital filter's cutoff is $\omega_d (=2\pi f_d)$, then find the equivalent analog cutoff from $(2)$, and then your digital filter is just $H(s)$ with the given $s$ in $(1)$.
If you are strictly looking for a first order digital AR filter of the form $$H(z)=\frac{1-a}{1-az^{-1}}$$ then $$H(j\omega)=\frac{1-a}{1-ae^{-j\omega}}$$ and
$$|H(j\omega)|=\frac{1-a}{|1-ae^{-j\omega}|}=\frac{1-a}{|1-a\cos(\omega)+ja\sin(\omega)|}=\frac{1-a}{\sqrt{1-2a\cos(\omega)+a^2}}$$
With that, you can find $a$ with respect to the cutoff frequency.
H
is written for continuous-time. Does it mean you want to design an analog filter? Isn't your data discrete? $\endgroup$