Professional Documents
Culture Documents
close all
clear
clf
clc
(i)
The value of magnitudes of G in dB for angular frequency 0-300 rad/s with increment of 5 rad/s are:
disp(logmagGiDiscrete)
fprintf("The value of phases of G in degree for angular frequency 0-300 rad/s with
increment of 5 rad/s are:")
The value of phases of G in degree for angular frequency 0-300 rad/s with increment of 5 rad/s are:
disp(phaGiDiscrete)
1
-90.0000e+000 -155.4467e+000 -291.6401e+000 -317.7879e+000 -329.0597e+000 -335.5005e+000 -339.6960e+000 -3
axmag.Box = "on";
hold off
% axpha.Title.String = "Phase";
axpha.XScale = 'log';
axpha.Box = "on";
hold off
2
% Create the Nyquist plot
figure(2);
axnyq = gca;
hold on
plot(realGi, imagGi, 'Parent', axnyq);
scatter(realGiDiscrete, imagGiDiscrete, "filled", 'Parent', axnyq);
grid on
axis equal
axnyq.XAxisLocation = "origin";
axnyq.YAxisLocation = "origin";
axnyq.XLabel.String = "G_{Re}";
axnyq.YLabel.String = "G_{Im}";
axnyq.Box = "on";
hold off
3
% Create the Nichols chart
figure(3);
axnic = gca;
hold on
plot(phaGi, logmagGi, 'Parent', axnic);
scatter(phaGiDiscrete, logmagGiDiscrete, 'filled', 'Parent', axnic);
grid on
axnic.XAxisLocation = "origin";
% axnic.YAxisLocation = "origin";
axnic.Box = "on";
4
hold off
(ii)
5
fprintf("The value of magnitudes of G in dB for angular frequency 0-300 rad/s with
increment of 5 rad/s are:")
The value of magnitudes of G in dB for angular frequency 0-300 rad/s with increment of 5 rad/s are:
disp(logmagGiDiscrete)
fprintf("The value of phases of G in degree for angular frequency 0-300 rad/s with
increment of 5 rad/s are:")
The value of phases of G in degree for angular frequency 0-300 rad/s with increment of 5 rad/s are:
disp(phaGiDiscrete)
axmag.Box = "on";
hold off
% axpha.Title.String = "Phase";
6
axpha.XScale = 'log';
axpha.Box = "on";
hold off
hold on
plot(realGi, imagGi, 'Parent', axnyq);
scatter(realGiDiscrete, imagGiDiscrete, "filled", 'Parent', axnyq);
grid on
axis equal
axnyq.XAxisLocation = "origin";
axnyq.YAxisLocation = "origin";
axnyq.XLabel.String = "G_{Re}";
7
axnyq.YLabel.String = "G_{Im}";
axnyq.Box = "on";
hold off
hold on
plot(phaGi, logmagGi, 'Parent', axnic);
scatter(phaGiDiscrete, logmagGiDiscrete, 'filled', 'Parent', axnic);
grid on
axnic.XAxisLocation = "origin";
axnic.YAxisLocation = "origin";
8
axnic.XTick = [-180 -90 0 90 180];
axnic.XLim = [-225 225];
axnic.Box = "on";
hold off