difference between polar and nyquist

16 Ansichten (letzte 30 Tage)
Maria Lancheros Vega
Maria Lancheros Vega am 28 Aug. 2020
Kommentiert: Star Strider am 28 Aug. 2020
hello,
I'm trying to obtain a polar plot of a transfer function and I came across two expressions that should give me the same results but they don't and I can't really understand how they work. how do I interpret the two plots?
num = [10];
den = [1 -2];
G = tf(num,den)
%% code number one
[MAG, PHASE] = bode(G);
PHASE = PHASE(1,:);
MAG = MAG(1,:);
polar(PHASE*pi/180, MAG)
%% code number two
nyquist(G)

Akzeptierte Antwort

Star Strider
Star Strider am 28 Aug. 2020
Your polar call is only plotting half of the evaluated transfer fuctiion.
Try this:
num = [10];
den = [1 -2 1];
G = tf(num,den)
% %% code number one
[MAG, PHASE] = bode(G);
PHASE = PHASE(1,:);
MAG = MAG(1,:);
figure
polar(PHASE*pi/180, MAG)
hold on
polar(-PHASE*pi/180, MAG)
hold off
% %% code number two
figure
nyquist(G)
The nuquist result is more appropriate than the polar result, however the plots are the same if you plot both parts, and include axis equal with the nyquist plot.
  2 Kommentare
Maria Lancheros Vega
Maria Lancheros Vega am 28 Aug. 2020
Thank you so much!! it worked perfectly, I was only plotting the positive phase
Star Strider
Star Strider am 28 Aug. 2020
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Polar Plots 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!

Translated by