Experiment 3
Experiment 3
EXPERIMENT 3
7
R(s) Y(s)
C(s) 𝑆(0.5𝑆 + 1)
+_
7
Consider the open loop transfer function G(s) =
𝑆(0.5𝑆+1)
G(s)
The close loop transfer function is W(s)=
1+G(s)
7
( )
W(s)= 𝑆(0.5𝑆+1)
7
(1+( ))
𝑆(0.5𝑆+1)
7
G(s) =
𝑠 2 +2𝑠+7
𝑠−𝑧
The compensator transfer function can be written as: C(s)=
𝑠−𝑝
(s + 2 − j3)
By substituting the desired values, we get: C(s)= 𝑠−𝑝
To determine the location of the compensator pole p, we use the angle condition. Since the
desired poles are complex, we need to find the angle of the complex poles and the
compensator zeros.
The angle: θ = atan(Im(z) / Re(z))
3
= atan( )
2
≈ 56.31 degrees
The angle condition states that the angle contributed by the compensator zeros should be
twice the angle contributed by the compensator poles. Therefore, the angle contributed by
the compensator poles should be half of the desired angle:
θ_pole = θ / 2
= 56.31 / 2
≈ 28.16 degrees
To find the real part of the pole, we can use the magnitude condition:
|p| = |z| / tan(θ_pole)
= 3 / tan(28.16)
≈ 5.19
(s + 2 − j3)
C(s) = (s + 5.19)
c) Ploting on the same plane, the unit-step response of the original and compensated
systems using MATLAB.
D) To obtain the steady-state error for the compensated and uncompensated systems, we can
use the stepinfo function in MATLAB
E) Based on the analysis and simulation result
1. Without the compensator, the closed-loop transfer function of the system led to a steady-
state error for the original system.
Consequently, the lead compensator was effective in improving the steady-state performance
of the system. The reduced steady-state error indicates that the compensated system reaches a
more accurate final output in response to a unit-step input.
Exercise 2
Given the open-loop transfer function G(s) = 1 / (0.5s^2), the closed-loop transfer function W(s) without the
compensator is obtained by dividing G(s) by (1 + G(s)):
G(s)
W(s)= since H(s)=1 for unity feedback
1+G(s)
1
𝑜.5𝑠2
W(s)= 1
(1+ )
𝑜.5𝑠2
1
W(s)=
0.5𝑠 2 +1
Here's the MATLAB code
Hence the system is unstable because one of the poles is located at the origin (s = 0).
b) Lead Compensator Design
s = -1 ± j
2. Lead Compensator Transfer Function:
(s + 1 − j)
C(s) =
(s + p)
3. Determining the Pole p:
The angle contribution of the compensator poles should be half of the desired angle:
θ
Θ _pole = 2 ≈ -0.3927 radians
(s + 1 − j)
C(s) =
(s − 1.2732)
c) Unit-Step Response
The compensated system exhibits a faster rise time and reduced settling time compared to the
original system.
e) Steady-State Error
1. MATLAB Code for Calculating Steady-State Error:
f) Conclusion
The designed lead compensator successfully stabilized the originally unstable system and
improved its transient response and steady-state error. The compensated system exhibits faster rise
time, reduced settling time, and lower steady-state error for both unit-step and unit-ramp inputs.