How to see the freq response of a transfer function
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am having Transfer Function
H(z)= .5z(2)+1/ [z(2)+1]
i want to plot its freq response using omega axis
0 Kommentare
Akzeptierte Antwort
Wayne King
am 13 Nov. 2011
Hi, I'm going to assume that by z(2) you mean z^{-2}.
You can do a couple things.
[H,W] = freqz([1 0 0.5],[1 0 1]);
plot(W,20*log10(abs(H)));
set(gca,'xlim',[0 pi]); grid on;
xlabel('Radians/sample');
Or
fvtool([1 0 0.5],[1 0 1]);
0 Kommentare
Weitere Antworten (6)
moonman
am 13 Nov. 2011
1 Kommentar
Wayne King
am 13 Nov. 2011
Hi, I don't think that is correct. If you look at the pole-zero plot for that
zplane([0.5 0 1],[1 1]);
That frequency response peaks near pi radians/sample or 1 in omega/pi.
You have a lowpass filter in your figure.
moonman
am 13 Nov. 2011
1 Kommentar
Wayne King
am 13 Nov. 2011
I know which one is correct, but I don't want to just give you the answer. You have to keep in mind that
[H,W] = freqz(....) is giving you zero frequency first. Your book is plotting zero frequency in the middle. That may be confusing you. What is the value of your transfer function at zero frequency?
Look at H(1) for you possibilities that is the transfer function at 0 frequency.
Wayne King
am 13 Nov. 2011
Also, you see that your plotting frequency response has zero as 0-1j and 0+1j. That means there are zeros on the unit circle at those frequencies (angles).
Use
zplane(B,A)
to look for those zeros.
0 Kommentare
moonman
am 13 Nov. 2011
2 Kommentare
Wayne King
am 13 Nov. 2011
You're right.
They are just plotting the magnitude, so at zero frequency they have 8.
Look at:
[H,W] = freqz([1 0 1],[1 -0.75]);
H(1)
moonman
am 13 Nov. 2011
1 Kommentar
Wayne King
am 13 Nov. 2011
Because I saw that the magnitude was zero at -0.5 and 0.5, which corresponds to angles of -pi/2 and pi/2
exp(1j*pi/2) = 0+1j
exp(-1j*pi/2) = 0-1j
Siehe auch
Kategorien
Mehr zu Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!