KEMBAR78
MECH0023 Week 04 Notes | PDF | Control Theory | Damping
0% found this document useful (0 votes)
29 views19 pages

MECH0023 Week 04 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)
29 views19 pages

MECH0023 Week 04 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/ 19

MECH0023

DYNAMICS
&CONTROL

PART 04
Controller Design
using Root Locus &
MATLAB

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. R em ote-Operated Sub-Sea Vehicles .................................................................. 3
Modelling an Underwater Robot Arm ............................................................................ 3
2. Controller Design for an Underw ater R obot Arm ............................................... 4
Transfer Function Model ............................................................................................... 4
Original System Root Locus .......................................................................................... 4
Performance Assessment .............................................................................................. 5
‘Pole Placement’ or ‘Compensator’ Controller Design ................................................... 6
Practicalities of Pole Placement Compensators ............................................................ 7
MATLAB Exercise: Pole cancellation in practice ............................................................ 8
3. Further R oot Locus Techniques .......................................................................... 9
Asymptote directions .................................................................................................... 9
Asymptote Centroid .................................................................................................... 10
The Unstable System .................................................................................................. 11
Designing a Stabilising Controller: Attempt 1 ............................................................. 11
Attempt 2 .................................................................................................................... 12
Attempt 3 .................................................................................................................... 12
Attempt 4 .................................................................................................................... 13
Overall Assessment of Controllers .............................................................................. 13
5. M ATLAB Controller Design: Boeing Airliner ..................................................... 14
System Modelling ........................................................................................................ 14
Design Specifications .................................................................................................. 14
Performance Assessment Without Control ................................................................. 15
Controller Design: a Lead Compensator ...................................................................... 17
6. M ATLAB ‘SI SOtools’ Tutorial ............................................................................ 18
Setting Up ................................................................................................................... 18
Investigating the System Using SISOtool ................................................................... 19
Lead Compensation..................................................................................................... 19

2
1. Remote-Operated Sub-Sea Vehicles
Modelling an Underwater Robot Arm
Remote-operated vehicles (ROVs) for sub-sea use have been in use for over 50 years. Typical uses
include exploration and surveys for the oil & gas industry, sub-sea construction, and laying,
inspecting and repairing pipes and cables. The internet today relies heavily on physical cables –
fibre-optic – running thousands of miles under the oceans.

https://www.sofarocean.com/products/trident

Today’s ROVs come in all shapes and sizes


from a battery-powered self-build open-
source project (“openROV”) to high-power
industrial robots with hydraulic
manipulators, such as the Conan FP7 from
Alstom Schilling Robotics, shown right.

Here we also see an example of a miniature version of the arm


being used as an intuitive remote controller.

3
2. Controller Design for an Underwater Robot Arm
Transfer Function Model
The general model for an electrohydraulic servo-system
was developed in Week 2:

Where Y(s) = cylinder position


X(s) = control valve spool position
For this small cylinder application, the following model was obtained from measurements:

In this case the 2nd order polynomial factorises into two 1st order components – all real roots; no
oscillations in the OL response.

Original System Root Locus


Here is the root locus plotted on ‘square’ axes
– equal x- and y-scales.
We can add gridlines (via MATLAB) to help
clarify how root positions relate to system
performance:

Circles = …

Radial lines = …

x-coordinate = exponential coefficient 𝑒𝑒 𝜎𝜎𝜎𝜎


(rate of decay, or increase):

y-coordinate = damped natural frequency of


oscillations

4
Performance Assessment
The root locus shows the “parameters of the possible”
for the system, if proportional feedback control is used
(varying k)

As we increase K…
… ζ increases / decreases*
… ωn increases / decreases*
* delete as appropriate

e.g. if we want ζ greater than 0.6 (to avoid excessive overshoot)


then ωn is limited to less than 1.7 rad/s
This occurs at K = 18.

We would like to somehow move these roots


left, away from the imaginary axis so we can
Step responses are compared below. have faster ωn for the same value of ζ.

5
‘Pole Placement’ or ‘Compensator’ Controller Design
Approach: If (-3) and (-5) poles were further to the left of the s plane, the asymptotes and
therefore loci would also be further left and we’d have higher ωn for the same value of ζ.

1
The open loop transfer function is: 𝐺𝐺(𝑠𝑠) =
𝑠𝑠(𝑠𝑠+3)(𝑠𝑠+5)

(𝑠𝑠+3)
Add a controller into the loop, with the T.F.: 𝐶𝐶(𝑠𝑠) =
(𝑠𝑠+10)

So the resulting Open Loop Transfer Function is:


𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 ℎ𝑒𝑒𝑒𝑒𝑒𝑒
𝐺𝐺(𝑠𝑠)𝐶𝐶(𝑠𝑠) =
𝑇𝑇𝑇𝑇𝑇𝑇𝑇𝑇 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 ℎ𝑒𝑒𝑒𝑒𝑒𝑒
The pole at -3 is cancelled by a zero at -3.
Instead, we’ve added a pole at a faster position:
s = -10.
Overall the nature of the system hasn’t changed
(‘taken away one pole and added one’)

This method of controller design is called


“compensation”, or “pole-placement”

We now have higher/lower* ωn for the same


value of ζ. And the step response is therefore
faster/slower* to rise and to faster/slower* to
settle for the same % overshoot.
*delete as appropriate!

6
Practicalities of Pole Placement Compensators
Mathematically, (s + 3) on the numerator exactly cancels (s + 3) on the denominator. But in
practice the value ‘3’ might be 3.01, or 2.96.
The controller zero and ‘plant’ pole can never be assumed to match exactly because…

When there’s a slight mis-match, both the ‘new’ controller zero and original pole exist on the s-
plane. The root locus with this extra pole and zero is slightly distorted compared to the theoretical
version with them totally cancelled, however when ‘zoomed out’ there is less of a difference.
Importantly, the overall shape and behaviour of the root locus is not affected by a very small
mismatch.

Now, try for yourself in the following MATLAB exercise (over the page)…

7
MATLAB Exercise: Pole cancellation in practice
Referring to the hydraulic servo robot, with compensator, we assumed the pole at s = -3 was
exactly cancelled out by the controller zero at s = -3
In reality, parameters are not precise integers and cannot cancel entirely.
Find out what happens if the pole was actually at s = -3.05, and the zero was at s = -2.98.
Method: here’s how to plot the root locus of the original system with controller:
s = tf('s');
servoTF = 1/(s*(s+3)*(s+5));
ctrlTF = (s+3)/(s+10);
compTF = servoTF*ctrlTF;
rlocus(compTF)

You can compare the root locus plots directly by plotting on the same axes: (you will need to zoom
in to see clearly)
figure
rlocus(compTF)
hold on
rlocus(compTF2) % where compTF2 is your “other version” – create this using the
same method as above but use 3.05 instead of 3.

Step responses can also be compared by plotting on the same axes. The following plots the
response of the open-loop system showing how the hydraulic cylinder moves when the valve is
opened by a “unit” amount
figure
step(compTF)
hold on
step(compTF2) % where compTF2 is your “other version”

Just as with the DC motor model, feedback is required to use either of those actuators as a servo-
positioner. Note the gain is included: “K”
K = 100;
CLTF = K*compTF/(1+K*compTF); % this is easy!
figure
step(CLTF)

Click one of the roots on the root locus plot and MATLAB tells you
what gain K corresponds to that point and what the response
would be like (damping etc).

Select a few values of K, re-calculate the CLTF for each, and


compare the step responses with what the root locus plot predicts.

8
3. Further Root Locus Techniques
Asymptote directions
When there are closed loop roots which move outwards towards infinity as K is increased, the
directions in which they move converge to asymptotes. This greatly simplifies the process of
sketching root locus diagrams, because similar systems all share similar patterns of asymptotes,
e.g. the previously-seen systems below have three root paths, and three asymptotes at equal
angles:

We can work out what these asymptote angles are (once), then every time we come across a
similar transfer function we will know the shape of its root locus.
Remember that the angle criterion defines the shape of root locus paths:

Let’s say ‘s’ is a point on the root locus.


As K increases, s gets far away from the OL poles and zeros,
And from that far away viewpoint, they appear as a cluster together.
From the point s, the angles to all the poles, ∠D(s), and the angles to all the zeros, ∠N(s), are all
approximately the same: φA
If there are P poles and Z zeros then we have: PφA – ZφA = π ± 2nπ
(2𝑛𝑛+1)𝜋𝜋
So we can rearrange to calculate 𝜙𝜙𝐴𝐴 =
𝑃𝑃−𝑍𝑍
Therefore the asymptote angle depends on the number of ‘spare’ poles (P-Z) which do not have a
corresponding zero.

9
In practice, we very often see cases where there are 1, 2, or 3 ‘spare’ or ‘homeless’ poles whose
closed-loop roots do not have a zero at which to terminate.
In these cases, the asymptote directions are always as follows:

P–Z=1
Add the root locus and asymptote line to the plot

P–Z=2
Add the root locus and asymptote lines to the plot

P–Z=3
Add the root locus and asymptote lines to the plot

Asymptote Centroid
The centre of the asymptotes, where they meet the real axis, is
simply the centroid of poles and zeros, and is calculated by:
This fact is very important when designing controllers: adding
poles or zeros to the s-plane will move the asymptotes, and can be exploited to shift the closed-
loop roots into desirable regions of the s-plane, e.g. away from the unstable side...

10
4. Controllers to Stabilise an Unstable System
The Unstable System
The following Open Loop transfer function represents a rocket being launched: the thrust
is underneath the centre of mass, therefore the system is unstable.

We can tell this system is unstable by inspection of the transfer function because…

In this example, without a controller the rocket would…

The root locus also shows, unfortunately,


that the rocket would be unstable in
closed-loop operation for all possible
values of gain, K.

Designing a Stabilising Controller: Attempt 1


“Compensate” the unstable pole, the same method used on the ROV robot arm earlier, by adding
a zero at (+1)
Add the zero and the root locus lines to the plot

This would / not* be effective at stabilising the system, because…


*delete as appropriate!

11
Attempt 2
Add negative velocity feedback to try to increase
damping.
Add a controller: C(s) = (s+4), which puts a zero
at -4.
Add the zero, the root locus lines, and the
asymptote (at -0.5) to the plot.

This controller brings the roots over to the left hand side of the plane if K > 1.25, thus would be
stable for K > 1.25

However, the roots would still be complex and


close to the imaginary axis, indicating under-
damped oscillations.
The step response confirms that:
These oscillations are not useful for a rocket :-/
The settling time is also far too long: ….

Attempt 3
Change the negative velocity feedback coefficients,
moving the centroid further to the Left.
Add a controller: C(s) = (s+0.5), which puts a zero
at -0.5.
Add the zero, the root locus lines, and the
asymptote to the plot.
Asymptote position = (-5 -1 -(-1) -(-0.5))/2 = …
This controller moves the oscillatory roots further over
to the left hand side of the plane if K > 10, thus would
be stable for K > 10.
However, while the oscillations are damped, the step
response is dominated by the slow root near the
origin, giving a settling time of approx…

Furthermore, this is the response to a step demand


with a desired position of ‘1’. However the steady
state output is…

12
Attempt 4
Now that we have seen it is possible to stabilise the rocket, we’re focussing on adding more
features to the controller to refine the performance:
Add a pole at the origin to remove steady-state error
Add a zero at (-1) to cancel the slow pole
Add another zero at (-1) to keep the
asymptotes on the Left.

Add the root locus lines to the plot.

(𝑠𝑠+1)(𝑠𝑠+1)
The controller transfer function is: C(s) =
𝑠𝑠

This can be rearranged to show the three components separately and we can see that it actually
has the form of a P.I.D. controller. (Complete the table below)
Proportional Integral Derivative
C(s) = ? ? ?

Overall Assessment of Controllers


Overlaying the step responses gives a
very clear impression of the relative
performance of the controllers, which
have been designed based on their root
locus locations on the s-plane.
This combination of root locus and step
response plots is very useful in
designing controllers.
MATLAB has a very useful toolbox which
combines these methods; we’ll have a
look at an example next:

13
5. MATLAB Controller Design: Boeing Airliner
The following example is taken from Mathwork’s Matlab control tutorials
http://ctms.engin.umich.edu/CTMS
That Mathworks site also includes details of the model development for the airliner, as well as lots
of other examples of other systems.

System Modelling
The equations of motion of a large commercial aircraft (based on a Boeing 767) are six complex,
nonlinear, coupled differential equations.
In order to create a manageable tutorial example, these equations have been greatly simplified (!)
and we’re only looking at one part of the direction control system: controlling pitch*. We’re
assuming that for certain steady-flight conditions -not major manoeuvres- pitch can be considered
independently and doesn’t affect, for example, speed.
After these simplifications the relevant transfer function is:

Input: control surface angle δ(t)


Output: aircraft pitch θ(t)
(written in capital theta Θ and delta ∆)

Design Specifications
This tutorial is focussed on trying to design a controller so that the overall pitch control system
meets the following, specific, design specifications:
• Overshoot less than 10%
• Rise time less than 2 seconds
• Settling time less than 10 seconds
• Steady-state error less than 2%

*
Of the six degrees of freedom, pitch can be thought of as the angle tilting up/down from the horizon.

14
Performance Assessment Without Control
Open Loop
From the open loop transfer function we
1
can see that it contains a component,
𝑠𝑠
known as a …… at the ………

1
We also saw that term with the DC
𝑠𝑠
motor and the Electrohydraulic
Servosystem. These are all Type 1
systems.
When given a constant input, they will
accelerate and reach a steady velocity.
For this pitch control application, open loop
control would mean that the pitch angle
would continually increase… loop-the-loop!
Closed Loop
1
When a Type 1 system is used in feedback control, the “pole at the origin” means that any
𝑠𝑠
position error is integrated over time, and so, for position step responses, type 1 systems have zero
steady state error. Examining the closed-loop step response here, we can take measurements from
the MATLAB plot to assess whether it passes the Design Specifications:

Rise Time:
(to first peak)

Settling time (within 2%):

Final value:

So we can see that the system without a controller doesn’t meet the specifications. We now look to
the root locus to identify what’s wrong, and how to fix it by adding a controller.

15
The Design Specifications can be mapped onto the s-plane to shade regions of the s-plane which
are acceptable and unacceptable. E.g.:
Settling to within ±2% of the final value in
less than 10 seconds:
That means the exponential decay has
reached 0.02 when t = 10 seconds or less:
𝒆𝒆𝝈𝝈𝝈𝝈 < 0.02
Remembering that σ is the “x-coordinate” of
the s-plane, with faster decay being further
from the origin, we can identify the condition
for decay within 10 seconds:
𝜎𝜎𝜎𝜎 < ln (0.02) where t = 10 seconds…

Overshoot of less than 10% is equivalent to


saying ζ>0.6
Rise time of <2 seconds is equivalent to ωn
> 0.9 rad/s.
These correspond to regions on the s-plane
which can be shaded on the root locus plot:
Shade the regions on the plot, right, which
correspond to unacceptable behaviour which
doesn’t meet the performance specifications.

Without a controller, the roots never reach


the acceptable region of the s-plane for any
value of K.

16
Controller Design: a Lead Compensator
Similarly to the underwater robot arm example, we would like to shift the root locus to the Left of
the s-plane so that we can have a faster, more damped response.
In this example, we’ll use a lead compensator with the aim of adding a pole and zero on the Left
Hand Side of the s-plane to shift the centroid of the asymptotes further Left.
Response time & Settling time:

Stability:
(𝑠𝑠−𝑧𝑧0 )
The general form of the controller is 𝐶𝐶(𝑠𝑠) = 𝐾𝐾𝑐𝑐
(𝑠𝑠−𝑝𝑝0 )

- i.e. one zero and one pole. The pole is further Left than the zero: the magnitude of p0 is larger
than the magnitude of z0
Remember that asymptotes have a centroid based on the open loop poles & zeros:

When we add the controller…


The number of Poles – the number of Zeros:........

Σ poles – Σ zeros:..........

So the centroid (and roots in general) are shifted to the left.

17
6. MATLAB ‘SISOtools’ Tutorial
This is a shortened version specially for MECH0023. The full instructions are online here:
http://ctms.engin.umich.edu/CTMS/index.php?example=AircraftPitch&section=ControlRootLocus
(That Mathworks site also includes details of how the airliner model was developed, as well as lots
of examples of other systems.)
This model is just for part of the direction control system:
controlling pitch.
Input: control surface angle δ(t)
Output: aircraft pitch θ(t)
(written in capital theta Θ and delta ∆)

Setting Up
Type the plane pitch transfer function, ‘P_pitch’, into the MATLAB command line.
s = tf('s');
P_pitch = (1.151*s+0.1774)/(s^3+0.739*s^2+0.921*s);

Optionally use MATLAB’s step() and rlocus() functions to investigate the system.
% Open loop step response
t = 0:0.01:10;
step(0.2*P_pitch,t);
axis([0 10 0 0.8]);
ylabel('pitch angle (rad)');
title('Open-loop Step Response');

% Closed loop step response


% note: we use the ‘feedback’ function to create the CLTF first
sys_cl = feedback(P_pitch,1);
figure; step(0.2*sys_cl);
ylabel('pitch angle (rad)');
title('Closed-loop Step Response');

18
Investigating the System Using SISOtool
Now use the MATLAB command sisotool(‘rlocus’, P_pitch) to interact with the model,
add and adjust a lead compensator.
1. On the root locus plot you can change the gain K by clicking and dragging one of the pink
squares which are the closed loop roots.
2. There’s a tab for root locus and one for step and they update simultaneously – when you
make changes on the root locus plot, the step response updates in the background.
3. Enter the design requirements specified in the notes:
a. Right click on root locus plot
b. Design Requirements -> New
c. Settling time < 10 seconds
d. % Overshoot < 10%
e. Rise time less than 2 seconds translates to natural frequency of wn > 0.9 rad/s
4. Notice that the root locus roots are always in the yellow (bad) regions.
5. Right click on the step response. The Characteristics menu gives the option of displaying
settling time and/or other characteristics on the plot.

Lead Compensation
6. Click Preferences button (on the main toolbar, with the gear-wheel icon), then select the
Options tab.
7. Under “Compensator Format”, select Zero/pole/gain – the lowest of the 3 radio button
options.
8. Back to the root locus plot, right click in a blank region of the plot, click Edit Compensator.
9. Right click in the (blank) Dynamics section of the pop-up and select Add Pole/Zero -> Lead.
10. You can accept the default values here, OR enter Real Zero at -0.9 and Real Pole at -3 (the
next two boxes auto-update about Max Delta and Frequency).
11. Back to the root locus, drag to change the gain and see what happens to the step response.
12. If you’re still not hitting the performance targets, try adjusting the controller by interacting
with the root locus plot: drag the little X cross at -3 (hard to spot) drag it all the way over to
-30 (the tutorial suggests). Then increase the gain some more either by dragging the pink
roots or by entering the value directly in the “Edit Compensator” dialog box. You can keep
tinkering and adjusting until you get awesome performance… but is it too good to be true?!

19

You might also like