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

ELE 4623: Control Systems: Faculty of Engineering Technology

This laboratory report describes a control systems experiment involving Bode plot analysis and gain compensator design. The experiment involves: 1. Deriving the open-loop transfer function of a DC motor position control system. 2. Performing Bode plot analysis of the uncompensated system to determine stability margins. 3. Designing a gain compensator to meet specifications of 60° phase margin and 3 dB gain margin. 4. Evaluating and comparing the step responses of the uncompensated and compensated systems. The results show the uncompensated system has a phase margin of 7.71° and infinite gain margin. After adding a gain compensator, the compensated system meets the

Uploaded by

Maitha Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

ELE 4623: Control Systems: Faculty of Engineering Technology

This laboratory report describes a control systems experiment involving Bode plot analysis and gain compensator design. The experiment involves: 1. Deriving the open-loop transfer function of a DC motor position control system. 2. Performing Bode plot analysis of the uncompensated system to determine stability margins. 3. Designing a gain compensator to meet specifications of 60° phase margin and 3 dB gain margin. 4. Evaluating and comparing the step responses of the uncompensated and compensated systems. The results show the uncompensated system has a phase margin of 7.71° and infinite gain margin. After adding a gain compensator, the compensated system meets the

Uploaded by

Maitha Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Faculty of Engineering Technology

Electrical Engineering Department

ELE 4623: Control Systems


LABORATORY WORK

LAB #06
Bode Plot and Gain Compensator Design

BY
Name: ID
Abdulla Sulaiman H00350247

Submission Date:
Instructor Name: Velmurugan
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.6

TITLE: Bode plot and compensator design/analysis


PURPOSE: Use Bode plot technique to analyze a given (control) system stability and design a gain
compensator to achieve desired stability margin (desired PM & GM).

Method:
1. Create a MATLAB script to create and plot Bode diagram of an LTI system.
2. Perform stability analysis of the system in frequency domain using the Bode plot technique
3. Design a gain compensator for a given performance specification.
4. Evaluate and compare the system’s step response performance for both uncompensated and
compensated system.
5. 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
Frequency response analysis involves the study of a system’s response to various input frequencies.
This study provides insight on the system gain and stability. For a given Linear Time Invariant
(LTI) system shown in Figure 1, let the input signal be a sinusoidal signal:
𝑥(𝑡) = 𝐴𝑖𝑛𝑠𝑖𝑛(𝜔𝑖𝑡 + 𝜑𝑖𝑛) (1) the output will be a sinusoidal signal:
𝑦(𝑡) = 𝐴𝑜𝑢𝑡𝑠𝑖𝑛(𝜔𝑖𝑡 + 𝜑𝑜𝑢𝑡) (2)
where 𝑨𝒊𝒏 and 𝝋𝒊𝒏 , are respectively the input signal amplitude and phase at frequency, 𝝎𝒊 , and
𝑨𝒐𝒖𝒕 and 𝝋𝒐𝒖𝒕 , are respectively the output signal amplitude and phase at same frequency, 𝝎𝒊 .

Figure 1: Block Diagram of a simple LTI system The


frequency response is obtained as follows:
• For each sinusoidal frequency, measure the change in magnitude and phase of the output
signal. Figure 2 shows a sample input and output frequency response.
• The output magnitude relates to the amplification of the system at that frequency.
• The output phase relates to the shift in time of the system at that frequency.
• A phase shift 0o means no time shift.
• A phase shift 180o means the output is inverted from the input.

Figure 2: Sample Frequency Response Plot

1.2 Bode Plot


A Bode plot is a chart of the system change in magnitude and phase over various frequencies. It
provides graphical description of a system frequency response characteristic. Given a closed-loop
system in Figure 3, the open-loop Bode plot of the system is obtained using the transfer function,
𝐺𝐻(𝑠). A typical Bode plot is shown in Figure 4.
Figure 3: Standard Closed-Loop System Block Diagram

Figure 4: A typical Bode Plot Here


are the key review points:
1. The Bode magnitude is displayed in decibels. Decimal (A) to Decibel(dB) relationship is
given as:
𝑑𝐵 = 20log10(𝐴) (3)
𝐴 = 10(𝑑𝐵⁄20) (4)
2. Phase Crossover Frequency: is the frequency at which the phase first reaches and crosses
180o
3. Gain Crossover Frequency: is the frequency at which the open-loop gain first reaches and
crosses 0dB (1).
4. Phase Margin, PM: is the degrees by which the phase is less than -180 o at the gain
crossover. In other words, at the gain crossover, how much phase may be added to reach
180o .
5. Gain Margin, GM: is the factor by which the gain must be multiplied at the phase crossover
to have a value of 0dB (1). In other words, at phase crossover, how much gain needed to
reach 0dB.
6. Bode plot is created from contribution of system’s gain (k), poles (p) and zeros (z).

G(s)  ksz1sz2szN (5)


s p s p s p 
1 2 M

1.3 Bode Plot and Stability Analysis


Bode plot provides both qualitative and quantitative stability condition of a dynamic system.
Qualitatively, a system is stable if:
• The gain is less than 0dB (1) at the phase crossover (at -180o), and
• The phase is less than -180o at the gain crossover (at 0dB)
Figure 5 and 6 are example of stable and unstable systems, respectively.

Figure 5: Stable system Figure 6 : Unstable system

Quantitatively, the system PM and GM values are indication of how much stability a system has.
This is a valid metric in comparing stability of systems, and specify desired stability for a given
application.
Here are the key points to note:
• The higher the margins (PM & GM), the better a system stability.
• More stability implies less oscillation / overshoot. This is due to direct relationship between
damping factor and PM.
• More stability may leads to less speed or slow transient response. This is a typical challenge
in control system design, and a drive for advanced compensator where necessary.

LAB Exercises
System Description:
The block diagram in Figure 2 below model a simple DC motor robot arm gripper position control.
Input , 𝜃𝑖𝑛(𝑠), is the desired robot arm position, and the output , 𝜃𝑜𝑢𝑡(𝑠), 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.

The system parameters are:


Amplifier gain, A 1
Motor field resistance, Rf 10Ω
Motor constant, km 550 N.m/Amp
Motor shaft inertial, J 1 kg. m2
Friction coefficient, b 1 N.m.s
Sensor gain, H 1

PARTA
Uncompensated Bode Plot Analysis
A.1. Derive the open loop transfer function (“GH” see equation (6)) of the above system
Step should be clearly shown for full mark.
A.2. Perform Bode plot analysis of the system (uncompensated, K=A = 1) using MATLAB.

A.2.1. Present the MATLAB Codes

syms A=1 s;

Rf=10
Km=550 J=1 b=1 H=1
num=A*Km*H;
den=sym2poly(s*Rf*(J*s+b));
sysOL= tf(num,den);
bode(sysOL)
[Gm,Pm,Wcg,Wcp]=margin(sysOL)
grid on title('Bode plot')

A.2.2. Show the Bode plot with indication of its PM & GM: [format, label, correctness and
neatness]
A.2.3. Provide stability analysis of the system stating PM and GM (minimum 50 words)

From the bode plot of compensated system It may be observed that the PM of the system
is 7.71 and GM is Infinity. With the Gain-compensator we can achieve the desired
performance. Also, the system is stable as Gain Phase crossover is negative for frequency.

A.3 Evaluate the closed-loop unit step response of the uncompensated system.

A.3.1 Present the MATLAB Codes

syms s;
A=1
Rf=10
Km=550 J=1
b=1 H=1
num=A*Km*H;
den=sym2poly(s*Rf*(J*s+b)); sysOL=
tf(num,den);
sysCL=feedback(sysOL,1)
step(sysCL)
title('STEP RESPONSE')

A.3.2 Show the system Step response plot: [format, label, correctness and neatness]
A.4 Determine the Uncompensated Step Response Performance parameters

PM GM Rise time Settling % Steady state


time overshoot error
Uncompensated 7.71 Inf 0.148 7.7 80.9 0
system

A.4.1 Provide performance analysis report (minimum 50 words)

As we can see from the step response, we can see that it is second order we find the phase
margin and the gain margin by using the code margin to the total gain and we got the phase
margin equal to 7.71 while the gain margin is infinite. The steady state is zero in this case.
PARTB
Gain Compensated Design Using Bode Plot Technique
Design Problem Statement (Design specifications):
Design and evaluate a gain compensator using the Bode plot technique to achieve the following
control objectives:
• Phase Margin greater than or equal to 45o (PM ≥45o) and at least 6dB gain margin
(GM ≥ 6dB)
• Overshoot less than or equal to 20%
• Rise time less than or equal to 15 seconds

Follow the steps below to perform this design task:


B.1 Design gain compensator using frequency response approach (Bode plot method) to achieve the
required performance specification, PM ≥45o
Hint: note that, this process is iterative to achieve both stability margin and time domain
performances. Use relationship between damping factor and PM to figure out range of desired PM
to target.

Design Steps

By trying different k and write the series code we find the k that will give as the right data
for the overshoot and the phase margin and the gain margin.

Show the uncompensated Bode plot with designed gain indicated [format, label, correctness
and neatness]
State the compensated Open loop transfer function with the gain-compensator (new transfer
function with the designed gain)

syms s; A=1
Rf=10
Km=550 J=1
b=1 H=1
num=A*Km*H
;
den=sym2poly(s*Rf*(J*s+b));
sysOL_uncomp= tf(num,den);
freq=0.8;
[mag,phase,wout]= bode(sysOL_uncomp, freq);
mag_dB=20*log10(mag);
K=10^(-mag_dB/20)
sysOL_compensated= K*sysOL_uncomp
figure
bode(sysOL_compensated)
grid on
title(['bode plot of compensated system'])

Show the compensated Bode plot with indication of its PM & GM [format, label, correctness
and neatness]
Observation/comment: : From the bode plot of compensated system It may be observed that the
PM of the system is now increased to 51.3° and GM is Infinity.

B.2 Evaluate the closed-loop unit step response of the compensated system (system with gain
compensator).

Present the MATLAB Codes (Note: Show your codes to the instructor.)

Rf=10Km=550
J=1 b=1 H=1 num=A*Km*H;
den=sym2poly(s*Rf*(J*s+b));
sysOL_uncomp= tf(num,den);
freq=0.8;
[mag,phase,wout]= bode(sysOL_uncomp, freq);
mag_dB=20*log10(mag); K=10^(-mag_dB/20)
sysOL_compensated= K*sysOL_uncomp
sysCL_compensated= feedback(sysOL_compensated,1) figure
step(sysCL_compensated);
stepinfo(sysCL_compensated);
title('step response')

Show the system Step response plot: [format, label, correctness and neatness]

Note: Show the result to the instructor.

Determine the compensated Step Response Performance parameters from the plot above

PM GM Rise time Settling % Steady state


time overshoot error
Uncompensated 51.3 Inf 1.61 8.03 16.8 0
system
B.3 Provide performance analysis report (minimum 50 words)

As we can see the data that has been given are achieved, we got the phase margin more
than 45 degree which is 51.3 and we got the gain margin more than 6db which is infinite and
the overshoot which is 16.8.

PARTC
Comparative Analysis
Compare and present comparative analysis of uncompensated and compensated systems in PartA
and PartB

C.1 Comparative Performance Data


PM GM Rise time Settling % Steady state
time overshoot error
Uncompensated 7.71 Inf 0.148 7.7 80.9 0
system
Compensated 51.3 Inf 1.61 8.03 16.8 0
system

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)
As we can see there is a large difference between the compensated and the
uncompensated the phase margin different is almost 70 degrees. Furthermore, the settling
time almost the same for both and the steady state error is zero for the uncompensated
while it is 0 for the compensated. From the figure we can noticed that the vibration on the
uncompensated part is large while on the uncompensated there are almost no vibration.

Conclusion (at least 20 words)

To conclude we can change the phase margin, overshoot and the rise time by
adding a gain k in series to the system as we did on this lab. The gain that we added was
a specific value that will give us specific data.

You might also like