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

Control System Design - Midterm

1. The document describes designing a lag-lead compensator and PID controller for different unity feedback control systems using root locus, frequency response, and Ziegler-Nichols tuning methods. 2. For the first system, a lag-lead compensator is designed to meet specifications like 20% overshoot and settling time reduction. Step and ramp responses are plotted. 3. For the second system, a lead compensator is designed using frequency response to meet a phase margin specification and achieve a steady state error constant. Step responses are compared. 4. Nyquist plots are generated for different values of K1 and K2 in an open loop transfer function to analyze stability. 5.

Uploaded by

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

Control System Design - Midterm

1. The document describes designing a lag-lead compensator and PID controller for different unity feedback control systems using root locus, frequency response, and Ziegler-Nichols tuning methods. 2. For the first system, a lag-lead compensator is designed to meet specifications like 20% overshoot and settling time reduction. Step and ramp responses are plotted. 3. For the second system, a lead compensator is designed using frequency response to meet a phase margin specification and achieve a steady state error constant. Step responses are compared. 4. Nyquist plots are generated for different values of K1 and K2 in an open loop transfer function to analyze stability. 5.

Uploaded by

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

Time: 1 week.

Total Points: 20
1. Using Python/MATLAB, plot the root loci for the unity-feedback system as shown in Fig.1with feed-
forward transfer function G(s).
Using the root locus approach, design a lag-lead compensator for the system so that the system will
operate with 20% overshoot and a twofold reduction in settling time. Further, the compensated system
should exhibit a tenfold reduction in steady-state error for ramp input. Since there are infinite number
of ways the pole-zero pair for the lead compensator part of the lag-lead circuit may be chosen, you may
simplify your design by placing the compensator zero exactly at the open-loop pole of -6 and then
choose its pole to satisfy root locus angle criterion. For the same reason, choose to place the lag
compensator pole at 0.01. Draw the compensator circuit with resistance and capacitance values.
Compare the step and ramp responses of the compensated and uncompensated systems by plotting
them.
(5 + 2= 7 Points)
𝐾𝐾
+ 𝐺𝐺𝑐𝑐 (𝑠𝑠) 𝐺𝐺(𝑠𝑠) =
𝑠𝑠(𝑠𝑠 + 6)(𝑠𝑠 + 10)

Fig. 1

The answer to the question is found in the attached .ipynb file.

2. For the unity feedback control system shown in Fig. 2, calculate the phase margin requirement that is
theoretically equivalent to a peak overshoot requirement of nearly 20%. Now, for this system design a
lead compensator using frequency response approach (i.e., Bodes and polar plots) to get an overall
closed loop system with static velocity error constant 𝐾𝐾𝑣𝑣 = 40 and the phase margin dictated by the
above phase margin requirement. To have the same design across the class, choose 10% for extra
margin in phase you need to give to account for the shift in gain cross-over frequency caused by the
lead compensator. Plot the step responses of the uncompensated and compensated systems and measure
the percent overshoot and peak times of the two systems.
(7 Points)
100𝐾𝐾
+ 𝐺𝐺𝑐𝑐 (𝑠𝑠) 𝐺𝐺(𝑠𝑠) =
𝑠𝑠(𝑠𝑠 + 36)(𝑠𝑠 + 100)

Fig.2

1. Calculating the phase margin requirement for a peak overshoot of about 20%.

𝜁𝜁 𝜋𝜋
(− )
�1− 𝜁𝜁2
𝑀𝑀𝑝𝑝 = 𝑒𝑒

First, we solve the equation for the damping ration (𝜁𝜁) when 𝑀𝑀𝑝𝑝 is approximately 20%:

For 𝑀𝑀𝑝𝑝 ≈ 20%

𝑀𝑀𝑝𝑝 = 0.20

𝜁𝜁𝜁𝜁
− = ln 0.20 → taking the natural log for both sides.
�1− 𝜁𝜁 2

𝜁𝜁 = 0.456 (calculated using the code in the .ipynb file)

We solved for damping ratio 𝜁𝜁, and now we can relate it to the phase margin (MP)
using the following the cosine relationship for underdamped systems:

cos(𝜙𝜙𝑚𝑚 ) = 𝜁𝜁

𝜙𝜙𝑚𝑚 = 𝑐𝑐𝑐𝑐𝑐𝑐 −1 (0.456) ≈ 62.87 degrees required for a peak overshoot of 20%

2. Design a lead compensator

a. Using frequency response approach to get an overall closed loop system with static velocity
error constant 𝐾𝐾𝑣𝑣 = 40:

𝑃𝑃𝑀𝑀𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 = 𝑃𝑃𝑀𝑀𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 + 10% × 𝑃𝑃𝑀𝑀𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜

𝑃𝑃𝑀𝑀𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 = 62.87 + ( 0.1 × 62.87 ) = 69.18

𝜙𝜙𝑚𝑚𝑚𝑚𝑚𝑚 = 𝑃𝑃𝑀𝑀𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 − 𝑃𝑃𝑀𝑀𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜

𝜙𝜙𝑚𝑚𝑚𝑚𝑚𝑚 = 69.18 − 62.87 = 6.287 degrees


• First, we calculate the total required phase margin increase (Δ𝜙𝜙𝑚𝑚 ) considering the extra
10%:

100𝐾𝐾
𝐾𝐾𝑣𝑣 = 𝑙𝑙𝑙𝑙𝑙𝑙𝑠𝑠 →0 𝑠𝑠. 𝐺𝐺(𝑠𝑠)𝐻𝐻(𝑠𝑠) → for the given system: 𝐺𝐺(𝑠𝑠) = 𝑠𝑠(𝑠𝑠+36)(𝑠𝑠+100)

To achieve 𝐾𝐾𝑣𝑣 = 40,

100𝐾𝐾
𝐾𝐾𝑣𝑣 = 𝑙𝑙𝑙𝑙𝑙𝑙𝑠𝑠 →0 𝑠𝑠.
𝑠𝑠(𝑠𝑠+36)(𝑠𝑠+100)
= 40

By solving for K,

𝑣𝑣 𝐾𝐾
𝐾𝐾 = 36 × 100 × 100 = 36 × 40 = 1440

Now we can design the lead compensator 𝐺𝐺𝑐𝑐 (𝑠𝑠),

𝑠𝑠 + 𝜔𝜔𝑧𝑧
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 𝐾𝐾𝑐𝑐 .
𝑠𝑠 + 𝜔𝜔𝑝𝑝

The phase lead introduced by the compensator is maximum when 𝜔𝜔𝑚𝑚 = �𝜔𝜔𝑧𝑧 . 𝜔𝜔𝑝𝑝 and
this frequency should be chosen close to the current gain crossover frequency to increase
the phase margin where it is most effective.

∅𝑚𝑚𝑚𝑚𝑚𝑚 �𝜔𝜔𝑧𝑧 . 𝜔𝜔𝑝𝑝


tan( )=
2 𝜔𝜔𝑧𝑧

𝜔𝜔𝑝𝑝
The frequency ratio 𝛼𝛼 = = 1.2459
𝜔𝜔𝑧𝑧
𝜔𝜔𝑚𝑚
𝜔𝜔𝑧𝑧 = ≈ 8 𝑟𝑟𝑟𝑟𝑟𝑟/𝑠𝑠𝑠𝑠𝑠𝑠
𝛼𝛼

𝜔𝜔𝑝𝑝 = 𝜔𝜔𝑚𝑚 . 𝛼𝛼 ≈ 12. 459

To find the gain crossover frequency 𝜔𝜔𝑔𝑔𝑔𝑔 where the phase margin is zero, we use the Bode
plot of G(s).

Lead compensator transfer function:


𝑠𝑠 + 𝜔𝜔𝑧𝑧 (𝑠𝑠 + 8)
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 𝐾𝐾𝑐𝑐 . = 𝐾𝐾𝑐𝑐
𝑠𝑠 + 𝜔𝜔𝑝𝑝 (𝑠𝑠 + 12.459)

We can calculate gain Kc to achieve the required gain at crossover:

1440
𝐾𝐾𝑐𝑐 = = 14.4
100

Therefore:
(𝑠𝑠 + 8)
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 14.4
(𝑠𝑠 + 12.459)

b. Plotting the step responses of the uncompensated:

Uncompensated:
Percent Overshoot = 11.98%
Peak Time = 0.09 seconds
Compensated:
Percent Overshoot = 62.44%
Peak Time = 0.02 seconds
3. Using Python/MATLAB code, plot the Nyquist plots for values of K1, K2 = 0.5, 1 and K1, K2 = 2, 1 for
K 1 (1 + K 2 s )
the closed loop system with open loop transfer function G ( s ) H ( s ) = . Clearly mark the
s ( s − 1)
points on these plots with the corresponding points on the Nyquist contour. By finding the location of
the point of intersection of this plot with real axis as a function of K1, and K2, show that the closed loop
system with an obviously unstable open-loop system 𝐺𝐺(𝑠𝑠)𝐻𝐻(𝑠𝑠), is stable for K 1 K 2 > 1
(3 Points)
ANALYSIS:
The above Python code produced two plots shown above for the transfer function G(s)H(s) with
different values of K1 while keeping K2 constant at 1. According to the Nyquist stability criterion, a
closed-loop system is NOT stable if the Nyquist plot for 𝐾𝐾1 𝐾𝐾2 > 1 does not encircle (-1, 0) in the
clockwise direction.

1. For 𝑲𝑲𝟏𝟏 = 𝟎𝟎. 𝟓𝟓, 𝑲𝑲𝟐𝟐 = 𝟏𝟏

• The plot shows a curve that starts from the origin (because as 𝜔𝜔 → 0 the transfer function
goes to zero) and traces out a path in the first and fourth quadrants as 𝜔𝜔 increases.
• The curve does not encircle the critical point (-1,0), which is marked by a red dot. This
suggests that for these values of 𝐾𝐾1 and 𝐾𝐾2 , the system would be stable because the Nyquist
plot doesn’t enclose the point −1 + 0𝑗𝑗 which is related to the Nyquist stability criterion.
• The dashed line in the plot represents the mirror image across the real axis. This is normally
seen in Nyquist plots due to the conjugate symmetry property of the transfer function for the
real value of 𝑠𝑠.

2. For 𝑲𝑲𝟏𝟏 = 𝟐𝟐, 𝑲𝑲𝟐𝟐 = 𝟏𝟏:

• This plot we notice a bigger curve starting from the origin and tracing a similar path. This is
due to the larger value of 𝐾𝐾1 . Also, the curve doesn’t encircle the critical point (-1, 0),
indicating the system is predicted to be stable for the 𝐾𝐾1 , 𝐾𝐾2 values.

1
4. For the system in Fig. 1, design a PID controller of the form 𝐺𝐺𝑐𝑐 (𝑠𝑠) = 𝐾𝐾𝑝𝑝 (1 + + 𝑇𝑇𝐷𝐷 𝑠𝑠) and tune
𝑇𝑇 𝑠𝑠
𝐼𝐼
the controller parameters using Ziegler-Nicols method. (3 Points)

𝐾𝐾
Given the transfer function of the plant: 𝐺𝐺(𝑠𝑠) = 𝑠𝑠(𝑠𝑠+6)(𝑠𝑠+10)
Since the given transfer function G(s) does not have any poles at the origin, we can
directly find 𝐾𝐾𝜇𝜇 and 𝑃𝑃𝜇𝜇 by creating a unity feedback loop and increasing K until the
output exhibits sustained oscillations.
𝐾𝐾𝜇𝜇 = 1

𝑃𝑃𝜇𝜇 = 4.0240240240240235

These values were found using the code in the .ipynb file.
Step 2: Calculate PID parameters using Ziegler-Nichols formulas:
𝐾𝐾𝑝𝑝 = 60% × 𝐾𝐾𝜇𝜇 = 0.6 × 1 = 0.6
𝑃𝑃𝜇𝜇 4.0.24
𝑇𝑇𝐼𝐼 = = = 2.012 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠
2 2
𝑃𝑃𝜇𝜇 4.024
𝑇𝑇𝐷𝐷 = = = 0.503
8 8

Step 3: The PID controller transfer function is:


1
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 𝐾𝐾𝑝𝑝 (1 + 𝑇𝑇 𝑠𝑠 + 𝑇𝑇𝐷𝐷 𝑠𝑠)
𝐼𝐼

1
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 0.6 �1 + 2.012 𝑠𝑠 + 0.503 𝑠𝑠�
0.6
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 0.6 + 2.012 𝑠𝑠
+ 0.3018 𝑠𝑠

The transfer function for the PID controller in the form of a polynomial equation:

𝐺𝐺𝑐𝑐 (𝑠𝑠) = 0.3018 𝑠𝑠 2 + 0.6 𝑠𝑠 + 0.2982

You might also like