Wc = tan(pi/2*Fc/(Fs/2)); % Analog prewarped freq. rad/second
Note that this frequency is already in rad/second so the analog design is:
[Bs,As] = butter(4,Wc,'s');
s=(1-z^(-1))/(1+z^(-1)).
In the BILINEAR function documentation, the following transformation is used:
s = 2*Fs*(z-1)/(z+1)
which is equivalent to
s = 2*Fs*(1-z^(-1))/(1+z^(-1)).
[Bz,Az] = bilinear(Bs,As,.5);
using FVTOOL as follows will show two identical filters:
fvtool(B,A,Bz,Az);
Note that if you are uncomfortable with using a different "Fs" for the bilinear transformation, you could use the same "Fs" throughout if you take that into account when prewarping as follows:
Wc = 2*Fs*tan(pi/2*Fc/(Fs/2)); [Bs,As] = butter(4,Wc,'s'); [Bz,Az] = bilinear(Bs,As,Fs); [B ,A] = butter(4,Fc/(Fs/2)); fvtool(B,A,Bz,Az);
A similar discussion can be found in the documentation by typing the following command in MATLAB 7.0.4 (R14SP2):
web([docroot,'/toolbox/signal/filter15.html'])
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Explore similar technical troubleshooting questions and verified MATLAB solutions: