Lect 2 - Modeling of Dynamic Systems

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Modeling of Dynamic Systems

Ref: Control System Engineering


Norman Nise : Chapters 2 & 3

TM184521 – Modelling of Dynamic Systems

Review of the last lecture

1
TM184521 – Modelling of Dynamic Systems

Review of the last lecture


◼ Open-loop control: The controller does not use the
output signal y(t)
◼ Closed-loop control: The controller uses the output
signal y(t)
◼ Feedback: another word for closed-loop
◼ Model: a mathematical description (differential
equation) of a system
◼ Better performance can be achieved by closed-loop
control

TM184521 – Modelling of Dynamic Systems

Chapter objectives :
◼ Review the Laplace transform
◼ Learn how to find a mathematical model, called a transfer
function
◼ Learn how to find a mathematical model, called a state
variable representation
◼ How to convert between transfer function and state space
models
◼ How to linearize a non-linear system

2
TM184521 – Modelling of Dynamic Systems

Laplace in Frequency Domain

Laplace Transforms Review


1. Standard notation in dynamics and control (shorthand
notation)
2. Converts mathematics to algebraic operations
3. Advantageous for block diagram analysis

Laplace transforms can be used in process control for:


1. Solution of differential equations (linear)
2. Analysis of linear control systems (frequency response)
3. Prediction of transient response for different inputs
4. Control system design
5. Stability analysis
5

TM184521 – Modelling of Dynamic Systems

Definition
The Laplace transform of a function f(t) is defined as

F ( s ) = L  f (t )  =  f ( t ) e − st dt
0

where F(s) is the symbol for the Laplace transform, L is the


Laplace transform operator, and f(t) is some function of time, t.

Note: The L operator transforms a time domain function f(t) into an


s domain function, F(s). s is a complex variable:
s = a + bj, j = −1

3
TM184521 – Modelling of Dynamic Systems

Inverse Laplace Transform, L-1:


By definition, the inverse Laplace transform operator, L-1, converts an
s-domain function back to the corresponding time domain function:

f ( t ) = L−1  F ( s ) 

Important Properties:
Both L and L-1 are linear operators. Thus,

L  ax ( t ) + by ( t )  = aL  x ( t )  + bL  y ( t ) 
= aX ( s ) + bY ( s )

TM184521 – Modelling of Dynamic Systems

where:
x(t) and y(t) are arbitrary functions
a and b are constants

X ( s ) = L  x ( t ) and Y ( s ) = L  y ( t )

Similarly,

L−1  aX ( s ) + bY ( s )  = ax ( t ) + b y ( t )

4
TM184521 – Modelling of Dynamic Systems

Laplace Transforms of Common Functions


1. Constant Function
Let f(t) = a (a constant). Then from the definition of the Laplace
transform,

 − st a − st  a a
L ( a ) =  ae dt = − e = 0−−  =
0 s  s s
0

2. Step Function
0 for t  0
It is defined as: u (t ) = 
1 for t  0
Because the step function is a special case of a “constant”, it
follows from u(t) that
1
L u ( t )  =
s 9

TM184521 – Modelling of Dynamic Systems

3. Derivatives
This is a very important transform because derivatives appear in
the ODEs we wish to solve.
 df 
L   = sF ( s ) − f ( 0 )
 dt 
initial condition at t = 0

Similarly, for higher order derivatives:


dn f 
L  n  = s n F ( s ) − s n−1 f ( 0 ) − s n−2 f ( ) ( 0 ) −
1
 dt 
−... − sf ( ) 0 − f ( ) 0
n−2 n −1
( ) ( )
where: n is an arbitrary positive integer
10

10

5
TM184521 – Modelling of Dynamic Systems

Special Case: All Initial Conditions are Zeroes

dk f
f ( ) ( 0) = k
k
Suppose then
dt t =0

f ( 0 ) = f ( ) ( 0 ) = ... = f ( ) ( 0 ) .
1 n−1

dn f  n
L n  = s F (s)
 dt 

In process control problems, we usually assume zero initial


conditions or some initial steady-state.

11

11

TM184521 – Modelling of Dynamic Systems

4. Exponential Functions
Consider f ( t ) = e−bt where b > 0. Then,
  − b+ s t
L e−bt  =  e−bt e− st dt =  e ( ) dt
  0 0
1  −( b+ s )t   1
= −e =
b+s  0 s+b

5. Rectangular Pulse Function


It is defined by:
0 for t  0

f ( t ) = h for 0  t  t w
0 for t  t
 w
12

12

6
TM184521 – Modelling of Dynamic Systems

f (t )
The Laplace transform of the rectangular
h pulse is given by

F (s) =
h
s
(
1 − e −t w s )
t w Time, t
6. Impulse Function (or Dirac Delta Function)
The impulse function is obtained by taking the limit of the
rectangular pulse as its width tw going to zero, but holding the area
1
under the pulse constant at one. (i.e., let h = )
tw
 ( t ) = impulse function
Then, L  ( t )  = 1
13

13

TM184521 – Modelling of Dynamic Systems

Solution of ODEs by Laplace Transforms


Procedure:
1. Take the L of both sides of the ODE.
2. Rearrange the resulting algebraic equation in the s domain to
solve for the L of the output variable, e.g., Y(s).
3. Perform a partial fraction expansion.
4. Use the L-1 to find y(t) from the expression for Y(s).

14

14

7
TM184521 – Modelling of Dynamic Systems

Table Laplace Transforms for Various Time-Domain Functions


f(t) F(s)

15

15

TM184521 – Modelling of Dynamic Systems

f(t) F(s)

16

16

8
TM184521 – Modelling of Dynamic Systems

f(t) F(s)

17

17

TM184521 – Modelling of Dynamic Systems

Important Properties of Laplace Transforms


1. Final Value Theorem
It can be used to find the steady-state value of a closed loop
system (providing that a steady-state value exists).

Statement of FVT:

lim y ( t ) = lim  sY ( s )


t → s →0

providing that the limit exists (is finite) for all Re ( s )  0,


where Re (s) denotes the real part of complex variable, s.

18

18

9
TM184521 – Modelling of Dynamic Systems

Example: 5s + 2
Y (s) =
s ( 5s + 4 )
Suppose,
Then,
 5s + 2 
y (  ) = lim y ( t ) = lim   = 0.5
t → s →0  5s + 4 

2. Time Delay
Time delays occur due to fluid flow, time required to do an
analysis (e.g. gas chromatograph). The delayed signal can
be represented as
y ( t − θ ) ; θ = time delay
Also,
L  y ( t − θ )  = e−θsY ( s ) 19

19

TM184521 – Modelling of Dynamic Systems

Example 1
Solve the ODE,
dy
5 + 4y = 2 y (0) = 1 (3-26)
dt

First, take L of both sides 5 ( sY ( s ) − 1) + 4Y ( s ) =


2
s

5s + 2
Rearrange, Y (s) = (3-34)
s ( 5s + 4 )
 5s + 2 
Take L-1, y ( t ) = L−1  
 s ( 5s + 4 ) 

From LT Table, y ( t ) = 0.5 + 0.5e−0.8t (3-37)


20

20

10
TM184521 – Modelling of Dynamic Systems

Example 2

21

21

TM184521 – Modelling of Dynamic Systems

Partial fraction expansion


Basic idea: Expand a complex expression for Y(s) into
simpler terms, each of which appears in the Laplace
Transform table. Then you can take the L-1 of both sides of
the equation to obtain y(t).

1. Case 1. Roots of the denominator of F(s) are real and


distinct
2. Case 2. Roots of the denominator of F(s) are real and
repeated
3. Case 3. Roots of the denominator of F(s) are complex or
imaginary

22

22

11
TM184521 – Modelling of Dynamic Systems

s+5
Example 3 Y (s) =
( s + 1)( s + 4 )
Perform a partial fraction expansion (PFE)
s+5  
= 1 + 2
( s + 1)( s + 4 ) s + 1 s + 4
where coefficients 1 and  2 have to be determined.

To find 1 : Multiply both sides by s + 1 and let s = -1

s+5 4
1 = =
s+4 s =−1 3

Laplace - 23

23

TM184521 – Modelling of Dynamic Systems

To find  2 : Multiply both sides by s + 4 and let s = -4

s+5 1
2 = =−
s +1 s =−4 3

A General PFE
N (s) N (s)
Consider a general transfer function, Y ( s ) = =
D(s) n
 ( s + bi )
i =1

Here D(s) is an n-th order polynomial with the roots ( s = −bi ) all
being real and distinct so there are no repeated roots. N(s) is order
m with n > m

24

24

12
TM184521 – Modelling of Dynamic Systems

The PFE is:


N (s) n
i
Y (s) = =
( s + b1 )( s + b2 ) ...( s + bn ) i =1 s + bi

Note: D(s) is called the “characteristic polynomial”.

Special Situations:
Two other types of situations commonly occur when D(s) has:
i) Complex roots: e.g., bi = 3  4 j j = −1( )
ii) Repeated roots : e.g., b1 = b2 = −3

For these situations, the PFE has a different form.

25

25

TM184521 – Modelling of Dynamic Systems

Example 4
d3y d2y dy
3
+ 6 2
+ 11 + 6 y = 4
dt dt dt
y( 0 )= y( 0 )= y ( 0 )= 0 system at rest (s.s.)

To find transient response for u(t) = unit step at t > 0

1. Take Laplace Transform (L.T.)


2. Factor, use partial fraction decomposition
3. Take inverse L.T.
Step 1 Take L.T. (note zero initial conditions)
4
s3Y(s)+ 6s 2Y(s)+11sY(s) + 6Y (s ) =
s
26

26

13
TM184521 – Modelling of Dynamic Systems

4
Rearranging, Y(s)=
( s 3 + 6s 2 + 11s + 6) s

Step 2a. Factor denominator of Y(s)


s(s 3+6s 2+11s+6 )=s(s+1 )(s+2 )(s+3 )

Step 2b. Use partial fraction decomposition


4 α α α α
= 1+ 2 + 3 + 4
s(s +1 )(s + 2 )(s + 3 ) s s + 1 s + 2 s + 3

Multiply by s, set s = 0
4  α α α 
= α1 + s  2 + 3 + 4 
(s +1 )(s + 2 )(s + 3 ) s =0  s + 1 s + 2 s + 3  s =0
4 2
= α1 =
1 2  3 3
27

27

TM184521 – Modelling of Dynamic Systems

For a2, multiply by (s+1), set s = -1 (same procedure


for a3, a4) 2
α2 = −2, α3 = 2, α4 = −
3
2 2 2 2/3
Step 3. Take inverse of L.T. (Y(s)= − + − )
3s s +1 s + 2 s +3
2 2
y(t)= − 2e −t + 2e −2t − e −3t
3 3
2
t → y(t) → t = 0 y (0) = 0. (check original ODE)
3

You can use this method on any order of ODE, limited only by
factoring of denominator polynomial (characteristic equation)

Practice Matlab …..


28

28

14
TM184521 – Modelling of Dynamic Systems

Example 5

Example 6
For a system described by the differential equations with initial conditions,
c + 7c + 10c = r , c ( 0 ) = 1, c ( 0 ) = 4
Determine (i) the transfer function C/R, (ii) the transient response to the
initial condition, c(t) and its final output.
29

29

TM184521 – Modelling of Dynamic Systems

Solution to example no 5
Since input is a step input, we have R(s) = 1/s, therefore
5(s + 100) 5(s + 100)
Y (s ) = =
(
s s + 60s + 500
2
)
s (s + 10)(s + 50)
The partial fraction expansion of Y(s) is given by
Y (s ) = 1 +
K K2 K3
+
s s + 10 s + 50
5(s + 100)
K1 = =1
(s + 10)(s + 50) s =0
5(s + 100)
K2 = = −1.125
s(s + 50) s = −10
5(s + 100)
K3 = = 0.125
s (s + 10) s = −50

30

30

15
TM184521 – Modelling of Dynamic Systems

and hence Y (s ) = 1 − 1.125 + 0.125


s s + 10 s + 50

Using Laplace transform table, we find that :


y(t ) = 1 − 1.125e−10t + 0.125e−50t
The final value can be computed using the final value theorem :

 5(s + 100) 
lim y (t ) = lim s  2  =1
t → s →0 (
 s s + 60s + 500 )

You can also find final value of y(t) by inputting a large value of
t (or infinite) in the equation

31

31

TM184521 – Modelling of Dynamic Systems

Modeling the system


What is system?
The original meaning of the term is a combination of elements
intended to act together to accomplish an objective.

For example, a link in a bicycle chain is usually not considered


to be a system. However, when it is used with other links to
form a chain, it becomes part of a system. The objective for the
chain is to transmit force.
When the chain is combined with gears, wheels, crank,
handlebars, and other elements, it becomes part of a larger
system whose purpose is to transport a person.
32

32

16
TM184521 – Modelling of Dynamic Systems

Input and Output


Nowadays, for example, a factory manager will call a
meeting to seek “input,” meaning opinions or data, from the
employees, and the manager may refer to the products
manufactured in the factory as its “output.”

However, in the system dynamics meaning of the terms, an


input is a cause; an output is an effect due to the input.

Thus, one input to the bicycle is the force applied to the


pedal. One resulting output is the acceleration of the bike.

33

33

TM184521 – Modelling of Dynamic Systems

The behavior of a system element is specified by its input-output


relation, which is a description of how the output is affected by the
input.
The input-output relation expresses the cause-and-effect behavior
of the element.

Any causes acting on the system from the world external to this
boundary are considered to be system inputs. Similarly, a system’s
outputs are the outputs from any one or more of the system
elements that act on the world outside the system boundary.

34

34

17
TM184521 – Modelling of Dynamic Systems

Static and Dynamic Elements


When the present value of an element’s output depends only
on the present value of its input, we say the element is a static
element.
For example, the current flowing through a resistor depends
only on the present value of the applied voltage.

If an element’s present output depends on past inputs, we say it


is a dynamic element.
For example, the present position of a bike depends on what its
velocity has been from the start.

35

35

TM184521 – Modelling of Dynamic Systems

Examples of dynamic systems

(a) one representation of an automobile, (b) a simplified representation

36

36

18
TM184521 – Modelling of Dynamic Systems

37

37

TM184521 – Modelling of Dynamic Systems

Need for Mathematical Model (or Model)


• Must have a quantitative mathematical model in order to
understand and control complex systems.
• Must have fundamental method for modeling many physical
systems:
❑ Mechanical
❑ Electrical
❑ Electromechanical
❑ Hydraulic
❑ Biological
❑ etc

38

38

19
TM184521 – Modelling of Dynamic Systems

What will the model be used for ?


o Solutions of the differential and algebraic equations allows
system response and performance to be analyzed and
designed.
o The Laplace transformation will be applied to the model to
allow convenient manipulation and dynamic analysis.
o Input-output relationships for systems and components will
be obtained.
o Controller models will be designed that can be
implemented in hardware.

39

39

TM184521 – Modelling of Dynamic Systems

Types of model
Models of dynamics system can be of many kinds, including
the following:
➢ Mental, intuitive or verbal models

➢ Graphs and tables

➢ Mathematical models

Constructing a model:
➢ Mathematical modeling or first principle modeling.
➢ Process or system identification.

Why does one perform system identification ?

40

40

20
TM184521 – Modelling of Dynamic Systems

Properties of the models obtained from system identification


➢ limited validity
➢ little physical insight → the parameters are used only as
tools to give a good description of the system's overall
behavior
➢ relatively easy to construct and use

Identification is not a foolproof methodology that can be used


without interaction from the user → reasons :
➢ An appropriate model structure must be found.
➢ There are certainly no “perfect” data in real life.
➢ The process may vary with time
➢ It may be difficult or impossible to measure some variables

signals
41

41

TM184521 – Modelling of Dynamic Systems

The procedure of deriving models :


• Understand the physics and interaction of the elements
• Construct a simplified diagrammatic rep of the system
• Apply element and interconnection laws
• Draw the FBD
• Identify or define the inputs, outputs and state variables
• Establish the system equations
• Obtain the desired form of the system model
• If the model is non-linear, determine the equilibrium
conditions and obtain a linearized model.

42

42

21
TM184521 – Modelling of Dynamic Systems

1. Mechanical Systems → translational & rotational

Translational mechanical systems


→ can have only horizontal or vertical motion

a. Variables
Variables of trans mechanical systems are :
➢ x, displacement in meters (m)
➢ v, velocity in meters per second (m/s)
➢ a, acceleration in meter per second square (m/s2)
➢ f, force in Newton (N)
➢ w, energy in Joule (J)
➢ p, power in watts (W)

all variables are functions of time


43

43

TM184521 – Modelling of Dynamic Systems

b. The element laws include in trans systems are mass, friction and
stiffness.
They relate the external force to the acceleration, velocity and
displacement associated with the element.

Mass
Friction → when two bodies slide over each other there is a frictional
force f between them that is a function of the relative velocity between the
sliding surface

44

44

22
TM184521 – Modelling of Dynamic Systems

45

45

TM184521 – Modelling of Dynamic Systems

Stiffness → when a mechanical element is subjected to a force f and goes


through a change in length ∆x, it can be characterized by a stiffness element.

46

46

23
TM184521 – Modelling of Dynamic Systems

c. Interconnection Laws
D’Alembert’s law → is developed from Newton’s law for translational system.
For a constant mass :
i ( f ext )i = M dt
dv

where the summation over the index i includes all the external forces (fext)i
acting on the body.

 ( f ) − M dt = 0
dv
ext i
i

The sum of the forces is zero provided -Mdv/dt is thought of as an additional


forces → this fictitious force is called inertial force or D’Alembert force.

f
i
i = 0 → D’Alembert’s law
47

47

TM184521 – Modelling of Dynamic Systems

48

48

24
TM184521 – Modelling of Dynamic Systems

The law of reaction force → accompanying any force of one element on


another, there is a reaction force on the first element of equal magnitude and
opposite direction (Newton’s third law : reaction forces)

49

49

TM184521 – Modelling of Dynamic Systems

The law for displacements → if the ends of two elements are connected, those
ends are forced to move with the same displacement and velocity.

50

50

25
TM184521 – Modelling of Dynamic Systems

d. Obtaining the system model → FBD

Example 7

51

51

TM184521 – Modelling of Dynamic Systems

Example 8

52

52

26
TM184521 – Modelling of Dynamic Systems

Example 9

Example 10

53

53

TM184521 – Modelling of Dynamic Systems

Series and parallel combination

k1k 2 b1b2
k eq = beq =
k1 + k 2 b1 + b2

keq = k1 + k2 beq = b1 + b2

54

54

27
TM184521 – Modelling of Dynamic Systems

Rotational mechanical systems


→ are modeled using the same techniques as those for
translational mechanical systems
a. Variables
Variables of rotational mechanical systems are :
✓ θ, angular displacement in radians (rad)
✓ ω, angular velocity in radians per second (rad/s)
✓ α, angular acceleration in radians per second squared (rad/s2)
✓ τ, torque in Newton-meters (N.m)

all variables are functions of time

55

55

TM184521 – Modelling of Dynamic Systems

b. The element laws include in rotational systems are moment of


inertia, friction, stiffness, levers and gears.

Moment of Inertia → J in kilogram-meters2 (kg.m2)

J =  r 2 dm where r is the distance from the axis of reference and


dm is the mass of the small element.

The net torque applied about the fixed axis of rotation is given by
=
d
(J ) where Jω is the angular momentum of a body.
dt
Parallel axis theorem states
J = J 0 + ma 2 where a is the distance between the parallel axes and J0
is the moment of inertia about the principal axis

56

56

28
TM184521 – Modelling of Dynamic Systems

Friction → A rotational friction element is one for which there is an algebraic


relationship between the torque and the relative angular velocity between two
surfaces.
Rotational viscous friction arises when two rotating bodies are separated by a
 = b = b(2 − 1 )
film of oil.

Rotational devices characterized by viscous friction


57

57

TM184521 – Modelling of Dynamic Systems

Stiffness → is usually associated with a torsional spring, such as the mainspring


of a clock, or with a relatively thin shaft.
For a linear torsional spring or flexible shaft,

 = k where k is the stiffness constant with units of newton-


meters (N.m) and ∆θ=θ2-θ1

(a) Rot stiffness el with one end fixed. (b) Rot stiffness el with ∆θ=θ2-θ1

Potential energy is stored in a twisted element and for a linear spring or shaft
is given by 1
W= k 2
2
58

58

29
TM184521 – Modelling of Dynamic Systems

The Lever → an ideal lever is assumed to be a rigid bar pivoted at a point


and having no mass, no friction, no momentum and no stored energy.
Let θ be the angular displacement of the lever from the horizontal position.

The lever

For small displacements


d2 d2 d2
x2 = x1 v2 = v1 f2 = f1
d1 d1 d1

59

59

TM184521 – Modelling of Dynamic Systems

Gears → an ideal gear is assumed to have no moment of inertia, no friction,


no stored energy, and a perfect meshing of the teeth.

N is a gear ratio

A pair of gears
r2 n2
N= = where r and n denote the radius and number of teeth
r1 n1
θ1 and θ2 are the angular displacements for the
gears
60

60

30
TM184521 – Modelling of Dynamic Systems

1 r2 1 r2
r11 = r2 2 ; = =N; = =N
 2 r1 2 r1
θ1 and θ2 are the angular
displacements for the gears

Ideal gears (a) ref position, (b) after rotation

 11 +  22 = 0

FBD for a pair of ideal gears


61

61

TM184521 – Modelling of Dynamic Systems

c. Interconnection Laws
D’Alembert’s law → for a body with constant moment of inertia
rotating about a fixed axis,

 ( ) − J = 0
i
ext i

where the summation over i includes all the torques acting on


the body, and the term –Jω can be considered an inertial
torque.

i
i = 0 → D’Alembert’s law

the torque –Jω is directed opposite to the positive sense of θ, ω


and α
62

62

31
TM184521 – Modelling of Dynamic Systems

The law of reaction force → for bodies that are rotating about the same axis,
any torque exerted by one element on another is accompanied by a reaction
torque of equal magnitude and opposite direction on the first element.

The law for angular displacements →

Rot sys to illustrate the law of ang disp

The reference marks on the rims are at the top of the two disks when no torque
is applied. The net angular displacement for the shaft K2 with respect to its
unstressed condition is θ2-θ1.

 ( )
i
i =0 around any closed path
63

63

TM184521 – Modelling of Dynamic Systems

d. Obtaining the system model → FBD

(a) Rotational system, (b) & (c) Its corresponding FBD


64

64

32
TM184521 – Modelling of Dynamic Systems

Example 11 Example 12

65

65

TM184521 – Modelling of Dynamic Systems

Computer simulation
Diagram for input-output equations
The steps :
1. Solve the given equation for the highest derivative of the
unknown output variable
2. Connect one or more integrator blocks in series to integrate the
derivatives
3. Use the result of step 1 to form the highest output derivative as
the output of a summer and a gain block

Example :
Mx + Bx + Kx = f a (t )

66

66

33
TM184521 – Modelling of Dynamic Systems

Model simulation → with ‘simulink’


Example 13

Create a simulation (using simulink) to calculate response of the


system below to an input force that increases from 0-8 N at t=1 s.
The parameter values are M=2 kg, K=16 N/m and B=4 Ns/m

67

67

TM184521 – Modelling of Dynamic Systems

Example 14
A person wearing a parachute jumps out of airplane. Assume there is no
wind and that the parachute provides viscous damping relative to a fixed
reference frame. The parachute has a relatively small mass Mp and a
large damping coefficient Bp. The jumper has a larger mass Mj and
smaller drag coefficient Bj. The cords attaching the parachute to the
jumper are called risers and are assume to be quite springy and the
elastic effects of the risers is represented by a spring Kr. The
deformation of the parachute itself can also be included in the value of
Kr. Write the modeling equation describing the motions of the jumper
and the parachute and then solve the equation using simulink. Take
positive direction to be downward. Use the following parameter values
Mp=10 kg, Mj=60 kg, Bp=100 Ns/m, Bj=10 Ns/m and Kr=400 N/m.
Initial velocity for jumper and parachute is 20 m/s

68

68

34

You might also like