MD SAIF ALI B210791ee Control System Assignment
MD SAIF ALI B210791ee Control System Assignment
MD SAIF ALI B210791ee Control System Assignment
Create a script in the MATLAB and include the results and the code as a single word document for
the submission.
Code:
numerator = 1;
denominator = conv([1, 0.5], [1, -0.5]); % (s+0.5)(s-0.5)
G = tf(numerator, denominator);
pzmap(G);
title('Pole-Zero Map of G(s) = 1/[(s+0.5)(s-0.5)]');
Result:
b) Plot the open loop system step response and display the transient and steady state response
specifications in the plot.
MD SAIF ALI B210791ee Control system assignment Date : 28/11/23
Code:
numerator = 1;
denominator = conv([1, 0.5], [1, -0.5]); % (s+0.5)(s-0.5)
G = tf(numerator, denominator);
figure;
step (G, 100);
title ('Open Loop Step Response');
grid on;
Result:
c) Calculate the closed loop system transfer function and plot the pole zero map.
Code:
numerator_open = 1;
denominator_open = conv([1, 0.5], [1, -0.5]); %
G_open = tf(numerator_open, denominator_open);
G_closed = feedback(G_open, 1);
% Display the closed-loop transfer function
disp('Closed-loop transfer function:');
disp(G_closed);
% Plot the pole-zero map of the closed-loop system
figure;
pzmap(G_closed);
title('Pole-Zero Map of Closed-Loop System');
MD SAIF ALI B210791ee Control system assignment Date : 28/11/23
Result:
d) Plot the closed loop system step response with negative unity feedback and display the transient
and steady state response specifications in the plot.
Code:
numerator = 1;
denominator = conv([1, 0.5], [1, -0.5]);
G = tf(numerator, denominator);
C = 1; % feedback gai
CL = feedback(G, C)
figure;
step(CL);
title('Closed Loop System Step Response with Negative Unity Feedback');
xlabel('Time (s)');
ylabel('Amplitude');
Result:
Result:
b) Graphically obtain the gain K for which the closed-loop system has a damping ratio 0.4.
MD SAIF ALI B210791ee Control system assignment Date : 28/11/23
Result:
c) Use the SISO tool and design an appropriate compensator such that -1 + j 1.5 is part of the root
locus
Code:
% Define the transfer function
numerator = [1, 2];
denominator = [1, -2, 0];
G = tf(numerator, denominator);
sisotool(G);
-1+j1.5
MD SAIF ALI B210791ee Control system assignment Date : 28/11/23
Result:
d) Plot the closed loop response and the characteristics like settling time and overshoot.
a) Sketch the Bode plot for the transfer function. Mark the phase crossover frequency and gain
crossover frequency and obtain the gain and phase margin.
Code:
numerator = 400;
denominator = conv(conv([1, 0], [1, 5]), [1, 10]); % s(s+5)(s+10)
G = tf(numerator, denominator);
Result:
Phase Crossover Frequency: -42.84 HzGain Crossover Frequency: 18.08 HzGain Margin: 5.46 dBPhase Margin:
18.08 degrees
a) Use SISO tool and design appropriate compensator such that phase margin is 60 degrees.
Code:
numerator = 400;
denominator = conv(conv([1, 0], [1, 5]), [1, 10]); % s(s+5)(s+10)
G = tf(numerator, denominator);
sisotool(G);
MD SAIF ALI B210791ee Control system assignment Date : 28/11/23
Results:
a) Plot the Nyquist plot and assess the closed loop stability
Code:
G = tf([400], [1,15,50,0]);
% Plot the Nyquist plot
nyquist(G);
title('Nyquist Plot');
MD SAIF ALI B210791ee Control system assignment Date : 28/11/23
result: