Professional Documents
Culture Documents
EXAMPLE 2
x + 8 x + 7 x = 14 14 1
x= 1 + ( p1e p2t − p2e p1t )
c p2 − p1
p2 + 8 p + 7 = 0
p1 = −7, p2 = −1, c = 7
⇒ p1 = −7, p2 = −1
14 1 −t −7 t
x= 1 + ( −7 e + e )
7 − 1 + 7
Plug in the solution from
above.
Summary: The solution comprises a constant linked to the input f(t) and
two exponentials linked to the poles of the characteristic polynomial.
REMARK: This note has given an explicit solution with zero initial
conditions as, in general, we are interested in characterising the
behaviours rather than determining a precise analytic solution.
With non-zero initial conditions the solution will not have such a simple
generic solution. However, such scenarios with more involved algebra,
offer little useful insight so are not pursued here.
2nd order responses: very over-damped
Assume a standard 2nd order model with constant d 2x dx
coefficients, output y(t) and input u(t). What is the a 2 + b + cx = f
expected behaviour and how does this vary with a,b,c? dt dt
For now the focus is on constant f, often f=0 or f=1 and zero initial conditions
(x(0)=0, dx/dt(0)=0) for convenience.
𝒇𝒇
COMPARE COEFFICIENTS: 𝒙𝒙 = + 𝑪𝑪𝟏𝟏 𝒆𝒆𝒑𝒑𝟏𝟏𝒕𝒕 + 𝑪𝑪𝟐𝟐 𝒆𝒆𝒑𝒑𝟐𝟐𝒕𝒕
𝒄𝒄
Compare the coefficients f − p2 f p1
𝑪𝑪𝟏𝟏 , 𝑪𝑪𝟐𝟐 for each exponential C1 = ; C2 =
c ( p2 − p1 ) c ( p2 − p1 )
in the solution.
They have a magnitudes in
a ratio of p1:p2 If |p1|>>|p2|, then |C2|>>|C1|, so the slower mode
will dominate.
EXAMPLE 1
1 1
x + 10 x + 9 x = 1 x = 1 + ( p1e p2t − p2 e p1t )
c p2 − p1
p 2 + 10 p + 9 = 0 1 1 −9 t −t
x= 1 + ( − e + 9 e )
⇒ p1 = −1, p2 = −9 9 − 8
1 1 −9 t Slower mode is
x= + (e − 9e −t )
9 72 dominating
EXAMPLE 2
1 −19.95t
x = 1 + (−0.05e + 19.95e −0.05t )
x + 20 x + x = 1 − 19.9
p1 = −19.95, p2 = −0.05 x = 1 + 0.0025e −19.95t − 1.0025e −0.05t )
interesting.
0.8
-0.2
0 10 20 30 40 50 60 70 80 90 100
Seconds
Hence:
x = 0.4 − 1.265e −3t sin(t + 0.32)
SUMMARY
1. Second order ODES can be solved using a long approach as shown
here.
2. With non-zero initial conditions the algebra will be a little more
tricky.
3. As a general rule, the approach is somewhat cumbersome to do on
pen and paper.
Assume real poles so that: 𝑎𝑎𝑠𝑠 2 + 𝑏𝑏𝑏𝑏 + 𝑐𝑐 = 𝑎𝑎(𝑠𝑠 + 𝑝𝑝1 )(𝑠𝑠 + 𝑝𝑝2 )
SUMMARY
1. It is straightforward to use inverse Laplace to determine the step
response of 2nd order models with real poles.
2. Write the output signal as a Laplace transform and use standard
inverse Laplace methods such as the cover-up rule.
2nd order responses: under-damped & Laplace
Assume a standard 2nd order model with constant d 2x dx
coefficients, output y(t) and input u(t). What is the a 2 + b + cx = f
expected behaviour and how does this vary with a,b,c dt dt
when the system has oscillatory modes?
This resource focuses on the use of Laplace methods to find a solution for x(t) and
assumes zero initial conditions for convenience. Assume f(t) is a constant.
Assume zero initial conditions as their impact is rarely insightful in a systems and
control setting focussed on behaviours.
Forming the Laplace transform (for convenience take f(t) to be a unit step)
Take Laplace of every term in the equation and rearrange to find x(s).
d 2x dx 1 1
L[a 2 + b + cx] = L[ f ] ⇒ x( s )[as 2 + bs + c] = f ( s ) ⇒ x( s) = 2
dt dt as + bs + c s
The assumption of oscillatory modes means that the poles p1,p2 are complex
(b2<4ac).
Inverse Laplace methods: identify forms in the look-up table with oscillatory modes
The standard forms are summarised
w
here. L−1[ 2 2
] = e − pt sin wt
A standard inverse Laplace technique is [( s + p ) + w ]
to express the given transform in the s+ p
same forms that are available in the L−1[ ] = e − pt
cos wt
[( s + p ) 2 + w2 ]
table.
For a given system this means: 1 A( s + p ) Bw C
• for appropriate p,w. 2
= 2 2
+ 2 2
+
[as + bs + c]s [ s + p ] + w [ s + p ] + w s
• A,B,C, to be determined.
It should be clear that the poles (roots of as2+bs+c=0) are given by p1,2=-p+jw,-p-jw
so p and w are easy to find. Note how it is typical to make the pole polynomial monic
first. For example:
b c b b2
as + bs + c = a ( s + s + ) = a ([ s + p ]2 + w2 ) ⇒
2 2
p= ; w= c− 2
a a 2a 4a
A,B,C are found using standard partial fraction methods.
Example 1 with zero initial conditions (x(0)=0, dx/dt(0)=0)
x + 2 x + 2 x = 1 ; 1 1
implies x( s ) = .
2 ( s + 1) 2 + 12 s
s + 2s + 2 = 0 ⇒ p = −1, w = 1
a) Express in partial fractions 1 A( s + 1) B C
using appropriate forms from 2 2
= 2 2
+ 2 2
+
[( s + 1) + 1 ]s [ s + 1] + 1 [ s + 1] + 1 s
the table.
Hints:
2nd order responses: normalised forms
Assume a standard 2nd order model with constant d 2x dx
coefficients, output y(t) and input u(t). What is the a 2 + b + cx = f
expected behaviour and how does this vary with a,b,c dt dt
when the system has oscillatory modes?
This resource focuses on the use normalised forms to understand the behaviour.
Normalised forms are most commonly used when the system has oscillatory
behaviour, but can also give some insight to the over-damped case.
d 2x dx d 2x dx 1 b c
a 2 + b + cx = f ≡ 2 + 2ςwn + wn2 x = f ; 2ςwn = ; wn2 =
dt dt dt dt a a a
While these definitions may seem arbitrary and odd, it will be seen that there are
clear links between the new parameters of ζ, wn and the behaviours and thus this
form gives good insight into the system.
• The coefficient ζ is referred to as the damping factor (or often just damping).
• The coefficient wn is referred to as the natural frequency (the frequency at
which the system would oscillate if the damping were zero).
0.5
x(t)
0.4 1
0.3
0.5
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4
0
0 1 2 3 4 5 6 7 8 Seconds
Seconds
Low damping, large oscillation
and slow convergence. Damping close to 1, small
oscillation and fast convergence.
SUMMARY
1. Under-damped second order ODES can be expressed in a normalised
form.
2. Convergence rate and oscillation are closely linking to the damping
ratio is this form.
3. The normalised form is given as:
d 2x dx wn2
2
+ 2ςwn 2
+ wn x =
dt dt 2
ζ >1 - an over damped system no oscillations (different real poles).
ζ =1 - a critically damped system no oscillations (equal real poles).
ζ <1 - an under damped, oscillatory system (complex poles).
2nd order responses: overshoot
Assume a standard 2nd order model with constant
coefficients, output x(t) and input u(t). What is the d 2x dx
expected impact on overshoot/oscillation of a change 2
2wn wn2 x f
dt dt
in damping ratio?
This resource assumes that damping is less than one and uses f=wn2 for
convenience and also zero initial conditions (otherwise a generic result is not
possible).
Assumption
We know that with an 1.5
underdamped system there is Overshoot = o
Step response with =0.5
This note focuses on the derivation of the full solution for x(t) and, from this, derives
values for the overshoot ‘o’ and its dependence on model parameters.
General solution for step response of an underdamped 2nd order ODE (zero initial
conditions). Only an abbreviated derivation is given here.
d 2x
dt 2
2wn
dx
dt
wn2 x wn2 x Ae wnt sin( wd t ) C w d wn 1 2
Substitute in the initial conditions and steady-state lim t x(t ) =1.
dx
Aewnt [wd cos(wd t ) wn sin(wd t )]
x(t ) 1 Aewt sin(wd t );
dt
x(0) 0 0 1 A sin ; x (0) 0 wd cos( ) w sin( ) 0
sin wd 1 2 1 1
HENCE: tan ; A
cos wn sin 1 2
e wnt 1 1 2
x(t ) 1 sin(wd t tan )
AND THUS:
1 2
occur when d w t w n t ; x (t ) 1 ;
1 2 1 2
t
1 2
wd wn 1 2 e sin( )
overshoot x(t ) 1
1 2
sin( ) 1 2
but 1 overshoot e
1 2
0.8
1 2
overshoot e
1.2
Overshoot
0.7
1 0.6
0.5
0.8
Amplitude
0.4
d 2x dx
0.6
2
2 x 1; 0.3
0.4
dt dt 0.2
2 0.1
d x dx
0.2
2
4 16 x 16 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
dt dt Damping ratio
0
0 1 2 3 4 5 6 7 8
Time (sec)
Overshoot becomes negligible for ζ>0.7 Successive overshoots follow the same
ratio of convergence
1.4 2 1+0.8
Critically damped 1.8 Damping=0.07
1.2
Damping=0.71 1.6
1+0.83
1 1.4 1+0.87
1.2
0.8
x(t)
x(t)
1
0.6
0.8
0.4 0.6
0.4
0.2
0.2
1-0.82
0 0
0 1 2 3 4 5 6 7 8 0 2 4 6 8 10 12 14 16 18 20
Seconds Seconds
SUMMARY
Solution for d 2x dx
2 wn wn2 x f
dt 2
dt with f=wn2
e wnt 1 1 2
and zero initial conditions is: x(t ) 1 sin(wd t tan )
1 2
Time to first peak is: t
wd wn 1 2
Overshoot at first peak is: 1 2
overshoot e
2nd order responses: steady-state
Assume a standard 2nd order model with constant
coefficients, output x(t) and input u(t). What is the d 2x dx
expected behaviour and how does this vary with
+ 2ς wn + wn
2
x= f
dt 2 dt
damping ratio?
This resource focuses on the expected steady-state: lim t →∞ x(t )
It is assumed that the steady-state exists and thus the damping ratio is positive.
Definition of steady-state
At steady-state, x(t) is constant and therefore:
dx d 2x
lim t →∞ = 0; lim t →∞ 2 = 0;
dt dt
Substitute these into the differential equation and hence:
d 2 x dx dx d 2x f
2 + 2ςwn
2
+ wn x = f AND = 0, 2
= 0 ⇒ wn2 x = f OR x = 2
dt dt dt dt wn
SUMMARY: The asymptotic value of x depends solely on the natural frequency and
the input signal.
0.5
x(t)
0.4 1
0.3
0.5
0.2
Steady-state
x + 5 0.1
x + 2 x = 1; x + 3 x + 2 x = 1
3the 3.5
same.4
0
0 0.5 1 1.5 2 2.5
x + 2 x00+ 2 x1= 1; 2 x +3 x + 24 x = 51 6 Steady-state
7 8 the Seconds
Seconds same.
x + 0.2 x + 2 x = 1
Steady-state computed by removing the derivatives.
So 300x=1
EXAMPLES: Find the steady-state for the following systems/input pairs (you can
assume convergence).
1
x + 5 x + 10 x = 1 ⇒ limt →∞ x(t ) =
10
2
x + 3x + 4 x = 2 ⇒ limt →∞ x(t ) =
4
0.4
x + 2 x + 6 x = 0.4 ⇒ limt →∞ x(t ) =
6
1.2
x + x + 5 x = 1.2 ⇒ limt →∞ x(t ) =
5
3
x + 0.2 x + 10 x = 3 ⇒ limt →∞ x(t ) =
10
SUMMARY
1. Steady-state is not affected by changes in damping alone.
2. Steady-state can be computed quickly by setting all the derivatives to
zero.
3. WARNING: This note assumes convergence, that is that
asymptotically x(t)constant.
2nd order responses: convergence/behaviour
Assume a standard 2nd order model with constant d 2x dx
coefficients, output x(t) and input u(t). What is the 2
+ 2ςwn + wn2 x = f
dt dt
expected impact on convergence rates of a change in
damping ratio?
This resource assumes that the state converges so the limit lim t →∞ x(t ) exists.
For convenience, assume that f, wn are fixed so that consideration is given solely to
the impact of damping. This is a reasonable assumption as it implies the steady-
state is constant.
Assumption
Speed of convergence is linked directly to the pole positions (see resources on
behaviours).
• A pole further into the LHP means faster convergence.
• A pole closer to the imaginary axis means slower convergence.
• A pole with imaginary part larger than the real part implies significant
oscillation.
• A pole with a real part greater than imaginary part implies the decay
dominates any oscillation.
• RHP poles imply instability/divergence behaviour.
Too oscillatory
RHP
Not allowed
Debatable
OK
Real axis
Good/fast Too slow
Good/ok
Imaginary
axis
Illustrations that pole positions and behaviour change dramatically with damping
(assuming constant natural frequency).
Damping ratio Pole positions
x + 5 x + 2 x = 1, ς = 1.77 − 4.56,−0.43 Fast and slow
• The real part of the poles is -ζwn • There are two poles, the one closest to
• As ζ gets smaller, the pole moves the origin is at wn (−ς + ς 2 − 1)
closer to the origin and thus the • As ζ gets bigger, this pole moves closer to
response slows down. the origin and thus the response slows
down.
SMALLER DAMPING slower LARGER DAMPING slower convergence
convergence
Example here uses wn=1 and plots the real part of the slowest pole.
0
-0.1
Smaller damping
-0.2 slower roots.
-0.3
Slowest pole
-0.4
-0.5
Larger damping
slower roots.
-0.6
-0.7
-1
0 0.5 1 1.5 2 2.5 3
Damping ratio
SUMMARY
1. If damping is less than one, reducing damping slows down convergence.
2. If damping is greater than one, increasing damping slows down convergence.
3. Faster convergence corresponds to damping ratios around 1.
QUESTION
Which of the following will converge to the steady-state more quickly and why?
x + 5 x + 16 x = 1; x + 8 x + 16 x = 1
x + 20 x + 16 x = 1; x + 12 x + 16 x = 1
Answer: These all have the same natural frequency: 𝑤𝑤𝑛𝑛2 = 16, 𝑤𝑤𝑛𝑛 = 4
For completeness, for each example in turn the roots are below which confirms the
expectation:
Objective is to form a sketch of a 2nd order response with pen and paper which
captures the key characteristics.
• It is conventional to do the sketch from zero initial conditions as other
assumptions would required excessive reworking of the algebra so a quick
sketch is not possible.
• The basic technique is to compute core values, put these on a graph and then
sketch between them.
STEP 2: Peak nπ
overshoot times. t= = 1.4, 2.8,
wn 1 − ς 2
remembering to have
zero gradient at t=0.
0.15
x(t)
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Seconds
EXAMPLE 2 for student work
Sketch the response for x + 2 x + 17 x = 25.5 and hence validate the sketch
provided here.
2.5
Step response with ζ =0.24
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4
SUMMARY:
These sketches assume a particular format of the 2nd order ODE, that is:
d 2x dx 𝐴𝐴
2
+ 2ςwn + wn2 x = f or 𝑌𝑌(𝑠𝑠) =
dt dt 2
𝑠𝑠 2 +2𝜁𝜁𝑤𝑤𝑛𝑛 𝑠𝑠+𝑤𝑤𝑛𝑛
The aim is to characterise the oscillatory behaviour. It is accepted that the specific
values such as overshoot/undershoot times, size of first peak, etc. will vary for
different initial conditions, but the decay rate and damped oscillation frequency will
stay the same.
High order ODE solutions using MATLAB
Assume a 2nd order model with 𝒅𝒅𝟐𝟐 𝒙𝒙 𝒅𝒅𝒅𝒅
constant coefficients, output 𝒇𝒇 = 𝒂𝒂 𝟐𝟐 + 𝒃𝒃 + 𝒄𝒄𝒄𝒄;
𝒅𝒅𝒕𝒕 𝒅𝒅𝒅𝒅
x(t) and constant input f(t). 𝒙𝒙(𝟎𝟎) = 𝒙𝒙𝒙𝒙, 𝒙𝒙̇ (𝟎𝟎) = 𝒙𝒙̇ 𝟎𝟎
Must use
multiply
Note use
of ==
solution
WARNING: A common mistake is to write, for example, ‘3x’ instead of ‘3*x’. It would
also be easy to forget the need for “==” and instead just write just “=”..
The solution is a symbolic variable so you need to understand how to use symbolic
variables in MATLAB. [Discussed elsewhere.]
EXAMPLE 2
𝒅𝒅𝟐𝟐 𝒚𝒚 𝒅𝒅𝒅𝒅
𝒔𝒔𝒔𝒔𝒔𝒔(𝒕𝒕) = + 𝟓𝟓 + 𝟖𝟖𝟖𝟖; 𝒚𝒚(𝟎𝟎) = 𝟏𝟏, 𝒚𝒚̇ (0)=0
𝒅𝒅𝒕𝒕𝟐𝟐 𝒅𝒅𝒅𝒅
Note here we have a more involved input function and also non-zero initial
conditions. However the syntax is unchanged as seen below.
Non-simple
input.
Non-zero initial
condition.
Note here initial conditions are all in terms of x(t) and none in terms of derivatives
but also do not need to be at time zero.
Initial conditions
The first note looked at the use of dsolve.m to solve ODEs. This note looks at
analytic solutions obtained through Laplace Transforms.
Or for a more general scenarios with non-zero intial conditions and arbitrary input
signal.
MATLAB has 2 tools to deal with these types of Laplace transform operations,
assuming you wish to form analytic as opposed to numeric solutions.
Both these files require the symbolic toolbox and use symbolic variables.
Here we focus on the solution of 2nd order ODEs, and thus the tool ilaplace.m.
EXAMPLE 1: Analytic solution of a 2nd order ODE.
MATLAB will give an exact analytic solution. Here some screen dumps are used to
illustrate the required coding. Assume that we have formed the solution in terms
of the model and input parameters, that is:
Solutions will be given, assuming: (i) the numbers are entered directly and (ii)
assuming the parameter values are given.
4𝑠𝑠 + 1
𝑋𝑋(𝑠𝑠) =
2𝑠𝑠 2 + 8𝑠𝑠 + 10
>> syms s
>> X=(4*s+1)/(2*s^2+8*+10)
>> x= ilaplace(X)
0.2𝑠𝑠 − 1
𝑍𝑍(𝑠𝑠) =
𝑠𝑠 2 + 0.8𝑠𝑠 + 0.2
>> syms s
>> Z=(0.2*s-1)/(s^2+0.8*+0.2)
>> z= ilaplace(Z)
ii) Code assuming the parameter values are given.
%%%% CODE
syms s
a=1; b=2;c=2;F(s)=1/s;
x0=-1;xd0=0;
X=[F+s*a*x0+b*x0+a*xd0]/(a*s^2+b*s+c) ;
x=ilaplace(X)