I need to create 4 different pass-band filters. What remains the same throughout is the following:
Sampling Frequency = $3000Hz$
Pass-band Frequency = $900Hz-1200Hz$
Now, these are the filters I am supposed to create:
$24^{th}$ order FIR using windowing method with Hamming window.
$24^{th}$ order FIR using frequency sampling.
$8^{th}$ order IIR using bilinear transform with Butterworth prototype analogue filter
- $8^{th}$ order IIR using impulse invariance with Butterworth prototype analogue filter.
My Attempts:
Normalised frequencies are $0.6$ and $0.8$ and the filter is 24th order hence
b = fir1(24,[0.6 0.8]);
The Desired frequency response is $$H(\Omega)=\exp^{-12j\Omega}$$ for $$\frac{3\pi}{5}\leq\Omega<\frac{4\pi}{5}$$ and $$\frac{6\pi}{5}<\Omega\leq\frac{7\pi}{5}$$ With $$\Omega=\frac{2\pi k}{25}$$ Hence I have that $H(\Omega)\neq0$ when $k=8,9,16,17$
The function in Matlab that creates this filter is
B=fir2(N,f,m)
Where $f$ is the vector with sampled frequencies and $m$ is the magnitude at those frequencies. But for my case I have frequencies higher than $1$ at it says that $f$ starts with $0$ and ends with $1$. I kind of guessed the outcome and produced this:
f=[0 0.64 0.72 1];
m=[1 exp(-12*j*0.64) exp(-12*j*0.72) exp(-12*j)];
b=fir2(24,f,m)
I have a feeling that this is not correct.
For the bilinear IIR I went to matlab's "butter" function.
[b,a] = butter(4,[0.6 0.8],'stop');
For this part I know I need to use both 'butter' and 'impinvar' together but I don't know how.
EDIT / ATTEMPT:
[b1,a1] = butter(4,[2*pi*900 2*pi*1200],'s');
[bz,az] = impinvar(b1,a1,3000);
Could someone tell me if my attempts 1-3 are correct and help me out a little with 4? Thank You.