0% found this document useful (0 votes)
10 views21 pages

MECH0023 Week 03 Notes

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

MECH0023 Week 03 Notes

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

MECH0023

DYNAMICS
&CONTROL

PART 03
Closed Loop Control &
Root Locus Techniques

View and edit this document in Word on your computer, tablet or phone.
Where you see this sign you need to enter your own thoughts, examples, or complete some
working-out. You can edit text and insert content such as pictures, shapes and tables.
CONTENTS
1. M easuring and Optim ising P erform ance Using the s-plane. .............................. 3
Parameters changing .................................................................................................... 3
2. Controlling R oot P osition & P erform ance .......................................................... 4
Example 1: UAV directional control model .................................................................... 4
UAV Block Diagram, OLTF & CLTF ................................................................................. 5
Plotting the Roots of the Characteristic Equation ......................................................... 5
3. P lotting a R oot Locus: Fundam entals ................................................................ 7
Root Locus Fundamental Concepts and Assumptions ................................................... 7
4. Controlling the Characteristic Equation w ith k .................................................. 8
5. Sketching a R oot Locus: Start and End P oints ................................................... 9
6. Sketching a R oot Locus: P aths ......................................................................... 10
OPTIONAL DIGRESSION ABOUT COMPLEX NUMBERS ................................................ 10
Identifying locus paths from the Angle Criterion ........................................................ 11
Examples of the angle criterion .................................................................................. 12
Root Locus on the Real Axis ........................................................................................ 12
Roots leaving / joining the real axis ........................................................................... 13
Examples of root locus before and after adding a controller pole or zero: ................. 14
“Before control” .......................................................................................................... 14
“After control” ............................................................................................................. 14
7. Controller Design .............................................................................................. 15
Start with the “Plant” ................................................................................................. 15
Open Loop Control ...................................................................................................... 15
Closed Loop Control .................................................................................................... 16
Closed Loop Example: Steering a car (manually) ........................................................ 16
Closed Loop Example: Liquid Level Control................................................................. 17
Mechanical Feedback Examples .................................................................................. 18
Disturbance and Measurement Noise ......................................................................... 19
Multi-loop systems ...................................................................................................... 20
8. Using the R oot Locus to Design Controllers ..................................................... 21
MATLAB Exercise: DC Motor Inductance is Negligible?............................................... 21

2
1. Measuring and Optimising Performance Using
the s-plane.
Week 2 demonstrated that a system’s behaviour can be visualised quickly by looking at an s-plane
plot. We also saw that if a parameter (e.g. mass, or damping) changes, we can identify its effect by
looking at the changes to pole positions on the s-plane.

Parameters changing

Fuel is stored in the wings. For a good reason:…

When it takes off, the wings are full of fuel: heavy. Then just before landing it is much
lighter. How might that affect the handling? …

There are many reasons why things might change. s-plane analysis can identify whether the
changes are significant, detrimental, dangerous…
In this section we look at closed loop control and how we can design to include a variable which we
can adjust to move the closed loop system’s pole positions to give the optim um perform ance .

3
2. Controlling Root Position & Performance
Example 1: UAV directional control model
Here we’re going to look at an example of optimising a system’s performance by controlling a
parameter: in this case, a controller gain. We’re going to use the s-plane to view the positions of
the system’s roots and identify the best position, as well as any situations to avoid – i.e. instability.
This model of a UAV takes the form of a fixed-wing plane. It has control surfaces (‘flaps’) on the
wings and tail fin which act to change its direction of motion: yaw, pitch and roll are the three
perpendicular axes of rotation. In this example we’re going to focus on pitch. In practice, the yaw,
pitch and roll motions are coupled: changing one angle affects the others; however in this example
we’re assuming that pitch can be controlled independently.

The pitch control scheme for the UAV has been measured in wind-tunnel testing and can be
described by the following equations:

(i)
Where θ0(s) = angular position of UAV axis
δ (s)= relative control surface angle
k1 = gain constant

(ii)

Where k2 = autopilot gain


τ = autopilot time constant
θe(s) = error in angular position of UAV axis

Our challenge: Plot the closed loop roots when ωn = 8 rad/s; ζ = 2.0; τ = 0.1s; k1 = 2.0
and k2 can be adjusted.

4
UAV Block Diagram, OLTF & CLTF
Drag these labels into the correct places on the block diagram:

k2 1+τs θi(s) θe(s)

2
+ δ(s) k1ωn θo(s)
2 2
- s + 2ζωns + ωn

𝛩𝛩𝑜𝑜 (𝑠𝑠) 2
𝑘𝑘1 𝑘𝑘2 𝜔𝜔𝑛𝑛
The open loop transfer function is G(s) = = 2�
(1+𝜏𝜏𝜏𝜏)�𝑠𝑠2 +2𝜁𝜁𝜁𝜁𝑛𝑛 𝑠𝑠+𝜔𝜔𝑛𝑛
𝛩𝛩𝑖𝑖 (𝑠𝑠)

𝛩𝛩𝑜𝑜 (𝑠𝑠) 2
𝑘𝑘1 𝑘𝑘2 𝜔𝜔𝑛𝑛
The closed loop transfer function is F(s) = = (1+𝜏𝜏𝜏𝜏)�𝑠𝑠2 2 �+...𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ℎ𝑒𝑒𝑒𝑒𝑒𝑒 ...
𝛩𝛩𝑖𝑖 (𝑠𝑠) +2𝜁𝜁𝜁𝜁𝑛𝑛 𝑠𝑠+𝜔𝜔𝑛𝑛

So the characteristic equation is:


𝜏𝜏𝑠𝑠 3 + (1 + 2𝜁𝜁𝜁𝜁𝑛𝑛 𝜏𝜏)𝑠𝑠 2 + (2𝜁𝜁𝜁𝜁𝑛𝑛 + 𝜏𝜏𝜏𝜏𝑛𝑛2 )𝑠𝑠 + 𝜔𝜔𝑛𝑛2 (1 + 𝑘𝑘1 𝑘𝑘2 ) = 0

Plotting the Roots of the Characteristic Equation


Finding the roots of this 3rd order polynomial? Let’s use MATLAB.
The main (only?) important thing we can easily see from the characteristic equation is that it
contains k2 which is the thing we can control. So: if we can control the coefficients of the
characteristic equation, we can control the roots of the characteristic equation. And if we can
control the roots that means we can control the performance of the system!
MATLAB is the most useful tool at this stage for displaying the roots and updating their positions for
different values of k2 that we might choose. You might like to edit & paste some of the following
into MATLAB’s command window, or create an m-script…
% setup the parameters
wn = 8; zeta = 2; tau = 0.1; k1 = 2;
k2 = 1; % This is our controller gain – change this value as you like
% Create the Closed Loop Transfer Function (using the equations above)
CLnum = k1*k2*wn^2;
CLden = [tau (1+2*zeta*wn*tau) (2*zeta*wn+tau*wn^2) wn^2*(1+k1*k2)];
% Create new figure windows and plot the pretty pictures!
figure; pzmap(CLnum,CLden)
figure; step(CLnum,CLden)

5
Here are some example plots of the Closed Loop root positions (Left) and the corresponding step
responses (Right). Note the steady-state value as well as the initial transient response.

The following plot overlays the root positions for several values of k2 up to 20 (which is unstable).
(Keep in mind this previously-
shown ‘map’ of root positions to
their responses)

Space for your notes – annotate the plots?

6
3. Plotting a Root Locus: Fundamentals
In the UAV example above, as we changed the autopilot gain (k2), we calculated the positions of
the closed-loop transfer function’s roots each time and found that each root moved along a path – a
“locus” – on the s-plane.
These loci * tell us the “parameters of the possible” for a closed-loop system:
• Will it be able to respond fast enough?
• Will it show oscillations in its response? Or even become unstable?
• Can a controller actually stabilise an inherently unstable system?

Root Locus Fundamental Concepts and Assumptions


The questions above are very relevant for many systems. They could be answered by repeatedly
calculating the closed loop root positions for many values of gain, like we just did.
OR, we can use shortcuts to sketch the root locus without having to calculate the Closed Loop
Transfer Function at all. That’s what root locus techniques are all about.
ALL root locus techniques are based on this generic model of a closed loop system.
H(s) gives the option to represent a sensor if it has a gain other than 1, or if it has a lag.
Gain is shown explicitly as “k”:

The Open Loop Transfer Function (OLTF) is: Type the OLTF here

𝑌𝑌(𝑠𝑠) 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑡𝑡ℎ𝑒𝑒 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 ℎ𝑒𝑒𝑒𝑒𝑒𝑒


The Closed Loop Transfer Function (CLTF) is: =
𝑅𝑅(𝑠𝑠) 𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑡𝑡ℎ𝑒𝑒 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 ℎ𝑒𝑒𝑒𝑒𝑒𝑒

*
The plural of locus is loci

7
4. Controlling the Characteristic Equation with k
The behaviour of any dynamic system is defined by its closed loop characteristic equation.
Here’s the characteristic equation of the generic closed loop model:

This is comprised of 1 plus the OLTF. It will always have this format for the closed loop model. So
for Root Locus analysis there’s no need to calculate the whole Closed Loop Transfer Function.
Now we’re going to look in detail at the OLTF to see how k changes things… (NB all the following
equations are exactly the same relationship, just rearranged into different ways of looking at it).
G(s)H(s) generally has the form of a fraction (a ‘quotient’)
with a polynomial numerator which we can call N(s)
and a polynomial denominator which we can call D(s).
Reminder: The roots of the OLTF numerator N(s) are the
zeros of the open loop system.
Reminder: The roots of the OLTF denominator D(s) are
the poles of the open loop system.
Reminder / maybe you haven’t noticed yet: just thinking
about the OLTF, changing k doesn’t affect the positions of
the poles or zeros. It’s only when you close the loop that
k is able to change the positions of the CLTF.
After a bit of re-arranging, this last form of the
characteristic equation is quite useful to see how k can be
used to change the positions of the closed loop roots.

8
5. Sketching a Root Locus: Start and End Points
Generally for Root Locus plotting, we assume that k can vary all the way from 0 to infinity. Of
course in practice there will be limitations to k, but this gives the fullest possible prediction of the
closed loop performance.
We will use the characteristic equation in this form to investigate the
“start” and “end” points when sketching root locus plots. These just
correspond to the ends of the locus lines: they are not really the
beginning or end of anything.
When k = 0 the characteristic equation becomes:………

So when k = 0 the roots of the CLTF are the same as the poles of the OLTF.
• Rule 1. The “starting” points of the root locus, when k=0, are the poles of the OLTF.

When k  ∞ the characteristic equation becomes …………

So when k  ∞ the poles of the CLTF are zeros of the OLTF.


• Rule 2. The “end” points of the root locus are the zeros of the OLTF or at infinity.

Add labels to this plot of the UAV closed loop roots to show where k = 0 and how the roots
move as k increases. Add your own notes as appropriate.

If k were increased to a very large magnitude, since this UAV system has no open loop zeros in its
transfer function, the closed loop roots would be a very large distance away from the origin (and
two of the roots would be on the unstable side of the s-plane).

9
6. Sketching a Root Locus: Paths
In between k = 0 and ∞ the roots follow loci which are sometimes straight lines, sometimes curved:
what governs these shapes?
Answer: the characteristic equation.
Every point on the root locus obeys the closed loop characteristic equation.

Every point on the s-plane is a value of s, with real & imaginary components: s = σ +j ω.
So the root locus paths are the ‘coordinates’ of all the points which solve:
(this is one of the many alternative
arrangements of the characteristic
equation we saw in part 4)
Since we’re looking at complex values of s, we should write both sides of that equation as complex
numbers.

NB: “-1” is a complex number, with zero imaginary part

OPTIONAL DIGRESSION ABOUT COMPLEX NUMBERS


NB: if you insert any complex number into a typical polynomial such as N(s) or D(s) you
end up with a complex number as your answer.
If you aren’t sure what that means, try the following in MATLAB sometime:
So let’s say D(s) = 𝑠𝑠 3 + 17𝑠𝑠 2 + 4𝑠𝑠 + 76 for example.
s = 3 + 4i;
denom_coeffs = [1 17 4 76];
denom_value = polyval(denom_coeffs,s)

See? ‘denom_value’ is a complex number. If you’re not sure about polyval(), look at
the help, or try:
denom_value2 = 1*s^3 + 17*s^2 + 4*s + 76

Same thing, right?


* END OF DIGRESSION *

10
Identifying locus paths from the Angle Criterion
Every complex number can be expressed in its (real, imaginary) form OR (magnitude, angle) form,
often instead called (modulus, argument).

The magnitude, angle format can be written in exponential format: 𝐴𝐴𝑒𝑒 𝑗𝑗𝑗𝑗 which is convenient for
multiplying & dividing complex numbers.
So, using magnitude & angle format here:

Remember that for any value of s, the left hand side will evaluate to a complex number (as
demonstrated in the digression above!)
Now this is actually two equations combined into one: we can say that the magnitude and angle of
Left and Right sides of the equation are equal.
So if s is a point on the root locus, the angle of the complex number on the Left of the equation is
equal to the angle on the Right: π radians: this is the Angle Criterion.

The angle criterion is perhaps best displayed as a diagram:

11
Examples of the angle criterion
In this Left hand example, the point s1 shows In the Right hand example, the point s2 which
angles which add up to π radians by is clearly not on the root locus doesn’t obey
symmetry. All points like s1 on the root locus the angle criterion.
obey the angle criterion.
Drag these labels onto the appropriate angles on these diagrams

π−θ α β ≠ (π−α)

Root Locus on the Real Axis


From the -rather complex- angle criterion, we can extract a very simple rule which is a great to
start to sketching a root locus plot:
The root locus only passes along the real axis when there is an odd number of open-loop poles
and zeros to the right of it.
Because: Each pole/zero to the right of the locus contributes ± π rad; all those to the left contribute
an angle of zero.

Draw the root locus on the real axis only (NB if that is technically challenging, simply state YES / NO
for points s1 to s6 regarding whether they are on the root locus or not).

12
Roots leaving / joining the real axis
Loci always break away from the real axis at ± 𝜋𝜋�2 rad, initially.
Because: pairs of roots arise from solutions to 2nd order components, which are solved with the
quadratic formula, so they are always of the form 𝑥𝑥 ± �𝑦𝑦 and they become complex when ‘y’
becomes negative.
This, and the angle criterion, demand that pairs of complex loci are always symmetrical about the
real axis.

13
Examples of root locus before and after adding a
controller pole or zero:
Later we will delve into the rationale behind different approaches to controller design, but for now,
just consider these as examples of sketching root locus and notice how dramatically the
performance of a closed loop system can be changed by adding one more component to the open
loop transfer function.

“Before control” “After control”


Complete these when you reach Part 8

14
7. Controller Design
We have seen that big changes can be effected in closed loop control by changing the controller
gain (k) or by adding a simple component to a system. The root locus sketching method helps to
identify the general nature of these changes at an early stage of system design.
Now is a good time to pause and consider what we want to achieve when adding a controller. And
we’ll review some different ways in which control is used, and how it can be implemented
physically.

Start with the “Plant”


Fully understanding the “plant” or “process” is the most important step in control. This usually
means creating a model of that plant: the previous weeks’ guidance on level-of-detail and step-by-
step modelling processes are important.

Input Plant Output

Lecture attendance A student Acquired knowledge and skills


(or moodle time)
Voltage supplied DC Motor Shaft rotational speed

Force Vehicle suspension Vertical position

… … …

Open Loop Control


Not as simple as it looks – add your notes & thoughts from the video of part 07 here.

15
Closed Loop Control
Also not as simple as it looks – add your notes & thoughts from the video of part 07 here.

Closed Loop Example: Steering a car (manually)

Space for notes from the accompanying video. E.g. “deadband”, and the error between desired &
actual direction.

16
Closed Loop Example: Liquid Level Control
Mechanical feedback – the float valve shuts off
the flow of water when the tank is full. Toilet
cisterns work on a similar principle – very
Manual control: eyes provide feedback reliable.

Your notes & thoughts here – any other examples of manual and/or mechanical feedback control?

17
Mechanical Feedback Examples
Spend some time thinking through how these traditional, mechanical systems would work; make
some annotations / notes if you like.
A) Drebbel’s incubator

B) A ‘fly-ball’ governor on a Watt steam engine

18
Disturbance and Measurement Noise
These can be modelled as shown: as extra signals being input into the block diagram.
Although these can never be avoided, effective controller design will ensure the sensitivity to
disturbance and noise is much less than the sensitivity of the controller to changes in the demand.

Examples of systems and typical disturbances and measurement noise:

System Example Disturbance Example Noise

Wind, e.g. when passing Bright light; dirt covering


A road car “autopilot” another vehicle. proximity sensors

Thermostat sensor being near


Door or window being opened a draught or local source of
Office heating
to the outside air. heat: gives a false measure of
the real room temperature.

… … …

19
Multi-loop systems
Often, simple control loops control one small part of a more complex system. Loops can be nested
like this and operated hierarchically by an overseeing controller.
Often the inner loop would operate at a faster rate, and is higher priority.

System Inner loop Outer loop

Missile flight control Maintains stability Maintains trajectory

Injection and ignition timing –


Engine control unit Cruise control; fuel economy
every revolution

… … …

20
8. Using the Root Locus to Design Controllers
Watch the video instruction for part 8, and complete the root locus plots back in part 6.
Next week we will investigate more specific and targeted approaches to designing controllers, using
MATLAB.
In the meantime the following exercise will provide some practice:

MATLAB Exercise: DC Motor Inductance is Negligible?


Referring to our model of a DC motor – what is the effect of including / excluding the inductance?
This was how to input the model:
J = 3.23E-6;
b = 3.51E-6;
K = 0.0274;
R = 4;
L = 2.75E-6;
s = tf('s');
motorTF = K/(s*((J*s+b)*(L*s+R)+K^2));

Refer back to your notes to remind yourself that since L was much smaller than R we made the
simplification:

Using unity feedback (i.e. there’s no need to add another gain) create closed loop transfer functions
for the systems with- and without L included and compare the step responses.
HINTS if you’re stuck (deliberately upside down!): motorTF_simple = K/(s*((J*s+b)*R+K^2));

motorCLTF = motorTF/(1+motorTF);

SPOILER ALERT: you won’t spot any difference. Increase L to 1000x its original value (and re-create
all the TFs) and you’ll see a tiny difference.
Try looking at the root locus for each version:
Use the open-loop motorTF to create the root locus using MATLAB’s built-in function rlocus():
rlocus(motorTF)
which then shows you what the positions of the Closed Loop TF would be for all possible values of
the controller gain. The effect of “L” is a root way over to the left, which decays to zero very
quickly.
Try clicking on the plot and interacting!

21

You might also like