MECH0023 Week 02 Notes
MECH0023 Week 02 Notes
DYNAMICS
&CONTROL
WEEK 02
Laplace techniques
for modelling and
analysing complex
systems
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. Modelling Complex Systems ............................................................................... 3
2. Actuators and Servosystems .............................................................................. 4
3. Electrohydraulic Actuators ................................................................................. 5
Example 1: Modelling an Electrohydraulic Servosystem ............................................... 6
4. Example 2: Modelling a Soldering Robot ......................................................... 10
5. Modelling Complex Systems in the Laplace Domain ........................................ 12
6. The s-plane Diagram: a Visual Representation of Transfer Functions ............ 13
7. Example 3: Inspecting Transfer Functions on the s-plane .............................. 15
8. Example 4: The Soldering Robot Model ........................................................... 16
on the s-plane ....................................................................................................... 16
9. Example 5: DC Motor Model - a MATLAB Tutorial ............................................ 17
2
1. Modelling Complex Systems
We have seen (in part 01 and previous years’ dynamical modelling examples) that the behaviour of
dynamic systems can be described by mathematical expressions, for example:
1 æ æ öö
y (t ) = ( )
ç wnt - 2z + e -zwnt ç 2z cos wn 1 - z 2 t -
wn ç ç
è
1
1-z 2
( ) (
1 - 2z 2 sin wn 1 - z 2 t ) ÷÷
÷÷
øø
è
… describes the response of a 2nd order system to a ‘ramp’ input. That expression is not very
helpful in revealing key features easily (and remember: “all models are wrong” anyway!)
• Is this well-damped?
• Does it respond quickly?
• What’s the steady state behaviour after transient responses have died away?
[these are rhetorical questions!]
This is only a 2nd order system, so we can imagine that for higher-order models it will become
unworkable to find expressions for the response in the time domain.
Instead, modelling in the Laplace domain means that however complex the system it can always be
split up into parts which are no more complicated than a 2nd order component. That’s as tricky as it
will get.
So the general approach to creating a model is:
3
2. Actuators and Servosystems
In Part 1 we looked at DC motors which are extremely common for providing position control.
However they are not the only type of actuator. Here is a very general indication of some different
types and their suitability for a servo system, that is to say: position control.
You will notice important omissions from the table: cost (!), durability, power supply requirements,
maintenance requirements… Depending on the application, one or more of those criteria could be
the most important in selecting an actuator.
Type some reasons why your chosen actuator type would be used in a specific situation:
Take as much space as you like to include pictures of the actuator, pictures of it in use, details of its
price, size, weight, power supply, any special limitations / features (e.g. can it be used in the
presence of explosive gases/vapours? Does it cause electromagnetic interference?)
4
3. Electrohydraulic Actuators
With a very high power-to-volume ratio, very high maximum force and very high aptitude for
position control, electrohydraulic actuators are used in applications requiring motion control of large
loads. The precision required to manufacture cylinders and control valves which operate reliably
under hundreds of bars of pressure means that these systems are expensive.
Some applications include fly-by-wire control surfaces (‘flaps’) on aircraft, flight simulators, the
Wembley stadium seating and tidal turbine examples are from Shepcote Engineering.
5
Example 1: Modelling an Electrohydraulic
Servosystem
General components and operation. An electrohydraulic servosystem comprises:
• An electrically operated valve
‘Tank’ (≈0) Supply which controls the flow of…
pressure Ps Valve ‘spool’ • extremely high-pressure hydraulic
displacement fluid to a…
x(t) • hydraulic cylinder with a…
• position sensor which informs a…
• digital controller.
y(t)
M
Pressure P1(t)
Volume V1(t)
Area A1 Area A2
• When the valve is open positively: on the left hand side of the piston there is P1 (less than Ps)
and on the right hand side of the piston there is Ps. And yet there is a resultant force to the
Right, because …
• When the valve is open in a negative direction: on the left hand side of the piston there is
‘Tank’ pressure which is assumed to be negligibly small. On the right hand side of the piston
there is Ps. Therefore there is a resultant force to the Left.
• All the moving mass (load plus piston) is assumed to have a constant mass, M, which is
accelerated by the resultant force.
• Since the forces involved will be so high, friction will be relatively minimal.
6
Let’s get creating a model, starting with the governing equations:
Where, 𝑘𝑣 is a valve constant dependent on the size & shape of the particular valve.
𝑘1 is the bulk modulus of the hydraulic fluid – i.e. describing how compressible it is. “But liquid isn’t
compressible?!” Not usually. But the fluid is bound to have tiny bubbles of air, and the pipes which
contain it are not rigid. These are very high pressures we’re talking about here.
This system is clearly non-linear for at least two reasons:
1.
2. The valve flow is proportional to the square root of the pressure difference across it.
… but we’ll try the small perturbation method (as before, in the magnetic levitation example) to
create a linear approximation about a normal operating point.
The aspect of this model which we can most easily control is: valve spool position, x(t), so we’ll
consider that the input.
The output of the system is the cylinder position, y(t).
Other variables - Q1(t) and P1(t) - are not of specific interest.
We’ll therefore combine these governing equations to create one model which relates the valve
spool position, x(t), to the cylinder position y(t).
We’ll use a positive value of x(t) as the operating point just for example, and start by linearising the
valve orifice equation:
𝑄1 (𝑡) = 𝑘𝑣 𝑥(𝑡)√𝑃𝑠 − 𝑃1 (𝑡)
This function of two variables could be imagined as a surface, e.g. below. It’s also possible of
course to have functions depending on 3 or more variables, in which case we can’t visualise them in
Cartesian geometry.
Here is a “slice” through that surface at the
Q1 operating point, X0, illustrating how Q1
depends on (Ps – P1(t)).
Q1 (P 1)
Q1 = f
dQ1
Q1 0
(Ps - P1 )
X (Ps - P1 )
P1 0 dP1
7
Considering how Q1 varies with these two independent variables, we can use two linear tangents to
that surface to create two linear approximations and hence one linear model. NB even though Q1
will still depend on two variables it will still be a linear model.
We’ll use “small perturbation variables” to represent the small variations about the operating point:
q1’(t) = Q1(t) – Q0, x’(t) = x(t) – x0, etc…
The cylinder flow equation is already linear. Using the small perturbation variables it’s written:
𝑝̇1 (𝑡)
𝑞1 (𝑡) = 𝐴1 𝑦̇ (𝑡) +
𝑘1
In the Laplace domain that is:
The piston kinetics equation is also linear. Using the small perturbation variables it’s written:
𝑝1 (𝑡)𝐴1 = 𝑀𝑦̈ (𝑡)
In the Laplace domain that is:
By combining these three equations we can then rearrange to one linear transfer function:
𝑘1 𝐴1 𝑐𝑥1
𝑌(𝑠) 𝑀
=
𝑋(𝑠) 𝑘 𝐴2
𝑠 (𝑠 2 + 𝑐𝑝1 𝑘1 𝑠 + 1𝑀 1 )
Don’t panic! Although this transfer function might not mean anything to you, as mentioned, any
transfer function can be split into parts which are no more complicated than a 2nd order component.
so in this case we have:
𝑌(𝑠) 1 𝜔𝑛2
= 𝐾
𝑋(𝑠) 𝑠 (𝑠 2 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛2 )
𝑘1 𝐴21 𝑐𝑝1 𝑘1
Where, 𝜔𝑛2 = ; 𝜁= ; and
𝑀 2𝜔𝑛
𝐾 = ……
8
Rapid Interpretation of the Transfer Function Model
Remember the long time-domain expression at the start of this section…
1 æ æ öö
y (t ) =
wn ç ç
è
( )
ç wnt - 2z + e-zwnt ç 2z cos wn 1 - z 2 t -
1
1- z 2
( ) (
1 - 2z 2 sin wn 1 - z 2 t ) ÷÷
÷÷
øø
è
Although this is needed for plotting a graph of the response, this is not too easy to interpret / to
understand… and this was just the response to one type of input (in this case a step response).
In comparison, the transfer function model can be interpreted much more easily in general terms:
𝑌(𝑠) 1 𝜔𝑛2
= 𝐾
𝑋(𝑠) 𝑠 (𝑠 2 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛2 )
9
4. Example 2: Modelling a Soldering Robot
In that interpretation of the 2nd order component of the
hydraulic servosystem the behaviour is described in general
terms, e.g. “damping becomes very low”.
In most applications it matters “How low damping?!” In the
following example, we see how to find out specific response
performance characteristics, quite easily, from transfer
functions.
Description:
A DC motor is driven by a current amplifier, to provide
thrust. The thrust output is K times the voltage input.
The moving mass is M kg, and the friction drag from
the gears and linear bearing is approximately C times
the velocity in m/s
The open loop block diagram is shown below
(fill in the blanks!). The Open Loop Transfer
Function (OLTF) is simply all those blocks
multiplied together.
We’ve seen (Part 01) that a DC motor needs position feedback to be used as a position servo, and
that’s what is done for this soldering robot. The position sensor gives a voltage proportional to
position: 0 to 1 V covers positions of 0 to 1m.
The desired position is specified by a voltage, R(s), which also uses the scale 1 Volt per metre.
That changes the transfer function to the following Closed Loop Transfer Function (CLTF):
10
Interpreting a Second Order Transfer Function Model:
If we look at the expression for the time response of a 2nd order step response, we can identify
specifically how each parameter affects the response.
Since all 2nd order transfer function components always behave like this, we will never need to do
this analysis again!
Overshoot (%):
-zp / 1-z 2
y (t ) = 1 -
1
1- z 2 (
e-zwnt sin wn 1 - z 2 t + cos -1 (z ) )
A = 100e
Time to first peak (Tp):
p p
TP = =
wd wn 1- z 2
Settling time*
* to within 5% of steady-state value:
3
TS »
zw n
For this specific soldering robot application, we can look at how these depend on the robot
parameters: K, C, and M:
C K
Damping ratio: z= Natural Frequency: wn =
2 KM M
Again: all standard 2nd order transfer function components will have this form, so we just need to
plug in values for any specific example.
This is most useful in design and modelling stages to predict what the performance will be before
building something. But once a machine / device exists, modelling is still useful to predict the effect
of changes – which may be deliberate or accidental.
E.g. the soldering tip on this robot breaks. The new replacement version is now made with
recyclable materials and weighs 20% more.
If M increases…
11
5. Modelling Complex Systems in the Laplace
Domain
• More complex systems are just replication of the standard transfer function components.
• Each component is never more complicated than the 2nd order component.
• The overall behaviour is the sum of the contributions of each part.
E.g. multi-link robots like these:
Next time you see a motorised device which can move in more than one direction, write it here…
12
6. The s-plane Diagram: a Visual Representation of
Transfer Functions
Even quicker than looking up standard expressions for TF components, there are graphical methods
for visualising at a glance some of the key features of transfer functions:
• stability,
• frequency and damping of any oscillatory components,
• decay time of any lags,
• ‘type’ of the system: steady state behaviour, and suitability for servo applications.
The key is that the Laplace variable, s, is a complex variable and may have real and imaginary
parts:
s = + j
So if we take the example of a first order lag, it
1
is possible to plot this function on a complex G(s) =
plane, using both real and imaginary parts of s: 1 + st
jw
G(s) is said to have a ‘pole’ at s = 1/ ,
1
This approach becomes much more useful when a transfer function has several poles, and zeros
(values of s which make the numerator = 0)
1
I haven’t been able to reliably determine whether this is so called because of the appearance of a ‘spike’ or
‘pole’ on the s-plane.
13
For a 1st order lag the pole lies at s = 1/ .
For 2nd order components, the roots to the characteristic equation are found from the ‘normal’
quadratic formula for solving 2nd order polynomials.
Characteristic equation:
𝑠 2 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛2 = 0
−𝑏 ± √𝑏 2 − 4𝑎𝑐
𝑠=
2𝑎
For the standard form of 2nd order TF, a = 0.
If 𝑏 2 − 4𝑎𝑐 is positive there will be two real roots.
If𝑏 2 − 4𝑎𝑐 is negative there will be two complex roots, whose positions are intrinsically linked to
𝜁 and 𝜔𝑛 as shown above, therefore 𝜁 and 𝜔𝑛 can be calculated from the s-plane coordinates if
required.
So the positions of complex poles on the s-plane tell us at a glance about oscillatory behaviour of
any linear system.
complex jw
poles x
oscillate x
x
x
A complex pair
x x x x x x
s
Faster decay
x
x
stable x unstable
x
This diagram is super-important and will be used frequently through the course.
14
7. Example 3: Inspecting Transfer Functions on
the s-plane
To provide electrical power to the soldering robot motor we need a
powerful amplifier. Imagine the electrical engineering department
have suggested two possible circuits, and they have provided the
transfer function for each:
Output current to motor, I(s), as a function of the control
voltage, V(s).
- 5s1 - 1s 0
(i) G1 (s) = 3
2s + 11s 2 + 32 s1 + 63s 0
s 3 + 3s 2 + 15s1 + 25s 0
(ii) G2 ( s) = 4
s + 5s 3 + 12 s 2 + 26 s1 + 144s 0
Glancing at these TFs it’s not possible to tell much about their behaviour. We
don’t even know if they’re stable (it’s quite possible for electrical amplifiers to be
unstable).
MATLAB’s function roots() function can quickly tell us whether there are any roots on the right
hand side of the s-plane, to answer the question of stability. And check out “pzmap()”…
15
8. Example 4: The Soldering Robot Model
on the s-plane
𝐾
𝑌(𝑠) 𝑀
The closed loop transfer function from Example 2 was: = 𝐶 𝐾
𝑅(𝑠) 2
(𝑠 +𝑀𝑠+𝑀)
We plot the poles of the system to predict its performance (rise time, overshoot, settling time etc.)
The poles are the roots to the characteristic equation:
𝑇𝑦𝑝𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 ℎ𝑒𝑟𝑒 = 0
−𝑏±√𝑏2 −4𝑎𝑐
Which, being quadratic, can be solved with the ‘good old’ quadratic formula: 𝑠=
2𝑎
𝐶
𝐶𝑜𝑚𝑝𝑙𝑒𝑡𝑒 𝑡𝑦𝑝𝑖𝑛𝑔 𝑡ℎ𝑒 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠 ℎ𝑒𝑟𝑒: 𝑠 = − ±⋯
2𝑀
These poles can be calculated for any numerical values of K, C & M. MATLAB or MS Excel can be
used to plot how the pole positions change as any of the values of K, C and/or M vary.
As C increases,
15 z also increases 15
and the system
becomes more
5 damped. 5
As C decreases,
-15
z also decreases
-15
and the system
becomes less
-25 damped. The
poles move..
The course moodle page has a MS Excel workbook with these equations already populated. It
contains instructions too. Download it and “play around”.
16
9. Example 5: DC Motor Model - a MATLAB Tutorial
In MATLAB, we can enter these parameters as follows: (cut & paste this into the command line)
>> J = 3.23E-6;
>> b = 3.51E-6;
>> K = 0.0274;
>> R = 4.0;
>> L = 2.75E-6;
17
>> denominator = motorTF.den{1};
>> motor_poles = roots(denominator)
d) How about a step response? (showing the angle of the motor vs time)
>> step(motorTF)
To see the transient response you’ll need to zoom in to the first 0.1 seconds,
or use the axis() command to re-scale the graph axes to [Xmin ,Xmax ,Ymin ,Ymax ]:
>> axis([0,0.1,0,3])
e) Read MATLAB’s help documentation for each of these commands.
You might want to copy & paste some notes here – feel free to copy pages & pages!
f ) Try using MATLAB to further investigate the transfer functions in Example 3 (and any others in
these notes or elsewhere!)
18