Sie sind auf Seite 1von 55

1

Chapter 3: Modeling in the Time Domain

Chapter 3
Modeling in the Time Domain

Chapter 3: Modeling in the Time Domain

Cramers rule (1704-1752 Gabriel Cramer)

Ax+ By=f Cx+Dy=g how do you solve it? Lets eliminate y ADx+BDy=fD - BCx+BDy=gB (AD-BC)x=fD-gB x= (fD-gB)/ (AD-BC) Determinant=AD-BC

Chapter 3: Modeling in the Time Domain

Cramers rule

x f A B C D y ! g Det ! AD  BC f B g D x! AD  BC fD  gB x! AD  BC

Ax+By=f Cx+Dy=g

A f C g y! AD  BC gA  fC y! AD  BC

Chapter 3: Modeling in the Time Domain

Examples; Cramers rule


3x  y ! 4 x  2y ! 3 x 4 3 1 1 2 y ! 3 Det ! AD  BC 3 4 4 1 1 3 3 2 x! y! 3 * 2  1 *1 3 * 2  1 *1 83 94 x! !1 y ! !1 5 5

Chapter 3: Modeling in the Time Domain

Review of Matrices
1 2 5 6 6 8 3 4  7 8 ! 10 12 1 3 1 2 3 4 ! 2 4 1 x T ? 2A ! , ! ?x 1 2 y 1 2 3 1 4 7 4 5 6 ! 2 5 8 7 8 9 3 6 9
T T T

yA

Chapter 3: Modeling in the Time Domain

Review of Matrices
1 2 2 4 ! 2 , 3 4 6 8 A  B ! A  ( B) x y cx cy ! c z w cz cw

4 5 1 2 4 5  1  2 6 7  3 4 ! 6 7   3  4 3 3 1 1 ! ! 31 1 3 3 AT ! A symmetric matrix _ 2a ! x  2 y 1 x y 1 x _ 2 C1 ! A1j X j1

y x ya! Cij ! A i1 X 1 j 2 x 2 y

Chapter 3: Modeling in the Time Domain

Review of Matrices
1 2 5 6 1* 5  2 * 7 1* 6  2 * 8 3 4 * 7 8 ! 3 * 5  4 * 7 3 * 6  4 * 8 19 22 ! 43 50 5 6 1 2 5 *1  6 * 3 5 * 2  6 * 4 7 8 * 3 4 ! 7 *1  8 * 3 7 * 2  8 * 4 23 34 ! 31 46 A* B { B * A x 1 2 3 x  2 y  3 z 4 5 6 x  5 y  6 z y ! 4 7 8 9 x  8 y  9 z z 7

Chapter 3: Modeling in the Time Domain

Introduction

Frequency-domain technique
rapidly providing stability and transient response information Immediate can see the effect of varying system parameters

State-space approach (modern, or time-domain approach)can be used for non-linear system with backlash, saturation and dead zones

Chapter 3: Modeling in the Time Domain

State-space Representation

Select a particular subset of all possible system variables; state variables For an nth order system, write n simultaneous, first-order differential equations in terms of the state variables; simultaneous differential equations state equations

10

Chapter 3: Modeling in the Time Domain

State-space Representation

Solve the simultaneous equations with the known initial conditions of all the state variables at t0 as well as the system input Algebraically combine the state variables with the systems input and find all other system variables output equations State equation +output equation state space representation

11

Chapter 3: Modeling in the Time Domain

State-space representation x=Ax+Bu y=Cx+Du x=state vector Y=output vector x=time derivative of the state vector u=input vector A=system matrix B=input matrix C=output matrix D=feedforward matrix

12

Chapter 3: Modeling in the Time Domain

Example

 2 x  3 x ! f   x  z!x   x z!  ! z ! 2 x  3 x  f ! 2 z  3x  f   x   1 x 0 x 0 z !  3  2 z  1 f 

13

Chapter 3: Modeling in the Time Domain

Example II

  2  3 x  4 x ! f    x x  z!x   x y!z!  z x    y !  !  ! 2  3 x  4 x  f x  ! 2 y  3 z  4 x  f  1 0 x 0 x 0 z ! 0  0 1 z  0 f y  4  3  2 y 1 

14

Chapter 3: Modeling in the Time Domain

Next Move?
 2 x  3 x ! 0   x  x(0) ! 1, x(0) ! 0 Solution at t ! 5  v!x  x   v !  ! 2 x  3 x  1 x x 0 v !  3  2 v  x y ! [1 0] v

15

Chapter 3: Modeling in the Time Domain

(t ) 2  y  y (t  (t ) ! y (t )  y (t )(t  (t 2 Let (t ! 0.1  1 x(0) 0 1 1 0 x ( 0) 0 v(0) !  3  2 v(0) !  3  2 0 !  3  x(0.1) 1 0 1 v(0.1) ! 0   3 0.1 !  0.3

16

Chapter 3: Modeling in the Time Domain

t ! 0.2  1 x(0.1) 0 1 1  0.3 x(0.1) 0 v(0.1) !  3  2 v(0.1) !  3  2  0.3 !  2.4  0.97 x(0.2) 1  0.3 v(0.2) !  0.3   2.4 0.1 !  0.24

17

Chapter 3: Modeling in the Time Domain

Simple Euler Scheme


Scheme  xi ! vi  vi ! 3xi  2vi  xi 1 ! xi  (t * xi  vi 1 ! vi  (t * vi

18

Chapter 3: Modeling in the Time Domain

Exact Solution of the Example

 2 x  3 x ! 0   x  x(0) ! 1, x(0) ! 0 ( s  2s  3) X ( s ) ! s ( s  1)  1 X ( s) ! 2 ( s  1)  2
2

1 sin 2t ) x(t ) ! e (cos 2t  2


t

19

Chapter 3: Modeling in the Time Domain

Simple Euler Scheme


Time 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 x(I) 1 1 0.9997 0.999106 0.998224 1.2 0.99706 1 0.99562 0.993909 0.8 0.991934 0.6 0.9897 0.4 0.987213 0.98448 0.2 0.981504 0 0.978293 0.974852 -0.2 0 0.971186 0.9673 v(I) 0 -0.03 -0.0594 -0.0882 -0.11641 -0.14403 -0.17106 -0.19751 -0.22338 -0.24867 -0.27338 -0.29753 -0.32112 -0.34414 2 -0.36661 -0.38852 -0.40988 x dot 0 -0.03 -0.0594 -0.0882 -0.11641 -0.14403 -0.17106 -0.19751 -0.22338 -0.24867 -0.27338 -0.29753 -0.32112 -0.34414 4 -0.36661 -0.38852 -0.40988 v dot -3 -2.94 -2.8803 -2.82091 -2.76185 -2.70312 -2.64474 -2.58671 -2.52905 -2.47177 -2.41487 -2.35837 -2.30228 -2.2466 6 -2.19134 -2.13652 -2.08213 x(I+1) v(I+1) 1 -0.03 0.9997 -0.0594 0.999106 -0.0882 0.998224 -0.11641 0.99706 -0.14403 0.99562 -0.17106 0.993909 -0.19751 0.991934 -0.22338 0.9897 -0.24867 Euler -0.27338 0.987213 Scheme exact 0.98448 -0.29753 0.981504 -0.32112 0.978293 -0.34414 0.974852 -0.36661 0.971186 -0.38852 0.9673 -0.40988 0.963202 -0.43071 Exact 1 0.999851 0.999408 0.998677 0.997664 0.996374 0.994814 0.99299 0.990907 0.98857 0.985987 0.983161 0.9801 0.976808 0.973291 0.969555 0.965604

20

Chapter 3: Modeling in the Time Domain

Runge- Kutta Scheme; General


yi 1 ! yi  hf (ti , yi ) An ! h * f (ti , yi ) h An Bn ! h * f (ti  , yi  ) 2 2 Bn h Cn ! h * f (ti  , yi  ) 2 2 Dn ! h * f (ti 1 , yi  Cn ) 1 yi 1 ! yi  ( An  2 Bn  2Cn  Dn ) 6

21

Figure 3.1 RL network

Chapter 3: Modeling in the Time Domain

i(t) is state variable; but you can pick up something else; e.g. vR

Initial condition i(0)

Ldi/dt+Ri=v(t) state equation

22

Chapter 3: Modeling in the Time Domain

RL network

Laplace transform L[sI(s)-i(o)]+RI(s)=V(s) For unit step v(t)=1, V(s)=1/s I(s)=1/{s(Ls+R)}+ i(o)L /(Ls+R) 1/{s(Ls+R)}=(1/L)[A/s+B/(s+R/L)] A=L/R, B=-L/R I(s)=(1/R)[1/s-1/(s+R/L)]+ i(o)/(s+R/L) i(t)=(1/R)[1-e-(R/L)t]+ i(o) e-(R/L)t

23

Chapter 3: Modeling in the Time Domain

RL network

i(t) state variable


Ldi/dt+Ri=v(t) state equation If initial condition i(0), input v(t) are known, we know i(t) Then we know other network variables; output equations VR(t)=Ri(t) VL(t)=V(t)-Ri(t) As VL(t)=Ldi/dt di/dt= VL(t)/L= [V(t)-Ri(t)]/L

24

Chapter 3: Modeling in the Time Domain

Figure 3.2 RLC network

Second order system; two state variables needed; e.g. i(t), q(t) charge on the capacitor

25

Chapter 3: Modeling in the Time Domain

RLC network

Ldi/dt+Ri+(1/c)+idt=v(t) i(t)=dq/dt, i=q Lq+Rq+(1/c)q=v(t) To make two first-order equations dq/dt=i di/dt=-(1/LC)q-R/Li+v(t)/L State equations If we know initial conditions, and input v(t), we can solve the problem

26

Chapter 3: Modeling in the Time Domain

RLC network

Output equation vL(t)=-(1/C)q(t)-Ri(t)+v(t) [note that vL+vR+vC=v(t)] Both system equations and output equation state-space representation You can pick up other state variables, e.g. vR, vC i(t) must be continuous, i=vR/R

27

Chapter 3: Modeling in the Time Domain

RLC network

vL=Ldi/dt=(L/R) dvR/dt As vL+vR+vC=v(t) (L/R) dvR/dt+vR+vC= v(t) dvR/dt=-(R/L) vR-(R/L) vC+(R/L)v(t) vC=(1/c) (vR/R)dt Differentiate dvC/dt=(1/RC)vR New state equations

28

Chapter 3: Modeling in the Time Domain

State-space representation

State variables are linearly independent; no state variable can be written as a linear combination of the other state variables Summary of the RLC state-space representation

29

Chapter 3: Modeling in the Time Domain

 x ! Ax  Bu 1 1 di R ! q  i  v(t ) LC dt L L 1 0 dq / dt R  A! 1 x! ,  LC  L di / dt 0 q B ! 1 , u ! v(t) x! , L i output equations y ! Cx  Du dq !i dt 1 y ! vL (t ), C ! C - R , D ! 1

30

Chapter 3: Modeling in the Time Domain

Figure 3.3 Graphic representation of state space and a state vector For RLC network; vR, vC were selected as state variables

Function of time t

31

Chapter 3: Modeling in the Time Domain

State-space representation x=Ax+Bu y=Cx+Du x=state vector Y=output vector x=time derivative of the state vector u=input vector A=system matrix B=input matrix C=output matrix D=feedforward matrix

32

Chapter 3: Modeling in the Time Domain

Applying the State-space representation

A minimum number of state variables must be selected as components of the state vector (sufficient to describe completely the state of the system State variables must be linearly independent Usually number of energy-storage elements becomes number of state variables

33

Chapter 3: Modeling in the Time Domain

Figure 3.4 Block diagram of a mass and damper

Mdv/dt+Dv=f(t); (Ms+D)V(s)=F(s) One energy-storage element (mass)

First order equation, so one statevariable may be enough; but mass must have relative position use two state-variables, v(t), x(t)

34

Chapter 3: Modeling in the Time Domain

Example 3.1 Electrical network for representation in state space

Output iR(t)

35

Chapter 3: Modeling in the Time Domain

Solution to the Example 3.1

Write equation for all energy-storage elements; inductor & capacitor CdvC/dt=iC LdiL/dt=vL Select vC & iL as state variables Next, change iC & vL in terms of state variables and input v(t) iC = iL - iR = iL - vC /R vL = v(t)-vC

36

Chapter 3: Modeling in the Time Domain

1 dvC C !  vC  iL dt R diL L ! vC  v(t ) dt 1 1 dvC vC  iL ! dt RC C 1 1 diL !  vC  v(t ) dt L L 1 output i R ! vC R 1 1   vC RC C vC 0  1 v (t ) i ! 1  L  0 iL L L vC 1 iR ! 0 iL R

37

Chapter 3: Modeling in the Time Domain

Figure 3.6 Electrical network for Example 3.2

38

Chapter 3: Modeling in the Time Domain

Figure 3.7 Translational mechanical system

39

Chapter 3: Modeling in the Time Domain

Figure 3.8 Electric circuit for Skill-Assessment Exercise 3.1

40

Chapter 3: Modeling in the Time Domain

Figure 3.9 Translational mechanical system for Skill-Assessment Exercise 3.2

41

Chapter 3: Modeling in the Time Domain

Figure 3.10 a. Transfer function; b. equivalent block diagram showing phase-variables. Note: y(t) = c(t)

42

Chapter 3: Modeling in the Time Domain

 9s 2  26s  24 C ( s ) ! 24 R ( s)   9c  26c  24c ! 24r    c 


3

24 C (s) ! 3 R( s ) s  9s 2  26s  24

x1 ! c  x2 ! c   x3 ! c  x1 ! x2

State variables System equations

 x2 ! x3  x3 ! - 24 x1 - 26 x2  9 x3  24r y ! c ! x1

Output equation

43

Chapter 3: Modeling in the Time Domain

 x1 !  x2 ! y ! c ! x1

x2 x3

 x2 ! - 24 x1 - 26 x2  9 x3  24r  1 0 x1 0 x1 0 x ! 0  0 1 x 2  0 r 2 x2  24  26  9 x3 1  x1 y ! ? 0 0A x2 1 x3

44

Chapter 3: Modeling in the Time Domain

Can you explain?

45

Chapter 3: Modeling in the Time Domain

Figure 3.11 Decomposing a transfer function

Output equation y(t)=b0x1+b1x2+b2x3

46

Chapter 3: Modeling in the Time Domain

Figure 3.12
a. Transfer function; b. decomposed transfer function; c. equivalent block diagram. Note: y(t) = c(t)

47

Chapter 3: Modeling in the Time Domain

 1 0 x1 0 x1 0 x  0 r x ! 0  0 1 2 2 x2  24  26  9 x3 1  C ( s ) ! ( s 2  7 s  2) X 1 ( s ) y ! x3  7 x2  2 x1 x1 x y ! ?2 7 1A 2 x3

48

Chapter 3: Modeling in the Time Domain

Figure 3.13
Walking robots, such as Hannibal shown here, can be used to explore hostile environments and rough terrain, such as that found on other planets or inside volcanoes.

Bruce Frisch/S.S./Photo Researchers

49

Chapter 3: Modeling in the Time Domain

Converting to a Transfer Function


 x ! Ax  Bu y ! Cx  Du sX ( s ) ! AX ( s)  BU ( s ) Y ( s ) ! CX ( s )  DU ( s ) ( sI  A) X ( s ) ! BU ( s ) X ( s ) ! ( sI  A) BU ( s ) Y ( s ) ! C ( sI  A) 1 BU ( s)  DU ( s) ! [C ( sI  A) 1 B  D]U ( s ) Y ( s) T (s) ! ! C ( sI  A) 1 B  D U (s)
1

50

Chapter 3: Modeling in the Time Domain

Example 3.6
 1 0 x1 10 x1 0 x ! 0  0 1 x2  0 u 2 x2  1  2  3 x3 0  x1 y ! ? 0 0A x2 1 x3 1 0 s 1 0 s 0 0 0 1 ( sI  A) ! 0 s 0  0 0 1 ! 0 s 0 0 s  1  2  3 1 2 s  3 s 2  3s  2 s 3 1 s( s  3) s 1 s  2( s  1) s 2 1 ( sI  A) ! s 3  3s 2  2s  1

51

Chapter 3: Modeling in the Time Domain

Example 3.6
10 B!0 0 C ! ? 0 0A 1 D!0 T ( s) ! C ( sI  A) 1 B  D s 2  3s  2 1 s3 s ( s  3) s 1 10 s  2( s  1) s 2 0 1 ! ? 0 0 A s 3  3s 2  2s  1 0 10( s 2  3s  2) 1 1 ? 0 0A  10 ! 3 s  3s 2  2s  1  10s 10( s 2  3s  2) ! 3 s  3s 2  2s  1

52

Chapter 3: Modeling in the Time Domain

Figure 3.14
a. Simple pendulum; b. force components of Mg; c. free-body diagram

53

Chapter 3: Modeling in the Time Domain

Figure 3.15 Nonlinear translational mechanical system for Skill-Assessment Exercise 3.5

54

Chapter 3: Modeling in the Time Domain

Figure 3.16
Pharmaceutical drug-level concentrations in a human

55

Chapter 3: Modeling in the Time Domain

Figure 3.17 Aquifer system model

Das könnte Ihnen auch gefallen