ELE 4623: Control Systems: Faculty of Engineering Technology
ELE 4623: Control Systems: Faculty of Engineering Technology
LAB #08
Phase Lag Compensator Design and
Evaluation
BY
Name: ID
H00350247
Abdulla Sulaiman
Submission Date:
Instructor Name:
GENERAL INFORMATION AND GUIDE
This Lab manual should be used together with the class notes/lecture.
Each student / group should work independently; direct copy of work will be highly
penalized according to the HCT policy.
For group work, contribution of each member of the team should
You are advised to follow the guide provided here for smooth and timely completion
of the experiments.
The following should be noted regarding the report format:
Prepare the report in softcopy, and upload in the appropriate BBL
section.
Diagram/Picture should be neatly and clearly prepared in the report.
For the text font, use 12 points, Time New Roman and double
spacing.
Lab. demonstration of the experiment will be assessed during the Lab. session. See
rubric for the assessment in the BBL.
Report submission due date : check the announcement on the course BBL
Assessment Approach per each experiment:
Report: 60% (see report rubric)
Demonstration: 40% (see practical/simulation rubric)
ELE 4623 Lab No.8
PURPOSE: Design Phase Lag for an LTI system to achieve a given set of control objectives.
Method:
1. Design Phase Lag compensator analytically using frequency response technique.
2. Create a MATLAB script / SIMULINK diagram to evaluate the uncompensated and
compensated system performances: stability and time domain response performances.
3. Present and discuss the performance results comparatively.
4. Prepare report
Lab resources:
1. Computer systems /Laptops
2. MATLAB software
Expected Outcome:
1. Sample of MATLAB mfile and SIMULINK block
2. Results of system responses
3. Report submission
1.1 Background
In control system, compensation refers to design changes in the control system to improve the
system performance. It involves designing and adding extra sub-system known as compensator (or
controller) to achieve specific control objectives.
Figure 1 shows a standard closed-loop control system with and without compensator. In the figure,
compensator, C, plant, G, and feedback gain (sensor), H.
(a) (b)
Figure 1: Standard Compensated Closed-Loop System Block Diagram (a) uncompensated (b)
compensated)
Control objectives (specifications) are aimed at improving (i) stability and (ii) time domain
response requirements. The breakdown is as follows:
Stability: stability requirement is given in terms of desired Gain and Phase margins.
Generally, GM of at least 6dB and PM between 45 and 65 degrees are common in practical
application.
Time domain response: this is usually given with respect to step response performances,
which rise time, percentage overshoot, settling and steady state error. Actual values depends
on application requirement.
There are several types of compensator ranging from classical controllers to modern and advanced
controllers. For the purpose and scope of this study, the following are the common classical
compensators:
Gain compensator
Pole/Zero compensator
Phase Lead compensator
Phase Lag compensator
PID compensator
The first two compensators were covered in the previous LAB assignments (refer to LAB 5 & 6), in
this LAB, focus will be on Phase Lag compensator. Its characteristics and design steps provided in
the next section.
1.2 Phase Lag Compensator Design Procedure
Phase lag compensator is one of the common approaches in phase compensation technique. It is
used to provide negative phase to the open-loop gain.
Key characteristics of Phase Lag compensator
Transfer Function
Design form:
1+ τs
C ( s) = (1)
1+ ατs
Zero-pole-gain (zpk) form
Simplify equation (1) to obtain the following zpk form of the phase lead
compensator:
k (s + z)
C ( s) = (2)
(s + p)
where the gain, k =α , the zero, z=1/ τ , and the pole, p=1 /ατ
For phase lead, the magnitude of zero is greater than the magnitude of pole, i.e. |z|>| p|
According to equation (2), phase lag adds a zero and a pole to the system transfer function.
The frequency response of a phase lead compensator is shown in Figure 2 :
Design Procedure
The goal of the Phase lag compensator design is to determine the appropriate values of the
compensator parameters, α and τ , in equation (1) to achieve the specified control objectives. The
control objective in this approach is given in terms of the desired phase margin, PM desired . The
following are the design steps:
1. Determine the frequency known as the new cross over frequency, ω new , where the PM desired
would be obtained if the gain was 0dB at this frequency.
How?
Obtain the frequency (ω new ) point on the uncompensated Bode plot where phase is
equal to:
o
−180 + PM desired (3)
2. One decade below ω new is reciprocal of theτ . That is:
ωnew 1
= (4)
10 τ
Use the above equation (4) to calculate the .
3. Determine the gain, k ω , at the ω new from the uncompensated Bode plot to ensure the
new
compensated system crosses at this frequency. Then apply the relationship below to
determine the value of the α .
k ω =−20 log 10 (α )
new
(5)
1
τ= (6)
ωnew √ α
4. Substitute the values of α and τ , in the equation (1) to determine the compensator transfer
function.
LAB Exercises
System Description:
The block diagram in Figure 2 below model a simple DC motor robot arm gripper position control.
Input , θ¿ (s) , is the desired robot arm position, and the output ,θ out (s), is the actual robot arm
position. Position sensor, H, measure the actual position for the feedback system.
Figure 2: Block Diagram of a DC Motor robot arm gripper position control system.
Design Problem statement (Design specifications): Design a Phase Lag compensator to achieve
the following control objectives:
Phase margin greater than or equal to 45 o ( PM≥ 45 o) and at least 6dB gain margin
(GM)
Overshoot less than 15% (OS < 15%)
Rise time less than or equal to 0.5 second ( t r ≤0.5 sec .)
Settling time less than or equal to 1 second ( t s ≤1 sec .)
Then evaluate and compare the compensated and uncompensated systems performances.
Show your MATLAB files and result to the instructor for review and assessment during the
LAB.
PARTA
Uncompensated System Analysis
Analyze the uncompensated system performances:
Frequency response using Bode plot, get uncompensated PM and GM.
Step response analysis: get the OS, settling time, rise time and steady state error.
Write brief observation on the uncompensated stability margins, %overshoot, rise time and
steady state error.
A.1. Derive uncompensated the open loop and closed-loop transfer function of the above system
Step should be clearly shown for full mark.
MATLAB Codes:
clc;
clear;
close all;
A=1;
J=1;
b=1;
Rf=10;
km=550;
H=1;
num=[km];
den=[Rf*J Rf*b 0];
sys= tf(num,den);
sysOLT=A*sys*H
bode(sysOLT)
margin(sysOLT)
Bode Plot
A.3 Closed-loop step response plot
MATLAB Codes:
clc;
clear;
close all;
A=1;
J=1;
b=1;
Rf=10;
km=550;
H=1;
num=[km];
den=[Rf*J Rf*b 0];
sys= tf(num,den);
sysOLT=A*sys*H
bode(sysOLT)
margin(sysOLT)
sysCLT=feedback(A*sys,H)
figure()
step(sysCLT)
stepinfo(sysCLT)
s=1;
[y,t]=step(s*sysCLT);
ess=abs(s-y(end))
For our uncompensated system we found that the system is stable because the Gm and Pm are
positive and the Wpc>Wgc So the system will be stable. The speed response we can observe
from stepinfo() the time parameters we can see that the rise time is 0.1481 with an overshoot of
80% because the system is in open loop.
PARTB
Phase Lag Compensator Design and Evaluation
Design a Phase Lag compensator to achieve the above objectives (use the space provided in
below to report the design, you can attach any additional materials at the appendix)
1+ τs 1 ωnew 1
C ( s) = k ω =−20 log 10 (α ) τ= =
1+ ατs new
ωnew √ α 10 τ
B.2. Derive compensated (with compensator designed in B.1) open loop and closed-loop transfer
function of the system.
MATLAB Codes:
clc;
clear;
close all;
A=1;
J=1;
b=1;
Rf=10;
km=550;
H=1;
num=[km];
den=[Rf*J Rf*b 0];
sys= tf(num,den);
num1=[14.9 1];
den1=[940 1];
sys_cs=tf(num1,den1);
sysOLT=A*sys_cs*sys*H
figure()
bode(sysOLT)
figure()
margin(sysOLT)
sysCLT=feedback(A*sys_cs*sys,H)
step(sysCLT)
stepinfo(sysCLT)
s=1;
[y,t]=step(s*sysCLT);
ess=abs(s-y(end))
Bode Plot
The compensated system had an overshoot of 22.96% because of the feedback and the step response
is slowed which can be observed from the settling time and rise time. After compensation the
system had less oscillation compared to uncompensated system.
regarding the stability of the bode plot the open loop of the system is stable thus the closed system
is stable.
PARTC
Comparative Analysis
Compare and present comparative analysis of uncompensated and compensated systems in PartA
and PartB
C.2. Comparative step response plots: provide step response plots of both compensated and
uncompensated systems on one graph
C.3. Comparative analysis: provide comparative report of both systems (minimum 50 words)
We can see improvement in the step response of the system as it had less oscillation which lowers
the steady state error, the overshoot has been reduced significantly after compensation.
The only disadvantage after compensation is the system speed as both the rise time and settling time
has been increased, this effect can be adjusted by recalculating and adding safety factors.
Conclusion (at least 20 words)
In conclusion, how much overshoot we want and the rise time can be determined while we are
calculating the zeroes and poles of the compensator. Exact numbers can not always be obtained so
there sometimes has to be some readjustment.
Reference Materials:
(Provide reference to all materials used in this assignment