ch03 Update
ch03 Update
Modeling
in the Time Domain
SOLUTIONS TO CASE STUDIES CHALLENGES
Antenna Control: State-Space Representation
For the power amplifier, = . Taking the inverse Laplace transform, ea+150ea =
·
e a =- 150e a +150v p
For the motor and load, define the state variables as x1 = m and x2 = qm. Therefore,
x1 = x2 (1)
Using the transfer function of the motor, cross multiplying, taking the inverse Laplace transform,
x2 = - x2 + ea (2)
y = 0.2x1 (3)
= 0.8, and = 1.32. Using Eqs. (1), (2), and (3) along with the previous values, the
0 1 0
x= x+ e ; y = 0.2 0 x
0 -1.32 0.8 a
3-2 Chapter 3: Modeling in the Time Domain
-(G2+G1+G21)h1+G2h2+qi1+G21H1
[ ][ ]
−( G1 +G 2 +G3 ) G2 q i 1 + G21 H 1
0
C1 C1 C1
.
G2 −( G2 +G3 ) G3 q i 2 −q o 2
x= x+ u( t )
C2 C2 C2 C2
G3 −G 3 q i 3 −q o 3
0
C3 C3 C3
[ ]
1 0 0
y= 0 1 0 x
0 0 1
13. Yes, depending upon the choice of circuit variables and technique used to write the system equations.
For example, a three -loop problem with three energy storage elements could yield three simultaneous
second-order differential equations which would then be described by six, first-order differential equations.
This exact situation arose when we wrote the differential equations for mechanical systems and then
proceeded to find the state equations.
14. The state variables are successive derivatives.
SOLUTIONS TO PROBLEMS
1.
Substituting
or
Thus
3-4 Chapter 3: Modeling in the Time Domain
d i2 −4 1 2 1
v 1= =v i−2 i 1= i − i + v+ v
dt 3 2 3 4 3 i 3 o
Also
−1 1 1 1
i 3=i 1−i 2= i + i + v− v
3 2 6 4 6 i 6 o
and
−1 5 1 1
i 5=i 3−i 4 = i2− i 4 + v i− v o
3 6 6 6
d vo −2 5 1 1
=2 i5 = i2 − i 4 + v i− v o
dt 3 3 3 3
Finally
d i 4 v 2 i 5+ v o −1 5 1 5
= = = i 2− i 4 + v i + v o
dt 3 3 9 18 18 18
[[ ] ][ ] [ ]
In matrix form we have
d i2 −4 −1 2 2
dt 3 3 3 5
i2
d i4 −1 −5 5 5
= i4 + v
dt 9 18 18 18 i
d vo −2 −5 −1 v o 1
dt 3 3 3 3
[]
i2
y=v o= [ 0 0 1 ] i 4
vo
2.
Let C1 be the grounded capacitor and C 2 be the other. Now, writing the equations
for the energy storage components yields,
di L
=v i−v C
dt 1
dv C i −i
1
=1 2
dt 2
dv C i 2−i 3
2
=
dt 2 (1)
Solutions to Problems 3-5
[]
iL
x= v C
1
vC
Thus the state vector is 2
.
Now, find the three loop currents in terms of the state variables and the input.
v C =v C +2i 2
Writing KVL around Loop 2 yields 1 2 .
i 2 =0 .5 v C −0 .5 v C
Or, 1 2
i +2 i 2=v i
Writing KVL around the outer loop yields 3
Or,
i 3 =v i −2i 2 =vi −v C + v C
1 2
Also,
i 1−i 3 =i L . Hence, i 1=i L +i 3 =i L + vi −v C1 + v C 2
Substituting the loop currents in equations (1) yields the results in vector-matrix form,
v o =2i 2 =v C −v C 2
Since 1 , the output equation is
3-6 Chapter 3: Modeling in the Time Domain
3.
Equations of motion in Laplace:
Substituting Eq. (1) in (2), (3) in (4), and (5) in (6), we obtain, respectively:
dz 1
=z 2 (7)
dt
dz 3
=z 4 (8)
dt
dz 5
=z 6 ( 9)
dt
Substituting Eqs. (1) through (6) into the equations of motion in the time domain and
solving for the derivatives of the state variables and using Eqs. (7) through (9) yields the
state equations:
Solutions to Problems 3-7
In vector-matrix form:
4.
1 1 +1 1
x¨1=− ẋ 1− x 1+ ẋ ẋ + x 3
2 2 2 2 3 2
z˙1= x˙1=z 2
1 1 1 1
z˙2= x¨1=−z 2− z + z 4 + z 6 + z 5
2 1 2 2 2
z˙3= x˙2=z 4
z˙4 = ẍ2 =z1−2 z 4 −z 3+ z 6 + z 5
z˙5= x˙3=z 6
z˙6= x¨3=z 2 + z 1+ z 4+ z3 −2 z 6 −2 z 5
[ ] []
In matrix form
0 1 00 0 0
0
1 1 1 1
− −1 0 0
2 2 2 2
0
ż= 0 0 0 1 0 0 z+ f (t )
0
1 0 −1 −2 1 1
0
0 0 0 0 0 1
1
1 1 1 1 −2 −2
y= [ 0 0 1 0 0 0 ] z
Solutions to Problems 3-9
5.
1600
50
4T
Writing the state equations using the equations of motion and the definitions of the state
variables
In vector-matrix form,
3-10 Chapter 3: Modeling in the Time Domain
6.
Drawing the equivalent circuit,
10T
200(1/10)2 =2 N-m/rad
(1/10)(102 ) = 10 N-m/rad
(1)
(2)
(3)
From (3),
and (4)
assuming zero initial conditions.
From (1)
(5)
Solutions to Problems 3-11
Substituting (4) and (5) into (2) yields the state equation (notice there is only one equation),
7.
X 1( s ) X 2( s )
Solving Eqs. (3.44) and (3.45) in the text for the transfer functions F( s ) and F( s ) :
0 K M 1 s2 + D s + K 0
F M2 s2 + K K F
X 1 s = X 2 s =
M 1 s2 + D s + K K M 1 s2 + D s + K K
K M 2 s2 + K and K M 2 s2 + K
Thus,
X1 s = K
4 3 2 2
F s M 2 M 1 s +D M 2 s +K M 2 s +K M 1 s +D K s
and
2
X2 s M 1 s +D s +K
=
4 3 2 2
F s M 2 M 1 s +D M 2 s +K M 2 s +K M 1 s +D K s
Multiplying each of the above transfer functions by s to find velocity yields pole/zero cancellation at
the origin and a resulting transfer function that is third order.
8.
a. . Using the standard form derived in the textbook,
[ ] []
0 1 0 0 0
¿
x= 0
0 1 0
x + 0 r (t )
0 0 0 1 0
−80 −20 −15 −10 1
c= [ 80 0 0 0]x
b. Using the standard form derived in the textbook,
3-12 Chapter 3: Modeling in the Time Domain
[ ] []
0 1 0 0 0 0
¿ 0 0 1 0 0 0
x= 0 0 0 1 0 x+ 0 r (t )
0 0 0 0 1 0
−20 −1 −3 −7 −5 1
c= [ 20 0 0 0 0]x
9.
Program:
'a'
num=100;
den=[1 20 10 7 100];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)
'b'
num=30;
den=[1 8 9 6 1 30];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)
Computer response:
ans =
Transfer function:
100
---------------------------------
s^4 + 20 s^3 + 10 s^2 + 7 s + 100
A=
0 1 0 0
0 0 1 0
0 0 0 1
-100 -7 -10 -20
B=
0
0
0
1
Solutions to Problems 3-13
C=
100 0 0 0
ans =
Transfer function:
30
------------------------------------
s^5 + 8 s^4 + 9 s^3 + 6 s^2 + s + 30
A=
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
-30 -1 -6 -9 -8
B=
0
0
0
0
1
C=
30 0 0 0 0
10.
a. Using the standard form derived in the textbook,
22
3-14 Chapter 3: Modeling in the Time Domain
11.
Program:
'a'
num=[8 10];
den=[1 5 1 5 13]
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)
'b'
num=[1 2 12 7 6];
den=[1 9 13 8 0 0]
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)
Computer response:
ans =
ans =
den =
1 5 1 5 13
Transfer function:
8 s + 10
----------------------------
s^4 + 5 s^3 + s^2 + 5 s + 13
A=
0 1 0 0
0 0 1 0
0 0 0 1
-13 -5 -1 -5
B=
0
0
0
1
Solutions to Problems 3-15
C=
10 8 0 0
ans =
den =
1 9 13 8 0 0
Transfer function:
s^4 + 2 s^3 + 12 s^2 + 7 s + 6
------------------------------
s^5 + 9 s^4 + 13 s^3 + 8 s^2
A=
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
0 0 -8 -13 -9
B=
0
0
0
0
1
C=
6 7 12 2 1
12.
1 2
3 2 s −3 s
s + 4 s +13 s+10
3-16 Chapter 3: Modeling in the Time Domain
x 1=x ; x 2= ẋ ; x 3= ẍ
so
x˙1=x 2
x˙2=x 3
y= ẍ −3 ẋ =x3 −3 x 2
In vector-matrix form
[ ] []
0 1 0 0
ẋ= 0 0 1 x+ 0 r (t )
−10 −13 −4 1
y= [ 0 −3 1 ] x
13.
a. G(s)=C(sI-A)-1B
[ ] []
0 1 0 0
A= 0 0 1 ; B= 0 ; C=[ 1 0 0 ]
−1 −3 −2 23
[ ]
s 2 +2 s +3 s +2 1
−1 1
(s I − A) = 3 2
−1 s ( s+2) s
s +2 s +3 s+1
−s −(3 s +1) s 2
23
Therefore, G ( s )= 3 2 . Note that in this case the result could have also been obtained
s +2 s + 3 s+1
by inspection.
b. G(s)=C(sI-A)-1B
Solutions to Problems 3-17
[ ] []
−1 2 −6 5
A= −4 −5 0 ; B= 1 ; C=[ 2 0 2 ]
3 −3 7 2
−1 1
(s I − A) = 3 2 ¿
−s +s +11s−71
2
14 s +8 s−134
Therefore G ( s )= 3 2
.
s −s −11s +71
c. G(s)=C(sI-A)-1B
[ ] []
−2 8 7 1
A= 5 −4 2 ; B= −5 ; C=[ 7 2 1 ]
−9 −3 −1 −1
[ ]
s2 +5 s+10 8 s−13 7 s +44
1
(s I − A)−1= 3 2 5 s−13
2
s +3 s +65 2 s+39
s +7 s +43 s+ 481 2
−(9 s +51) −(3 s+78) s + 6 s−32
2
−4 s +318 s +166
( )
Therefore G s = 3 2
.
s +7 s +43 s+ 481
14.
Program:
'a'
A=[0 1 5 0;0 0 1 0;0 0 0 1;-7 -9 -2 -3];
B=[0;5;8;2];
C=[1 3 6 6];
D=0;
statespace=ss(A,B,C,D)
[num,den]=ss2tf(A,B,C,D);
G=tf(num,den)
'b'
A=[3 1 0 4 -2;-3 5 -5 2 -1;0 1 -1 2 8;-7 6 -3 -4 0;-6 0 4 -3 1];
B=[2;7;8;5;4];
C=[1 -2 -9 7 6];
D=0;
statespace=ss(A,B,C,D)
[num,den]=ss2tf(A,B,C,D);
G=tf(num,den)
Computer response:
ans =
3-18 Chapter 3: Modeling in the Time Domain
a=
x1 x2 x3 x4
x1 0 1 5 0
x2 0 0 1 0
x3 0 0 0 1
x4 -7 -9 -2 -3
b=
u1
x1 0
x2 5
x3 8
x4 2
c=
x1 x2 x3 x4
y1 1 3 6 6
d=
u1
y1 0
Continuous-time model.
Transfer function:
75 s^3 - 96 s^2 - 2331 s - 210
------------------------------
s^4 + 3 s^3 + 2 s^2 + 44 s + 7
ans =
a=
x1 x2 x3 x4 x5
x1 3 1 0 4 -2
x2 -3 5 -5 2 -1
x3 0 1 -1 2 8
x4 -7 6 -3 -4 0
x5 -6 0 4 -3 1
b=
u1
x1 2
x2 7
x3 8
x4 5
x5 4
c=
x1 x2 x3 x4 x5
y1 1 -2 -9 7 6
d=
u1
y1 0
Solutions to Problems 3-19
Continuous-time model.
Transfer function:
-25 s^4 - 292 s^3 + 1680 s^2 + 1.628e004 s + 3.188e004
------------------------------------------------------
s^5 - 4 s^4 - 32 s^3 + 148 s^2 - 1153 s - 4480
3-20 Chapter 3: Modeling in the Time Domain
15.
Program:
syms s
'a'
A=[0 1 5 0
0010
0001
-7 -9 -2 -3];
B=[0;5;8;2];
C=[1 3 4 6];
D=0;
I=[1 0 0 0
0100
0010
0 0 0 1];
'T(s)'
T=C*((s*I-A)^-1)*B+D;
T=simple(T);
pretty(T)
'b'
A=[3 1 0 4 -2
-3 5 -5 2 -1
0 1 -1 2 8
-7 6 -3 -4 0
-6 0 4 -3 1];
B=[2;7;6;5;4];
C=[1 -2 -9 7 6];
D=0;
I=[1 0 0 0 0
01000
00100
00010
0 0 0 0 1];
'T(s)'
T=C*((s*I-A)^-1)*B+D;
T=simple(T);
pretty(T)
Computer response:
ans =
ans =
T(s)
3 2
59 s - 148 s - 2241 s - 140
-----------------------------
4 3 2
s + 3 s + 2 s + 44 s + 7
ans =
Solutions to Problems 3-21
ans =
T(s)
4 3 2
(- 7 s - 408 s + 1708 s + 14582 s +
5 4 3 2
27665) / (s - 4 s - 32 s + 148 s -
1153 s - 4480)
>>
16.
Ka
d (s) K X(s) K F (s)
3 b
K K K s+
Ka
s 3+ 2 2
s + 1
s+ 0
K K K
3 3 3
K K K
... 2 1 0 Ka
For the first box, x + x+ x+ x = (t).
K K K K
3 3 3 3
Selecting the phase variables as the state variables: x =x, x =x, x =x.
1 2 3
x1 = x2
x2 = x3
y = (t) = x+ x = x1+x2
In vector-matrix form,
3-22 Chapter 3: Modeling in the Time Domain
0 1 0 0
0 0 1 0 K
b
x = K K K x+ (t) ; y = 1 0 x
0 1 2
Ka Ka
- - - K
K K K
3 3 3 3
17.
Or,
= - m + ia
But, m = L.
= - L + ia
The second state equation is:
= L
Since
= - L - ia+ ea
In vector-matrix form,
Deq K N
t 1
- 0 0
Jeq Jeq N
2 N
0 2
x= 1 0 0 x+ ea ; y = 0 0 x
1 N
K N 1
b 2 Ra La
- 0 -
La N La
1
where,
Solutions to Problems 3-23
L
x = L
ia
18.
Controller:
Wheels:
Rw (s) c Xw(s)
sc
yw = xw
3-24 Chapter 3: Modeling in the Time Domain
Vehicle:
Rv (s) 1 Xv(s)
19.
Adding displacements to the figure,
xr xs xe
d2 xr dx r dx s
+2 +2 x r −x s− =u( t )
dt 2 dt dt
dx r d2 x s dx s
− −xr + 2 + + x s =0
dt dt dt
Writing the state equations, using the differential equations and the definition of the state variables,
we get,
Solutions to Problems 3-25
· ·
x 1=x r =x 2
· ··
x 2 =xr =- 2 x 1−2 x 2 + x 3 + x 4 +u( t )
· ·
x 3 =x s =x 4
· ··
x 4 =x s =x 1 + x 2 −x 3−x 4
y=x 3
In vector-matrix form,
[ ] []
0 1 0 0 0
·
x = −2 −2 1 1 x+ 1 u(t )
0 0 0 1 0
1 1 −1 −1 0
y= [ 0 0 1 0]x
Writing the differential equations for contact,
d2 xr dx r dx s
+2+2 x r −x s− =u( t )
dt 2 dt dt
dx d2 x dx
− r −xr + 2 s + s + x s −z−x e =0
dt dt dt
dz dx
−x s + + z− e =0
dt dt
2
dz d x dx
−x s − + 2 e + 2 e +2 x e=0
dt dt dt
Using the differential equations and the definitions of the state variables, we write the state equations.
·
x 1=x 2
·
x 2 =- x 1−2 x 2 + x 3 + x 4 +u ( t )
·
x 3 =x 4
·
x 4 =x 1 + x 2 −x 3 −x 4 + x 5 + x7
·
x 5 =x 6
3-26 Chapter 3: Modeling in the Time Domain
Differentiating the third differential equation and solving for d2z/dt2 we obtain,
2
·
d 2 z dx s dz d x e
x 6= = − +
dt 2 dt dt dt 2
d2 xe dz dx e
= xs+ −2 −2 x e = x3 + x 6 −2 x 8 −2 x 7
dt 2 dt dt
·
Substituting this expression back into x 6 along with the other definitions and then simplifying yields,
·
x 6 =x 4 + x 3−2 x 8 −2 x 7
Continuing,
·
x 7 =x 8
·
x 8 =x 3 + x 6 −2 x7 −2 x 8
Assuming the output is xs,
y=x s
Hence, the solution in vector-matrix form is
[ ] []
0 1 0 0 0 0 0 0 0
−1 −2 1 1 0 0 0 0 1
0 0 0 1 0 0 0 0 0
·
1 1 −1 −1 1 0 1 0 0
x= x+ u(t )
0 0 0 0 0 1 0 0 0
0 0 1 1 0 0 −2 −2 0
0 0 0 0 0 0 0 1 0
0 0 1 0 0 1 −2 −2 0
y= [ 0 0 1 0 0 0 0 0 ] x
Solutions to Problems 3-27
20.
a.
A=
1.0000 0 0 -3.0860
0 1.0000 0 0
B=
-0.0075 -0.0230
0.0017 -0.0022
0 0
0 0
>> C = [0 0 1 0; 0 0 0 1]
C=
0 0 1 0
0 0 0 1
3-28 Chapter 3: Modeling in the Time Domain
num =
0 0 0.0017 0.0001 0
den =
num =
den =
b.
a.
36
G( s)=C (sI−A )−1 B=9( s+10 )−1 4=
( s+10 )
b.
[ ]
1
0
[ ][] [ 41 ]
−1
s +10 0 4 s+10
G( s )=C (sI−A )−1 B=[ 9 0 ] =[9 0 ]
0 s+1 1 1
0
s+ 1
=
[ 9
s+10 ][ ]
0 4 =
36
1 s+10
c.
[ ]
1
0
[ ][] [ 40 ]
−1
−1 s+10 0 4 s+10
G( s )=C (sI−A ) B=[ 9 4 ] =[ 9 4]
0 s +1 0 1
0
s +1
[ ]
4
36
= [9 0 ] s +10 =
s +10
0
3-30 Chapter 3: Modeling in the Time Domain
22.
a.
d mSO
=k O 1 m A ( t )−(k O 2+ k O 3 )mSO ( t )+ k O 4 m IDO (t)
dt
d mIDO
=k O 3 mSO ( t )−k O 4 mIDO (t)
dt
d mV
=k L1 m A ( t )−(k L2 +k L3 )mV ( t )
dt
d mS
=k L3 mV (t )−k L 4 mS ( t )
dt
b.
Solutions to Problems 3-31
23.
e a ( t ) =R a x 3 + La ẋ 3+ K b x 2
Or
−K b Ra u
ẋ 3= x 2− x 3 +
La La La
ẋ 1=x 2
And
K m x 3=J ẋ2 + D x 2+ K x 1
Or
−K D Km
ẋ 2= x 1− x 2+ x
J J J 3
[ ][ ] [ ]
0 1 0
[]
ẋ 1 K m x1 0
−K −D
0
ẋ 2 = J J J x2 + u
1
ẋ3 −K b −R a x 3
0 La
La La
[]
x1
y= [ 1 0 0 ] x 2
x3
24.
In vector-matrix form,
25.
[]
θ
θ̇
y=lθ+x=Cx=[ l 0 1 0 ]
x
ẋ
b. Substituting the given values into the A matrix and B and C vectors yields,
Solutions to Problems 3-33
[ ][ ]
0 1 0 0 0
29 . 8615 0 0 0 −1. 1574
A= B=
0 0 0 1 0
−0 . 9401 0 0 0 ; 0 . 4167
C=[ 0.36 0 1 0 ] ; D = 0
G(s)=Y(s)/U(s)
G =
---------------------------------
Note: As will be noted in chapter 6, a system with missing powers of ‘s’ and alternating signs
26.
a.
f 1=s−dT −(1−u1 )β Tv
3-34 Chapter 3: Modeling in the Time Domain
¿
f 2=(1−u1 ) β Tv−μT
¿
f 3 =(1−u 2 )kT −cv
∂f1
| =−d−(1−u1 ) βv|0=−d−(1−u10 ) βv 0
∂T 0
∂f1
¿ | =0
∂T 0
∂f1
| =(1−u 1 ) βv|0 =(1−u 10 )βv 0
∂v 0
∂f2
| =(1−u 1 ) βv|0 =(1−u10 ) βv 0
∂T 0
∂f2
¿ | =−μ
∂T 0
∂f2
| =(1−u 1 ) βT|0 =(1−u10 )βT 0
∂v 0
∂f3
| =0
∂T 0
∂f3
¿ | =(1−u 20 )k
∂T 0
∂f3
| =−c
∂v 0
∂f1
| =βT 0 v 0
∂u1 0
∂f1
| =0
∂u2 0
∂f2
| =−βT 0 v 0
∂u1 0
∂f2
| =0
∂u2 0
∂f3
| =0
∂u1 0
∂f3 ¿
|0 =−kT 0
∂u2
Solutions to Problems 3-35
b.
[ ][ ][ ] [ ][ ]
Ṫ −(d + βv 0 ) 0 −βT 0 T βT 0 v 0 0
¿ ¿ u1
Ṫ = βv 0 −μ βT 0 T + −βT 0 v 0 0
u
v̇ 0 k −c v 0
¿
−kT 0 2
[]
T
y= [ 0 0 1 ] T ¿
v
27.
a. The following basic equations characterize the relationships between the state, input, and output
variables for the HEV common forward path of the figure:
(1)
, where ,
,
b. Given that the state variables are the motor armature current, Ia(t), and angular speed, (t), we re-
write the above equations as:
(2)
3-36 Chapter 3: Modeling in the Time Domain
(3)
(4)
(5)
28.
The corresponding differential equation is:
¨
h(t)+0.0224 ˙
h (t)+196 ×10−6 h (t)=137.2 ×10−6 q(t−39)
In matrix form:
[][
ẋ1
=
0
ẋ2 −196 ×10
−6
1
−0.0024 x 2 1
x1 0
][ ] [ ] −6
+ 137.2× 10 q(t−39)
x
h ( t )= y= [ 1 0 ] 1
x2 []
Alternatively this can also be written as:
[][
ẋ1
=
0
ẋ2 −196 ×10 −6
1 x1 0
−0.0024 x 2 1 ][ ] [ ]
−6
+ 137.2× 10 q(t)
Solutions to Problems 3-37
h ( t+ 39 )= y (t +39)=[ 1 0 ]
[]
x1
x2