How to see the freq response of a transfer function

조회 수: 30 (최근 30일)
moonman
moonman 2011년 11월 13일
I am having Transfer Function
H(z)= .5z(2)+1/ [z(2)+1]
i want to plot its freq response using omega axis

채택된 답변

Wayne King
Wayne King 2011년 11월 13일
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]);

추가 답변 (6개)

moonman
moonman 2011년 11월 13일
Hi King thanks a lot. I am stuck with this multiple choice of book Can u help me and see it. As per ur direction, i checked the freq response and as per my responses, option (a) is correct
Can u just cross check my answer thanks a lot
  댓글 수: 1
Wayne King
Wayne King 2011년 11월 13일
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
moonman 2011년 11월 13일
Can u kindly suggest which one is correct I have plotted all four responses and only this response is having matching shape with that of given figure
Any idea which one is correct
  댓글 수: 1
Wayne King
Wayne King 2011년 11월 13일
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
Wayne King 2011년 11월 13일
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.

moonman
moonman 2011년 11월 13일
thanks for finishing this confusion
for H(1) at zero i m having magnitude of about -3 db
So answer (b) is correct choice b/c at zero freq, it is having arount 18 db which comes to be 64 and at freq of 1, it is having around 1 db which comes to be 1.25
I think the book has drawn it to 80 by mistake
So am i correct in saying (b) is correct option
thanks for guiding me
  댓글 수: 2
moonman
moonman 2011년 11월 13일
Ur this guidance zplane(B,A)
also confirms that (b) is correct choice
Wayne King
Wayne King 2011년 11월 13일
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
moonman 2011년 11월 13일
I also changed the scale to decimal Analysis Parameter and now i am 100% sure. thanks a lot King
Can u lastly explain me that how u came to know by seeing that my plotting frequency response (book figure) has zero as 0-1j and 0+1j
I also want to be know it
Great help by u
  댓글 수: 1
Wayne King
Wayne King 2011년 11월 13일
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

댓글을 달려면 로그인하십시오.


moonman
moonman 2011년 11월 13일
Wayne King thanks a lot, ur explanation is always wonderful and u make me understand the whole topic.
U r Excellent Expert. Hats Off for u

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by