contents introduction workshop logbook logbook organization dates for
Search for question
Question
Contents
Introduction
Workshop logbook
Logbook organization
Dates for mini-test
Login access to PCs in the control lab
Analysis of Open Loop Systems
Open loop system definition
2nd order canonical model
Derivation of Poles
S-plane geometry
Open Loop investigation
Matlab/Simulink
Open_loop.slx Model
System 1 calculations
How to define a Transfer function in Simulink
System 2 calculations
Systems 3,4,5,6, Table 1 and conclusions
Final value theorem (open Loop)
How to determine the Characteristic equation from Poles
Model Approximation
3rd order to 2nd order example
4th and 5th order to 2nd order exercises
Analysis of Closed loop systems using Root Locus
Closed loop system definition
Simulation of closed loop systems using Closed_loop.slx model
Closed loop system results and Table 2
Final Value theorem for closed loop system
Root locus plots ......
Forward path compensators
Frequency Response Analysis (Open loop)
Straight line asymptotic approximation
Calculation of Log gain
Calculation of Phase angle
Investigation into sketching bode plots and verifying with Matlab
Open loop frequency response
Closed loop frequency response
Exercises to determine Gain margins
Exercise to determine Phase margins
System identification from Bode plots
Page 1 of 33
Page
12
17
19
14
23
2
27
32
3
Simulink models for workshop exercises can be
downloaded from your Moodle site.
Please note that MATLAB is available for download from
a link on your Moodle site. Introduction
The Principles of control workshop is designed to support and provide a practical application of the
theory taught in class. The contents of this document are an introduction to basic control theory and
involve application of mathematics to control systems. The mathematics covers Complex numbers,
second order/ higher order Quadratic/polynomial equations and how to calculate their Roots and
Pythagoras theorem. The workshop exercises will be coupled with demonstrations by Technical staff
where necessary.
Students are expected to be familiar with the basic maths theory and it is your responsibility to revise if
you have forgotten. The time spent in the lab must be used efficiently to bring you up to date and ready
for a Mini Test.
Workshop Logbook and Mini Test
The workshop practice carries 30% of the total module mark. The mark is divided between the
logbook (15%) and the Mini test(15%). The final exam will carry a mark of 70% to bring the total mark
of the module to 100%. Both the logbook and the test must be passed in order to get full marks for the
Module. It is not possible to pass the module without the workshop mark. This should make it
absolutely clear to you how important the workshop is.
Logbook organization
The logbook is a complete record of the all the work that you do in the workshop. It must be properly
labelled with your Name and ID number, your Supervisor's name, your course code and course title, the
laboratory number T405 and properly maintained with dates and contents page with titles of the topics
covered as you progress through the semester. The work should include all calculations, graphs and
conclusions, necessary to obtain the marks due for each topic. It must be intelligible and easy to read
with neat hand writing. Each page must be numbered and all pages must be written into. DO NOT leave
blank pages in your logbook. Your supervisor will sign your logbook every week at the end of the
session to confirm that you have carried out the exercises. DO NOT write on separate pieces of
paper and later copy them in the logbook. This will be observed very strictly in the workshop.
Your logbook will be marked by your Supervisor only and not by Technicians
If the supervisor is unable to read your hand writing or understand your results or graphs, then you will
get a mark of Zero for the topic or questions. You should always make comments about your results,
especially, calculations and graphs. Graphs should be sketched by hand. It is not necessary for these to
be to scale but a clear approximation. DO NOT copy and paste images. Printed copies of graphs will
not be accepted.
You will use your logbook to revise for the mini test. Therefore, it is absolutely imperative that your
logbook should be up to date. Write your work as you progress in the workshop.
Date for the Mini test
The date of your mini test is given in your Module guide. The logbook should be handed into the faculty
office(in your supervisor's name) on the date given in the module guide. You must obtain a receipt for
the logbook from the faculty office.
Login access, Health and safety in the Control Laboratory
Please note that your LSBU Password will not work in this laboratory. A common password will be
given to you by staff. Audio and Video recordings and taking photographs are not allowed. Eating
and drinking is not allowed in any lab or workshop throughout the university.
Do not touch, move or interfere with any equipment in the lab.
Page 2 of 33 Open Loop system definition
An open loop system is a system in which the output is not controlled, but only observed. In open loop,
a system's output response is measured and analysed in response to an input excitation signal. A system
can be represented using a standard mathematical model known as the Second Order Canonical transfer
function as shown below:
ANALYSIS OF OPEN LOOP SYSTEM
RELATIONSHIP OF POLE LOCATION TO TRANSIENT RESPONSE
A second order system can be modelled by the following canonical transfer function:
U(s)
Y(s)
G(s) =
Y(s)
Koo²
=
U(s) s² +25@₂s+w²/
Where, is the damping ratio and on is the undamped natural frequency and K is the system
Gain or amplification, also known as the DC-Gain. The input signal is U(s) and the output signal
Y(s). The Ratio between the Output and Input is called the Transfer function G(s).
In any system, there exists resistance/friction or viscosity, termed Damping and is represented by
(Zeta). If damping is removed, the system becomes undamped and the system is free to oscillate with
simple harmonic motion at its natural resonant frequency w, (Omega-n).
The denominator polynomial (also called the characteristic polynomial) is second order with roots
which may be real numbers or Complex and are termed Poles. If the numerator contains roots, these are
termed Zeros. A Zero may also have real or complex values. The values of the Poles and Zeros and
their interaction determine the systems behaviour.
Real Axis
Therefore to find the Poles/roots of the characteristic equation, the denominator is set equal to
zero and the equation is solved: s²+25w₁s+w²2²=0
As the polynomial is second order, we expect to have two Poles whose real or complex values are
plotted on real and imaginary axes, which in control theory, is termed the S-plane. The relationship
between the coefficients of the characteristic i.e the parameters and @,, are shown below on the
S-plane. The complex roots (poles) are at locations
S-Plane
50 n
@n
Κω
s²+250,s+0
0
Imaginary Axis
(0,0)
√1-5²
joo, √√1-2²
s=-5w₁ ±ja, √1-5²
S=
The distance of each pole from the origin(0,0) of
the s-plane is an (undamped natural frequency)
The angle 0 made by each pole is such that
the damping ratio = cos
Page 3 of 33 Derivation of the Poles
Since the characteristic equation is a second order equation, the standard solution for the Poles can be
expressed in terms of its coefficients as s²+25w,s+w=as² +bs + c = 0
- b ± √b² - 4ac
The solution is: $1,2
2a
Where, a=1, b=25@,,, and c= w. Substitute these into the solution we get:
-250, ± √(250)² - 4w/
2
$1,2
Take the square-root of 4 and we get:
- 25w₁ ±2w₁ √5²-1
2
$1,2 =
Therefore, the Poles are s=-
S-Plane geometry
Real Axis
S-Plane
Now rearrange √2-1 to @√√-1(-5² +1), then the imaginary part of the Poles will be
00₁,√-1√√1-5².
Then the √1=j i.e the imaginary component followed by its coefficient √1-5².
- 50 n
"
@₂
$1,2 =
s=-5w₁ ±jw√√1-5²
8
-250 ± √√45²²-40²/ -250 ± √√40² (5²-1)
11
2
اع - الهز
(0,0)
2
- jo, √₁-5²
Real Axis
=
H
, $1.2
=
Page 4 of 33
S-Plane
The Right angle Triangle defined by the sides AOH has side lengths which are:
A 500,
A = 50₁, 0=0,√√1-5² and H=@₁. Then cos(0)=
@₁
The length of side H can be calculated using the Pythagoras theorem: H = √√² +0².
√A² +0².
H
0
8
(0,0)
-=, therefore cos(0) = 5.
Therefore, @,,= √
Note: Pole locations are indicated on the S-plane by the letter 'x' and Zeros by the letter 'o'. Open Loop Investigation
In the Open Loop analysis part of the investigation, six different open loop system models will be tested
to examine their responses using Matlab and Simulink models.
Investigation requirements
the
The workshop investigations for all systems include calculation of the Parameters K, , ,,
Systems Poles, the Value of the system's Steady-state output, a sketch of the system's response from the
Scope and a sketch of Pole positions on the S-plane. Finally for each system a short comment should be
written to describe its behaviour based on the values of the Parameters and Pole Locations. In the
following examples, you will be shown how to calculate the parameters for each system. As you
calculate the parameters for each system, fill in the data into Table 1 on page 9.
How to run Matlab/Simulink
On the Desktop, you will find the Icon for Matlab 2014a. Double click the Icon and wait for Matlab to
run. The following screen will be displayed:
MATLAB R2014
HOME
Open
PLOTS
Details
Ready
FLE
44442CUsers
Find Fles
Compare Import Save
Current Folder
Name
POC
Control Engineering
Bytronic MAB
APPS
Data Workspace
New Varable
Open Variable
Clear Workspace
SASABLE
CONTROL Documents MATLAB
O
Command Window
Analyze Code
Ran and Time
Clear Commands
CODE
Preferences
Simulink Layout Set Path
Library
SMULINK
DWPONMENT
This is a Classroom License for instructional use only.
Research and commercial use is prohibited.
>> |
Hele
Community
Request Support
+Add-Ons-
RESOURCES
Page 5 of 33
Search Documentation
The default Matlab folder shows a number of sub-folders as shown in the Folder view. You are required
to work in the POC folder only. Double click the folder and locate the filename Open_loop.slx. Double
click it to load the Simulink Model. The following windows are displayed:/n Straight line Asymptotic approximations
It is possible to sketch Asymptotic approximations of the system's frequency response using the above
equations 9 and 10. Then for the transfer function the LogGain of the Numerator expression is divided
by the LogGain of the Denominator expression.
If the system is:
10
G(s)=-
(s+10)
LogGain of G(S) in dB = 20log|numerator-20log|deno min ator
Since the numerator or the denominator can be complex numbers, then their magnitudes can be
expressed as:
G(s):
a + jb
c+ jd
If
Log Gain Calculation
Therefore, the magnitude of the numerator is numerator = √a² + b²
And the magnitude of the denominator is deno min ator = √² +d²
Reminder:
If
X
Z=-
y
z = x*y
10
s+10
0= tan
then log(z) = log(x) -log(y)
LogGain of G(S) in dB = 20 log √a² + b² -20log √² +d²
Substitute the values of a=10, c=10 and jd = s = @
LogGain of G(S) in dB = 20Log√10² -20log √² +10²
⇒Gain(dB)=20-20log √²+10²
Phase angle Calculation
The phase angle for numerator and denominator can be expressed as:
b
0
= tan [-]-tan [²]
C
-1
a
0
10
⇒Phase(0)=0-tan
where, jb=0 in this case since the s-term is missing in the numerator.
log(z) = log(x) + log(y)
tan
-1
@
10
-1 @
10
equation 11
equation 12
Therefore, as the constant terms or the s-terms in the numerator / denominator are multiplied or divided
their logarithmic values are added or subtracted respectively. The phase angles of the individual terms
are also calculated in the same way, where the phase angle of terms multiplied are added, and phase
angles of terms which are divided in the expression are subtracted for each term.
Page 25 of 33 Tabulating the results for frequencies of 0.1, 1, 10, 100 and 1000 we can obtain an approximate
response and plot these using straight line asymptotes as shown below:
Gain(dB) = 20-20log √² +10²
(ap) aprique p
Phase (deg)
0.1
1
10
100
1000
Output flat until Break
frequency
-3db
-20
-40
Bode Diagram
Output-3 dB at break
Frequency=10 rads/s
Phase angle starts to fall a
decade before the Break
frequency
Output drops at 20dB/decade after
break frequency
10
Frequency (radisec)
Phase(0)
Phase angle = -45 at
break Frequency =10
rads/s
=-tan
0
-5.7
-45
-84.3
-89.4
Page 26 of 33
Straight line Asymptotic approximation
-1
@
10
On the next page the system can be simulated over the full frequency range using Matlab commands. INVESTIGATION INTO SKETCHING BODE PLOTS AND VERIFYING WITH MATLAB
PREDICTIONS
10
sketch the straight-line asymptotic Bode-plot and verify using Matlab.
(s+10)'
The following command must be entered from the Matlab command window at the prompt >>.
It defines the transfer function(tf-command) for G(s) as the variable g.
A. Given G(s) =
>>g = tf([10], [1 10])
The following is the Bode command which plots the transfer function response for g and also plots
a grid in the graph.
>>bode(g),grid
You should see this bode plot
10
s + 10
(gp) apri
Phase (deg)
-10
-90 Q.1. 0,2.03.
10
(increasing
(0)
Bode Diagram
10
10
Frequency (radisec)
-3 dB -ve attenuation at Break
frequency w 10
Phase angle(-45) at Break
frequency w=10
Plotted on a logarithmic scale
100
200 300
1000
10²
The Bode plot is divided into two parts. The top part is a plot of the dB gain values on its linear vertical
axis. The horizontal axis is a plot of all the w frequency values in radians/sec. The horizontal axis has a
Logarithmic scale. Look at the horizontal axis. The frequency values start from 0.1, 0.2 and increment
up to 1, then increment by 10 to 20, 30 then increment by 100 to 200, 300 etc up to 1000. As the
numbers increase at each stage the scale also shrinks. This is known as a Logarithmic scale increasing in
Decades.
The Bottom part of the graph is the Phase angle plot with the angles on its linear vertical axis plotted
against the frequency values in Decades. Now look at the system's response. The system Gain in dB
starts with a flat response until it reaches the Pole location S=-10. This is known as the Break Frequency
of 10 in this case. You will notice a sudden drop in the dB gain from 0 down to -3 dB. This is indicative
that the system has a Pole at this frequency with the value of 10.
Page 27 of 33 From the Bode plot answer the following questions:
Q1: What is the break frequency?
Q2: If the input signal is a sinusoid of amplitude 1 volt at frequency of 1 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
Hint: Read the dB gain of the system by right clicking the mouse at 1 rads/s on the Gain plot and
substitute the dB gain in equation 8 on page 24. Similarly, read the phase angle value
directly on the phase plot at 1 rad/s. Repeat the same procedure for the following exercises.
Q3: If the input signal is a sinusoid of amplitude 1 volt at frequency of 10 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
If the input signal is a sinusoid of amplitude 1 volt at frequency of 100 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
Q4:
sketch the straight-line asymptotic Bode-plot and verify using MATLAB.
B. Given G(s) =
s+10
S+100
g= tf([1 10], [1 100])
bode(g),grid
% this line creates a transfer function G(s)
% this draws the Bode plot
From the Bode plot answer the following questions:
Q1: What are the break frequencies?
Q3:
Q2: If the input signal is a sinusoid of amplitude 1 volt at frequency of 1 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
If the input signal is a sinusoid of amplitude 1 volt at frequency of 100 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
Q4: If the input signal is a sinusoid of amplitude 1 volt at frequency of 1000 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
1000
(s+10)(s+100)
C. Given G(s) =
prediction.
Q1: What are the break frequencies?
Q3:
Q2: If the input signal is a sinusoid of amplitude 1 volt at frequency of 1 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
If the input signal is a sinusoid of amplitude 1 volt at frequency of 100 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
Q4: If the input signal is a sinusoid of amplitude 1 volt at frequency of 1000 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
sketch its straight-line Bode diagram and verify with a MATLAB
1
s(s+1)
D. Given the transmittance G(s) = -
MATLAB prediction.
Q1: What are the break frequencies?
Q2: If the input signal is a sinusoid of amplitude 1 volt at frequency of 0.1 radian/second, what is the
amplitude of the output signal? What is the phase angle between the output and input signals?
Q3: Is the system stable?
sketch its straight-line Bode diagram and verify with a
Page 28 of 33 Closed loop Frequency response demo program
So far we have only considered open-loop plants. When we close the loop with a compensator H(s) in
the feedback path and a gain Kp in the forward path we are interested in predicting the additional gain
that could be applied before instability results.
We can do so by plotting the Bode-plot for the transmittance product GH (called the Open-loop product)
and measuring the Gain Margin (GM). This is equivalent to the Critical gain in time domain i.e the Gain
at which the system becomes unstable. First find the Gain Cross Over Frequency (GMF). This is the
frequency at which the phase angle of GH is ± 180 degrees.
At the cross over frequency, the Gain Margin (GM) is the additional gain (in decibels) necessary to
make the amplitude of GH unity (i.e. 0 dB). Start your investigation by predicting the Gain Margin
(GM) of the following systems. We will find the Phase Margin later with other examples.
Type the following command >> margin_gui in the MATLAB Command Window to run a demo that
shows system stability and its link with GM and PM. Wait for a few seconds for Matlab to do its
calculations, then it will display the following window. Use the slider to vary the gain Kp from zero to
max value.
Gain and Phase Margin Analysis
File Edit View Insert Iools Desktop Window Help
Magnitude (dB)
(6ap) asend
60
40
20
0
-20
-40
-60
-45
-90
-135
-180
-225
10
Open Loop G-K
10°
Frequency (rad/sec)
10
Amplitude
Closed-Loop Step Response
1.5
0.5
10
Time (sec)
Gain Margin: 8.8 dB
Phase Margin: 45 deg
Closed-loop Stable? Yes
20
Page 29 of 33
Feedback Loop:
G(s) =
K-G
0.1
Loop Gain K:
0.5 s +1.3
s+1.2s²+1.6s
1
X
Close
10
This demo plots the system time response and the bode plot simultaneously and allows you to vary the
Proportional Gain Kp to observe the system's response. The system has 1 Zero and 3 Poles. Vary the
Gain of the system and observe the response, particularly the Gain and Phase margins. Make notes in
your logbook about your observations.