Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use MATLAB to generate Nyquist plot for the following open-loop transfer functio

ID: 2082246 • Letter: U

Question

Use MATLAB to generate Nyquist plot for the following open-loop transfer function. Prom the Nyquist plot, determine the stability of the closed-loop system. Provide MATLAB code and Nyquist plots. GH = 1/s^3+5s^2+6s+2 GH = 100/s^3+5s^2+6s+2 GH = 1/(s-1)(s-2) Use MATLAB to generate bode plot for the open-loop transfer functions in problem #4, and find the gain margin, phase margin, gain crossover frequency, and phase crossover frequency. First write down the transfer function F, and then use MATLAB command bode(F); grid on. Check your results using the MATLAB command [Gm, Pm, Wgm, Wpm] = margin(F) which will provide you gain margin, phase margin, gain crossover frequency, and phase crossover frequency information, respectively for the corresponding open-loop transfer function.

Explanation / Answer

clc;
%script for nyquist plots
n1 = [1];
n2 = [100];
n3 = [1];
d1 = [1 5 6 2];
d2 = [1 5 6 2];
d3 = [1 -3 2];
Gh1 = tf(n1,d1)
Gh2 = tf(n2,d2)
Gh3 = tf(n3,d3)
nyquist(Gh1);
figure
nyquist(Gh2);
figure
nyquist(Gh3);

After the Nyquist diagram appears:
1. Right-click in the graph area.
2. Select Characteristics.
3. Select All Stability Margins.
4. Let the mouse rest on the margin points to read the gain and phase margins.

clear all;
close all;
clc;
%script for nyquist plots
n1 = [1];
n2 = [100];
n3 = [1];
d1 = [1 5 6 2];
d2 = [1 5 6 2];
d3 = [1 -3 2];
Gh1 = tf(n1,d1)
Gh2 = tf(n2,d2)
Gh3 = tf(n3,d3)
bode(Gh1);grid on
[Gm1 Pm1 Wgm1 Wpm1] = margin(Gh1)
figure
bode(Gh2);grid on
[Gm2 Pm2 Wgm2 Wpm2] = margin(Gh2)
figure
bode(Gh3);grid on
[Gm3 Pm3 Wgm3 Wpm3] = margin(Gh3)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote