0% found this document useful (0 votes)
10 views

Report 1

The document discusses analyzing the stability and time response of a control system using MATLAB. It involves determining poles, plotting pole-zero maps, and calculating the open-loop transfer function. The stability is then evaluated by examining the poles. The time response to a step input is also plotted for the first 20 seconds.

Uploaded by

zaigham mohiudin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Report 1

The document discusses analyzing the stability and time response of a control system using MATLAB. It involves determining poles, plotting pole-zero maps, and calculating the open-loop transfer function. The stability is then evaluated by examining the poles. The time response to a step input is also plotted for the first 20 seconds.

Uploaded by

zaigham mohiudin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

1.

Part 1: Pole-Zero Map and Open-Loop Response


1.1. Determine the poles of G2 (show the results of the function ‘pole’ in the command
window only for the G2 block – refer to Figure 1).
MATLAB Code:
% Part I (1.1)
clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a,b);
pol=pole(G2)
Results

1.2. Plot the pole-zero map of G2 (use the function ‘pzmap’)


% Part I (1.1)
clc
clear all
a = 10;
b = [1 18 72];
G2 = tf(a,b);
pol=pole(G2)
% Part I (1.2)
figure;
pzmap(G2);
title('Pole-Zero Map of G2');
1.3. With K = 1, compute the Open Loop Transfer Function (OLTF) in MATLAB
where Gopen(s)=G1(s)G2(s)G3(s)
MATLAB Code
% Part I (1.3)
clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a,b);
k = 1;
H = tf([0.67 3.33],[1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 .* G2 .* G3
Results

1.4. Determine the poles of the obtained OLTF in part 1.3


MATLAB Code
% Part I (1.3)
clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a,b);
k = 1;
H = tf([0.67 3.33],[1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 .* G2 .* G3
% Part I (1.4)
p1 = pole(Gopen)
Results
1.5. Plot the pole-zero map of the obtained OLTF in part 1.3
MATLAB Code
% Part I (1.3)
clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a,b);
k = 1;
H = tf([0.67 3.33],[1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 .* G2 .* G3
% Part I (1.4)
p1 = pole(Gopen)
% Part I (1.5)
figure;
pzmap(Gopen);
title('Pole-Zero Map of Gopen');
Results
1.6. Plot a unit step response for the first 20 seconds of the open loop system (refer to
part 1.3)
MATLAB Code
% Part I (1.3)
clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a,b);
k = 1;
H = tf([0.67 3.33],[1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 .* G2 .* G3
% Part I (1.4)
p1 = pole(Gopen)
% Part I (1.5)
figure;
pzmap(Gopen);
title('Pole-Zero Map of Gopen');
% Part I (1.6)
figure;
t = 0:0.1:20;
step(t, Gopen);
title('Step Response of Gopen');
1.7. Evaluate the stability properties
Solution: o evaluate the stability properties of a system, we typically examine the poles of its transfer
function in the complex plane. For a system to be stable, all poles must have negative real.
The Transfer Function of G2(s) system is given by
100
𝐺2 (𝑆) = --------(1)
𝑆 2 +18𝑆+72
To find the poles
𝑆 2 + 18𝑆 + 72 = 0
𝑆 2 + 6𝑆 + 12𝑆 + 72 = 0
𝑆(𝑆 + 6) + 12(𝑆 + 6) = 0
(𝑆 + 6)(𝑆 + 12) = 0
(𝑆 + 6) = 0; (𝑆 + 12) = 0
𝑆 = −6; 𝑆 = −12

From the Pole-Zero Plot and our


calculations All poles of G2(S) System is lie at left half plan therefore G2(S) is the Stable transfer
function.

1.8. To Find the Open loop Transfer function of the Whole system
The Open Loop transfer function of the whole system is given by

𝐺𝑜𝑝𝑒𝑛 (𝑆) = 𝐺1 (𝑆) × 𝐺2 (𝑆) × 𝐺3 (𝑆)


G1(S) system transfer function is given as
𝐺1 (𝑆) = 𝐾 × 𝐻(𝑆)
K=1
0.67𝑆+3.33
𝐻(𝑆) =
𝑆 2 +9.50𝑆+31
0.67𝑆+3.33
𝐺1 (𝑆) = 2
𝑆 +9.50𝑆+31
G2(S) system transfer function is given as
100
𝐺2 (𝑆) =
𝑆 2 +18𝑆+72
G3(S) system transfer function is given as
1
𝐺3 (𝑆) =
𝑆+1
The Open Loop transfer function of the whole system is given by

0.67𝑆 + 3.33 100 1


𝐺𝑜𝑝𝑒𝑛 (𝑆) = ( )( 2 )( )
2
𝑆 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72 𝑆 + 1
10(0.67𝑆+3.33)
= 2
(𝑆+1)(𝑆 +9.50𝑆+31)(𝑆2 +18𝑆+72)

67𝑆 + 333
=
(𝑆 + 1)(𝑆 4 + 9.50𝑆3 + 31𝑆 + 18𝑆3 + 171𝑆2 + 558𝑆 + 72𝑆2 + 684𝑆 + 2232)
67𝑆 + 333)
=
(𝑆 + 1)(𝑆 4 + 27.50𝑆3 + 274𝑆2 + 1242𝑆 + 2232)
67𝑆 + 333)
=
𝑆 5 + 27.50𝑆4 + 274𝑆3 + 1242𝑆2 + 2232𝑆 + 𝑆 4 + 27.50𝑆3 + 274𝑆2 + 1242𝑆 + 2232)

67𝑆 + 333)
𝐺𝑜𝑝𝑒𝑛 (𝑆) =
5
𝑆 + 28.50𝑆4 + 301𝑆3 + 1516𝑆2 + 3474𝑆 + 2232)
1.9. Evaluate the stability properties of the system based on the poles and the pole-zero map of the
OLTF (refer to parts 1.4 & 1.5)
To find the No. of Poles of the open loop transfer function is that

0.67𝑆 + 3.33 100 1


𝐺𝑜𝑝𝑒𝑛 (𝑆) = ( )( 2 )( )
2
𝑆 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72 𝑆 + 1

𝑆 2 + 9.50𝑆 + 31 = 0
−𝑏±√𝑏2 −4𝑎𝑐
S=
2𝑎
−9.5±√9.52 −4(1)(31)
S=
2(1)
−9.5±√90.25−124 −9.5±√90.252 −124 −9.5±√−33
S= = =
2 2 2
−9.5+√−33 −9.5+√−33
S1= ; S2=
2 2

−9.5+5.744𝑖 −9.5−5.744𝑖
S1= ; 𝑆2 =
2 2
S1=-4.75+2.872i; S2=-4.75-2.872i
S3=-6; S4=-12; S5=-1
We see that all the poles have negative real parts (since they all have a negative sign before
the real part), which means they all lie in the left half-plane of the complex plane.
Therefore, based on the locations of the poles, we can conclude that the system is stable.
1.10. Evaluate the time response behavior of the system (refer to part 1.6)
0.67𝑆 + 3.33 100 1
𝐺𝑜𝑝𝑒𝑛 (𝑆) = ( )( 2 )( )
𝑆 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72 𝑆 + 1
2

1 0.67𝑆 + 3.33 100


( )( )( 2 )
𝑆 + 1 𝑆2 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72
𝐴 𝐵𝑆 + 𝐶 𝐷𝑆 + 𝐸
=( )+( )+( 2 )
𝑆+1 2
𝑆 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72
2 2
Multiply (𝑆 + 1)(𝑆 + 9.50𝑆 + 31)(𝑆 + 18𝑆 + 72) on both side of the above
equation
67𝑆 + 333 = 𝐴(𝑆 2 + 9.50𝑆 + 31)(𝑆2 + 18𝑆 + 72) +( 𝐵𝑆 + 𝐶) (𝑆 +
1) (𝑆2 + 18𝑆 + 72) + (𝐷𝑆 + 𝐸) (𝑆 + 1)(𝑆 2 + 9.50𝑆 + 31)----(a)

67𝑆 + 333
= 𝐴(𝑆4 + 18𝑆 3 + 72𝑆 2 + 9.50𝑆 3 + 171𝑆 2 + 684𝑆 + 31𝑆 2
+ 558𝑆 + 2201) + (𝐵𝑆 + 𝐶)(𝑆3 + 18𝑆2 + 72𝑆 + 𝑆2 + 18𝑆 + 72)
+ (𝐷𝑆 + 𝐸)( 𝑆 3 + 9.50𝑆2 + 31𝑆 + 𝑆 2 + 9.50𝑆 + 31)

67𝑆 + 333
= 𝐴(𝑆4 + 27.5𝑆 3 + 274𝑆 2 + 1242𝑆 + 2201) + (𝐵𝑆 + 𝐶)(𝑆3
+ 19𝑆2 + 90𝑆 + 72) + (𝐷𝑆 + 𝐸)( 𝑆 3 + 10.50𝑆2 + 40.5𝑆
+ 31)
67𝑆 + 333 = 𝐴𝑆4 + 27.5𝐴𝑆 3 + 274𝐴𝑆 2 + 1242𝐴𝑆 + 2201𝐴 + 𝐵𝑆4 +
19𝐵𝑆3 + 90𝐵𝑆 2 + 72𝐵𝑆 + 𝐶𝑆3 + 19𝐶𝑆2 + 90𝐶𝑆 + 72𝐶 + 𝐷𝑆 4 +
10.50𝐷𝑆3 + 40.5𝐷𝑆2 + 31𝐷𝑆 + 𝐸𝑆 3 + 10.50𝐸𝑆2 + 40.5𝐸𝑆 + 31𝐸---(b)
S=-1 in above equation (a)
-67+333= 𝐴(1 − 9.50 + 31)(1 − 18 + 72)
266=1237.5A
A=0.215
Compare coefficient of "𝑺𝟒 " in equation (b)
0=A+B+D
B+D=-0.215
B=-D-0.215----(i)
Compare coefficient of "𝑺𝟑 " in equation (b)
0=27.5A+19B+C+10.50D+E
0=27.5(0.215) +19(-0.215-D) +C+10.50D+E
0=5.913-4.09-19D+C+10.5D+E
0=-1.823-8.5D+C+E
C=1.823+8.5D-E-----(ii)
Compare coefficient of "𝑺𝟐 " in equation (b)
0=274A+90B+19C+40.5D+10.50E
0=274(0.215)+90(-0.215-D) +19(1.823+8.5D-E)+40.5D+10.50E
0=58.91-19.35-90D+34.637+161.5D-19E+40.5D+10.50E
0=74.197+112D-8.5E
112D=8.5E-74.197
D=0.076E-0.662-----(iii)
Compare coefficient of "𝑺" in equation (b)
67=1242A+72B+90C+31D+40.5E
67=1242(0.215)+72(-0.215-D)+90(1.823+8.5D-E)+31(0.076E-0.662)+40.5E
67=267.03-15.48-72D+164.07+765D-90E+2.356E-20.522+40.5E
67=395.098+693D-47.144E
From (iii)
67=395.098+693(0.076E-0.662)-47.144E
67=395.098+52.668E-458.766-47.144E
67=-63.668+5.524E
5.524E=130.66
E=23.654
The Value of E is put in (iii)
D=1.136
The Value of E and D Put into (ii)
C=-12.175
The Value of D put in (i)
B=-1.351
1 0.67𝑆 + 3.33 10
( )( 2 )( 2 )
𝑆 + 1 𝑆 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72
𝟎. 𝟐𝟏𝟓 -1.351𝑆 − 𝟏𝟐. 175 1.136𝑆 + 23.654
=( )+( 2 )+( 2 )
𝑆+1 𝑆 + 9.50𝑆 + 31 𝑆 + 18𝑆 + 72

Now it converted into time domain this the time response of the system
9 9
√23 √23
Gopen(t) =0.215𝑒 −𝑡 − 1.351𝑒 −20𝑡 𝑠𝑖𝑛 ( 20 𝑡) − 12.175𝑒 −20𝑡 𝑐𝑜𝑠 ( 20 𝑡) + 1.136𝑒 −9𝑡 𝑠𝑖𝑛(3𝑡) +
23.654𝑒 −9𝑡 𝑐𝑜𝑠(3𝑡)
1.11. Explain the significance of the location of the poles of the Open-Loop TF and
their
impact in the system output
The poles of the open-loop transfer function (TF) play a crucial role in determining the behavior
and stability of a control system. The significance of the location of the poles lies in their impact
on the system's output response. Here's how:
• Stability: The stability of a control system is closely related to the location of its poles.
For a system to be stable, all poles of the open-loop transfer function must lie in the left-
half plane (LHP) of the complex plane. This means that the real parts of the poles are
negative. If any pole lies in the right-half plane (RHP), the system is unstable and may
exhibit oscillatory or divergent behavior.
• Transient Response: The location of poles determines the transient response
characteristics of the system. Poles closer to the imaginary axis (i.e., with smaller real
parts) result in slower transient response, leading to sluggish or overdamped behavior.
Conversely, poles farther away from the imaginary axis (with larger real parts) lead to
faster transient response, resulting in quicker settling time but potentially introducing
oscillations.
• Frequency Response: The location of poles affects the frequency response of the
system. Poles dictate the system's natural frequencies and damping ratios, which
influence how the system responds to different frequencies of input signals. Poles closer
to the imaginary axis correspond to lower natural frequencies, while poles farther away
correspond to higher natural frequencies.
• Resonance and Stability Margins: The proximity of poles to the imaginary axis also
affects the system's susceptibility to resonance and stability margins. Systems with poles
closer to the imaginary axis are more prone to resonance and may exhibit poor stability
margins, making them sensitive to disturbances and noise.
2. Part 2: Bode and Nyquist Diagram
2.1. Plot a Nyquist diagram of the obtained OLTF (Refer to part 1.3)
MATLAB Code
Clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a,b);
k = 1;
H = tf([0.67 3.33],[1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 .* G2 .* G3
% Part II (2.1)
figure;
nyquist(Gopen);
title('Nyquist Diagram of Gopen');

Result

2.2. Plot a Bode diagram of the obtained OLTF (Refer to part 1.3), and show the
Gain Margin (GM) and the Phase Margin (PM) values on the diagram
MATLAB Code
% Part II (2.2)
figure;
margin(Gopen);
Results
2.3. Determine the values of the Gain Margin (GM) and Phase Margin (PM) using function
“margin” and state the values.
MATLAB
[GM, PM, ~, ~] = margin(Gopen);
K_star = 1 / GM;
fprintf('Gain Margin (GM): %.4f dB\n', 20*log10(GM));
fprintf('Phase Margin (PM): %.4f degrees\n', PM);
fprintf('Maximum value of K for stability (K*): %.4f\n', K_star);

Results

2.4. Re-plot the Nyquist diagram with K = K*


MATLAB
Gopen_Kstar = K_star * Gopen;
figure;
nyquist(Gopen_Kstar);
title(['Nyquist Diagram of Gopen with K = ', num2str(K_star)]);
Results

2.5. Compare both Nyquist diagrams from parts 2.1 and 2.4 and then assess the
stability properties of the system
• critical point (-1, 0) and stays within a stable region, the system is stable under the
given gain K=1.
• The Nyquist plot in part 2.4 stays within a stable region without encircling the critical
point (-1, 0), it indicates that the system is stabilized with the appropriate gain
𝐾*=0.019.
2.6. Convert the maximum value of K (=K*) from dB to magnitude, and demonstrate all
the steps employed in the process.
Given
K*=0.019db
To convert from dB to linear scale, we use the formula:
𝐾∗(𝑑𝐵) 0.019
Linear Scale=10 20 =10 20 =1.002
2.7. What can you say about the system based on the obtained information from the Bode
diagrams, Nyquist plots and the values of the GM/PM?
Stability Assessment:
Nyquist Plots: The Nyquist plot provides a visualization of the system's stability. If
the plot encircles the critical point (-1, 0) in the counter-clockwise direction, it indicates
instability. Conversely, if it remains outside the critical point, the system is stable.
GM and PM Values: Higher values of GM and PM indicate greater stability margins.
A high GM implies the system can tolerate significant gain variations before instability,
while a high PM suggests stability against phase lag and oscillations. Higher GM and
PM values indicate greater robustness of the system against uncertainties and
disturbances. A system with ample stability margins is more resilient to variations in
system parameters and external disturbances.
Bode Diagrams: The Bode diagrams depict the system's frequency response, including
gain and phase characteristics across a range of frequencies. They provide insights into
the system's bandwidth, resonance frequency, and frequency-domain behavior.
2.8. What is the significance of the Gain and Phase Margins, and why their representations in
terms of the Bode and Nyquist plots are equivalent? Explain your answer
• Gain Margin (GM):
GM represents the amount of gain that can be added to the system before it becomes unstable. A higher
GM indicates greater stability margins, providing a buffer against gain variations and disturbances. It
quantifies the system's robustness against changes in gain, ensuring stable operation under different
operating conditions.

• Phase Margin (PM):


PM measures the phase difference between the system's output and input signals at the frequency where
the gain crossover occurs. A higher PM implies a greater phase difference, indicating more stability
against phase lag and oscillations. It reflects the system's ability to maintain stability in the presence of
phase variations.
The representations of GM and PM in terms of the Bode and Nyquist plots are equivalent due to the
relationship between gain and phase:

• Bode Plots:
In Bode plots, the gain and phase are represented separately as functions of frequency. The gain crossover
frequency is where the magnitude plot intersects the 0 dB line, while the phase crossover frequency is
where the phase plot intersects -180 degrees. The difference between these crossover frequencies
corresponds to the phase margin, while the gain margin is calculated as the reciprocal of the gain at the
phase crossover frequency.
• Nyquist Plots:
Nyquist plots provide a visual representation of the system's frequency response on the complex plane.
The gain and phase information is encoded in the shape of the plot. The gain margin is directly related to
the distance from the critical point (-1, 0) to the Nyquist plot at the phase crossover frequency, while the
phase margin is the angle between the Nyquist plot and the negative real axis at the gain crossover
frequency.
3.1. With K=1, plot root locus diagram
% Plot the root locus diagram (3.1)
figure;
rlocus(Gopen);
title('Root Locus Diagram with K = 1');
xlabel('Real Axis');
ylabel('Imaginary Axis');
grid on;

Result

3.2. Show the Gain Margin on the root locus diagram using the data cursor in the figure
3.3. Evaluate the behavior of the poles of the system based on the root locus diagram

• Pole s1 = -11.9:This pole is located farthest to the left on the real axis. As K increases, this pole
will move towards the left.
• Pole s2 = -6:This pole is closer to the origin compared to s1 but still on the left-half of the
complex plane. As K increases, this pole may move towards the left or remain stable depending
on the direction of the root locus branch.
• Pole s3 = -1:This pole is closer to the origin compared to s2. As K increases, this pole may move
towards the origin or remain stable.
• Poles s4 and s5:These poles are in the left-half of the complex plane with non-zero imaginary
components. As K increases, these poles may move towards the origin or change their position in
the complex plane based on the behavior of the root locus branches.
3.4. Compare the gain obtained from the root locus diagram with part 2.3 (refer to part 3.2) and
explain any differences

• Gain K from Root Locus Diagram: The gain K obtained from the root locus diagram represents
the value of K where the root locus branches cross the imaginary axis. This gain is associated
with specific pole locations along the root locus.
• Gain K at Pole Locations: When the system poles are at the provided locations and 𝐾=0, there is
no control action applied to the system. The system poles are purely determined by the plant
dynamics and other factors.
• Differences and Explanations: The gain K obtained from the root locus diagram represents the
control action required to stabilize the system when K>0. At the provided pole locations and K=0,
the system is uncontrolled, and the gain K is not applicable since the system is not stabilized by a
controller.
4.1. With K = 1 and using MATLAB, compute the Closed Loop Transfer Function (CLTF) of the system in
Figure 1
% Given open-loop transfer function G_open and feedback transfer function H
a = 100;
b = [1 18 72];
G2 = tf(a, b);
k = 1;
H = tf([0.67 3.33], [1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 * G2 * G3;
% Derive the Closed-Loop Transfer Function (CLTF) with K = 1
CLTF = G1 * G2 / (1 + G1 * G2 * G3)
4.2. Determine the poles and zeros of the obtained CLTF in part 4.1 (show the results of the
functions ‘zpk’, ‘pole’, ‘zero’ in the command window)
%4.2
% Determine poles and zeros of CLTF
[z, p, k] = zpkdata(CLTF, 'v');
poles = pole(CLTF);
zeros = zero(CLTF);
% Display results in the command window
disp('Poles of CLTF:');
disp(poles);
disp('Zeros of CLTF:');
disp(zeros);

4.3. Plot the pole-zero map of the obtained CLTF in part 4.1
% Part 4 (4.3)
figure;
pzmap(CLTF);
title('Pole-Zero Map of Closed Loop TF');
4.4. Plot a unit step response for the first 20 seconds of the CLTF observed at the output Y(s)
% Part 4 (4.4)
t = 0:0.1:20;
step(t, CLTF);
title('Step Response of Closed Loop TF');

𝑮𝟏 (𝑺)𝑮𝟐 (𝑺)
4.5. With K = 1, derive the CLTF 𝑮𝒄𝒍𝒐𝒔𝒆𝒅 (𝑺) =
𝟏+𝑮𝟏 (𝑺)𝑮𝟐 (𝑺)𝑮𝟑 (𝑺)

𝑮𝟏 (𝑺)𝑮𝟐 (𝑺)𝑮𝟑 (𝑺)


67𝑆 + 333
=
𝑆 5 + 28.50𝑆4 + 301𝑆3 + 1516𝑆2 + 3474𝑆 + 2232
𝟏 + 𝑮𝟏 (𝑺)𝑮𝟐 (𝑺)𝑮𝟑 (𝑺)
67𝑆 + 333
=𝟏+
𝑆 5 + 28.50𝑆4 + 301𝑆3 + 1516𝑆2 + 3474𝑆 + 2232
𝑆 5 +28.50𝑆4 +301𝑆3 +1516𝑆2 +3474𝑆+2232+67𝑆+333
=
𝑆 5 +28.50𝑆4 +301𝑆3 +1516𝑆2 +3474𝑆+2232
𝑆 5 +28.50𝑆4 +301𝑆3 +1516𝑆2 +3841𝑆+2565
𝟏 + 𝑮𝟏 (𝑺)𝑮𝟐 (𝑺)𝑮𝟑 (𝑺 )=
𝑆 5 +28.50𝑆4 +301𝑆3 +1516𝑆2 +3474𝑆+2232
0.67𝑆 + 3.33 100
𝑮𝟏 (𝑺)𝑮𝟐 (𝑺) = ( 2 )( )
𝑆 + 9.50𝑆 + 31 𝑆2 + 18𝑆 + 72
(67𝑆 + 333)
= 4
(𝑆 + 27.50𝑆3 + 274𝑆2 + 1242𝑆 + 2232)
(67𝑆 + 333)
(𝑆 4 + 27.50𝑆 + 274𝑆2 + 1242𝑆 + 2232)
3
𝑮𝒄𝒍𝒐𝒔𝒆𝒅 (𝑺) = 5
𝑆 + 28.50𝑆4 + 301𝑆3 + 1516𝑆2 + 3841𝑆 + 2565
𝑆 5 + 28.50𝑆4 + 301𝑆3 + 1516𝑆2 + 3474𝑆 + 2232
(67𝑆+333)(𝑆 5 +28.50𝑆4 +301𝑆3 +1516𝑆2 +3474𝑆+2232)
=
(𝑆 4 +27.50𝑆3 +274𝑆2 +1242𝑆+2232)(𝑆 5 +28.50𝑆4 +301𝑆3 +1516𝑆2 +3841𝑆+2565)

After Simplify
𝟔𝟕𝑆 6 + 2242.5𝑆 5 + 29691.5𝑆 4 + 𝟐𝟎𝟐𝟎𝟎𝟎𝑆 3 + 𝟕𝟑𝟕𝟓𝟖𝟔𝑆 2 + 1306000𝑆 + 743256
=
(𝑆 9 + 56𝑆 8 + 1359𝑆7 + 18860𝑆6 + 165471𝑆 5 + 953400𝑆 4 + 3597000𝑆3 + 8484000𝑆2 + 11090000𝑆 + 5725000)

4.6. Evaluate the stability properties of the system based on the pole-zero map of the From the
Pole-zero Plot.
The pole
S1=-12; S2=-11.9883; S3=-4.7500 + 2.9047i; S4=-4.7500 - 2.9047i; S5=-4.7334 + 2.8812i
S6=-4.7334 - 2.8812i; S7=-6.0234; S8=-6; S9=-1.0217
The Zero
Z1=-12
Z2=-4.7500 + 2.9047i
Z3=-4.75- 2.9047i
Z4=-6
Z5=-4.9701
Z6=-1
All poles and Zeros lie left hand plane therefore closed loop transfer function is stable.
4.7. Evaluate the time response behavior of the closed-loop system

S1=-12; S2=-11.9883; S3=-4.7500 + 2.9047i; S4=-4.7500 - 2.9047i; S5=-4.7334 + 2.8812i


S6=-4.7334 - 2.8812i; S7=-6.0234; S8=-6; S9=-1.0217
Time response characteristics

• Transient response: The system's response to a change or input will be relatively fast, with a
settling time of approximately 1-2 seconds.
• Overshoot and ringing: Some overshoot and ringing may occur in the response, but these effects
will be dampened and not persistent.
• Steady-state response: The system will reach a stable steady-state response after the transient
response has settled.
• Overall behavior: The system will exhibit a stable response with a fast-transient response and
some possible overshoot or oscillations, followed by a stable steady-state response.
• Overall behavior: The closed-loop system will exhibit a stable response with a fast-transient
response (settling time around 1-2 seconds) and some possible overshoot/oscillations due to the
zeros and complex conjugate poles. The steady-state response will be reached, and the system
will remain stable.

5.1. Re-compute the CLTF with K=K* and determine the poles and zeros of the new CLTF
(refer to 2.3)
clc
clear all
a = 100;
b = [1 18 72];
G2 = tf(a, b);
k = 1;
H = tf([0.67 3.33], [1 9.50 31]);
G1 = k .* H;
G3 = tf([1], [1 1]);
Gopen = G1 * G2 * G3;
% Derive the Closed-Loop Transfer Function (CLTF) with K = 1
CLTF = G1 * G2 / (1 + G1 * G2 * G3);
[GM, PM, ~, ~] = margin(CLTF);
K_star = 1 / GM;
fprintf('Gain Margin (GM): %.4f dB\n', 20*log10(GM));
fprintf('Phase Margin (PM): %.4f degrees\n', PM);
fprintf('Maximum value of K for stability (K*): %.4f\n', K_star);

5.2. Plot the pole-zero map of the obtained CLTF in part 5.1
%5.2

CLTF_Kstar = K_star * CLTF;

pzmap(CLTF_Kstar);
5.3. Plot a unit step response for the first 20 seconds of the obtained CLTF in part 5.1
t = 0:0.1:20;
figure;
step(t, CLTF_Kstar);
title('Step Response of CLTF_Kstar');

5.4. Re-compute the CLTF with K=0.5K* and determine the poles and zeros of the new
CLTF
knew=0.5.*K_star;
CLTF_new=knew* CLTF;
[z, p, k] = zpkdata(CLTF_new, 'v');
poles = pole(CLTF_new);
zeros = zero(CLTF_new);
disp('Poles of CLTF_new:');
disp(poles);
disp('Zeros of CLTF_new:');
disp(zeros);
5.5. Plot the pole-zero map of the obtained CLTF in part 5.4
% 5.6
figure;
pzmap(CLTF_new);
title('Pole-Zero Map of CLTF_new');

5.6. Plot a unit step response for the first 20 seconds of the CLTF obtained in part 5.4
% 5.6
t = 0:0.1:20;
figure;
step(t, CLTF_new);
title('Step Response of CLTF_new');
5.7. Evaluate the stability properties of the system based on the pole-zero map of CLTF when K =
K* (refer to parts 5.1 and 5.2)
The pole
S1=-12; S2=-11.9883; S3=-4.7500 + 2.9047i; S4=-4.7500 - 2.9047i; S5=-4.7334 + 2.8812i
S6=-4.7334 - 2.8812i; S7=-6.0234; S8=-6; S9=-1.0217
The Zero
Z1=-12
Z2=-4.7500 + 2.9047i
Z3=-4.75- 2.9047i
Z4=-6
Z5=-4.9701
Z6=-1
All poles and Zeros lie left hand plane therefore closed loop transfer function is stable.

5.8. Evaluate the time response behavior of the system when K=K*.
With the change in K from 1 to 0.0210, the system's behavior will change significantly. Here's an
updated evaluation of the time response:
• Stability: The system is still stable, but the reduced gain (K) will affect the response.
• Transient response: The system's response to a change or input will be much slower
compared to the previous case (K=1). The settling time will be significantly longer,
potentially in the range of tens or even hundreds of seconds.
• Overshoot and ringing: The reduced gain will also reduce the amount of overshoot and
ringing in the response. The response will be more sluggish and less oscillatory.
• Steady-state response: The system will still reach a stable steady-state response, but it
will take much longer to get there.
• Overall behavior: The system's response will be characterized by a slow and sluggish
behavior, with a long settling time and minimal overshoot or oscillations.
5.9. Evaluate the stability properties of the system based on the pole-zero map of CLTF when K =
0.5K*.

The pole
S1=-12; S2=-11.9883; S3=-4.7500 + 2.9047i; S4=-4.7500 - 2.9047i; S5=-4.7334 + 2.8812i
S6=-4.7334 - 2.8812i; S7=-6.0234; S8=-6; S9=-1.0217
The Zero
Z1=-12
Z2=-4.7500 + 2.9047i
Z3=-4.75- 2.9047i
Z4=-6
Z5=-4.9701
Z6=-1
All poles and Zeros lie left hand plane therefore closed loop transfer function is stable.
5.10. Evaluate the time response behavior of the system when K=0.5K*

• Stability: The system remains stable, but the even smaller gain (K) will lead to an even
more sluggish response.
• Transient response: The system's response to a change or input will be even slower
compared to the previous case (K=0.0210). The settling time will be even longer,
potentially in the range of hundreds or even thousands of seconds.
• Overshoot and ringing: The already minimal overshoot and ringing will be almost
negligible due to the very small gain (K).
• Steady-state response: The system will still reach a stable steady-state response, but it
will take even longer to get there.
• Overall behavior: The system's response will be extremely slow and sluggish, with a
very long settling time and almost no overshoot or oscillations.
6.1. With K = 0.5 K* and using MATLAB, determine the value of the SSE of the system in Figure 1
(hint: refer to part 5.4
%%%% 6.1
sse=(1-dcgain(CLTF_new))

6.2. Derive the theoretical value of the SSE when K=0.5K*

At the K=0.5K*=0.0105 the transfer function will be


0.7025𝑆 6 + 23.51𝑆 5 + 𝟑𝟏𝟏. 𝟑𝑆 4 + 𝟐𝟏𝟏𝟖𝑆 3 + 𝟕𝟕𝟑𝟒𝑆 2 + 13713𝑆 + 7794
(𝑆 9 + 56𝑆 8 + 1359𝑆7 + 18860𝑆6 + 165471𝑆 5 + 953400𝑆 4 + 3597000𝑆3 + 8484000𝑆2 + 11090000𝑆 + 5725000)

Sse=1-lim→0 (Gclosed )
lim→0 (Gclosed )
0.7025𝑆6 + 23.51𝑆5 + 𝟑𝟏𝟏. 𝟑𝑆4 + 𝟐𝟏𝟏𝟖𝑆3 + 𝟕𝟕𝟑𝟒𝑆2 + 13713𝑆 + 7794
= lim→0 ( )
(𝑆9 + 56𝑆8 + 1359𝑆7 + 18860𝑆6 + 165471𝑆5 + 953400𝑆4 + 3597000𝑆3 + 8484000𝑆2 + 11090000𝑆 + 5725000)

7792
lim→0 (Gclosed ) = = 0.013610
572500
Sse=1-0.013610
SSE=0.9864
6.3. Evaluate the SSE value and explain how it may be improved

The SSE value is approximately 0.9864, which means that the system's output will be about 98.64% of
the desired output in the steady-state condition.
To improve the SSE value, you can try:

• Increasing the gain K: A higher gain will reduce the SSE, but be careful not to make the system
unstable.
• Adjusting the controller parameters: Tuning the controller gains can help minimize the SSE.
• Using a different control strategy: Depending on the system and requirements, other control
methods like PID, state-space control, or advanced techniques like model predictive control might
achieve better performance.
• Reducing disturbances: Minimizing external disturbances or using disturbance rejection
techniques can help reduce the SSE.
7.1. Construct the open-loop system ‘Gopen(s)’ (refer to 1.3) in SIMULINK with a unit step input

7.2. Show the SIMULINK step response for the first 20 seconds of the system in part 7.1 and take a
print screen
7.3. Construct the closed-loop system in Figure 1 using SIMULINK with a unit step as input.
7.4. Show the SIMULINK step responses for the first 20 seconds of the closed-loop system in Figure 1
when K=1, K=K* and K=0.5K*

K=1

K=0.5K*

7.5: There will be no major difference in the previous part .


8.1. Use the LTI Viewer in MATLAB to plot the Nyquist diagrams when K= 1 and K=K* and then
compare plot with the previously obtained results in parts 2.1 and 2.4. Explain the stability of the
system based on the results.
%%% 8.1
ltiview({'nyquist'},CLTF,'m-',CLTF_Kstar,'k-',CLTF_new,'-b')

System is stable and graph is appeared same as the previous parts

8.2. Use the LTI Viewer in MATLAB to plot the first 20 seconds of the unit step responses for the
obtained OLTF together with the CLTF when K=1, K=K* and K=0.5*K* and then compare the results with
the previously obtained plots (refer to parts 1.9, 4.6, 5.3, 5.8). Explain the impact of varying values of
the gain K on the system response with LTI Viewe
%%%.8.2
ltiview({'step'},Gopen,'r--',CLTF,'m-',CLTF_Kstar,'k-',CLTF_new,'-b')
8.3. System is stable and graph is appeared same as the previous parts

8.4. Based on the results from part 8, the overall system behavior can be evaluated as follows:
- The system has a slow response, with a long rise time and settling time.
- The system has a significant steady
- -state error (SSE) of 1, indicating a large deviation from the desired output. - The system
is not accurately tracking the reference signal, with a large error margin.
• To improve the overall performance of the system, the following steps can be taken:
• Increase the control gains: Increasing the control gains can improve the response time and reduce
the steady-state error. However, this must be done carefully to avoid instability and oscillations.
• Optimize the controller design: Consider using advanced control techniques such as PID control,
state-space control, or model predictive control (MPC) to improve the system's response and
accuracy.
• Adjust system parameters: Modify system parameters such as damping ratios, natural
frequencies, or time constants to improve the system's response and reduce the steady state
error.
• Implement disturbance rejection techniques: If disturbances are affecting the system's
performance, consider implementing disturbance observers or robust control methods to
minimize their impact.
• Use adaptive control: Implement adaptive control techniques to allow the system to adjust to
changing conditions and improve its performance over time.
• Improve sensor accuracy: Ensure that the sensors providing feedback to the controller are
accurate and reliable to improve the system's overall performance.
• Reduce noise and disturbances: Implement noise reduction techniques and disturbance rejection
methods to minimize the impact of external factors on the system's performance.

By implementing these improvements, the overall performance of the system can be significantly
enhanced, resulting in a faster response, improved accuracy, and reduced steady-state error

You might also like