linear systems lect2 .pdf
TRANSCRIPT
-
EL 625 Lecture 2 1
EL 625 Lecture 2
State equations of finite dimensional linear systems
Continuous-time:
x(t) = A(t)x(t) + B(t)u(t)
y(t) = C(t)x(t) + D(t)u(t)
Discrete-time:
x(tk+1) = A(tk)x(tk) + B(tk)u(tk)
y(tk) = C(tk)x(tk) + D(tk)u(tk)
state x(t) - vector of length n 1input u(t) - r 1output y(t) - m 1
A,B,C and D are matrices of sizes n n, n r,m n and m rrespectively.
If A,B,C,D are functions of time timevaryingIf these matrices are constant with time time-invariant
-
EL 625 Lecture 2 2
State Differential equations of circuits
basic elements resistor, capacitor, inductor
Resistor:
vR(t) = R(t)iR(t)
vR(t) : the voltage across the resistor
iR(t) : the current through the resistor
R(t) : the resistance
A resistor is a zero-memory element.
BBB
BBBB
BBBB
BBBB
R
h h
+ vR
-iR
Any circuit with only resistors (a purely resistive network) has
zero-memory and is of zero order (needs no states to describe it).
-
EL 625 Lecture 2 3
Capacitor: iC(t) = qC(t) , qC(t) = C(t)vC(t) where:
iC(t) : the current through the capacitor
qC(t) : the electrical charge in the capacitor
vC(t) : the voltage across the capacitor
C(t) : the capacitance
C(t)dvC(t)dt = iC(t) dC(t)dt vC(t)If the capacitance does not change with time,
C dvC(t)dt = iC(t)
C
h h
+ vC
-iC
-
EL 625 Lecture 2 4
Inductor: vL(t) = (t) , (t) = L(t)iL(t) where:
iL(t) : the current through the inductor
vL(t) : the voltage across the inductor
(t) : the flux stored in the inductor
L(t) : the inductance
L(t)diL(t)dt = vL(t) dL(t)dt iL(t)If the inductance does not change with time,
LdiL(t)dt = vL(t)
L
h h
+ vL
-iL
-
EL 625 Lecture 2 5
Example:
LC1
PPPPPPPPP
PP
R1
C2
PPPPPPPPP
PP
R2
&%
'$
&%
'$
+
e1(t)
e2(t)
+
+
+ +
-
iL(t)
vL(t)
? ?i1(t) i2(t)
v2(t)
v1(t)
Applying Kirchoffs current and voltage laws,
iL = i1 + i2
e1 = vL + i1R1 + v1
e1 = vL + v2 + i2R2 + e2
From the terminal relationships of the capacitors and the inductor,
v1 =1C1i1
v2 =1C2i2
iL =1LvL
-
EL 625 Lecture 2 6
The inputs are e1 and e2. The output is the voltage across the
inductor, vL. Choosing as our states, iL, v1 and v2,
x =
iL
v1
v2
, u =
e1
e2
, y = [vL]
Need to express x in terms of x and the inputs, e1 and e2,. . .
iL =1LvL
But, vL is not a state variable. . . we need to express vL in terms of
the state variables and the inputs. . .
vL = iL R1R2R1 +R2
+v1 R2R1 + R2
+v2 R1R1 + R2
+e1+e2 R1R1 +R2
iL = iL
R1R2L(R1 + R2)
+ v1 R2L(R1 + R2)
+ v2 R1L(R1 +R2)
+e1
1L
+ e2 R1L(R1 + R2)
-
EL 625 Lecture 2 7
Similarly,
i1 = iL R2R1 +R2
+ v1 1R1 +R2
+ v2 1R1 +R2
+ e2 1R1 + R2
v1 =1C1i1
= iL
R2C1(R1 + R2)
+ v1 1C1(R1 + R2)
+ v2 1C1(R1 + R2)
+e2
1C1(R1 +R2)
i2 = iL R1R1 +R2
+ v1 1R1 +R2
+ v2 1R1 +R2
+ e2 1R1 + R2
v2 =1C2i2
= iL
R1C2(R1 + R2)
+ v1 1C2(R1 + R2)
+ v2 1C2(R1 + R2)
+e2
1C2(R1 +R2)
-
EL 625 Lecture 2 8
x = Ax + Bu
y = Cx + Du
where
A =
R1R2L(R1+R2)
R2L(R1+R2)
R1L(R1+R2)
R2C1(R1+R2)
1C1(R1+R2)
1C1(R1+R2)
R1C2(R1+R2)
1C2(R1+R2)
1C2(R1+R2)
B =
1L
R1L(R1+R2)
0 1C1(R1+R2)
0 1C2(R1+R2)
C =[R1R2R1+R2
R2R1+R2
R1R1+R2
]
D =[
1 R1R1+R2]
-
EL 625 Lecture 2 9
State Differential Equations of Mechanical Systems
Spring:
fK(t) = K(t)[z2(t) z1(t)]Hookes Law where:
z1(t) and z2(t) : the displacements of the two ends of the spring
fK(t) : the force applied
K(t) : the spring constant K-
z1 z2 fK
Damping Element:
fD(t) = D(t)[v2(t) v1(t)]where:
v1(t) and v2(t) : the velocities of the two ends of the damping element
fD(t) : the force applied
D(t) : the damping coefficient.
D
-v1 v2fD
-
EL 625 Lecture 2 10
Mass:
M(t)dv(t)dt = fM(t) dM(t)dt v(t)where:
v(t) : the velocity of the mass
fM(t) : the force applied
M(t) : the mass.If mass does not change with time,
M dv(t)dt = fM(t)
.
M -v
fM
-
EL 625 Lecture 2 11
Example:
D
M1 KM2
- -x1 x2
- f(t)
f (t) is the input and x2(t) is the output. u = [f (t)],y = [x2]
Choose as the state variables
x1, x2, v1 and v2 where
v1 = x1 and v2 = x2.
= x =
x1
x2
v1
v2
M2v2 = f(t) + K(x1 x2)M1v1 = K(x2 x1) + D(v1)
-
EL 625 Lecture 2 12
x = Ax +Bu
y = Cx + Du
where
A =
0 0 1 0
0 0 0 1
KM1
KM1
DM1
0
KM2
KM2
0 0
B =
0
0
0
1M2
C =
[0 1 0 0
]D = [0]
-
EL 625 Lecture 2 13
Choice of state variables is not unique
Let xa(t) be a valid set of state variables with
xa = Aaxa +Bau
y = Caxa +Dau. (1)
Consider xb(t) = Txa(t) where T is an nn nonsingular matrix.xb = T xa = TAaT1xb + TBau
y = CaT1xb + Dau. (2)
xb(t) is also a valid set of state variables!
xb = Abxb + Bbu
y = Cbxb +Dbu (3)
where:
Ab = TAaT1
Bb = TBb
Cb = CaT1
Db = Da (4)
Similarity Transformation: xb = Txa
-
EL 625 Lecture 2 14
Convenient choice of state variables :
inductor currents and capacitor voltages for fixed net-
works
inductor fluxes and capacitor charges for time-varying net-
works
differences in displacements of the ends of springs
from their equilibrium positions and velocities of masses
for mechanical systems
Simulation Diagrams:
Basic Simulator Elements:
1. Dynamic element
(a) integrator : for analog systems
-
-u(t) y(t) = y(t0) + tt0u() d
y = D1u
(b) delay : for discrete-time systems
- -u(tk) y(tk) = u(tk1)
y = E1u
-
EL 625 Lecture 2 15
2. Summing element - adder
&%
'$
--+u1(t)1+u2(t) ... 6+
ur(t)
y(t) =ri=1
ui(t)
3. Scaling Element (Amplifier or Attenuator)
-
HHHHH -u(t) y(t) = K(t) u(t)K(t)
Minimal Realization: Fewest possible number of dynamic el-
ements.
Convenient choice of state variables Outputs of integrators
and delay elements
Example:
y... + 3ty + 2y + (t)y = u + etu + u
D3y + 3tD2y + 2Dy + (t)y = D2u + etDu + u
(D is the derivative operator)
y = D3{D2u 3tD2y + etDu 2Dy + u (t)y}
y = D1{D2(D2u 3tD2y) + D1{D1(etDu 2Dy)
-
EL 625 Lecture 2 16
+D1{u (t)y}}}= D1
{uD2(3tD2y) + D1{D1(etDu) 2y
+D1{u (t)y}}}
Using integration by parts,
D2(3tD2y) = D1(3tDy D1(3Dy))= D1(3tDy 3y)= 3ty D1(3y)D1(3y)= 3ty D1(6y)
D1(etDu) = etu +D1(uet)
Thus,
y = D1{u 3ty +D16y + D1{etu + D1(uet) 2y
+D1{u (t)y}}}= D1
{u 3ty + D1{etu + +4y +D1{u + uet (t)y}}}
-
EL 625 Lecture 2 17
Simulation Diagram:
- -
HHHHHH
1 + et
-
- -
- -
-
?
?
AAAAAA
(t)?
?
AAAAAA
4?
?
AAAAAA
3t
6
6
6
AAAAAA
et
u y+ + + +
+ +x1x2x3
Choosing the outputs of the integrators as the states, we have
x1 = u 3tx1 + x2x2 = 4x1 + x3 + etu
x3 = u(1 + et) (t)x1y = x1
x =
x1
x2
x3
x = A(t)x + B(t)u
y = C(t)x + D(t)u
A(t) =
3t 1 04 0 1
(t) 0 0
; B(t) =
1
et
1 + et
; C(t) =
1
0
0
T
; D(t) = [0]
-
EL 625 Lecture 2 18
Example:
y(k + 3) + 3ky(k + 2) + 2y(k + 1) + (k)y(k) = u(k + 2) + eku(k + 1)
+u(k)
E3y(k) + 3kE2y(k) + 2Ey(k) + (k)y(k) = E2u(k) + ekEu(k)
+u(k)
where E is the delay operator.
y(k) = E3{E2u(k) 3kE2y(k) + ekEu(k) 2Ey(k) + u(k)
(k)y(k)}= E1
{E2(E2u(k) 3kE2y(k)) + E1{E1(ekEu(k) 2Ey(k))
+E1{u(k) (k)y(k)}}}
E2(3kE2y(k)) = 3(k 2)y(k)E1(ekEu(k)) = ek1u(k)
Thus,
y(k) = E1{u(k) 3(k 2)y(k) + E1{e(k1)u(k) 2y(k)
+E1{u(k) (k)y(k)}}}
-
EL 625 Lecture 2 19
Simulation Diagram:
-
-- -- --
?
?
AAAAAA
(k)?
?
AAAAAA
2?
?
AAAAAA
3(k 2)
6
6
6
AAAAAA
e(k1)
u(k) y(k)+ + +
+ +x1x2x3
Choosing the outputs of the delay elements as the states, we have
x1(k + 1) = u(k) 3(k 2)x1(k) + x2(k)x2(k + 1) = e(k1)u(k) 2x1(k) + x3(k)x3(k + 1) = u(k) (k)x1(k)
y(k) = x1(k)
x(k) =
x1(k)
x2(k)
x3(k)
x(k + 1) = A(k)x(k) + B(k)u(k)
y(k) = C(k)x(k) + D(k)u(k)
-
EL 625 Lecture 2 20
A(k) =
3(k 2) 1 02 0 1(k) 0 0
B(k) =
1
e(k1)
1
C(k) =[
1 0 0]
D(k) = [0]
-
EL 625 Lecture 2 21
Simpler method if no derivatives of the input are in the equation:
y(n)+n1(t)y(n1)+n2(t)y(n2)+. . .+1(t)y(1)+0(t)y = (t)u(t)
(y(i) ith derivative of y(t))Choose,
x1 = y
x2 = y(1)
x3 = y(2)
...
xn = y(n1)
x =
x1
x2
x3...
xn
x1 = x2
x2 = x3...
xn1 = xn
xn = n1(t)xn n2(t)xn1 . . . 0(t)x1+(t)u(t)
y = x1
-
EL 625 Lecture 2 22
x =
0 1 0 . . . 0... . . . . . . . . . ...... . . . . . . 0
0 . . . . . . 0 1
0 1 . . . n2 n1
A
x +
0
0......
B
u
A is in companion matrix form.
y =[
1 0 0 . . . 0]
C
x + [0]D
u
Another method: Let 0, 1, . . . , n1 and be constants.
Dny + n1Dn1y + n2Dn2y + . . . + 1Dy + 0y = u
Dny = n1Dn1y n2Dn2y . . . 1Dy 0y + uy = Dn
{n1Dn1y n2Dn2y . . . 1Dy 0y + u}= D1
{ n1y + D1{ n2y + D1{ . . .+D1(0y + u ) . . . }
}}
n
-
EL 625 Lecture 2 23
z1 = n1z1 + z2z2 = n2z1 + z3
...
zn1 = 1z1 + xnzn = 0z1 + uy = z1
z =
z1
z2...
zn1zn
z =
n1 1 0 . . . . . . 0n2 0 1 0 . . . 0
... ... . . . . . . . . . ...
2 ... 0 1 01 0 . . . . . . 0 10 0 . . . . . . . . . 0
A
z +
0
0...
0
0
B
u
y =[
1 0 0 . . . 0]
C
z + [0]Du
This method gave different A and B matrices . . . - z and x are
related through a similarity transformation.
-
EL 625 Lecture 2 24
z = Tx
where
T =
1 0 . . . . . . 0
n1 1 0 . . . ...... . . . . . . . . . ...
2 . . . n1 1 0
1 . . . . . . n1 1
It can be checked that A = TAT1, B = TB, C = CT1 and
D = D.
The D matrix does not change under a similarity transforma-
tion.
A non-singular D matrix = the impulse response has an impulse.
-
EL 625 Lecture 2 25
MIMO systems:
y1 + t2y2 + y1 + ty1 + y2 = tu1 + u2
y2 + ty1 + y2 y1 = tu1 + u2From the first equation,
D2y1 + t2Dy2 + Dy1 + ty1 + y2 = tu1 + Du2
y1 = D2{ t2Dy2 Dy1 +Du2 + tu1 ty1 y2}
= D1{D1(t2Dy2 Dy1 + Du2) + D1{tu1 ty1 y2}
}
D1(t2Dy2) = t2y2 D1(2ty2)Thus,
y1 = D1{u2 y1 t2y2 + D1{2ty2 + tu1 ty1 y2}
}Similarly, from second equation,
D2y2 + tDy1 + y2 y1 = tDu1 + u2
y2 = D2{tDu1 tDy1 + u2 + y1 y2
}= D1
{D1(tDu1 tDy1) + D1{u2 + y1 y2}
}
-
EL 625 Lecture 2 26
D1(tDu1) = tu1 D1u1D1(tDy1) = ty1 D1y1
y2 = D1{tu1 ty1 + D1{2y1 y2 u1 + u2}
}
State-space realization:
x1 = x1 +x2 t2x3 +u2x2 = tx1 +(2t 1)x3 +tu1x3 = tx1 +x4 +tu1x4 = 2x1 x3 u1 +u2y1 = x1
y2 = x2
-
EL 625 Lecture 2 27
Simulation Diagram
-
-
-
-
-
-
-
-
?
?
AAAAAA
t?
?
AAAAAA
2
?
?
?
AAAAAA
t
6
6
AAAAAA
2t 16
6
AAAAAA
t2
- -
HHHHHH
t
6
6
AAAAAA
t
@@R
6
@@@R
y1
y2
u1
u2
x1
x3
x2
x4
+
+
+
+
++
+
+