Key Learning Points for these notes. System Represenation using Simulation Diagrams Flow Graphs State Equations EigenValues and EigenVectors Converting Transfer Function to State Space Converting State Space to Transfer Function. 2.7 Simulation Diagrams & Flow Graphs
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Key Learning Points for these notes
i. Shift Register = Delay element
ideal delay element
shift register
ideal delay element
E(z)
e(k)
e(k)
z1E(z)
e(k1)
e(k1)
z1
T
transfer function of time delay element = z1
transform of input: Z[e(k)]=E(z)
transform of output: Z[e(k1)] = z1E(z)
basic element of simulation diagrams
input = e(k)
ouput = m(k)
m(k) = e(k) – e(k1)  m(k1)
m(k)

e(k)
e(k1)
m(k1)
,…e(2), e(1),e(0)

T=0
T=0
+
m(k)
,…m(2),m(1),m(0)
e.g.: system represented by difference equation:
use ASICs, FPGAs to implement equations with shift registers, adders, summers…
(i)initial conditions = 0: set all shift registers to 0 output 0 at k = 0
m(0) = 0
e(0) = 0
Transfer Function:(1+z1)M(z) = (1z1)E(z)

e(k+1)
e(k)
m(k+1)
m(k)
,…e(2), e(1)

e(0)
m(0)
+
m(k+1)
,…m(2),m(1)
B=AG
A G
B=AG
G
C=AB
A
A 1 C=AB
+

1
B
B
Transfer Function (Mason’s Gain Formula)
M1 =  z1
M2 = 1
L1 = z1
= 1 – (L1) = 1 + z1
1 = 1
2 = 1
M(z)
1
E(z) z 1
z 1
z1M(z)
1
1
T(z) =
e.g. m(k) = e(k) – e(k1)  m(k1)
B
C
D
G3
G1
G2
H1
Massons Gain Formula (review): determine TF from source to sink node
=
=
T: transfer function
Li: loop gain of ith loop
Mk: path gain of kth forward path
k: value of for part of flow graph not touching kth forward path
Determination of TF from Massons Gain Formula
G6
G3
G4
H1
H2
T =
G6
G1
G2
G3
G4
G3
G2
G1
G5
H1
H2
R(s)
C(s)
H1
H2
e.g. TF from Signal Flow Graph
m(k) + an1m(k1)+…+ a0m(kn) = bn e(k) + bn1e(k1)+…+ b0 e(kn)
(2.41)
e(k)
e(k1)
e(k2)
e(k3)
e(kn)
T
T
T
m(k)
T
M(z) + an1 z1 M(z)+…+a0 z n M(z) = bn E(z) +…+b0 znE(z)
bn
bn1
bn2
b0
(1 + an1 z1 +…+a0 z n )M(z) = (bn + bn1 z1+…+b0 zn )E(z)
(2.42)
+
+
+
+
+
+
m(k)
m(k1)
m(kn)
T
T
(2.43)
  
an1
an2
a0
General nth order diffence equation
Nonminimal representation: minimal representaion has ndelay elements
Example of minimal simulation diagram
+

y(k1)
e(k)
y(k)
T
+

m(k)
1
z1Y(z)
Y(z)
E(z)
M(z)
z1
1
1
1
H1
T =
u(k)
E(z)
x(k)
G(z)
M(z)
y(k)
state variables
x1(k)
x2(k)
xn(k)
ith external input, ui(k)
input space =u(k)
hth system output, yh(k)
output space = y(k)
State Variable Method
jth internal state variable,xj(k)
state space = x(k)
state vector
u1(k)
u2(k)
ur(k)
y1(k)
y2(k)
yp(k)
2.8 State Variables
system representation
(1) nonlinear, time varying system (k implies kT)
system description at t = k+1
x(k+1) = f [x(k),u(k)]
(2.45)
system response at t = k
y(k) = g [x(k),u(k)]
(2.46)
(2) linear, time varying system
system description at t = k+1
x(k+1) = A(k)x(k) + B(k)u(k)
(2.47)
system response at t = k
y(k) = C(k)x(k) + D(k)u(k)
(2.48)
(3) linear, time invarient system
system description at t = k+1
x(k+1) = A x(k) + B u(k)
(2.49)
system response at t = k
y(k) = C x(k) + D u(k)
(2.50)
y(k+2) = u(k) + 1.7y(k+1) – 0.72y(k)
x1(k) = y(k)
x2(k) = y(k+1) = x1(k+1)
x1(k+1) = x2(k)
x2(k+1) = u(k) + 1.7x2(k) – 0.72x1(k)
G(z) =
(2.51)
for input u(k) and output y(k)
= G(z) =
(2.52)
Y(z) = (bn1z n1 + bn2 z n2+…+ b0 z ) E(z)
(2.53)
U(z) = (zn + an1 z n1 +…+ a1z + a0)E(z)
(2.54)
Dervation of statespace equations from TF  Control Canonical Form
(i) start with transfer function G(z)
(2.55)
from (254) u(k) = e(k+n) + an1e(k+n1) +…+ a1 e(k+1) + a0e(k)
e(k+n) = u(k)  an1e(k+n1) … a1 e(k+1)  a0e(k)
xn(k+1) = u(k)  an1xn(k) … a1 x2(k)  a0x1(k)
x(k+1) = Ax(k) + Bu(k)
y(k) = Cx(k)
(2.60)
State Space Equation
Multiply 2.51 by zn
TF of delay ofnT seconds iszn
= G(z) =
(2.61)
Y(z) = (bn1z 1 + bn2 z 2+…+ b0 zn ) E(z)
(2.62)
U(z) = (1 + an1 z 1 +…+ a1zn1 + a0 zn)E(z)
(2.63)
E(z) = U(z)  (an1 z 1 +…+ a1zn1 + a0 zn)E(z)
(2.64)
Derive signal flow graph for control canonical form use dummy variable, E(z)
bn1
bn2
b1
b0
U(z)1
E(z)
z1E(z) z2E(z) znE(z)
z1
z1
z1
an1
an2
a1
a0
Y(z)= bn1z 1 E(z) + bn2 z 2 E(z)+…+ b0 z n E(z) (262’)
E(z) = U(z)  an1 z 1 E(z)+…+ a1z 1n E(z) + a0 z –n E(z)(264’)
+
bn1
bn2
b1
b0
u(k)
e(k) e(k1) e(k2) e (kn+1) e(kn)
+
T
T
T
T
xn(k)
xn1(k)
x1(k)
x2(k)
an1
an2
a1
a0
derive simulation diagram for control canonical form from signal flow
b0
b1
b2
bn1
Yz)
E(z)
z1
z1
z1
an1
a2
a1
a0
signal flow graph forobserver canonical form from
b0
b1
bn2
bn1
+
+

xn(k)
xn1(k)
+
+

+

+
+

x2(k)
y(k)
T
T
T
T
x1(k)
a0
a1
an2
an1
x1(k+1) = x2(k)  an1x1(k) + bn1u(k)
x2(k+1) = x3(k)  an2x1(k) + bn2u(k)
…
xn1(k+1)= xn(k)  a1x1(k) + b1u(k)
xn(k+1) =  a0x1(k) + b0u(k)
and y(k) = x1(k)
thus State Space Represenation for observer canonical form
x(k) +
u(k)
x(k+1) =
y(k)= [1 0 0 … 0 ] x(k)
G(z) =
x(k+1) =
y(k)=
1
z1
Yz)
z1
1
z1
1
2
U(z)
X3
X2
X1
2
1
0.5
y(k)
u(k)
T
T
T
x3(k)
x2(k)
x1(k)
2
1
0.5
+
2
1
1
+
e.g. 2.17
state = output of delay
b2
b1
b0
X2
X1
U(z)
1
z1
z1
a1
a0
x(k+1) =
x(k) +
u(k)
wrong! – only 2 state variables
y(k) = [b0 b1 b2 ]x(k)
G(z) =
e.g. numerator & denominator with same order Direct path from Y(z) to E(z)
x1(k) = e(k2)
x2(k) = x1(k+1) = e(k1)
x2(k+1) = u(k) – a1 x2(k) –a0 x1(k)
from signal flow graph:
Y(z) = b2E(z) + b1X2(z) + b0X1(z)
E(z) = U(z)  a1X2(z) – a0X1(z)
thus Y(z) = b2U(z)+ (b1b2a1)X2(z) + (b0– b2a0)X1(z)
and y(k) = [(b0–b2a0) (b1 b2a1)] x(k) + b2u(k)
x1(k) = e(kn)
x2(k) = x1(k+1) = e(kn+1)
x3(k) = …
G(z) =
y(k)
+
b1
b0
e(k)
u(k)
x2(k)
x1(k)
T
T
+
a1
a0
Deriving State Models:
(1) from transfer function:
Deriving State Models (continued)
x(k) +
u(k)
x(k+1) =
y(k) = [1 0] x(k)
y1(k) = x1(k)
x1(k+1) = u(k)+0.9x1(k)
y(k)
u(k)
+
+
T
T
x2(k)
x1(k)
y2(k) = x2(k)
x2(k+1) = u’(k)+0.8x2(k)
u’(k) = x1(k)
0.9
0.8
overall state model:
x(k+1) =
x(k) +
u(k)
y(k) = [0 1]x(k)
(2) Decompose G(z) into product of simpler TFs
x1(k)
+
T
10
y(k)
0.9
+
x2(k)
T
10
+
0.8
overall state model:
x(k+1) =
x(k) +
u(k)
y(k) = [10 10]x(k)
(3) Decompose G(z) into sum of simpler TFs (partial fraction expansion)
y(k) = 10x1(k)
x1(k+1) = u(k) + 0.9x1(k)
y'(k) = 10x2(k)
x2(k+1) = u(k) + 0.8x2(k)
a11 a12 a13 a11 a12
a21 a22 a23 a21 a22
a31 a32 a33 a31 a32
Review of Matrices
(1) trace tr(A) = sum of elements on diagonal (a11 + a22 +…+ ann)
A = a11a22a33 + a12a23a31 + a13a21a32  a11a23a32  a12a21a33  a13a22a31
(4) eigenvectors if zi is an eigen value of A an eigenvector xi satisfies
zixi = Axi
Similarity Transformation of State Model
x1(k) = p11w1(k) + p12w2(k) + …p1nwn(k)
x2(k) = p21w2(k) + p22w2(k) + …p2nwn(k)
…
xn(k) = pn1w1(k) + pn2w2(k) + …pnnwn(k)
Similarity Transformation of State Model (continued)
substitution of (268) into (267) yields:
w(k+1) = P1APw(k) + P1Bu(k)
y(k) = CPw(k) + Du(k)
let
Aw= P1AP
Bw = P1B
Cw = CP
Dw= D
then
w(k+1) = Aw w(k) + Bw u(k)
y(k)= Cw w(k) + Dw u(k)
Eigenvalues:roots of characteristic equation
if zi are eigenvalues of A
zIA = (zz1) (zz2)…(zzn)=0
Aw= P1AP
(i) eigen values, ziare unchanged
(ii) Aw =  P1AP =  P1A P =  P1P A =A
(iii) trace: tr Aw =tr A = z1 + z2 +…+ zn
(iv)C[zIA]1 B + D = Cw [zIAw] 1 Bw + Dw
If a system has distinct eigenvalues it is possible to derive a state variable model with diagonal system matrix
Eigenvalues and Eigenvectors
Eigenvalues and Eigenvectors (continued)
A[m1 m2 …mn ] =AM = [m1 m2 …mn ]zI
the diaganol matrix, is given as = M1AM
x(k) +
x(k+1) =
u(k)
y(k)=
x(k)
0.8m11 + m21 = 0.8m11
0.9m21 = 0.8m21
thus m11 = arbitrary and m21= 0
0.8m12 + m22 = 0.9m12
0.9m22 = 0.9m22
thus m22 arbitrary and m12 = 10m22
m2=
m1=
e.g.
characteristic eqn: zIA = 0 (z0.8)(z0.9) = 0
eigenvaluesgiven asz1 = 0.8, z2 = 0.9
M =
and
diagonal system matrix is given as
M1 =
inv(M) =
=
=
= M1 A M =
=
=
Bw= M1B =
Cw= CM =
[1 0]
= [1 10]
w(k+1)=
w(k) +
u(k)
y(k) =[1 10]w(k)
e.g.
letting p = q =1 we have the modal matrix is given as:
by similarity transform we have
(2) take ztransform of state equations & eliminate state varible, x
x(k+1) = Ax(k) + Bu(k) zX(z) – zx(0) = AX(z) + BU(z)
y(k) = Cx(k) + Du(k) Y(z) = CX(z) + DU(z)
thenY(z) = [C [zI –A]1B + D] U(z)
and transfer function:G(z) = C [zI –A]1B + D
2.11 Solutions of State Equations
state equations given as:
x(k+1) = Ax(k) + Bu(k)
y(k) = Cx(k) + Du(k)
x(1) = Ax(0) + Bu(0)
and we have
x(3) = Ax(2) + Bu(2)
= A(A2x(0) + ABu(0)) + Bu(1)) + Bu(2)
= A3x(0) + A2Bu(0) + ABu(1) + Bu(2)
x(k) = Akx(0) +
Ak1iBu(i) (2.88)
thus
Ak1iBu(i)
+ Du(k)
y(k) =
CAkx(0) +C
Recursive Solution (continued)
definestate transition matrixor fundamental matrix as:
(k) = Ak
x(k) = (k) x(0) +
(k1i)Bu(i)
(2.89)
y(k) = C(k)x(0) +
C(k1i) Bu(i)
x(k+1) = Ax(k) + Bu(k)
y(k) = Cx(k) + Du(k)
then (k) x(0) = Z1{z[zIA]1x(0)}
thus substitute (k) = Z1{z zIA1 }
G(z) =
x(k+1)=
x(k) +
u(k)
e.g.
derive State Equations:
u(k)= e(k+2)+3e(k+1)+ 2e(k)
y(k) = e(k+1) + 3e(k)
x1(k) = e(k)
x2(k) = e(k+1)
x2(k+1) = u(k)  3x2(k)  2x1(k)
y(k) = [3 1]x(k)
x(0) +
u(0) =
x(1) =
y(1) =
y(2) =
y(3) =
[3 1]x(1) = 1
[3 1]x(2) = 1
[3 1]x(2) = 1
x(1) +
u(1) =
x(2) =
x(2) +
u(1) =
x(3) =
asssume system is initially at rest (x(0) = 0 ) & input is unit step: u(k)= 1