Pole zero plot and frequancy response of a system in MATLAB

33 ビュー (過去 30 日間)
Muhammad Ali
Muhammad Ali 2020 年 10 月 29 日
コメント済み: Ameer Hamza 2020 年 10 月 30 日
I have the following system:
I am required to find its frequency response using freqresp() function and find its magnitude response over the range 0 ≤ ω ≤ 20 in steps of 0.01. I am also required to plot its magnitude response and compare the results with its pole zero plot. I wrote following code for this in matlab but don't know whats the problem with this. The code is running without error but I think the plot of magnitude respnse is wrong. Kindly help me about these questions.
w = 0:0.01:20;
num = [3 4];
den = [1 5 8 4];
zeros = roots(num);
poles = roots(den);
H = tf (num,den);
%pzmap(H)
%grid on
H1 = freqresp(H,w);
H2 = squeeze(H1);
plot(w,abs(H2))
xlabel('w');
ylabel('freq response');

回答 (2 件)

Ameer Hamza
Ameer Hamza 2020 年 10 月 29 日
It looks strange because the frequency response is usually plotted on logarithmic axes. Replace the line
plot(w,abs(H2))
with
loglog(w,abs(H2))
  2 件のコメント
Muhammad Ali
Muhammad Ali 2020 年 10 月 29 日
Now I am getting this.
But how would know that this plot correct? and whats the of this plot with pole zero plot?
Ameer Hamza
Ameer Hamza 2020 年 10 月 29 日
You can use bode() function to see if this is correct.

サインインしてコメントする。


Muhammad Ali
Muhammad Ali 2020 年 10 月 30 日
Yeah thats correct now. Thank you for your kind help.

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by