You are on page 1of 47

Introduction

Lagrange
Formulation

Bondgraph
Methodology
Modeling and Simulation
MEIE5121/MCTE4150
State-Space &
Simulation

System Models
Time Response
: Mechanical
Systems II

Linearization

Laplace
Laplace
Transform and
Transform
Transfer
Transfer
Function
Function &
& Stability
Stability

MCTE4150/MEIE5121 Modeling & Simulation


Example

MCTE4150/MEIE5121 Modeling & Simulation


Relation Between State Space and Transfer
Function

sX (s )  AX (s )  BU (s )  sI  A  X (s )  BU (s )
Y (s )  CX (s )  DU (s ) 
Y (s )  CX (s )  DU (s )

X (s )   sI  A 1 BU (s )

 Y (s )  CX (s )  DU (s )

MCTE4150/MEIE5121 Modeling & Simulation


Relation Between State Space and Transfer
Function

X (s )   sI  A 1 BU (s )

 Y (s )  CX (s )  DU (s )

Y (s )  C  sI  A  BU (s )  DU (s )
1

 
 C  sI  A  B  D U (s )
1

MCTE4150/MEIE5121 Modeling & Simulation


Relation Between State Space and Transfer
Function
Y (s )  C  sI  A  BU (s )  DU (s )
1


 C  sI  A  B  D U (s )
1

Now,
Y (s )
 C  sI  A  B  D
1
G (s ) 
U (s )
Recall,
1
 sI  A  adj  sI  A 
1

sI  A

MCTE4150/MEIE5121 Modeling & Simulation


Relation Between State Space and Transfer Function

1
 sI  A  adj  sI  A 
1

sI  A

Y (s ) C adj  sI - A  B  sI  A D
G (s )  
Hence, U (s ) sI  A
N (s )

sI  A

Is known as the characteristic


sI  A  0 equation, the solution of this
equations are the poles of the
Transfer function

MCTE4150/MEIE5121 Modeling & Simulation


Time Response of Dynamic Systems

• Time response of a dynamic system response to an input


expressed as a function of time.

System

• The time response of any system has two components


• Transient response
• Steady-state response.
MCTE4150/MEIE5121 Modeling & Simulation
Test Signals

Test Signals r t  R  s Purpose

r  t   A  t  , t  0
Impulse A stability test
 0, t0

r  t   A, t  0 A
Step transient response test
 0, t0 s
r  t   At , t  0 A
Ramp tracking capability test
 0, t0 s2
r  t   At 2 , t  0 2A
Parabolic faster tracking capability test
 0, t0 s3

The dynamic response of a system


to an impulse input is the natural
response

MCTE4150/MEIE5121 Modeling & Simulation


Analysis: Time response : Natural + forced
1
R(s) 
s s3 C (s )
( s  2)( s  4)( s  5)

k1 k2 k3 k4
C ( s)    
s s2 s4 s5

Forced response Natural response

c(t )  k1  k 2 e 2t  k3e 4t  k 4 e 5t

MCTE4150/MEIE5121 Modeling & Simulation


Time Response of Control Systems

• When the response of the system is changed from equilibrium it


takes some time to settle down.

• This is called transient response.


-3
x 10 Step Response
6

Steady State Response


Step Input
5
• The response of the
4
system after the transient
Response
Amplitude

response is called steady 3

state response. 2
Transient Response
1

0
0 2 4 6 8 10 12 14 16 18 20
MCTE4150/MEIE5121 Modeling & Simulation
Time (sec)
Time Response of Dynamic Systems

• Transient response depend upon the system poles only and not on
the type of input.

• It is therefore sufficient to analyze the transient response using a


step input.

• The steady-state response depends on system dynamics and the


input quantity.

• It is then examined using different test signals by final value


theorem.

MCTE4150/MEIE5121 Modeling & Simulation


Step Response of 1st Order System
• Consider the following 1st order system

K
R(s ) C(s )
Ts  1

1
R( s )  U ( s ) 
s
K
C( s ) 
sTs  1
• In order to find out the inverse Laplace of the above equation, we
need to break it into partial fraction expansion (page 867 in the
Textbook)
K KT
C( s )  
s Ts  1
MCTE4150/MEIE5121 Modeling & Simulation
Step Response of 1st Order System

1 T 
C( s )  K   
 s Ts  1 
• Taking Inverse Laplace of above equation


c(t )  K u(t )  et / T 
c(t )  K 1  e 
• Where u(t)=1
t / T

• When t=T (time constant)

 
c(t )  K 1  e1  0.632K
MCTE4150/MEIE5121 Modeling & Simulation
Step Response of 1st Order System
• If K=10 and T=1.5s then c(t )  K 1  e t / T  
K*(1-exp(-t/T))
11

10

9 Step Response

8 steady state output 10


K 
7
63% Input 1
6
c(t)

2
Unit Step Input
1

0
0 1 2 3 4 5 6 7 8 9 10
Time

MCTE4150/MEIE5121 Modeling & Simulation


Step Response of 1st Order System
• If K=10 and T=1, 3, 5, 7 
c(t )  K 1  e t / T 
K*(1-exp(-t/T))
11
10
T=1s
9

8 T=3s
7
T=5s
6
c(t)

5 T=7s

4
3
2
1
0
0 5 10 15
Time

MCTE4150/MEIE5121 Modeling & Simulation


Step Response of 1st Order System
• If K=1, 3, 5, 10 and T=1 
c(t )  K 1  e t / T 
K*(1-exp(-t/T))
11
10
K=10
9

8
7
6
K=5
c(t)

5
4
K=3
3
2
K=1
1
0
0 5 10 15
Time
MCTE4150/MEIE5121 Modeling & Simulation
Analysis of Simple RC Circuit

i(t)
R
vT(t) ± C v(t)

MCTE4150/MEIE5121 Modeling & Simulation


Simple RC Circuit

MCTE4150/MEIE5121 Modeling & Simulation


Practical Determination of
Transfer Function of 1st Order
Systems
• If we can identify T and K empirically we can obtain
the transfer function of the system.

C ( s) K

U ( s) Ts  1


c(t )  K u(t )  e t / T 

MCTE4150/MEIE5121 Modeling & Simulation


Practical Determination of Transfer
Function of 1st Order Systems
• For example, assume the unit step
response given in figure.

c(t )  K u(t )  e t / T 
K=0.72

• From the response, we can measure the


time constant, that is, the time for the C ( s) K
amplitude to reach 63% of its final 
value. U ( s) Ts  1
• Since the final value is about 0.72 the T=0.13s
time constant is evaluated where the
curve reaches 0.63 x 0.72 = 0.45, or
about 0.13 second.
• Thus transfer function is obtained
as:

C ( s) 0.72 5.5
• K is simply steady state value.  
U ( s) 0.13s  1 s  7.7
MCTE4150/MEIE5121 Modeling & Simulation
Modeling : A simple Experiment

Interface

Tank

Analog Computer (but in this


experiment it just applies step input

MCTE4150/MEIE5121 Modeling & Simulation


Modeling : A simple Experiment
It can be shown by relating flow into the tank Qi to flow out of the
tank through the valve Qo and the rate of change of volume of water
d/dt(V)=d/dt(Ah) that the model is dh
A  qi  qo  qi  Rh
qi dt
H ( s) 1/ R 
h   
qo Qi ( s ) A s  1 Ts  1
R

Input a step input , what is the


u(t)=5
output??? y(t)=??

0
 0

Ts  1

MCTE4150/MEIE5121 Modeling & Simulation


Modeling : A simple Experiment
Can you figure out what is the parameters of the system??
5

4.5

4
H (s) 
3.5 
3 Qi ( s ) Ts  1
h1(Volts)

2.5

1.5

0.5

0
200 400 600 800 1000 1200 1400 1600
time(sec)

Go to menti.com and enter code 711000

MCTE4150/MEIE5121 Modeling & Simulation


Modeling : A simple Experiment
Can you figure out what is the parameters of the system??
H (s)  5 
  H ( s) 
5

Qi ( s ) Ts  1 s Ts  1
4.5

5 / T 1 2
3.5

  
3
h1(Volts)

2.5

1 s 1
s( s  ) s
2

1.5

1
T T
5  5
0.5 t

0
200 400 600 800 1000
time(sec)
1200 1400 1600
H ( s)    h(t )  5  5e T
s s 1
T

MCTE4150/MEIE5121 Modeling & Simulation


Modeling : A simple Experiment
Can you figure out what is the parameters of the system??

t

h(t )  5  5e T

hss  h @ steady state 


3.75
3.75  5  0   
0.63* 3.75  2.3625 5
@ t  T , h(t )  3.75  3.75e 1
 0.63 * 3.75  2.3625
T  85 sec

MCTE4150/MEIE5121 Modeling & Simulation


Take home info. For First Order System
a
Y ( s)  R( s)G( s) 
s( s  a)
y(t )  y f (t )  yn (t )  1  eat
• The time constant can be described as the time for the impulse
response to decay to 37% of its initial value. Alternately, the time is
the time it takes for the step response to rise to 63% of its final value.

e at  e1  0.37 y (t ) t  1  1  e  at  1  0.37  0.63


t 1
a a t 1
a

MCTE4150/MEIE5121 Modeling & Simulation


Little Exercise: Match the unit step responses to the right H(s)
5
1
4.5
0.9
5
HA 
0.8 4

s 1
0.7 3.5

0.6 3
y(t)

0.5

y(t)
2.5
0.4
2
1
HB 
0.3
1.5

s5
0.2

0.1
Step1 1

0.5
Step2
0
0 1 2 3 4 5 6
Time(sec) 0
0 1 2 3 4 5 6

5
HC 
Time(sec)
1 0.2

s5
0.9 0.18

0.8 0.16
0.7
0.14
0.6
Step3 0.12
1
y(t)

HD 
0.5
y(t)

0.1

s 1
0.4
0.08
0.3
400
0.06
0.2
350 0.04
0.1

0
0 1 2 3
300
4 5 6
0.02 Step4
Time(sec) 0
250 0 1 2 3 4 5 6

Step5 Time(sec)

1
y(t)

200

150
HE 
Go to menti.com and enter code 711000
100

50
s 1
0
0 1
MCTE4150/MEIE5121 Modeling & Simulation
2 3 4 5 6
Time(sec)
Little Exercise
5
1
4.5
0.9
4
0.8
3.5
0.7
3
0.6
y(t)

y(t)
2.5
0.5

0.4
1 2
5
0.3
HD  1.5
HA 
s 1 s 1
0.2 1

0.1 0.5

0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
Time(sec) Time(sec)

0.2
1
0.18
0.9

0.8 0.16

0.7 0.14

0.6 0.12
y(t)

y(t)

0.5 0.1
1
0.4
5 0.08
HB 
0.3
HC  0.06

s5
s5
0.2 0.04

0.1 0.02

0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
Time(sec) Time(sec)

MCTE4150/MEIE5121 Modeling & Simulation


First Order System with a Zero
C ( s ) K (1  s )

R( s ) Ts  1
• Zero of the system lie at -1/α and pole at -1/T.

• Step response of the system would be:


K (1  s )
C( s ) 
sTs  1
K K (  T )
C( s )  
s Ts  1
K
c(t )  K  (  T )e t / T
T
MCTE4150/MEIE5121 Modeling & Simulation
2nd Order System

MCTE4150/MEIE5121 Modeling & Simulation


Modeling : A simple Experiment

Interface

Tank

Analog Computer (but in this


experiment it just applies step input

MCTE4150/MEIE5121 Modeling & Simulation


Double Tank Problem : 2nd order system
qi

h1 h2
q12
qo

It can be shown that the model in this case (after linearizing) ,and feeding back the level of
water and applying proportional control is, where a and b are constants while k is manipulated
by designer, if an input is constant = 3.5 what is the output

u(t)=3.5
h2(t)=??

0
+

H2 k k1 0

 2
k
k2
21
s  as  b
2
-

Qi s  as  b  k
MCTE4150/MEIE5121 Modeling & Simulation
Analysis : Here is the response for different values of k

6
k=low
5

8
k=high
4
h1, and h2 (Volts)

3 6

h1, and h2 (Volts)


5
2

1
3

0 2
0 50 100 150 200 250 300 350 400 450
Samples
1

0
0 50 100 150 200 250 300 350
Samples

Can you explain the effect of k on the response?, k


changes the characteristic equations of the system
MCTE4150/MEIE5121 Modeling & Simulation
Analysis : Second Order System

Second-order
systems, pole plots,
and step responses

MCTE4150/MEIE5121 Modeling & Simulation


Importance of understanding time response
of 2nd order system

Comparing to the simplicity of a first-order system, a second order system exhibits a wide range
of responses. For example, a second order system can display characteristics much like a first-
order system or display damped or pure oscillations for its transient response. Second order
systems are very important in control systems engineering, since many control systems design
methods are based on second-order system analysis. Even if the system is of higher order, it
usually can be approximated by a second order system in order to obtain a first approximation for
preliminary design purposes with reasonable accuracy.

MCTE4150/MEIE5121 Modeling & Simulation


The standard 2nd order system
A standard 2nd order system is usually represented as
n 2
G( s)  2
s  2n s  n
2

The characteristic equation is


q(s)  s 2  2n s  n  0
2

The two roots are:


s1, 2  n  jn 1   2    jd

Where,  is known as damping ratio, and  n is the natural undamped


frequency

MCTE4150/MEIE5121 Modeling & Simulation


Response and performance of a second-order system

The character of the transient unit-step response depends on


the pole locations.
2. If  = 1 (equal real
1. If 0 <  <1 (complex poles): the system is
critically damped
poles): The system is
underdamped. y(t )  1  et (1  t ), t  0
  
y (t )  1  e cos(d t ) 
t
sin( d t )
 1   3. If  > 1 (negative real
2

e t  1  2  and unequal poles) :


 1 sin d t  tan 1
, t  0
1  2
   the system is
overdamped.
  e  s1t e  s2t 
y (t )  1    , t  0
2   1  s1
2 s2 

where s1, 2  (   2  1)

MCTE4150/MEIE5121 Modeling & Simulation


UnderDamped 2nd Order System

Step response
n 2 K1 K 2 ( s   n )  K 3n 1   2
Y (s)   
s ( s  2 n s  n ) ( s   n ) 2  n (1   2 )
2 2 2
s

 1  ( s   n )  n 1  2
1 1 2
 
( s   n ) 2   n (1   2 )
2
s

Taking the inverse Laplace transform


 
y(t )  1  e  nt  cos  1   2 t   2 
sin n 1   t
 n
1  2 
 
1
1
1 2

e  n t cos  n 1   2 t   
  
where   tan 
1 
 1 2 
 

MCTE4150/MEIE5121 Modeling & Simulation


Transient Response

For a step input, the transient response can be characterized by:


Peak time tp: time required to reach the first peak of the
overshoot
Percent Overshoot Mp:

Settling time ts: time required for the response curve to reach
and stay within 2% or 5% of the final value. Is a function of the
largest time constant of the control system.

MCTE4150/MEIE5121 Modeling & Simulation


Response and performance of a second-order
4
2

system
• The peak time is the time required for
the response to reach the first peak
of the overshoot.
y (t ) tp

0
t

MCTE4150/MEIE5121 Modeling & Simulation


Response and performance of a second-order
system
• The maximum overshoot is the relative maximum peak value
of the response curve measured from the final value.

y (t ) tp
Mp
1
y(t p )  y()
Mp  100%
y()
0
t
Note: the maximum overshoot directly indicates
the relative stability of the system.

MCTE4150/MEIE5121 Modeling & Simulation


Response and performance of a second-order
system
• The settling time is the time required for the response
curve to reach and stay within a range about 1% or 2%
or 5% of the final steady-state value.

y (t ) tp
Mp
1 ±1%

0
t
ts
Note: t is the time it takes the
system transients to decay.
MCTE4150/MEIE5121 Modeling & Simulation
MCTE4150/MEIE5121 Modeling & Simulation
Analysis: Match responses with transfer
function
The unit step responses of four second- 16 2
G(s)  G( s) 
order systems are shown in the Figure s  16
2
s  3s  2
2

below , and four transfer functions are 1 16


listed below. Match the transfer functions G ( s)  G (s) 
s  0.2 s  1
2
s  0.8s  16
2

with the corresponding step-response


curve. n 2
G( s)  2
s  2n s  n
2

3
ts 
 n
 / 1 2
Mp e ,


tp 
n 1   2

Go to menti.com and enter code 711000


MCTE4150/MEIE5121 Modeling & Simulation
P1 Match responses with transfer function

Damping ratio same (same overshoot) but


one has higher natural frequency (low
settling time)

1 2
G ( s)  G( s) 
s  0.2 s  1
2
s  3s  2
2

4
ts 
 n

16
G(s) 
G (s) 
16 s  16
2

s  0.8s  16
2

MCTE4150/MEIE5121 Modeling & Simulation


Analysis
Given a closed loop transfer function
Y ( s) 3k
 2
R( s) s 4s  7  k
Describe the effect of increasing k (increase , decease, unchanged)
on the following
n 2
1. Natural frequency n G( s)  2
s  2n s  n
2

2. Damping ratio 

3. Settling time 3
ts 
 n

MCTE4150/MEIE5121 Modeling & Simulation


Given the transfer function k n 2
T (s)  2 G( s)  2
percent overshoot is less than 5% and the settling s  ps  k s  2n s  n
time (within 2% of the final value) should be less
than 4 seconds.
k  n
2

Comparing with the standard 2nd order system p  2n

4  / 1 2
Now, ts  4 Mp e  0.05,
 n
4  / 1 2
for 2% criteria t s   4   n  1 Mp e    0.69
 n

Let   0.7
1
 n   1.428 let  n  1.5
0.7
k  n  2.25
2

p  2n  2 * 0.7 *1.5  2.1


MCTE4150/MEIE5121 Modeling & Simulation

You might also like