Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

State Equations

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

State Equations

Mohammad Hadi

mohammad.hadi@sharif.edu
@MohammadHadiDastgerdi

Fall 2021

Mohammad Hadi Circuit Theory Fall 2021 1 / 35


Overview

1 State Equations

2 State Equations for LTI circuits

3 State Equations for LTV circuits

4 State Equations for NTV circuits

5 Solving State Equations

Mohammad Hadi Circuit Theory Fall 2021 2 / 35


State Equations

Mohammad Hadi Circuit Theory Fall 2021 3 / 35


State Equations

Figure: An LTI circuit with an input and initial conditions. State equations allow to solve a system of 1st-order
linear differential equations instead of solving an nth order linear differential equation. State equations are very
useful for analysis of time-varying circuits.

nth-order
Pn linear differential
Pm equation:
k=0 ak y (k)
(t) = l=0 b l w (l)
(t), y (0− ), y 0 (0− ), · · · , y (n−1) (0− )
System of 1st-order linear equations:

0
x1 (t) = a11 x1 (t) + · · · + a1n xn (t) + b1 w (t)


.. .. ..
 . . .
x 0 (t) = a x (t) + · · · + a x (t) + b w (t)

n 1n 1 nn n n
d
State equations: dt X (t) = AX (t) + Bw (t), X (0) = X 0
T
Output response: y (t) = C X (t) + dw (t)
Mohammad Hadi Circuit Theory Fall 2021 4 / 35
State Equations

Definition (Network state)


A set of data qualifies to be called the state of a network if it satisfies two conditions

For any time t0 , the state at time t0 and the inputs from t0 on determine
uniquely the state at any time t > t0 .
For any time t, the state at time t and the inputs at time t (and sometimes
some of their derivatives) determine uniquely every network variable at time t.
The components of the state are called state variables.

Mohammad Hadi Circuit Theory Fall 2021 5 / 35


State Equations for LTI Circuits

Mohammad Hadi Circuit Theory Fall 2021 6 / 35


State Variables

Figure: A sample suitable tree for writing state equations.

State variables: Independent capacitor voltages and inductor currents.


Number of state variables: Number of independent energy storage elements.
Number of state variables: Circuit order.

Mohammad Hadi Circuit Theory Fall 2021 7 / 35


State Equations

Figure: A sample suitable tree for writing state equations.

State variables: Independent capacitor voltages and inductor currents.


Proper tree: Capacitors in tree branches and inductors in link branches.
State equations: KCL in fundamental cut sets and KVL in fundamental loops.
d
State equations: dt X (t) = AX (t) + BW (t), X (0) = X 0
T T
Output response: y (t) = C X (t) + D W (t)

Mohammad Hadi Circuit Theory Fall 2021 8 / 35


State Equations

Example (State equations for a circuit with three state variables)


The first voltage node of the circuit below can be given in terms of state variables.

0 0
Cv = −i1 − i2 L1 i1 = v − vR1 − es
i1 = vR1 /R1 0
L2 i1 = v − vR2
i2 = vR2 /R2


Cv 0 = −i1 − i2
 0     

 v 0 −1/C −1/C v 0
0
L1 i1 = v − R1 i1 − es ⇒  i10  = 1/L1 −R1 /L1 0  i1  + −1/L1  es
L2 i10 = v − R2 i2 i20 1/L2 0 −R2 /L2 i2 0

Mohammad Hadi Circuit Theory Fall 2021 9 / 35


State Equations

Example (State equations for a circuit with three state variables


(cont.))
The first voltage node of the circuit below can be given in terms of state variables.

       
v (t) v (0) dX 0 −1/C −1/C 0
X (t) = i1 (t) , X 0 = X (0) = i1 (0) ⇒
    = 1/L1 −R1 /L1 0  X + −1/L1  es

i2 (t) i2 (0) dt 1/L2 0 −R2 /L2 0

   
e1 = vR1 + es = R1 i1 + es = 0 R1 0 X + 1 es

Mohammad Hadi Circuit Theory Fall 2021 10 / 35


State Equations

Example (State equations for a circuit with two inputs)


The capacitor current i2 in the circuit below can be given in terms of state variables.

0
C1 v1 + vR1 /R1 + iL − is = 0 vR1 = v1 + v2
0
C2 v2 + vR1 /R1 − is =0 vR2 = R2 (iL + gm v1 )
0
LiL + vs + vR2 − v1 =0

− R 1C − R 1C − C1
   
1
0
   
v1 (t) v1 (0) C1  
dX  − 11 1 1 1
− R 1C 0 
1
1  vs
X (t) = v2 (t) , X 0 = X (0) = v2 (0) ⇒ =  R1 C2 X +  0
    
1 2 C2  i
iL (t) iL (0) dt 1−gm R2 R s
L 0 − L2 − L1 0

Mohammad Hadi Circuit Theory Fall 2021 11 / 35


State Equations

Example (State equations for a circuit with two inputs (cont.))


The capacitor current i2 in the circuit below can be given in terms of state variables.

− R 1C − R 1C − C1
   
1
0
   
v1 (t) v1 (0) dX 1 1 1 1 1 C1  
 vs
X (t) = v2 (t) , X 0 = X (0) = v2 (0) ⇒ =  − R11C2 − R 1C 0 X + 
 0 1
     
1 2 C2  i
iL (t) iL (0) dt 1−gm R2 R s
L 0 − L2 − L1 0

 
vs (t) 0 v1 + v2 h i
+ is = − R11 − R1
 
W (t) = ⇒ i2 = C 2 v 2 = − 0 X+ 0 1 W
is (t) R1 1

Mohammad Hadi Circuit Theory Fall 2021 12 / 35


State Equations
Example (State equations for a circuit with dependent energy storage
elements)
All the energy storage elements are not among the state variables of the circuit
below whose element have unit values.

 0

 v1 + v1 − is + (v1 − v2 )0 = 0
v 0 + i − (v − v )0 = 0

2 1 1 2
0 0
i1 + (i1 − i2 ) − v2 = 0

0
i2 + vs + i2 − (i1 − i2 )0 = 0

 2
− 13 2
  
v1 (t) v1 (0) −3 0 0 0
   
3
− 1 − 23 1
 
v2 (t) v2 (0) dX 0 0  0
3  vs
X (t) =  , X 0 = X (0) = ⇒ =  3
2 1
 X + 
− 1
i1 (t)   i (0) 
1 dt  0
3 0 3 3 0  is
1 2
i2 (t) i2 (0) 0 3 0 3 − 32 0

Mohammad Hadi Circuit Theory Fall 2021 13 / 35


State Equations for LTV circuits

Mohammad Hadi Circuit Theory Fall 2021 14 / 35


State Equations

State variables: Independent capacitor voltages and inductor currents.


State variables: Independent capacitor charges and inductor fluxes.
Number of state variables: Number of independent energy storage elements.
Proper tree: Capacitors in tree branches and inductors in link branches.
State equations: KCL in fundamental cut sets and KVL in fundamental loops.
d
State equations: dt X (t) = A(t)X (t) + B(t)W (t), X (0) = X 0
T T
Output response: y (t) = C (t)X (t) + D (t)W (t)

Mohammad Hadi Circuit Theory Fall 2021 15 / 35


State Equations

Example (State equations for an LTV circuit)


Capacitor voltage and inductor current can be used as state variables in the LTV
circuit below.

vC (t)
( ( dvC c(t)
dq(t) dq(t) C (t)
dt + R(t) + iL (t) − is (t) = 0 dt = C (t) dt + vC (t) dt
dφ(t)
, dφ(t) diL (t) L(t)
dt − vC (t) = 0 dt = L(t) dt + i L (t) dt

C 0 (t)
 
− 1 − − C 1(t) − C 1(t)
     
vC (t) v (0) dX (t)
X (t) = , X 0 = X (0) = C ⇒ =  R(t)C (t) C (t)
L0 (t)
 X (t) + is (t)
iL (t) iL (0) dt 1
− L(t) 0
L(t)

Mohammad Hadi Circuit Theory Fall 2021 16 / 35


State Equations

Example (State equations for an LTV circuit)


Capacitor charge and inductor flux can be used as state variables in the LTV circuit
below.

( vC (t)
( dq(t) q(t) φ(t)
dq(t)
dt + R(t) + iL (t) − is (t) = 0 dt + c(t)R(t) + L(t) − is (t) = 0
dφ(t)
⇒ dφ(t) q(t)
dt − vC (t) = 0 dt − C (t) = 0

" #
1 1
− R(t)C − L(t)
     
q(t) q(0) dX (t) (t) 1
X (t) = , X 0 = X (0) = ⇒ = X (t) + i (t)
φ(t) φ(0) dt
1
C (t)
0 0 s

Mohammad Hadi Circuit Theory Fall 2021 17 / 35


State Equations for NTV circuits

Mohammad Hadi Circuit Theory Fall 2021 18 / 35


State Equations

State variables: Independent capacitor charges and inductor fluxes.


Number of state variables: Number of independent energy storage elements.
d
State equations: dt X (t) = f (X (t), W (t), t), X (0) = X 0
Output response: y (t) = h(X (t), W (t), t)

Mohammad Hadi Circuit Theory Fall 2021 19 / 35


State Equations

Example (State equations for an NTI circuit)


Capacitor voltage and inductor current can be used as state variables in the NTI
circuit below.

dq dvC dvC
( dq(t)
= f20 (vC )
(
dq(t) =
dt + iR (t) + iL (t) − is (t) = 0 dt dvC dt dt
dφ(t) , dφ(t) dφ diL di
dt − vC (t) = 0 dt = diL dt = f30 (iL ) dtL

 −f (v (t))−i (t)+is (t) 


    1 C L
vC (t) vC (0) dX (t) f 0 (vC (t))
X (t) = , X 0 = X (0) = ⇒ = 2
v (t)

iL (t) iL (0) dt C
0 f (iL (t))
3

Mohammad Hadi Circuit Theory Fall 2021 20 / 35


State Equations

Example (State equations for a an NTI circuit)


Capacitor charge and inductor flux can be used as state variables in the NTI circuit
below.

( (
dq(t) dq(t)
dt + iR (t) + iL (t) − is (t) = 0 dt + f1 (f2 (q(t))) + f3 (φ(t)) − is (t) = 0
dφ(t) , dφ(t)
dt − vC (t) = 0 dt − f2 (q(t)) = 0

     
q(t) q(0) dX (t) −f1 (f2 (q(t))) − f3 (φ(t)) + is (t)
X (t) = , X 0 = X (0) = ⇒ =
φ(t) φ(0) dt f2 (q(t))

Mohammad Hadi Circuit Theory Fall 2021 21 / 35


Solving State Equations

Mohammad Hadi Circuit Theory Fall 2021 22 / 35


Single State Equation

Single state equation: x 0 (t) = ax(t) + bw (t), x(0)


Zero-input response: xzi (t) = x(0)e at , t ≥ 0
Rt 0
Zero-state response: xzs (t) = 0 e a(t−t ) bw (t 0 )dt 0 , t ≥ 0
Complete response: xcs (t) = xzi (t) + xzs (t), t ≥ 0

Mohammad Hadi Circuit Theory Fall 2021 23 / 35


System of State Equations

d
Single state equation: dt X (t) = AX (t) + BW (t), X (0)
Zero-input response: X zi (t) = e At X (0), t ≥ 0
Rt 0
Zero-state response: X zs (t) = 0 e A(t−t ) BW (t 0 )dt 0 , t ≥ 0
Complete response: X cs (t) = X zi (t) + X zs (t), t ≥ 0
Matrix exponential: e At = I + At + 2!1 A2 t 2 + 3!1 A3 t 3 + · · ·

Mohammad Hadi Circuit Theory Fall 2021 24 / 35


Exponential Matrix

Eigen values and vectors: |A − λI | = 0 ⇒ λ1 , · · · , λn , u 1, · · · , u n


Diagonal decomposition:
 
λ1 0 ··· 0
  0 λ2 ··· 0
U = u1 ··· un , Λ= .
 
.. .. .. 
 .. . . .
0 0 ··· λn
 λt 
e 1 0 ··· 0
−1 −1
 0 e λ2 t ··· 0 
At Λt Λt
⇒ A = UΛU ⇒e = Ue U , e = .
 
.. .. ..
 ..

. . . 
0 0 ··· e λn t

Mohammad Hadi Circuit Theory Fall 2021 25 / 35


Exponential Matrix

d
Zero-input response: dt X zi (t) = AX zi (t), X zi (0) = X 0 ⇒ X zi (t) = e At X 0
Laplace-domain zero-input response:
sX zi (s) − X 0 = AX zi (s) ⇒ X zi (s) = (sI − A)−1 X 0
Laplace-domain zero-input response: X zi (s) = L e At X 0


Laplace transform of matrix exponential: L e At = (sI − A)−1




Matrix exponential: e At = L−1 (sI − A)−1




Mohammad Hadi Circuit Theory Fall 2021 26 / 35


State Equations

Example (Solving state equation)


Matrix diagonal decomposition can be used to solve the matrix state equation below.

 
d −0.5 1
X (t) = AX (t), A=
dt 1 −3
|A − λI | = (−0.5 − λ)(−3 − λ) + 1 = 0 ⇒ λ = −1, −2.5
 
2
Au = λu ⇒ Au = −u ⇒ u =
1
 
1
Au = λu ⇒ Au = −2.5u ⇒ u =
2
   −1
−1 2 1 −1 0 2 1
A = UΛU =
1 2 0 −2.5 1 2
−1
2 1 e −t 1 4e −t − e −2.5t −2e −t + 2e −2.5t
    
At Λt −1 0 2 1
e = Ue U = =
1 2 0 e −2.5t 1 2 −t
3 2e − 2e
−2.5t
−e −t + 4e −2.5t
1 4e − e −2.5t
 −t
−2e −t + 2e −2.5t

At
X (t) = e X 0 = −t −2.5t X0
3 2e − 2e −e −t + 4e −2.5t

Mohammad Hadi Circuit Theory Fall 2021 27 / 35


State Equations

Example (Solving state equation)


Laplace transform can be used to solve the matrix state equation below.

 
d −0.5 1
X (t) = AX (t), A=
dt 1 −3
" −1
#
n −1 o s+3
s + 0.5 1
n o
At −1  −1 −1 −1 (s+1)(s+2.5) (s+1)(s+2.5)
e =L (sI − A) =L =L 1 s+0.5
−1 s+3 (s+1)(s+2.5) (s+1)(s+2.5)

1 4e −t − e −2.5t −2e −t + 2e −2.5t


 
At
X (t) = e X0 = −t −2.5t −t −2.5t X0
3 2e − 2e −e + 4e

Mohammad Hadi Circuit Theory Fall 2021 28 / 35


Response Equation

d
State equations: dt X (t) = AX (t) + Bw (t), X (0) = X 0
Laplace-domain state equations:
sX (s)−X 0 = AX (s)+BW (s) ⇒ X (s) = (sI −A)−1 BW (s)+(sI −A)−1 X 0
Single-input Output response: y (t) = C T X (t) + dw (t)
Laplace transform of Output response:
Y (s) = C T X (s)+dW (s) = C T (sI −A)−1 BW (s)+(sI −A)−1 X 0 +dW (s)
 

Y (s)
Transfer function: H(s) = W (s) X 0 =0 = C T (sI − A)−1 B + d

Mohammad Hadi Circuit Theory Fall 2021 29 / 35


Single-input Response Equation
Example (Transfer function)
Transfer function can be found by the matrices involved in state equations

− R 1C − R 1C − C1
       1 
v1 (t) dX 1 1 1 1 1 0 C1
X (t) = v2 (t) ⇒ =  − R11C2 − R 1C 0  X + 0 v +  1  is

1 2
   s C2
iL (t) dt 1−gm R2 R2 − 1
L 0 − L L 0
 
vs (t)
h i
0 1 1
W (t) = ⇒ i2 = C 2 v 2 = − R 1 −R 0 X + 0 × vs (t) + 1 × is (t)
is (t) 1
 1 1 1
−1 
i s + R1 C1

I2 (s) h R1 C 1 C1 0
1 1 1 1
H1 (s) = = −R −R 0  R C
 s+ R C 0   0 +0
Vs (s) Is (s)=0 1 1 1 2 1 2


1−gm R2
0
R
s + L2 − L1
L
 1 1 1
−1  
1
I2 (s) h i s + R1 C 1 R1 C 1 C1 C1
1 1 1 1
H2 (s) = = − R1 −R 0  R C s+ R C 0   1 +1

V (s)=0 1 1 2 1 2
 C
Is (s) s 1−gm R2 R
2
− L 0 s + L2 0

Mohammad Hadi Circuit Theory Fall 2021 30 / 35


Approximated Solution

d
General state equations: dt X (t) = f (X (t)), X (0) = X 0
Approximated solution for general state equations:
d
X (∆t) ≈ X (0) + X (t) t=0 ∆t = X (0) + f (X (0))∆t
dt
X (2∆t) ≈ X (∆t) + f (X (∆t))∆t
..
.
X ((k + 1)∆t) ≈ X (k∆t) + f (X (k∆t))∆t

Approximated solution for LTI state equations:

X ((k + 1)∆t) ≈ X (k∆t) + f (X (k∆t))∆t = X (k∆t) + AX (k∆t)∆t


X ((k + 1)∆t) ≈ (I + A∆t)X (k∆t)

Mohammad Hadi Circuit Theory Fall 2021 31 / 35


State Trajectory

Example (State trajectory)


State trajectory can be plotted using approximated numerical methods.
   
d −1 0 1
X (t) = AX (t), A= , X0 =
dt −1 −3 0
" #
−1 o 1
At −1  −1 −1
n
s + 1 0 −1
n
s+1 0 o
e =L (sI − A) =L =L −1 1
−1 s+3 (s+1)(s+3) s+3

e −t e −t −x1 + x13
      
x1 (t) At 0 1
X (t) = = e X0 = = −3t ⇒ x2 =
x2 (t) −0.5e −t + 0.5e −3t e −3t 0 −t
−0.5e + 0.5e 2

        
0.9 0 1 0.9 0 1 0.9
∆t = 0.1 ⇒ I + A∆t = ⇒ X (0) = , X (0.1) = =
−0.1 0.7 0 −0.1 0.7 0 −0.1
     
0.81 0.729 0
X (0.2) = , X (0.3) = , · · · , X (0.2) =
−0.16 −0.193 0

Mohammad Hadi Circuit Theory Fall 2021 32 / 35


State Trajectory

Example (State trajectory)


State trajectory can be plotted using approximated numerical methods.

Mohammad Hadi Circuit Theory Fall 2021 33 / 35


State Trajectory

Example (State trajectory)


Natural frequencies involved in the response can be removed if the initial condition
equal eigen vectors.
   
d −1 0 a
X (t) = AX (t), A = , X0 =
dt −1 −3 b
e −t ae −t
      
x (t) 0 a
X (t) = 1 = =
x2 (t) −0.5e −t + 0.5e −3t e −3t b −t
−0.5ae + (0.5a + b)e −3t

3 b 3
⇒ x2 = −0.5x1 + 0.5x1 + x1
a
     
−1 0 0 0
A= ⇒ λ1,2 = −1, −2, u 1 = , u1 =
−1 −3 0 1
       
a 0 x (t) 0
X0 = = ⇒ X (t) = 1 = −3t ⇒ x1 = 0, x2 ∈ [0, 1]
b 1 x2 (t) e

Mohammad Hadi Circuit Theory Fall 2021 34 / 35


The End

Mohammad Hadi Circuit Theory Fall 2021 35 / 35

You might also like