Chapter 4 Slides
Chapter 4 Slides
Chapter 4
State Variable Analysis
of RLC Networks
1
Overview:
• Concepts of state and state variables.
• Formulation of state and output equations of simple
RLC networks using state-transition matrix.
• Transfer function of state and output equations in s-
domain.
Learning Outcome:
Solve for the time and frequency behaviour of electric
circuits using state variable analysis.
2
State and State Variables
• The state of a system refer to the past, present and
future conditions of the system. It represents the
dynamics of the system at any instant of time.
• State variables are physical properties which
characterise the state of a system regardless of how
the system got to that state.
• Examples – positions and velocities in mechanical
systems, temperatures and pressures in
thermodynamic systems, inductor currents and
capacitor voltages in electrical circuits.
3
State and Output Equations
u(t) Linear y(t) Y (s)
H ( s) =
System U (s)
u1(t) y1(t)
y2(t)
State-space
u2(t) Linear representation is
um(t)
System yp(t)
convenient for
multivariable systems
y = Cx + Du Output Equation
4
State Equation
x1 (t )
System matrix x (t )
x&1 (t ) 2
x& (t ) n×n x(t ) = •
2 •
x& (t ) = • x (t )
• n
x& (t ) State vector representing
n
x& = Ax + Bu n state vectors
State vector representing
n state vectors
u1 (t )
(first derivative u (t )
with respect to time) 2
u(t ) = •
Input coupling matrix •
n×m u (t )
m
( sI − A ) X( s ) = BU ( s )
7
y = Cx + Du
Y( s ) = CX( s ) + DU( s )
H ( s ) = C( sI − A) −1 B + D
If there are >1 inputs and/or >1 outputs, there will be
more than 1 transfer functions.
8
Steps to apply the state variable
method to circuit analysis
9
Example 1
i L
R
vs +
-
+
C _vo
10
Solution i L
v s = v L + v R + vo
di • v s − iR − vo
L = v s − iR − vo ∴i = ... (1)
dt L
•
Current in C C dvo = i ∴ vo =
i
... (2)
dt C
• 0 1
0 1
v o = C v o + 1 v s 0 0
• −1 − R i A= C
B = 1
i L
−1 −R
L
L L
L L
vo
vo = [1 0] C = [1 0] D=0
i 11
1 −1
s 0 0
C = s
C
−
− R 1 R
sI − A =
0 s − 1 s+
L L L L
R 1
Taking the inverse of this gives s + L C
−1
s
adj (sI − A )
= L
−1
(sI − A ) =
det (sI − A ) s 2 + R s + 1
L LC
Thus, the transfer function is given by
R 1
s + L C 0
[1 0] − 1 1
s L
1
−1
H (s ) = C(sI − A ) B = L = LC =
1
2 R 1 2 R 1 LCs 2 + RCs + 1
s + s+ s + s+
L LC L LC 12
Example 2
i L Node 1 iC
ix
+
vs + C _v
- R
13
Solution
i Node 1 iC
State variables - inductor current i and
capacitor voltage v L ix
Input - vs +
Output - ix vs + C _v
-
R
di • v vs
vs = v L + v → L = −v + vs or i = − + ... (2 )
dt L L
Both (1) and (2) constitute the state equation.
For output equation, v
i =
x
R 14
Putting (1) & (2) in the standard form leads to
−1 1
• 0
v• = RC C v + 1 v ... (3a )
s
i − 1 0 L
i
L
1 v
ix = 0 ... (3b )
R i
s 4
Taking the inverse of this gives
−1 adj (sI − A ) − 2 s + 4
(sI − A ) = = 2
det (sI − A ) s + 4s + 8
s 4 0 8
[1 0] [1 0]
−1 − 2 s + 4 2
= 2 s + 8= 8
H (s ) = C(sI − A ) B =
s 2 + 4s + 8 s 2 + 4s + 8 s 2 + 4s + 8
16
Example 3
Determine the state and output equations for the circuit shown below.
Take vo as the output.
1/4F 1H
+
v1(t) vo 2Ω v2(t)
-
17
Solution
State variables - inductor current iL and 1/4F 1H
capacitor voltage vC
Inputs - v1 and v2
Output - vo +
v1(t) vo 2Ω v2(t)
Applying KVL at the outer loop -
v1 = vC + vL + v2
vL = v1 − v2 − vC
diL • − vC + v1 − v2
L = v1 − v2 − vC ∴ iL = ... (1)
dt L
Applying KVL around the left-hand loop gives
v1 = vC + vo = vC + 2iR = vC + 2(iC − iL ) ... (2)
iC = 0.5v1 − 0.5vC + iL
dv • − 0.5vC + iL + 0.5v1
C C = 0.5v1 − 0.5vC + iL ∴ vC = ... (3)
dt C
18
From (2), we see that
v1 = vC + vo
∴ vo = −vC + v1
•
iL = 0 − 1 iL + 1 − 1 v1 (t )
• 4 − 2 vC 2 0 v2 (t ) State Variables
vC Output
iL v1 (t ) Inputs
vo (t ) = [0 − 1] + [1 0]
v
C v
2 (t )
19
Example 4 2007/08 Final exam – Q5
Solution:
0 1 0
Given: A= ; B = ; C = [4 5]; D = [0]
− 2 − 3 1
20
[sI − A] = s
1 0 0 1 s −1
− =
0 1 − 2 − 3 2 s + 3
s + 3 1
− 2 s
[sI − A] = 2
−1
s + 3s + 2
s + 3 1
− 2 s
C[sI − A ]−1 = [4 5] = [4 s + 2 5s + 4]
s 2 + 3s + 2 s 2 + 3s + 2
−1
C[sI − A ] B =
[4s + 2 5 s + 4 ] 0
=
5s + 4
s + 3s + 2 1 s 2 + 3s + 2
2
5s + 4
Thus, transfer function is: H (s ) =
s 2 + 3s + 2
21
b) For the electrical RLC circuit shown below,
i. What are the state variables of the system?
ii. Derive the state-space formulation of the system. Take vx as the output.
22
Solution:
23
diL vC vs
From (2) and (4), we get: =− + ... (5)
dt L L
From (3) and (5), we get the state equation as:
2 1 1
−
•
v•C = RC C vC + RC v (t )
1 s
i − 1 0 iL
L
L L
vC
From (2), the output equation: v x = [− 1 0] + vs
iL
24
Example 5
Y1 ( s ) Y2 (s)
(i) Find the transfer functions H1 ( s ) = and H2 (s) = .
U ( s) U (s)
25
Solution
(i) s 0 0 − 4 1 0 s + 4 − 1 0
sI − A = 0 s 0 − − 5 0 1 = 5 s − 1
0 0 s − 2 0 0 2 0 s
s −1 5 −1 5 s
det( sI − A) = ( s + 4) − (−1) +0
0 s 2 s 2 0
= s 3 + 4 s 2 + 5s + 2
s 2 − 5s − 2 − 2s
Matrix of co-factors =
s s 2 + 4s −2
1 s+4 s 2 + 4 s + 5
s2 s 1 0 0
1 0 0 2 s2 s
1
0 2 0 − 5 s − 2 s + 4 s s + 4 1 1
− 2s − 2 s 2
+ 4 s + 5 1
2
− 10s − 4 2 s + 8s 2s + 8 1
H= =
s 3 + 4 s 2 + 5s + 2 3 2
s + 4 s + 5s + 2
s +1
2s 2 + 10s + 8
H = 3
s + 4 s 2 + 5s + 2
Y1 ( s ) s +1 1
H1 ( s ) = = 3 =
U ( s ) s + 4 s 2 + 5s + 2 ( s + 1)( s + 2)
Y2 ( s ) 2 s 2 + 10s + 8 2s + 8
H 2 ( s) = = 3 2
=
U ( s ) s + 4s + 5s + 2 ( s + 1)( s + 2)
27
(ii) Y1 ( s ) s +1 1
H1 ( s ) = = 3 =
U ( s ) s + 4 s 2 + 5s + 2 ( s + 1)( s + 2)
Y2 ( s ) 2 s 2 + 10s + 8 2s + 8
H 2 ( s) = = 3 =
U ( s ) s + 4 s 2 + 5s + 2 ( s + 1)( s + 2)
1 1 1
H1 ( s ) = = −
( s + 1)( s + 2) s + 1 s + 2
h1 (t ) = e−t − e−2t
2s + 8 6 4
H 2 ( s) = = −
( s + 1)( s + 2) s + 1 s + 2
h2 (t ) = 6e − t − 4e −2t
28
State Transition Equation
x& = Ax + Bu
sX( s ) − x(0) = AX( s ) + BU ( s )
( sI − A) X( s ) = x(0) + BU ( s )
t
y (t ) = Cφ(t )x(0) + Cφ(t − τ )Bu (τ )dτ + Du(t ) t ≥0
0
29
Example 6
• 0 1 x1 0 x1
x
• =
1
+ u ; y = [4 5]
x − 2 − 3 x2 1 x2
2
1
x(0) =
0
30
Solution
(i) 1 0 0 1 s −1
[sI − A] = s − =
0 1 − 2 − 3 2 s + 3
s + 3 1
− 2 s
[sI − A]−1 = 2
s + 3s + 2
s+3 2 1 −t − 2t
For the (1,1) element, = − → 2e − e
s 2 + 3s + 2 s + 1 s + 2
1 1 1
For the (1,2) element, = − → e −t − e − 2t
s 2 + 3s + 2 s +1 s + 2
31
−2 −2 2
For the (2,1) element, = + → −2e −t + 2e − 2t
s 2 + 3s + 2 s +1 s + 2
s −1 2 −t − 2t
For the (2,2) element, = + → − e + 2e
s 2 + 3s + 2 s + 1 s + 2
32
t
(ii) x(t ) = φ(t ) x(0) + 0 φ(t − τ )Bu(τ )dτ
2e −t − e −2t e −t − e −2t 1
x(t ) = −t − 2t −t − 2 t 0
− 2e + 2e − e + 2 e
t
2e −(t −τ ) − e − 2(t −τ ) e −(t −τ ) − e − 2(t −τ ) 0
+ − ( t −τ ) − 2 ( t −τ ) − ( t −τ ) − 2 ( t −τ ) (1)dτ
0 − 2e
+ 2e −e + 2e 1
2e −t − e − 2t t e −(t −τ ) − e − 2(t −τ )
= −t − 2t + 0 − ( t −τ ) − 2 (t −τ ) dτ
− 2e + 2e − e + 2e
t
2e −t − e − 2t e −(t −τ ) − 0.5e − 2(t −τ )
= −t − 2t + − ( t −τ ) − 2 (t −τ )
− 2e + 2e − e + e 0
2e −t − e − 2t 0.5 − e −t + 0.5e − 2t
= −t − 2t + −t − 2t
− 2e + 2e e − e
0.5 + e −t − 0.5e − 2t
= −t − 2t
− e + e 33
t
y (t ) = Cφ(t )x(0) + Cφ(t − τ )Bu(τ )dτ + Du(t )
0
t
x(t ) = φ(t )x(0) + 0 φ(t − τ )Bu(τ )dτ
Already found x(t). Also, D = 0.
y (t ) = Cx(t )
0.5 + e −t − 0.5e − 2t
= [4 5] −t − 2t
−e +e
= 2 + 4e −t − 2e − 2t − 5e −t + 5e − 2t
= 2 − e −t + 3e − 2t
34
Example 7
Find the state transition matrix for the state equation below:
x& = Ax + Bu − 4 4
A=
− 2 0
2
If x(0) = and u(t) = 0, find x(1).
3
Solution s 4
− 2 s + 4
(sI − A )−1 = adj ( sI − A ) = 2
det (sI − A ) s + 4s + 8
s+2 2
= −
( s + 2) + 4 ( s + 2) 2 + 4
2
→ e − 2t cos 2t − e − 2t sin 2t 35
For the (1,2) element, Laplace transform pairs
4 4
=
s + 4 s + 8 ( s + 2) 2 + 4
2
2 − 2t
=2 2
→ 2 e sin 2t
( s + 2) + 4
−1 −1
e −2t
cos 2t − e −2t
sin 2t 2e −2t
sin 2t
φ(t ) = L [(sI − A) ] =
−2t −2t −2t
− e sin 2t e cos 2t + e sin 2t
36
e −2t cos 2t − e −2t sin 2t 2e −2t sin 2t 2
x(t ) = φ(t )x(0) = − 2t − 2t − 2t
− e sin 2t e cos 2t + e sin 2t 3
2e −2t cos 2t + 4e −2t sin 2t
= − 2t − 2t
3e cos 2t + e sin 2t
0.380
x(1) =
− 0. 046
37
Example 8
• − 2 1 x 2 x1
x
•=
1
1
+ u ; y = [1 1]
x − 1 0 x2 0 x2
2
38
Solution
1 0 − 2 1 s + 2 − 1
i) [sI − A] = s − = 1
0 1 − 1 0 s
s 1
− 1 s + 2
[sI − A] = 2
−1
s + 2s + 1
φ(t ) = L−1[( sI − A) −1 ]
For s A1 A2
= +
s 2 + 2 s + 1 ( s + 1) 2 s + 1
ds −1 1
A1 = s s = −1 = −1 A2 = =1 2
+ −te − t + e − t
ds s = −1 ( s + 1) s +1
1 1
For 2
te −t
s 2 + 2s + 1 s + 2s + 1
39
−1 −1
For −te − t
s 2 + 2s + 1 2
s + 2s + 1
s+2 A1 A2
For = +
s 2 + 2s + 1 ( s + 1) 2 s + 1
d ( s + 2) 1 1
A1 = s + 2 s = −1 = 1 A2 = =1 + te −t
+ e −t
ds s = −1 ( s + 1) 2 s + 1
− te −t + e − t te − t
φ(t) = −t
− te te − t + e − t
t
ii) y (t ) = Cφ(t )x(0) + Cφ(t − τ )Bu (τ )dτ + Du (t )
0
Since u(t) = 0
− te −t + e −t te −t 0
y (t ) = [1 1] −t = 2te −t
+ e −t
− te te − t + e − t 1
40