Upload
w-mohd-zailimi-abdullah
View
216
Download
0
Embed Size (px)
Citation preview
8/3/2019 EML4314c Modeling 2nd Order Sys
1/50
This Weeks Objectives
Establish Dynamic Models of System to beControlled
Second Order SystemsObtain Solutions using LaPlace TransformsCreate Simulink Model and Generate
Simulated Results
8/3/2019 EML4314c Modeling 2nd Order Sys
2/50
Modeling of a Spring-Mass-Damper System
(Modeling of a Second Order System)
8/3/2019 EML4314c Modeling 2nd Order Sys
3/50
lets start with a one car system suppose we know:
m1 mass of the car k1, L01 spring constant and free lengthc damping coefficient
m 1
k1,L01
c
f(t)
x1
8/3/2019 EML4314c Modeling 2nd Order Sys
4/50
one car system suppose at start (initial condition):
x1 = L01 spring is applying zero force= 0 car is at rest
f(0) = 0 there is no applied force
m 1
k1,L01
c
f(t)
x1
1x
8/3/2019 EML4314c Modeling 2nd Order Sys
5/50
one car system now we want (final condition):
x1 = L01 + 3 cmwe want to move there as fast as possiblewe dont want to overshoot muchwe want the system to settle down quick
m 1
k1,L01
c
f(t)
x1
Were going to need to
properly define theseterms.
8/3/2019 EML4314c Modeling 2nd Order Sys
6/50
one car system we have a desired final position we can measure the position of the car we can set the value of f, the applied force, to
any value we want and constantly adjust it
m 1
k1,L01
c
f(t)
x1
Well pick a value for f that isrelated to the difference betweenthe current measured position andthe desired final position.
8/3/2019 EML4314c Modeling 2nd Order Sys
7/50
m 1
k1,L01
c
f(t)
x1
In Controls Terminology:BLOCK DIAGRAM
8/3/2019 EML4314c Modeling 2nd Order Sys
8/50
problem statement given:
m1 mass of the car k1, L01 spring constant and free length
c damping coefficientx1(0) initial position at t=0
(0) initial velocity at t=0xd desired position
generate values for the input force such thatthe car reaches the desired position within 3 secthe car will not overshoot by more than 0.25 cmthe car will settle within s 0.1 cm within 5 sec
m 1k1,L01
c
f(t)
x1
1x
8/3/2019 EML4314c Modeling 2nd Order Sys
9/50
how to start?lets first write the equationof motionassume the current position x 1>L01 andthat 1 is positive
m 1k1,L01
c
f(t)
x1
x
m 1ck1 (x 1- L01 )
f(t)
1x
1101111 xm)L(xkxcf(t) !
8/3/2019 EML4314c Modeling 2nd Order Sys
10/50
how do you solve for x 1(t) if you know f(t)as well as x 1(0) and 1(0)?
m 1k1,L01
c
f(t)
x1
f(t))L(xkxcxm 0111111 !
x
8/3/2019 EML4314c Modeling 2nd Order Sys
11/50
we must solve a second
order differential equation
we will write the equation in the Laplacedomain
Laplace transformations substitute easilysolved algebraic equations for differentialequations
m 1k1,L01
c
f(t)
x1
f(t))L(xkxcxm0111111
!
8/3/2019 EML4314c Modeling 2nd Order Sys
12/50
Review o f Laplac e transf o rms
if f(t) is some function of time, then theLaplace transformation of f(t) can be
written as
change from the time domain to the 's'domain
g
!!0
dtef(t)f(t)F(s) stL
8/3/2019 EML4314c Modeling 2nd Order Sys
13/50
Example:
Let f(t) = 1 for t > 0. Find F(s).
s
1
es1
es1
es1
dteF(s)
s0s
t
0t
st
st
!
!
!
!
g
g!
!
g
0
8/3/2019 EML4314c Modeling 2nd Order Sys
14/50
Example:
Let f(t) = eat
for t > 0 where a is aconstant. Find F(s).
as1
ea-s
1e
a-s1
ea-s
1
dtedteeF(s)
0
t
0t
a)-t(s
a)-t(s-stat
!
!
!
!!
g
g!
!
gg
00
8/3/2019 EML4314c Modeling 2nd Order Sys
15/50
The LaPlace transform is a linear operation.
For any functions f(t) and g(t) and for anyconstants, a and b,
L{a f(t) + b g(t)} = a L {f(t)} + b L {g(t)}
8/3/2019 EML4314c Modeling 2nd Order Sys
16/50
Example:
Let f(t) = cosh(at) = (eat
+ e-at
)/2for t > 0. Find F(s).
22
at-at
ass
as
1
2
1
as
1
2
1
)(e21
)(e21
at)(coshF(s)
!
!
!! LLL
8/3/2019 EML4314c Modeling 2nd Order Sys
17/50
LaPlace transform of the derivative of f(t).
L(f '(t)) = sL (f) - f(0)
L (f "(t)) = s 2L (f) - sf(0) - f'(0)
L (f (n)) = s nL (f) - s n-1 f(0) - s n-2 f '(0) - ...- f (n-1) (0)
8/3/2019 EML4314c Modeling 2nd Order Sys
18/50
LaPlace transform of the integral of f(t).
f(t)s1
d)f(t
0
!
L
8/3/2019 EML4314c Modeling 2nd Order Sys
19/50
Laplace transforms have been calculated
for a large variety of functions. Samplingof these are listed in Table 2.3 of the text Modern Control Systems, 9 th ed., R.C. Dorf
and R.H. Bishop, Prentice Hall, 2001 .
8/3/2019 EML4314c Modeling 2nd Order Sys
20/50
8/3/2019 EML4314c Modeling 2nd Order Sys
21/50
Inverse transformations are often of the form
where G(s) and H(s) are polynomials in s
This ratio must be re-written in terms of its partialfraction expansion.
Review the techniques for partial fractionexpansion when the polynomial H(s) hasrepeated roots or complex roots.
H(s)G(s)
F(s) !
8/3/2019 EML4314c Modeling 2nd Order Sys
22/50
Example:
Let a b . Find f(t)
first perform partial fraction reduction
Multiplying the left and right side of the aboveequation by (s-a)(s-b) gives
b)a)(s(s1
F(s) !
b)(s A
a)(s A
b)a)(s(s1
F(s) 21!!
8/3/2019 EML4314c Modeling 2nd Order Sys
23/50
1= A 1 (s-b) + A 2 (s-a)
Can pick two values for s and then solvefor A 1 and A 2 from the two equations intwo unknowns.
When s=a, 1= A 1(a-b).When s=b, 1=A 2(b-a). Thus
b)(a1- A,
b)(a1 A 21 !!
8/3/2019 EML4314c Modeling 2nd Order Sys
24/50
substituting A 1 and A 2 into F(s) gives
Using the linearity of the Laplacetransform,
!!
b)(s1-
a)(s1
ba1
b)a)(s(s1F(s)
-
! b)(s1-
a)(s1
ba1
f(t)11
LL
8/3/2019 EML4314c Modeling 2nd Order Sys
25/50
from previous example
btat eeba
1
b)(s1-
a)(s1
ba1
f(t)
!
-
! 11 LL
END OF REVIEW
8/3/2019 EML4314c Modeling 2nd Order Sys
26/50
car 1car 1car 2car 2 car 3car 3
Back to our problem.
8/3/2019 EML4314c Modeling 2nd Order Sys
27/50
equation of motion
take Laplace transform of left and right sideof equation
m 1k1,L01
c
f(t)
x1
f(t))L(xkxcxm 0111111 !
F(s)(1)Lkxkxcxm 01111111 !LLLL
8/3/2019 EML4314c Modeling 2nd Order Sys
28/50
m 1k1,L01
c
f(t)
x1
F(s)(1)Lk
xkxcxm
011
11111
!LLLL
(0)x(0)xs(s)Xsx
(0)x(s)sXx
1112
1
111
!
!
L
L
8/3/2019 EML4314c Modeling 2nd Order Sys
29/50
m 1k1,L01
c
f(t)
x1
!
21 1 1 1
1 1 1 1 1 01
m s X (s) s x (0) x (0)
1c sX (s) x (0) k X (s) k L F(s)
s
F(s)(1)Lk
xkxcxm
011
11111
!L
LLL
? A F(s)
s1
Lk(0)xc
(0)x(0)xsmkscsm(s)X
0111
11112
11
!
8/3/2019 EML4314c Modeling 2nd Order Sys
30/50
m 1k1,L01
c
f(t)
x1
1x
supposem 1 = 2 kg = 2 N sec 2/mk1 = 3 N/cm = 300 N/mL01 = 6 cm = 0.06 m
c = 2.5 N sec/cm = 250 N sec/mx1(0) = 4 cm = 0.04 m
(0) = -2 cm/sec = -0.02 m/sec
f(t) is a step input of 8 N starting at t=0
s
8F(s) !
8/3/2019 EML4314c Modeling 2nd Order Sys
31/50
m 1k1,L01
c
f(t)
x1
sN8
s1
m0.06mN
300m)(0.04msecN
250
)secm
(-0.02m)(0.04smsecN
2
mN
300smsecN
250smsecN
2(s)X2
22
1
!
-
are units consistent?
seems like s has units of 1/secand X(s) has units of m sec
8/3/2019 EML4314c Modeling 2nd Order Sys
32/50
? A
s1
0.06300(0.04)250
0.02s0.042s
8300s250s2(s)X 21 !
? A 9.96s0.08s
26300s250s2(s)X 21 !
s300s250s226s9.96s0.08
300s250s2
9.96s0.08s
26(s)X 23
2
21!!
8/3/2019 EML4314c Modeling 2nd Order Sys
33/50
x1(t) = 0.08667+ 0.00667 e -62.5 t
[-7cosh(61.29 t) 7.187sinh(61.29 t)]
how do we check the results ?
10lim ( ) 0.08667 s
sX sp
!
check boundary conditions
check steady state final position
- final value theorem:
8/3/2019 EML4314c Modeling 2nd Order Sys
34/50
8/3/2019 EML4314c Modeling 2nd Order Sys
35/50
How to model the system in Simulink?
m 1k1,L01
c
f(t)
x1
8/3/2019 EML4314c Modeling 2nd Order Sys
36/50
m 1k1,L01
c
f(t)
x1
1x
supposem 1 = 2 kg = 2 N sec 2/mk1 = 3 N/cm = 300 N/mL01 = 6 cm = 0.06 m
c = 2.5 N sec/cm = 250 N sec/mx1(0) = 4 cm = 0.04 m
(0) = -2 cm/sec = -0.02 m/sec
f(t) is a step input of 8 N starting at t=0
8/3/2019 EML4314c Modeling 2nd Order Sys
37/50
lets model this system
using Simulink
governing differential equation
for our case, f(t) = 0,(0) = -0.02 m/sec, x 1(0) = 0.04 m
thus
f(t))L(xkxcxm 0111111 !
1x
1
011111 m
)L(xkxcf(t)x !
m 1k1,L01
c
f(t)
x1
8/3/2019 EML4314c Modeling 2nd Order Sys
38/50
1
011111 m
)L(xkxcf(t)x !
8/3/2019 EML4314c Modeling 2nd Order Sys
39/50
8/3/2019 EML4314c Modeling 2nd Order Sys
40/50
blocks can be grouped into subsystems
8/3/2019 EML4314c Modeling 2nd Order Sys
41/50
x
8/3/2019 EML4314c Modeling 2nd Order Sys
42/50
m 1
k1,L01
c
f(t)
x1
8/3/2019 EML4314c Modeling 2nd Order Sys
43/50
8/3/2019 EML4314c Modeling 2nd Order Sys
44/50
d1 = d2 = 15 cmd3 = 80 cmm1 = 2.5 kgm2 = 5.5 kgc1 = 8 N sec/mc2 = 10 N sec/mk1 = 3 N/cm ; L01 = 6 cmk2 = 5 N/cm ; L02 = 8 cmk3 = 4 N/cm ; L03 = 10 cm
Cars 1 and 2 start at rest at their staticequilibrium position.
A constant force f 1 = 20N and f 2 = -5 N .
Obtain the motion response of the two cars, i.e.obtain x 1(t) and x 2(t).
x1
x2
d1
f 1 f 2
d2
d3
c2c1
m2m1k 2, L02k 1, L01 k 3, L03
8/3/2019 EML4314c Modeling 2nd Order Sys
45/50
Determine the position of the two cars at static equilibrium when noforces are applied.
x1
x2
d1
m1
k 2, L02k 1, L01
Car 1 will be in equilibrium when k 1 (x1 L01) = k 2 [x2 (x 1 + d 1 + L02 )]
x1
x2
d1 d2
d3
m2k 2, L02 k 3, L03
Car 2 will be in equilibrium when k 2 [x2 (x 1 + d 1 + L02)] = k 3 [d3 (x 2 + d 2 + L03)]
Substituting the given parameters and solving for x 1 and x 2 givesx1_equil = 17.06 cmx
2 _
equil= 46.70 cm
8/3/2019 EML4314c Modeling 2nd Order Sys
46/50
Now write equations of motion of the system.
x1
m1 k 2 [x2 (x 1 + d 1 + L 02)]k 1 (x 1 L01)
11xc f 1
)Lx(k xc)]Ldx(x[k f xm 011111021122111 !
x1
x2
d1 d2
d3
m2k 3 [d3 (x 2 + d 2 + L 03)]
k 2 [x2 (x 1 + d 1 + L 02)]
22 xcf 2
)]Ldx(d[k xc)]Ldx(x[k f xm 03223322021122222 !
8/3/2019 EML4314c Modeling 2nd Order Sys
47/50
8/3/2019 EML4314c Modeling 2nd Order Sys
48/50
)Lx(k xc)]Ldx(x[k f xm 011111021122111 !
)]Ldx(d[k xc)]Ldx(x[k f xm 03223322021122222 !
0)0(x,m4670.0)0(x
0)0(x,m1706.0)0(x
22
11
!!!!
8/3/2019 EML4314c Modeling 2nd Order Sys
49/50
time, sec
p o s
i t i o n , m
e t e r s
car 2
car 1
8/3/2019 EML4314c Modeling 2nd Order Sys
50/50
This Weeks Objectives
Establish Dynamic Models of System to beControlled Second Order Systems
Obtain Solutions using LaPlace TransformsCreate Simulink Model and GenerateSimulated Results