electricpete
Electrical
- May 4, 2001
- 16,774
Many function (such as cheby2) allow us to generate state space (SS) form of a system if we specify 4 arguments, or transfer function form if we specify two arguments.
freqz expects TF as an input, so if I have a SS, I need to convert it first.
I would expect the following two codes to gives similar plots:
But they do not give the same results. The second one gives the expected plot (20 db down at frequency 0.75).
Code and output shown here:
I think I have overlooked something. What?
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
freqz expects TF as an input, so if I have a SS, I need to convert it first.
I would expect the following two codes to gives similar plots:
code1 said:[A,B,C,D]=cheby2(9,20,0.75); % 9th order filter, 30 db down at cutoff of 0.75*Fmax
freqz(ss2tf(A,B,C,D))
code2 said:[A,B]=cheby2(9,20,0.75);
freqz(A,B)
But they do not give the same results. The second one gives the expected plot (20 db down at frequency 0.75).
Code and output shown here:
I think I have overlooked something. What?
=====================================
Eng-tips forums: The best place on the web for engineering discussions.