finding PM and GM for a system
43 views (last 30 days)
Show older comments
I need help finding PM and GM for this system.
Here is what I have so far, but I'm not sure if its right for the PM and GM. I tried a couple things, and this is the first that didn't give me an error, but the numbers just seem wrong.
Any help is appreciated!
% Part 1 - plot nyquist plot for K=900 G = tf([900],conv([1 10],[1 4 4])); figure(1) nyquist(G); xlim([-5 1])
% Part 2 - plot bode plot for transfer function figure(2) bode(G) [Gm,Pm,Wcg,Wcp] = margin(G) display(Gm); display(Pm);
0 Comments
Accepted Answer
William Rose
on 2 Nov 2022
Your results look reasonable to me.
% Part 1 - plot nyquist plot for K=15
G = tf([900],conv([1 10],[1 4 4]));
figure(1)
nyquist(G);
ylim([-4 4]); axis equal
% Part 2 - plot bode plot for transfer function
figure(2)
bode(G); grid on
[Gm,Pm,Wcg,Wcp] = margin(G)
display(Gm);
display(Pm);
The plots show an unstable system: when the phase is -180, which appears to be at f=650 Hz, the gain exceeds unity. That indicates the system is unstable. If you change 900 to 300, the system is stable, and the plots show that. For example, the phase plot below crosses -180 at f=650 Hz. The gain plot below shows that the gain is <0 dB at f=650, i.e. system is stable.
% Part 1 - plot nyquist plot for K=15
G = tf([300],conv([1 10],[1 4 4]));
figure(1)
nyquist(G);
ylim([-4 4]); axis equal
% Part 2 - plot bode plot for transfer function
figure(2)
bode(G); grid on
[Gm,Pm,Wcg,Wcp] = margin(G)
display(Gm);
display(Pm);
2 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!