You are on page 1of 151

ACS6001 Systems

Modelling
Dr George Panoutsos
Department of Automatic Control and
Systems Engineering

Welcome!

Dr George Panoutsos
Amy Johnson Building (ACSE), Room D8a
g.panoutsos@sheffield.ac.uk

ACS6001 2010-2011 Copyright

MOLE
Lecture Slides
code, examples
Notes
Extra Material

ACS6001 2010-2011 Copyright

Module Structure
ACS6001 Systems Modelling
30 Credits for the whole of ACS6001
Assessment: Assignment 12.5% - ACS6001.02b GP
Monday 29 Nov. 2010, 4pm
(barcode system)

ACS6001 2010-2011 Copyright

Module Structure Syllabus


1.Introduction

2.Theoretical
& Empirical
Equations

3. System
Linearisation

4. First
Order
Systems

5. Second
Order
Systems

6. Transfer
Function
Models

7. DC Motor
Models

8. Block
Diagrams

9. State Space
Models

ACS6001 2010-2011 Copyright

Recommended text (secondary reading)


Aslaksen E. and Belcher R., Systems Engineering, Prentice
Hall, 1992
Close C. M., Frederick D. K and Newell J. C., Modelling
and Analysis of Dynamic Systems, 3rd Ed., John Wiley &
Sons, INC. 2002
Dorf R. C. and Bishop R. H., Modern Control Systems, 9th
Ed., Prentice Hall, 2001
Hung V. V. and Esfandiari R. S., Dynamic Systems
Modelling and Analysis, McGraw-Hill, 1998
ACS6001 2010-2011 Copyright

Systems Engineering Approach


Control
Modelling

Computing
Design
System
Testing

Abstraction
Computer
Simulation

Systems Modelling

Performance
Mathematical
Analysis

Dynamic Analysis

Systems Engineering Approach


ACS6001 2010-2011 Copyright

Systems Modelling

ACS6001 2010-2011 Copyright

Systems Engineering
What is systems engineering?

Systems engineering is defined as the art


of designing and optimising systems
starting with an expressed need and
ending up with the complete set of
specifications for all the system elements.
Aslaksen & Belcher, Sys. Eng. Ch.2

ACS6001 2010-2011 Copyright

10

Systems Engineering
What is systems engineering?
Aslaksen & Belcher, Sys. Eng. Chapter 2
2.1.1
2.1.2
2.1.3

ACS6001 2010-2011 Copyright

11

Systems Modelling
1. System description and
abstraction
We need to
have an understanding of the system
be able identify the systems relevant
components
be able to suggest an appropriate
abstraction level

Example
ACS6001 2010-2011 Copyright

12

Systems Modelling
2. Modelling the system
Solving the model

A mathematical
model is a description
of a system in terms
of equations
Close, Modeling and Analysis of Dyn
Sys, pp2-4
ACS6001 2010-2011 Copyright

y=f(x)

13

Systems Modelling
2. Modelling the system
Solving the model

The model is only an


approximation of the
real system!
Validation
Testing
ACS6001 2010-2011 Copyright

y=f(x)

14

Systems Modelling
3. Computer aided
simulation
Easier to analyse
complex and/or large
scale systems

MATLAB/Simulink
(Dr Z Q Lang)

ACS6001 2010-2011 Copyright

Y1=f(x1)
Y2=f(x1,x2)
Y3=g(x3)
Y4=g(x1,x3)
Y5= Y3-Y1

15

Systems Modelling

Performance related to
design/specification

amplitude

4. System analysis and


performance evaluation

Did we achieve our targets?


If not, what we can do to
improve?
ACS6001 2010-2011 Copyright

time

16

Systems Modelling
Example of the systems engineering
approach
Student attention level in lectures

ACS6001 2010-2011 Copyright

17

System Abstraction
What is abstraction and why we need it?
simplification
Partitioning the system allows for a reduced
complexity
Easier to focus on specific system properties
Fundamental to the systems approach

ACS6001 2010-2011 Copyright

18

Example:
The human cardiovascular system

High abstraction level

ACS6001 2010-2011 Copyright

19

Example:
The human cardiovascular system

Low abstraction level

ACS6001 2010-2011 Copyright

20

Example:
The human
cardiovascular system

Very low abstraction level!

ACS6001 2010-2011 Copyright

21

Example:
The human cardiovascular system
What is the correct abstraction level?
Problem specific
It needs to include the systems properties under
investigation
Sometimes its not possible to get to the right
abstraction level! (why?)
ACS6001 2010-2011 Copyright

22

Systems Modelling
What is a model?
A model is representation of something
The model should be as similar as possible to the
entity that it represents
but can never be exactly same as the real thing!

ACS6001 2010-2011 Copyright

23

Systems Modelling
Types of model
Physical toy model of a car
Pilot plant a small/large scale working model
of a system
Mathematical set of equations describing
the real system
ACS6001 2010-2011 Copyright

24

If we have the model of a


system we can
Try out proposed changes,
experimentation
Reduce cost easier, cheaper, faster
but not always!

Reduce risk

ACS6001 2010-2011 Copyright

(People trust computers!)

25

but there are limitations:


The model is not 100% accurate
Approximation (errors? Semester 2)

The system, or specific parameters, may


not be possible to be modelled
Can also be time consuming, expensive to
develop a model (contradicts advantages!)
ACS6001 2010-2011 Copyright

26

but there are limitations:


Validation can be difficult
Example?

(People dont trust computers!)

ACS6001 2010-2011 Copyright

27

Mathematical Models
can be applied to a variety of systems:
Engineering
Biomedical
Financial
Weather
+ many more!
ACS6001 2010-2011 Copyright

28

Mathematical Models
For this course:
Model is a set of mathematical equations
describing the behaviour of a system

ACS6001 2010-2011 Copyright

29

Modelling errors
Parameters difficult to measure
i.e. friction

Time varying parameters


Due to wear, aging

Environmental errors
Temperature, pressure, humidity
ACS6001 2010-2011 Copyright

30

Good modelling practice


As simple as possible!
Model each component in the system
separately
Test each component model
Combine the components models into a
model of the full system
Test the full system model
ACS6001 2010-2011 Copyright

31

Example

ACS6001 2010-2011 Copyright

32

Modelling Techniques
Theoretical equations
System behaviour is known from theory
Example: electrical circuit

ACS6001 2010-2011 Copyright

33

Modelling Techniques
Empirical Equations
System behaviour is not known from theory
or too complex!

Input-output relationship is measured via


practical tests
1. Select and apply an appropriate input signal
2. Measure the corresponding output (response)

ACS6001 2010-2011 Copyright

34

Modelling Techniques
3. Fit a mathematical relationship

curve fitting, regression or

Neural Networks, Fuzzy Modelling

Example: CV system

ACS6001 2010-2011 Copyright

35

Example:
Mathematical model of CV system
(simplified form)
Blood pressure (systolic mmHg)
Cortisol level (total metabolites)

ACS6001 2010-2011 Copyright

Blood pressure

Cortisol

100

5000

120

6000

140

7000

160

8000

36

In practice a combination of
theoretical/empirical models may be used
as necessary
Example: electrical circuit

ACS6001 2010-2011 Copyright

Independent study:
Complexity Generality!
regarding systems modelling

ACS6001 2010-2011 Copyright

Module Structure Syllabus


1.Introductio
n

2.Theoretical
& Empirical
Equations

3. System
Linearisation

4. First
Order
Systems

5. Second
Order
Systems

6. Transfer
Function
Models

7. DC Motor
Models

8. Block
Diagrams

9. State Space
Models

ACS6001 2010-2011 Copyright

Physical System Equation Models


Physical system equation models usually
take the form of first or second order
ordinary differential equations (o.d.e. s)
1st

dY
= AY + BX
dt

2nd

d 2Y
dY
=A
+ BY + CX
2
dt
dt

ACS6001 2010-2011 Copyright

Physical System Equation Models


Note that these are both linear equations
that can only be applied if a system is
approximately linear.
INPUT X

ACS6001 2010-2011 Copyright

SYSTEM
COMPONENT

OUTPUT Y

Superposition principle
Test for linearity:
Suppose: Input X 1 (T ) Output Y1 (T ) and

Input X 2 (T ) Output Y2 (T )

What does

input of X 1 (T ) + X 2 (T )

give?

If X 1 (T ) + X 2 (T ) Y1 (T ) + Y2 (T ), system is linear.
If not, system is non-linear.
Examples
ACS6001 2010-2011 Copyright

Close, Modeling and Analysis of Dyn Sys

Superposition principle
In general:
Electrical, mechanical systems:
Approximately linear over certain operating
range
Thermal, fluid systems: non-linear

ACS6001 2010-2011 Copyright

Easiest if we apply a linear model to


represent the system
1st 2nd order ode

Many system components are close to


linear for a normal range of inputs
Normal = range of inputs expected under
normal operating conditions
ACS6001 2010-2011 Copyright

What if the system component


is non-linear?
Can we still apply linear equations?

ACS6001 2010-2011 Copyright

Linearisation

Suppose the input (x)/ output (y) relationship is: y (t ) = g [x(t )]

Carry out Taylor Series expansion about

dg
y = g ( x0 ) +
dx

d 2g
( x x0 ) +
dx 2
x= x0

x= x0

( x x0 ) 2
d 3g
+
dx 3
2

x= x0

( x x0 ) 3
+
3!

(1)

If the range x x0 is small, the slope at

x = x0 is a good approximation to the curve.

Hence, (1) approximates to: y = g ( x0 ) +

dg
dx

Or:

where y0 = g ( x0 ) and

( x x0 )
x= x0

y = y0 + m( x x0 )
m=

dg
dx

x= x0

(m is the slope of the curve at the operating point).


This can be alternatively written as:

( y y0 ) = m ( x x0 )

or as: y = m x

ACS6001 2010-2011 Copyright

10

Multiple inputs
with one output
Suppose

y = g ( x1 , x2 , xn )

Expanding about
and neglecting high
order terms:
g
y = g ( x10 , x20 , xn 0 ) +
x1

g
( x1 x10 ) +
x2
x= x0
+

ACS6001 2010-2011 Copyright

( x2 x20 )
x= x0

g
xn

( x1 xn 0 )
x= x0

11

Example:
Pendulum
L

Torque is a non-linear function of


T = MgL sin

1
0.8
0.6

Torque

0.4
0.2
0

-pi

pi

-0.2
-0.4
-0.6
-0.8

ACS6001 2010-2011 Copyright

-1
-4

-3

-2

-1

Angle

12

To form a linear approximation:


Take first derivative and evaluate at equilibrium:
T = MgL

d sin
( )
d
0

= MgL cos 0o 0o

= 0

= MgL
This is reasonably accurate over the range

ACS6001 2010-2011 Copyright

13

Real BME system:


Blood pressure monitoring in the ICU
150
140
130
Angle: 0.63, MSE : 19.34, STD Res : 4.32

120

Blood Pressure

110
100
90
80
70
60
50
40
500

ACS6001 2010-2011 Copyright

600

700

800

900
Sampling Time

1000

1100

1200

14

Types of systems
Linear across the whole range
Linear for specific range
Linear only around a specific point
Other types of non-linearity
Saturation
Dead-zone
ACS6001 2010-2011 Copyright

15

Grossly non-linear systems


Saturation

Dead-zone
Other non-linearities: delay, backlash
A look-up table may be used to describe the
system
ACS6001 2010-2011 Copyright

16

st
1

Order Systems

Modelled by a first order o.d.e.

Example 1
A cup of coffee cooling from 100 o C to room temperature of 21o C .

M odelling

It is known from theoretical considerations that the rate of heat loss if proportional to
the difference between the temperature of the coffee and room temperature (thus,
the rate of heat loss decreases as the temperature of the coffee falls).

It is also known from theoretical considerations that the rate of fall in temperature is
proportional to the rate of heat loss.

Thus:

where T is the temperature of the coffee,


time variable and k is a constant.

This will be developed further in a little while.

dT
= k (T Troom )
dt

ACS6001 2010-2011 Copyright

(1)

Troom

is the room temperature, t is the

17

st
1

Order Systems

Example 2

A water tank with a steady flow of water into the top of the tank has a leak from the
bottom of the tank.

The rate of leakage is proportional to the depth of the water in the tank, H.

Water flows into the tank at a constant rate, S.

M odelling

Rate of inflow = S

Rate of outflow = KH, where K is a constant

Hence, rate of change of water level in tank is:

dH
= S KH
dt

This will be developed further in a little while.

(2)

ACS6001 2010-2011 Copyright

18

Use of models

Models are created in order to investigate how the real system that the model
represents behaves. We may wish to determine the following from the models above:

Example 1

o
How long will it take for the coffee to cool to 90 C ?

Example 2

What level will the water settle down to in steady-state?

What is the depth of water at some general time t?

These questions can be answered by solving the relevant system model.

N.B. solving or simulating a model involves forming an expression for the output
variable of the system as a function of time.

ACS6001 2010-2011 Copyright

Solving example 1

To predict the time t when the coffee has cooled to a temperature of 90 o C :

Rearrange equation (1):

dT
+ kT = kTroom
dt

We need to find an expression for T in terms of the other system variables.

Unfortunately, it is impossible to get the required expression directly from equation


(3) because this equation contains both T and dT/dt terms.

This is a well known problem with first order differential equations.

ACS6001 2010-2011 Copyright

(3)

It was shown last week how to solve this sort of problem.


For a system with input u and output x, represented by the equation:
dx
ax = bu (4)
dt
bu
a solution can be obtained as:
(5)
x( t ) = e at x( 0 ) +( e at 1)
a
The general solution (5) can be used as a solution to equation (3) if the following
substitutions are made:
x = T, a = -k, b = k, u = Troom

Thus, at T = 90 o C : 90 =. 100e kt ( e kt 1)21

90 = 79e kt + 21
e kt = 69 79 ;
Thus, kt = 0.1353

We are trying to find a value for t but we have only got a value for kt

Hence, we need to know k.

k depends on the strength of the coffee, and the amount of sugar.

We can find an approximate vale for k but not its exact value.

Hence, although we know the general form of the model from the background theory,
there is an error because we do not know the exact value of k.

ACS6001 2010-2011 Copyright

ekt = 79 69 = 1.1449

Solving equation 2 (Leaking water tank)

What level (value of H) will the water settle down to in steady-state?

What is the level of the water (value of H) at some general time t?

When the water level reaches steady-state, the rate of change of level is zero, i.e.
dH/dt=0.

Hence, from equation (2), S = KH [Equation (2) was dH/dt = S KH]

Thus, H = S/K

Note that we need to know the value of the parameter K in order to get H

To get an expression for the value of H at some general time t, we need to solve
equation (2).

To do this, we can apply the general solution for a first order system given in equation
(5) if we make the following substitutions:

X = H, a = K, b = 1, u = S.
ACS6001 2010-2011 Copyright

Module Structure Syllabus


1.Introduction

2.Theoretical
& Empirical
Equations

3. System
Linearisation

4. First
Order
Systems

5. Second
Order
Systems

6. Transfer
Function
Models

7. DC Motor
Models

8. Block
Diagrams

9. State Space
Models

ACS6001 2010-2011 Copyright

nd
2

order systems

These are modelled by 2nd order ODEs


We will look at two examples:
Mass-spring system (MS system)
Damped mass-spring system (D-MS System)
Note: 1)elastic deformation 2) linearity
ACS6001 2010-2011 Copyright

MS System

Newtons second
law of motion states:

forces acting on body = mass of body acceleration

Consider a small
displacement of
mass y downwards:
Force exerted by spring = Ky
Thus, Ky = My

or My + Ky = 0
ACS6001 2010-2011 Copyright

D-MS System

Forces are as before, but we


also have the dampers
force: Damper force = Cy

Newtons 2nd law of motion


Cy Ky = My

or My + Cy + Ky = 0

ACS6001 2010-2011 Copyright

Solution of
equations

nd
2

order system

Output = f(t)
Analytical type of solution (as the one
developed for 1st order systems) is very
difficult for 2nd order systems!
We can use Laplace transform instead

ACS6001 2010-2011 Copyright

Laplace Transform
Time
domain,
differential
equation

ACS6001 2010-2011 Copyright

Laplace
Transform

Laplace
variable S,
algebraic
equation

D-MS System
Solution of:

My + Cy + Ky = 0

Laplace transform:
M [ s 2Y ( s ) sy (0) y (0)] + C [sY ( s ) y (0)] + KY ( s ) = 0
Initial conditions?

ACS6001 2010-2011 Copyright

D-MS System
M [ s 2Y ( s ) sy (0) y (0)] + C [sY ( s ) y (0)] + KY ( s ) = 0

(Eq. 1)

Initial conditions:
Let y (0) = y0 ; y = 0 at t = 0

This means displacement of mass M at time


zero is y0 and initial velocity is zero.

Note: If we specify that initial conditions are zero, we


must check that this is true ------ we cannot just
assume that initial conditions are zero!
ACS6001 2010-2011 Copyright

9
Inserting initial conditions in equation (1) gives:

Ms 2Y ( s ) Msy0 + CsY ( s ) Cy0 + KY ( s ) = 0


i.e.

Y ( s) =

(Ms + C ) y0

(Eq.2)

Ms + Cs + K
2

Equation (2) can be written as:


C

s + y0
A( s )
M
Y (s) =
=
C
K B( s)
s2 +
s+
M
M

where A( s) = s +

C
Cs K
2
+
y0 and B ( s ) = s +
M
M M

(Eq.3)

The equation B(s) = 0 is known as the characteristic equation of the system.


The roots of the characteristic equation are the values of s which make B(s) = 0
The roots are also known as the poles of the system.
The poles determine the character of the response (i.e. whether it is oscillatory or
not).
The roots of A(s) are known as the zeros of the system.
At the zeros, the function for Y(s) in equation (3) becomes equal to zero.
ACS6001 2010-2011 Copyright

10

Design example
returning to equation 3:
s+5
Then : Y ( s ) = 2
s + 5s + 6

Let

C
=5 ;
M

Factorising the denominator:


Y (s) =

s+5
(s + 2)(s + 3)

ACS6001 2010-2011 Copyright

K
=6
M

y0 = 1

11

Design example
Expanding as partial fractions:
3
2
Y (s) =

(s + 2) (s + 3)

ACS6001 2010-2011 Copyright

Y (s) =

k1
k
+ 2
(s + 2) (s + 3)

k1 =

(s + 2)(s + 5) = (s + 5) = 3 = 3
(s + 2)(s + 3) s =2 (s + 3) s =2 1

k2 =

(s + 3)(s + 5) = (s + 5) = 2 = 2
(s + 2)(s + 3) s =3 (s + 2) s =3 1

12

Design example
Performance evaluation
Step Response
0.9
0.8
0.7

Amplitude

0.6
0.5
0.4
0.3
0.2
0.1
0

0.5

1.5
Time (sec)

ACS6001 2010-2011 Copyright

2.5

3.5

13

Design example
Performance evaluation
Step Response

c/m=5 -> 3

0.7

0.6

(damper)
Amplitude

0.5

0.4

0.3

0.2

0.1

0.5

1.5

2.5

Time (sec)

ACS6001 2010-2011 Copyright

3.5

4.5

14

Design example
Performance evaluation
k/m=6 -> 10

Step Response
0.45
0.4

(spring)

0.35

Amplitude

0.3
0.25
0.2
0.15
0.1
0.05
0

ACS6001 2010-2011 Copyright

0.5

1.5

2.5
Time (sec)

3.5

4.5

15

Design example
Have we finished our design?
No! we cannot apply S domain equations to
the system!

ACS6001 2010-2011 Copyright

16

Finally, we require y(t).

Apply Inverse Laplace Transform:

(using standard Laplace transform tables)

[ ] = (s 1 a )

Laplace transform table shows that: L e

Hence,

Y (s) =

1
at
L1
=
e

s a

at

(Eq.4)

3
2

(s + 2) (s + 3)

For first term in Y(s), a = 2 and for second term a = 3

Hence, applying inverse Laplace transform on Eq.4,

ACS6001 2010-2011 Copyright

y (t ) = 3e 2t 2e 3t

17

Simulation languages
Clearly, the process of simulation by solving the model
equations is tedious.
Because of this, simulation is usually carried out by using
purpose-designed simulation languages
Different simulation languages require the system to be
described in different ways.
One way is to express the system in terms of first and
second order ordinary differential equations (as just
developed in recent lectures).
Another way is to express the system in terms of the
transfer functions of its components.
ACS6001 2010-2011 Copyright

18

Transfer function
The relationship between the input and
output of a system component is often
expressed in terms of the TRANSFER
FUNCTION (TF).
L [ y (t ) ]
TF =
L [ x(t ) ]

ACS6001 2010-2011 Copyright

with all initial conditions zero

19

Transfer function
LTI only!
Cannot describe internal system structure
(i.e. in/out only)

ACS6001 2010-2011 Copyright

Module Structure Syllabus


1.Introduction

2.Theoretical
& Empirical
Equations

3. System
Linearisation

4. First
Order
Systems

5. Second
Order
Systems

6. Transfer
Function
Models

7. DC Motor
Models

8. Block
Diagrams

9. State Space
Models

ACS6001 2010-2011 Copyright

DC Motors
Widely applied in industry
Robot manipulators
Disc drives
Machine tools
Home appliances
etc.

ACS6001 2010-2011 Copyright

DC Motors
Benefits
Provide accurate speed/position control
Portable
High torque

Drawbacks
Not enough power for certain applications (use
hydraulics instead)
Difficult to use in gas explosion risk environments
ACS6001 2010-2011 Copyright

DC Motors
Main components:
A rotor (armature)
which rotates and
therefore creates the
torque for the load
A stator (does not
move) which is used to
create a magnetic field
for the rotor
ACS6001 2010-2011 Copyright

DC Motors
Electromagnetic phenomena:
Torque creation due to a current in a
conductor (rotor) that is exposed to a
magnetic field (created by the stator)
Induction of back EMF to the rotor due to a
moving conductor (rotor) in a magnetic field
(created by the stator)
ACS6001 2010-2011 Copyright

DC Motors
Physics: Some units that well use:
Force: N=kgm/s2
Torque: Nm
Current: A (Ampere)=C/s (Coulomb/s)
Magnetic Field: T (Tesla)=N/(Am)
Magnetic flux: Wb (Webber) = Tm2

ACS6001 2010-2011 Copyright

DC Motors
Creation of torque:
Lorentz Force

dF = idl B

ACS6001 2010-2011 Copyright

DC Motors
Torque:
T=I A B sin
where A is the area of
the current loop (coil)

ACS6001 2010-2011 Copyright

DC Motors

The DC motor so far works as


a compass so something
else is needed

ACS6001 2010-2011 Copyright

10

DC Motors

Brushes

ACS6001 2010-2011 Copyright

Commutator

11

DC Motors
In practice:
Several coils are added into to armature to increase torque.

As an approximation

T = Ka I

ACS6001 2010-2011 Copyright

12

DC Motors
Back EMF (electro-motive force)
Faradays law of induction
(one coil)

(many coils)

d c
dA( B cos )
=
dt
dt
d
= AB sin
= AB sin
dt

e =

eb = K b
Kb = K a

ACS6001 2010-2011 Copyright

eb
- +
-

13

DC Motors
Electrical and mechanical equations:

dI
ea = Ra I + La
+ eb
dt

ACS6001 2010-2011 Copyright

d 2
d
J 2 +F
=T
dt
dt

14

DC Motors

Differential equation
model of armature
controlled DC motors

ACS6001 2010-2011 Copyright

dI

ea = Ra I + La dt + eb

T = K a I

J + F = T

, = d / dt

e
K
=
b
b

Kb = K a

15

DC Motors
Laplace transform

ACS6001 2010-2011 Copyright

16

DC Motors
Solve ia as a function
of ea, then use the
result in the torque
equation

ACS6001 2010-2011 Copyright

17

DC Motors
Use the new torque
result in the
mechanical equation

ACS6001 2010-2011 Copyright

18

DC Motors
Use the back EMF
equation and solve for
theta

ACS6001 2010-2011 Copyright

19

DC Motors
Armature
-

ACS6001 2010-2011 Copyright

Motor Load

20

DC Motors
Frequently the
armature inductance
is neglected

TF Model

La=0
Differential equation

ACS6001 2010-2011 Copyright

21

DC Motors
Frequently the
armature inductance
is neglected
La=0
TF Model

ACS6001 2010-2011 Copyright

22

DC Motors
State-space
representation:
Define state variables:
Define control and
input variables:

ACS6001 2010-2011 Copyright

23

DC Motors
DC Motor with a gearbox
Inertias, frictions: common reference

NL NM = n

NL
NM
+

ACS6001 2010-2011 Copyright

Inertia
Friction
Angle

Motor
Jm
Fm
m

Load
JL
FL
L

24

DC Motors
DC Motor with a gearbox
Load to motor gear ratio: NL/NM=n
Mechanical equation:

ACS6001 2010-2011 Copyright

25

DC Motors
DC Motor with a gearbox

n = N L N M = L M = r1 r2

2 r1 N M = 2 r2 N L

J m m = Tm r1 f c Fmm
J L L = r2 f c FL L
Tm=

m =

fc

fc
ACS6001 2010-2011 Copyright

= L

= f c r2

26

DC Motors
DC Motor with a gearbox
Mechanical equation
2
2

J
+
n
J

+
(
F
+
n
FL )m =
Tm
( m
L) m
m

or
J m + Fm =
Tm
where:
J=
J m + n2 J L , F =
Fm + n 2 FL
ACS6001 2010-2011 Copyright

27

DC Motors
The modelling process:
1. Schematic diagram of the system

Real system -> diagram

2. Mathematically describe the physical laws


governing the system
3. Apply the physics/equation to the system
ACS6001 2010-2011 Copyright

28

DC Motors
4. Derive an output-input set of equations
describing the process under
investigation
5. Apply Laplace transform to bring the
equations to a transfer function format
6. Draw a block diagram of the
process/system in TF format
ACS6001 2010-2011 Copyright

29

DC Motors
7. Use a software package to further
investigate/analyse the system (i.e.
simulink)

ACS6001 2010-2011 Copyright

30

Conclusions: DC Motors
Transfer functions for systems under
investigation are not typically available
Control/Systems engineer to derive them!

Physical models are very useful


Only if the underlying physics are
known/understood/straightforward

ACS6001 2010-2011 Copyright

31

Conclusions: DC Motors
Physical models allow the engineer to:
See the effect of various system parameters
Give physical meaning to the states of the
system
Get a better understanding of the limitations
of the model
modelling is the most time consuming stage
of the control design workflow
ACS6001 2010-2011 Copyright

Module Structure Syllabus


1.Introduction

2.Theoretical
& Empirical
Equations

3. System
Linearisation

4. First
Order
Systems

5. Second
Order
Systems

6. Transfer
Function
Models

7. DC Motor
Models

8. Block
Diagrams

9. State Space
Models

ACS6001 2010-2011 Copyright

What weve seen so far


Dynamic systems modelling:
ODEs
Laplace transform
Transfer Function

ACS6001 2010-2011 Copyright

TF and matrix form


representation
For a single equation:
Or:

Y ( s) = G ( s) R( s)

Y ( s ) = G1 ( s) R1 ( s ) + G2 ( s ) R2 ( s )

For a system of multiple simultaneous


equations

ACS6001 2010-2011 Copyright

Two TFs

Y1 ( s ) = G11 ( s ) R1 ( s ) + G12 ( s ) R2 ( s )
Y2 ( s ) = G21 ( s ) R1 ( s ) + G22 ( s ) R2 ( s )
or in Matrix Form:

Y1 ( s ) G11 ( s ) G12 ( s ) R1 ( s )
Y ( s ) = G ( s ) G ( s ) R ( s )
22
2 21
2

ACS6001 2010-2011 Copyright

In general, for J inputs and I outputs

Y1 ( s ) G11 ( s )
Y2 ( s ) G21 ( s )


Y ( s ) G ( s )
I I1

G1J ( s ) R1 ( s )
G2 J ( s ) R2 ( s )

GIJ ( s ) RJ ( s )

Why would we be interested in the matrix form?

ACS6001 2010-2011 Copyright

Example:
Complex D-MS system

k
c2

M1
c1
M2
ACS6001 2010-2011 Copyright

Example:
Complex D-MS system
Review of modelling strategy
(1) Split system into its separate component parts
(2) Model each component separately
(3) Combine the component models into a model
of the full system
Here, there are two main components, M1 and M2

k
c2

M1
c1
M2

ACS6001 2010-2011 Copyright

Example:
Difficulty: to get the damper forces right

k
c2

M1

x1

c1
x2

M2
w(t)
ACS6001 2010-2011 Copyright

Forces on M1
Spring force : Kx1( t )
Damper force : C1 [ x 1( t ) x 2( t )]
Accelerating force : M1x1( t )

relative velocity of M1 with respect to M2 )

Equating forces:
Newtons 2nd law of motion: ODE (1)
Forces on M2
Damper forces : C 2 x 2( t ) C1 [ x 2( t ) x 1( t )]
Accelerating force : M2 x 2( t )
Disturbing force : W( t )

Equating forces:
Newtons 2nd law of motion: ODE (2)

ACS6001 2010-2011 Copyright

10

Transfer function matrix


s 2M2 + s( C1 + C 2 )

sC1

X 2( s ) W( s )

= 0
2
X
(
s
)
s M1 + sC1 + k 1

ACS6001 2010-2011 Copyright

sC1

11

Block Diagram
The facility to represent the relationship of
a systems variables using diagrammatic
means
Block Diagram representation
Modern Control Systems, Dorf & Bishop

ACS6001 2010-2011 Copyright

12

Block Diagram representation


Block diagram: core element in the
systems engineering approach
Unidirectional blocks that represent the
TF of the variables of interest
X

G(s)

Cause and effect relationship (TF)


ACS6001 2010-2011 Copyright

13

Example:
DC Motor TF model:
ea(s)

G(s) =

ACS6001 2010-2011 Copyright

G(s)

(s)

14

The gain block


A

X(s)

Y(s)=AX(s)
Or A=-5
Or k/M
Or 1/t

ACS6001 2010-2011 Copyright

Y(s)

15

The transfer function block


X(s)

F(s)

Y(s)

F(s): any transfer function


Example: first order system: F(s)=A/(s+5)
the integrator: F(s) = 1/s

ACS6001 2010-2011 Copyright

16

Block diagrams in series


X(s)

F(s)

Y(s)

G(s)

Equivalent diagram:
X(s)

Numerical example
ACS6001 2010-2011 Copyright

F(s)G(s)

V(s)

V(s)

17

Block diagrams in parallel


F(s)
X(s)

V1(s)
+

G(s)

Equivalent diagram:

X(s)

Numerical example
ACS6001 2010-2011 Copyright

Y(s)

V2(s)

F(s)+G(s)

Y(s)

18

Example:

s 3 + 12 s 2 + 35s + 19
s 3 + 9 s 2 + 26 s + 24
ACS6001 2010-2011 Copyright

19

Negative feedback
U(s)

V(s)

G(s)

Z(s)

ACS6001 2010-2011 Copyright

H(s)

Y(s)

V ( s) = U ( s) Z ( s)
Y ( s ) = G ( s )V ( s )
Z ( s ) = H ( s )Y ( s )
eliminate V ( s ), Z ( s )...
Y ( s ) = G ( s )[U ( s ) H ( s )Y ( s )]
[1 + G ( s ) H ( s )]Y ( s ) = G ( s )U ( s )
or :
G (s)
T (s) =
1 + G ( s) H ( s)

20

Negative feedback
U(s)

G(s)

V(s)

Y(s)

Z(s)

Equivalent diagram:

H(s)

U(s)

Numerical example (H: unity)


ACS6001 2010-2011 Copyright

G (s)
1 + G ( s) H ( s)

Y(s)

21

Positive feedback
U(s)

G(s)

V(s)

Y(s)

+
Z(s)

Equivalent diagram:

H(s)

U(s)

ACS6001 2010-2011 Copyright

G (s)
1 G ( s) H ( s)

Y(s)

22

Example:

ACS6001 2010-2011 Copyright

1
s 2 + a1s + a0

23

Revisiting the D-MS system


3
2
Y (s) =

(s + 2) (s + 3)

ACS6001 2010-2011 Copyright

24

DC Motor
Armature
-

ACS6001 2010-2011 Copyright

Motor Load

25

System representation
We can also use signal flow graphs
(independent study)

ACS6001 2010-2011 Copyright

26

5
X(s)

1
s

1
s 3 + 3s 2 + 4
1
s2 + 3

ACS6001 2010-2011 Copyright

s+2
s 4 + 3s

+
+

Y(s)

Module Structure Syllabus


1.Introduction

2.Theoretical
& Empirical
Equations

3. System
Linearisation

4. First
Order
Systems

5. Second
Order
Systems

6. Transfer
Function
Models

7. DC Motor
Models

8. Block
Diagrams

9. State Space
Models

ACS6001 2010-2011 Copyright

State space models


Classical Modern Control
The time-domain approach
Non-linear
Time-varying
Multi-variable

ACS6001 2010-2011 Copyright

State variables
Definition: The state of a system is a set of
variables such that the knowledge of these
variables and the input functions will, with
the equations describing the dynamics,
provide the future state and output of the
system.
(Dorf & Bishop, Modern Control Sys.)

ACS6001 2010-2011 Copyright

State variables
For a dynamic system, the state of the
system is described using the state
variables:
[x1(t), x2(t),, xn(t)]

ACS6001 2010-2011 Copyright

Simple Example:
ON/OFF switch!
The state variables allow the system
outputs to be calculated for all time
provided that the inputs are known for all
time and the initial conditions are known.
ACS6001 2010-2011 Copyright

State equations
The differential equations in the state
variables relating the system inputs to the
system outputs are known as the state
equations.

ACS6001 2010-2011 Copyright

The D-MS system


(with an external force)

D-MS
k

Equation for system is ( see earlier lecture) :


My(t ) + Cy (t ) + Ky (t ) = U (t ) (1)

U(t)
M
y(t)

ACS6001 2010-2011 Copyright

We can represent this system using two


state variables:
Mass position y (t )
Mass speed y (t )
The state variables:

ACS6001 2010-2011 Copyright

x1 (t ) = y (t )
x2 (t ) = y (t )

My(t ) + Cy (t ) + Ky (t ) = U (t )

(1)

Substituting in the state variables:

Mx2 (t ) + Cx2 (t ) + Kx1 (t ) = U (t )

What happened to the 2nd order dynamics?


State space representation of systems: not unique!

State space representation

ACS6001 2010-2011 Copyright

x1 (t ) = x2 (t )

U (t ) Kx1 (t ) Cx2 (t )

(
)
=

x
t
2
M
M
M

(3)

(2)

10

We may also select the following state variables:

x1 (t ) = Ky (t )
x2 (t ) = K 2 y (t )
Using Eq.1 :

My(t ) + Cy (t ) + Ky (t ) = U (t )

State space representation

ACS6001 2010-2011 Copyright

M
C
x (t ) + 2 x2 (t ) + x1 (t ) = U (t )
2 2
K
K

x1 (t ) = x2 (t ) / K

K 2U (t ) K 2 x1 (t ) Cx2 (t )

x2 (t ) =
M
M
M

11

State space representation (Eq.3)

x1 (t ) = x2 (t )

U (t ) Kx1 (t ) Cx2 (t )

(
)
=

x
t
2
M
M
M

This is usually expressed in matrix form:

x1 0
x = K
2
M

ACS6001 2010-2011 Copyright

1
C

x1 0
+ 1 U
M x2 M

12

Linear Dependency
The state variables must be linearly
independent!
x1 (t ) = y (t )
x2 (t ) = Ky (t )
this will not result in 1st order odes

ACS6001 2010-2011 Copyright

13

Linear Dependency
In general:
For a system of order n, if [x1(t), x2(t),, xn-1(t)]
are state variables then xn(t) is not a legitimate
system variable if it can be expressed as a liner
combination of the other state variables such as:

xn(t)=c1x1(t),+c2x2(t)+ + cn-1xn-1(t)

ACS6001 2010-2011 Copyright

14

In general, for a system with n state variables and m inputs:

And in matrix form:


x 1 a11 a12 a1n x1 b11 b1m u1
x a
a 22
x 2

2
21





x n an1 ann x n bn1 bnm um

ACS6001 2010-2011 Copyright

15

x1
x
2
is known as the state vector


x n

Usually the state space models are expressed in the following form:
where x is the state vector ,
u1

u is the input vector


um
a11 a1n

A=

an1 ann

b11 b1m

B=

bn1 bnm

ACS6001 2010-2011 Copyright

x = Ax + Bu

16

The output y of the system can be expressed as:


y1

where y =


y n

c11 c1n

C=

c n1 c nn

ACS6001 2010-2011 Copyright

y = Cx

17

Using state space models


We can work directly with the governing
differential equations of the system in the
time domain
1st order ODEs: easier to solve
Treat multivariable systems as SISO
Directly design and analyse non-linear
systems
ACS6001 2010-2011 Copyright

18

Using state space models


Can use Matlab/Simulink to work directly
with state space models

ACS6001 2010-2011 Copyright

You might also like