State Equations
State Equations
State Equations
Mohammad Hadi
mohammad.hadi@sharif.edu
@MohammadHadiDastgerdi
Fall 2021
1 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
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.
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
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
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
− 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
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
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)
( 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
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
( (
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))
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 + · · ·
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
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
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)
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
− 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
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
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
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