1

CH 4: Open Loop Discrete Time Systems
covered to this point
• review of continuous systems
• z-transforms
• recovery of sampled data
• discrete systems
this chapter: derive analysis methods for open loop discrete sysems
4.2: Relationshiip between E(z) & E
*
(s)
• Z{e(k)} = E(z) = !

=

0 k
k
z ) k ( e = e(0) + e(1)z
-1
+ e(2)z
-2

• !{e
*
(t) }= E
*
(s) = !

=

0 n
nTs
) n ( e ε e(0) + e(1)ε
-Ts
+ e(2)ε
-2Ts
+ …
• E(z) =
z
Ts
*
) s ( E
=

ε
• in this case, z-transform can be considered special case of Laplace transform
• for analyzing discrete systems ! !! !use z-transform instead of *transform
) )( (
) e (
) s ( E
) z )( z (
) e ( z
) z ( E
2) 1)(s (s
1
E(s)
4.1 example
T sT T sT
T T sT
*
T T
T T
2
2
2
2
− −
− −
− −
− −
− −

=
− −

=
+ +
=
ε ε ε ε
ε ε
ε ε
ε
• E
*
(s) has infinite number of poles & zeros in the s-plane
• E(z) has a 1 zero at z=0 and 2 poles at ε
-2T
and ε
-T
• analysis using pole-zero locations greatly simplified using z-transform
determine E(z) =
λ
λ ε
κ
T
) E( of poles at z
) E( of residues
1
1
1


!
- useful for generating z-transform tables
- tables can be applied to *transform
2
4.3 Pulse Transfer Function
- this section develops z-transform for output of open-loop sampled data systems
- expression used to form closed loop system
• plant transfer function: G
p
(s)
• ZOH transfer function:
s
Ts −
−ε 1
pulse transfer function, G(s) =
s
Ts −
−ε 1
G
p
(s)
C(s) = G(s)E
*
(s) (4-5)
if c(t) is continuous at all sampling instants
since E
*
(s) =
!

−∞ =
+
n
s
) jnw s ( E
T
1
for e(t) continuous at all sampling instants,
we have C
*
(s) =
!

−∞ =
= + +
n
* *
s
)] s ( E ) s ( G [
2
) 0 ( c
) jnw s ( C
T
1
and C
*
(s) = ! + +

−∞ = n
s
*
s
) jnw s ( E ) jnw s ( G
T
1
because E
*
(s+jnw
s
) = E
*
(s) ! C
*
(s) = ! +

−∞ = n
s
*
) jnw s ( G
T
) s ( E
1
and C
*
(s) =E
*
(s)G
*
(s) (4-8)
and C(z) = E(z) G(z) (4-9)
pulse transfer function: G(z) = C(z)/E(z)
• TF between sampled input, e
*
(t) and output c(t) at sampling instants
• doesn’t indicate nature of output c(t) between sampling instants
• generally choose sampling frequency, w
s
such that response at sampling instants ~
between sampling instants
(4-8) (4-9) are general derivations: for any F
*
(s) = f
0
+ f
1
ε
-Ts
+ f
2
ε
-2Ts
if A(s) = B(s)F
*
(s)
! A
*
(s) = B
*
(s)F
*
(s)
! A(z) = B(z)F(z)
deriving B(z) & F(z)
B(z) = Z{B(s)}
F(z)=
z
Ts
*
) s ( F
=

ε
T
E(s) E
*
(s) C(s)
G(s)
1-ε εε ε
-Ts
s
G
p
(s)
T
E(s) E
*
(s) C(s)
G(s)
3
ie:
) z (
) 1 (
z
1 z
) z )( 1 z (
) 1 ( z
) z ( A
z 1 ) z ( F 1 ) s ( F
) z )( 1 z (
) 1 ( z
) z ( B
) 1 s ( s
1
B(s)
1
) 1 s ( s
1
) 1 s ( s
1
A(s)
T
T
T
T
1 Ts *
T
T
Ts
Ts




− −






=

− −

=
− = → − =
− −

= →
+
=

+
=
+

=
ε
ε
ε
ε
ε
ε
ε
ε
ε
ie: determine output C(z) if input, e(t) = unit step
T T
T
T
T
* *
Ts
z
z
1 z
z
z ) 1 z (
) 1 ( z
) z ( C
1 z
z
)} t ( u { Z ) z ( E
z
1
) z ( G
) s ( E ) s ( G ) s ( E
) 1 s ( s
1
C(s)
− −






=
− −

=

= =


=
=
+

=
ε ε
ε
ε
ε
ε
and c(nT) = 1-ε
-nT
(i) z-transform analysis yields response only at sampling instants
• output, c(kT) rises to final value of unity at sampling instants
• nothing known about response between sampling instants
• normally this information is needed !find complete response by simulation
(ii) if input, e(t) to sampler/ZOH is unit step, u(t), !output of sampler/ZOH is also unit step
• ZOH reconstructs sampled unit-step exactly
• response of c(kT) is step response of continuous time system w/
• G(s) = s/s+1
• c(t) = 1-ε
-T
z-transform analysis in example is correct: given c(t) !c(nT) = c(t)|
t=nT
converse is not true: c(t) ≠ c(nT)|
nT=t
T
E(s) E
*
(s) C(s)
1-ε εε ε
-Ts
s
1/(s+1)
0 T 2T 3T 4T 5T
c(kT)
1
4
(iii) often, Steady State (SS) Gain with constant input (dc gain) is important:
input E(z) = z/z-1 (unit step)
steady state output: c
ss
(k) = ) z ( C ) 1 z (
lim
1 z


= ) z ( E ) z ( G ) 1 z (
lim
1 z


= ) 1 ( G ) z ( G
1 z
z
) 1 z (
lim
1 z
=



dc gain = G(z)|
z=1
= G(1)
with constant input !gain of sampler/ZOH = 1
dc gain of system also given by continuous analysis: dc gain = ) s ( G
lim
p
s 0 →
thus dc gain = ) s ( G
lim
) z ( G
lim
p
s z 0 1 → →
=
can be used to check calculation of G(z)
1
1
1
1
1
0 0
1 1
=
+
=
=


=
→ →


→ →
s
lim
) s ( G
lim
z
lim
) z ( G
lim
example
s
p
s
T
T
z z ε
ε
5
Open Loop Transfer Functions with 2 plants : 3 cases
(1) 2 plants, both with data holds
C(s) = G
2
(s)A
*
(s)
C(z) = G
2
(z)A(z)
A(s) = G
1
(s)E
*
(s)
A(z) = G
1
(z)E(z)
!C(z) = G
2
(z)G
1
(z)E(z), total transfer function is product of pulse transfer functions
(2) 2 plants, 1
st
with data hold
• perform product in s-domain: G
1
(s)G
2
(s)
• determine z-transform Z{G
1
(s)G
2
(s)}
(3) 2 plants with intermediate data hold
transfer function can’t be written:
- cannot factor E(z) from
- E(z) contains values of e(t) only at t=kT
- signal a(t) is a function of all previous values of e(t) (not just at sampling instants)
A(s) = G
1
(s)E(s) ! from convolution: a(t) = τ τ τ d ) ( e ) t ( g
t
"

0
1
generally:
• if a sampled-data system’s input applied directly to continuous part before sampling
!Z{system’s output }can’t be expressed as function of the Z{system’s input}
• not a significant issue in analysis & design
C(s) = G
2
(s)A
*
(s) = G
2
(s)
C(z) = G
2
(z)G
1
E(z)
G
1
E
*
(s)
E(s) E
*
(s) A(s) A
*
(s) C(s)
G
1
(s) G
2
(s)
T T
G
1
(s) G
2
(s)
E(s) A(s) A
*
(s) C(s)
T
G
1
(s) G
2
(s)
T
E(s) E
*
(s) C(s)
C(s) = G
1
(s) G
2
(s)E
*
(s)
C(z) = Z{G
1
(s)G
2
(s)}E(z)
C(z) = G
1
G
2
(z) E(z)
G
1
G
2
(z) ≠ G
1
(z)G
2
(z)!
G
1
E(z)
6
4.4 Open Loop System with Digital Filters
- extend 4.3 for open loop systems that contain digital filters
(1) A/D converts continuous signal e(t) into discrete sequence {e(kT)}
(2) digital filter processes each e(kT) and generates output sequence {m(kT)}
• solves linear difference equation w/ constant coefficients
• transfer function represented by D(z) =
) z ( E
) z ( M
then:
M(z) = D(z)E(z)
M
*
(s) = D
*
(s)E
*
(s) (by substiting z = ε
sT
)
(3) D/A converts to continuous time signal ) t ( m
• usually has output hold register that gives ZOH and
• ) s ( M
s
) s ( M
*
Ts −

=
ε 1
Thus
(i) C(s) = ) s ( M
s
) s ( G ) s ( M ) s ( G
*
Ts
p p


=
ε 1
= ) s ( E | ) z ( D
s
) s ( G
*
z
Ts
p
Ts
ε
ε
=

− 1
(ii) C(z) = ) z ( E | ) z ( D
s
) s ( G Z
Ts
z
Ts
p
ε
ε
=

#
$
%
&
'
(
− 1
= G(z)D(z)E(z)
• CPU (digital filter) processes each e(kT)
• A/D - digital filter - D/A model only processes impulse function of weight e(kT)
• complete model combines with ideal-sampler/ZOH for accurate model
D/A A/D
digital
filter
G
p
(s)
E(s) M(s) C(s)
e(t) e(kT) m(kT) m(t) c(t)
T
e(t) e(kT) m(kT) m(t) c(t)
G(s)
1-ε εε ε
-Ts
s
D(z) G
p
(s)
E(s) E(z) M(z) M(s) C(s)
7
ie:
if m(kT) = 2e(kT) - e(k-1)T then M(z) = (2 - z
-1
)E(z)
thus
z
1 z 2
z 2
E(z)
M(z)
D(z)
1

= − = =

if G
p
(s) =
T
z
z
1 s
1



+
ε
then G(z) =
)
*
+
,
-
.

+
=
/
)
/
*
+
/
,
/
-
.
+



Ts
Ts
1
) 1 s ( s
1
Z
1 s
1
s
1
Z ε
ε
G(z )=
T
T
T
T
z
1
z ) 1 z (
z ) 1 (
z
1 z






=
− −
− −
ε
ε
ε
ε
if e(t) = u(t) then E(z) =
1 z
z

and C(z) = D(z)G(z)E(z)
C(z) = 0
1
2
3
4
5

0
0
1
2
3
3
4
5


0
1
2
3
4
5 −


1 z
z
z
1
z
1 z 2
T
T
ε
ε
z
z ) 2 (
1 z
z
1 ) z ( C
z
2
1 z
1
z
1
) z )( 1 z ( z
) 1 z 2 )( 1 (
z
C(z)
T
T
T
T
T T
T
T

− −



+

+ − =


+

+

=
− −
− −
=
ε
ε
ε
ε
ε ε
ε
ε
recall that Z
-1
{k
i
z
-i
} =
)
*
+
,
-
.

=
0 n 0,
i n , k
i
!Z
-1
{1-ε
T
} is non-zero only if n=0,
for n = 0 !c(0) = 1-ε
T
+ 1 + ε
T
-2 = 0
c(0) = 0 =
∞ →
) z ( C
lim
z
*
also by inspection since for C(z) order of numerator < order of denominator
c(∞) = 1 1
1
= −

) z ( C ) z (
lim
z
dc gain = D(z)||
z=1
G
p
(s)|
s=0
= (2z-1)/z |
z=1
1/(s+1) |
s=0
= 1
if steady state input = constant value of unity!steady state output, c(∞) = dc gain⋅ input =1
if e(t) = u(t) & M(z) = 2(1-z
-1
)E(z) !m(kT) = 2u(kT) – 2u(kT-T)
8
4.5 Modified z-transform consider systems containing ideal time delays
let a time function e(t) be delayed by ∆T, 0 < ∆ ≤ 1 ! e(t-∆T)u(t-∆T)
delayed z- transform, E(z,∆ ∆∆ ∆):
• E(z,∆) = Z{ e(t-∆T)u(t-∆T)} = Z{E(s)ε
-∆Ts
} = ! −

=

1 n
n
z ) T nT ( e ∆ (4-25)
• sampling instants are not delayed = 0, T, 2T, 3T, …
[ ]
aT
aT - -0.6
aT
aT - -0.6
n
n anT aT - -0.6
aT aT aT - -0.6
aT - 1.6 aT - -0.6
n
n -0.4T) (anT -
at -
z z
z
z e z
... z z z
... z z z
e(t) 0.4, ), , z ( E
4.5 example
− − −


=
− − −
− − − − −
− −

=


=

=
! =
+ + + =
+ + = !
= =
ε
ε
ε
ε
ε
ε ε ε
ε ε ε
ε ∆ ∆
1
1
0
1
2 2 1 1
2 1
1
1
1
1
E(z,m): modified z-transform is defined from delayed z-transform: replace ∆ ∆∆ ∆ by 1-m
E(z,m) = E(z,∆)|
∆=1-m
= Z{E(s)ε
-∆Ts
} )|
∆=1-m
(4-27)
E(z,m) = e(mT)z
-1
+ e((1+m)T)z
-2
+e((2+m)T)z
-3
+ …
m=1 !no delay: E(z,1) = E(z) – e(0)
m=0 !delay = T: E(z,0) = z
-1
E(z)
*special tables used for modified z-transform
property of modified z-transsform: Z
m
{e(t)} !z-transform of e(t) time shifted by 1-m
• theorms of E(z) f/ chapter 2 apply to E(z,m)
shifting theorm: Z
m
{E(s)} = Z{ε
-∆Ts
E(s)}|
∆ = 1-m
for integer, k: Z
m

-kTs
E(s)} = z
-k
Z
m
{ E(s)} = z
-k
E(z,m)
[ ]
z
z
z z z
... z z z
... z z z m) E(z,
} { Z find 4.6 example
T
mT -
T
mT -
n
n nT mT -
T T mT -
m)T (2 - m)T (1 - mT -
t
m

− −


=
− − −
− − − − −
− + − + −


=

= ! =
+ + + =
+ + + =
ε
ε
ε
ε ε ε
ε ε ε
ε ε ε
ε
1
1
0
1
2 2 1 1
3 2 1
1
1
1
0.4T T 2T 3T
e(t), e(t-∆T)u(t-∆T)
ε
-0.6aT
ε
-1.6aT
ε
-2.6aT
9
4.6 Systems with time delays: Use Z
m
{}
(1) determine pulse transfer function of discrete time systems w/ ideal time delays
• C(s) = G(s)
s
0
t −
ε
s
E
*
(s)
• C(z) = Z{G(s)
s
0
t −
ε }E(z)
• let t
0
= kT + ∆T, 0 < ∆ ≤ 1
!C(z) = z
-k
Z{G(s)ε
-∆Ts
}E(z) = z
-k
G(z,m)E(z)|
∆=1-m
(2) determine pulse transfer function where computation time cannot be neglected
• n
th
order digital controller solves difference equation every T seconds:
!m(k) = b
n
e(k) + b
n-1
e(k-1) + … + b
0
e(k-n) - a
n-1
m(k) - a
n-2
m(k-1)-…- a
0
m(k-n)
• let t
0
be the computation time: input at t = T !ouput at t = T + t
0
• model as digital controller without time delay followed by ideal time delay = t
0
C(z) = Z{G(s)
s
0
t −
ε }D(z)E(z) (4.42)
let t
0
= kT + ∆T, 0 < ∆ ≤ 1!C(z) = z
-k
G(z,m)|
m=1-∆
D(z)E(z) (4.44)
T
E(s) E
*
(s) C(s)
G(s) ε εε ε
-t
0
s
controller & compute time data hold & plant
T
E(s) E
*
(s) C(s)
D(z) ε εε ε
-t
0
s
G(s)
10
ie: t
0
= 0.2T, G(s) =
) 1 s ( s
1
Ts
+


ε
) z )( 1 z (
z z
) m , z ( G
1 z
z
) z ( E ) m , z ( G ) z ( C
) z )( 1 z (
z z
z
1 z
) z )( 1 z (
) 1 z ( ) z (
z
1 z
) 1 s ( s
Z
z
1 z
) 1 s ( s
1
Z ) z 1 (
) 1 s ( s
- 1
Z m) G(z,
T
T 8 . 0 T 8 . 0 T
T
T 8 . 0 T 8 . 0 T
T
T 8 . 0 T Ts 2 . 0
m
1
-Ts
m

− − −

− − −

− −

− −
+ − −
=

= =
− −
+ − −
#
$
%
&
'
( −
=
− −
− − −
#
$
%
&
'
( −
=
/
)
/
*
+
/
,
/
-
.
+

=
)
*
+
,
-
.
+
− =
/
)
/
*
+
/
,
/
-
.
+
=
ε
ε ε ε
ε
ε ε ε
ε
ε ε ε
ε
• C(z) = (1 - ε
-0.8T
)z
-1
+ (1 - ε
-1.8T
)z
-2
+ (1 - ε
-2.8T
)z
-3
+ … (power series)
• with no delay: c(nT) = (1 - ε
-nT
)
• with delay = 0.2: c(nT)|
n=n-0.2
= (1 - ε
-(n-0.2)T
), n≥ 1
ie: t
o
= 1ms, T = 50ms, since m = 1- ∆ then mT = T-∆T = (50ms-1ms ) = 49ms
0
0
1
2
3
3
4
5
− −
− − + −
=
0
1
2
3
4
5

0
1
2
3
4
5 −
0
0
1
2
3
3
4
5
− −
− + − −
= =
0
0
1
2
3
3
4
5
− −
− + − −
=
)
*
+
,
-
.
+

=
/
)
/
*
+
/
,
/
-
.
+

=

− − −

− − −

− − −

) z )( 1 z ( z
) 1 z 2 )( ( ) 1 ( z
1 z
z
z
1 z 2
) z )( 1 z (
) ( ) 1 ( z
z
1 z
z) G(z)D(z)E( C(z)
) z )( 1 z (
) ( ) 1 ( z
z
1 z
) 1 s ( s
1
Z
z
1 z
) 1 s ( s
1
Z m) G(z,
05 . 0
05 . 0 049 . 0 049 . 0
05 . 0
05 . 0 049 . 0 049 . 0
05 . 0
05 . 0 049 . 0 049 . 0
m
Ts
m
ε
ε ε ε
ε
ε ε ε
ε
ε ε ε
ε
filter & compute time data hold & plant
T=0.05s
E(s)=1/s C(s)
2z-1
z
ε εε ε
-0.001s 1-ε εε ε
-Ts
s
1
(s+1)
11
4.7: Non-Synchronous Sampling
system with multiple samplers that sample at the same rate but are not synchronized
- out of phase by some value, h
- can use the modified z-transform to compensate for sampling phase difference
4.8 State Variable Models (as opposed to transfer functions)
x(k+1) = Ax(k) + Bu(k)
y(k) = Cx(k) + Du(k)
state vector = x(k)
input vector = u(k)
output vector = y(k)
Transfer Function approach to obtain state variable model of open loop sampled data systems
(1) draw simulation diagram from z-transform TF
(2) assign state variables to output of each time delay
(3) write state equations from simulation diagram
ie:
1
1 T
1
T
T
T Ts
z 2
z
1 z 2
) z ( D
z 1
z
) 1 (
z
1
) 1 s ( s
1
Z ) z ( G

− −



− −
− =

=
0
0
1
2
3
3
4
5

− =


=
/
)
/
*
+
/
,
/
-
.
+

=
ε
ε
ε
ε ε
x
1
(k) = [2e(k-1) – x
2
(k-1) ](1-ε
-T
) + ε
-T
x
1
(k-1)
x
2
(k) = e(k-1)
x
1
(k+1) = (2e(k) – x
2
(k) )(1-ε
-T
) + ε
-T
x
1
(k)
x
2
(k+1) = e(k)
x
1
(k+1) ) k ( e
) (
) k (
T T T
#
$
%
&
'
(

+
#
$
%
&
'
(
+ −
1
1 2
0 0
1 ε ε ε
x
T
D(z) G(s)
1-ε εε ε
-Ts
s
2z-1
z
1
s+1
E(s) Y(s)
x
2
(k)
e(k) x
1
(k) = y(k)
+
1-ε
-T
2
+
z
-1
ε εε ε
-T
z
-1
12
4.9 Review of Continuous State Variables
2 main disadvantages of using transfer function to obtain state equations for discrete system
(1) difficult to derive pulse transfer function for higher order systems
(2) lose natural system states as state variables
ie: motion of mass without friction: force) (applied ) t ( f
dt
) t ( x d
=
2
2
state variables: (natural, physical variables)
v
1
(t) = x(t) (position)
v
2
(t) = ) t ( v
1
! = ) t ( x
1
! (velocity)
state equations
) (
) (
) (
) ( '
) ( '
t f
1
0
t v
t v
0 0
1 0
t v
t v
2
1
2
1
#
$
%
&
'
(
+
#
#
$
%
&
&
'
(
#
$
%
&
'
(
=
#
$
%
&
'
(
if system were part of sampled data system
(i) choose position as a state in discrete-state model by letting position be system
output
(ii) if TF approach used for discrete-state modelling – choosing velocity as 2
nd
state
would be difficult – state variables are outputs of delays
13
Alternate Approach for Obtaining Discrete State Model
- based on use of continuous state variables
v! (t) = A
c
v(t) + B
c
u(t)
y(t) = C
c
v(t) + D
c
u(t)
• system states: v(t)
• system inputs: u(t)
• system outputs: y(t)
• “
c
” used to indicate continuous matrices
) t (
0 1 0 0
0 0 0 1
) t (
) t ( u
1
0
0
0
) t (
B 0 B 0
1 0 0 0
B 0 ) K B B ( 0
0 0 1 0
) t ( u ) t ( y B ) t ( y B ) t ( y ) t ( v
) t ( y ) (t v t) ( v
) t ( y ) K B B ( ) t ( y B ) t ( y ) t ( v
) t ( y ) (t v ) t ( v
) t ( y (t) v
(t) y (t) v
(t) y (t) v
(t) y (t) v
) t ( u )] t ( y ) t ( y [ B ) t ( y
0 )] t ( y ) t ( y [ B ) t ( Ky ) t ( y B ) t ( y
2 2
2 2 1
1 2 2 2 2 4
2 4 3
1 2 1 2 2 1 2
1 2 1
2 4
2 3
1 2
1 1
1 2 2 2
2 1 2 1 1 1 1
v y
v (t) v
variables state
constant spring K factor, damping B mass, M
4.12 example
#
$
%
&
'
(
=
#
#
#
#
$
%
&
&
&
&
'
(
+
#
#
#
#
$
%
&
&
&
&
'
(

+ + −
=
+ + − = =
= =
+ + − = =
= =
=
=
=
=
= − +
= − + + +
= = =
!
! ! ! ! !
! !
! ! ! ! !
! !
!
!
! ! ! !
! ! ! ! !
B
2
B
1
K
M
1
=1
M
2
=1
y
2
y
1
u(t)
force
B
2
B
2
y”
1
(t) y’
1
(t) y
1
(t)
-B
2
y”
2
(t) y’
2
(t) y
2
(t)
s
-1
u(t) 1 s
-1
-(B
2
+B
1
)
-K
s
-1
s
-1
14
State Equations for Single Input-Output Systems
v! (t) = A
c
v(t) + B
c
u(t) (4-57)
y(t) = C
c
v(t) + D
c
u(t)
(1) Use Laplace Transform ! !! !Solve for V(s)
sV(s)- v(0) = A
c
V(s) + B
c
U(s) (4-58)
Y(s) = C
c
V(s) + D
c
U(s)
(sI-A
c
)V(s) = v(0) + B
c
U(s)
V(s) = [sI-A
c
]
-1
v(0) + [sI-A
c
]
-1
B
c
U(s) (4-59)
define Φ ΦΦ Φ
c
(t) =!
-1
{[sI-A
c
]
-1
} (4-60)
! !! !v(t) = Φ ΦΦ Φ
c
(t)v(0) +
"
t
0
Φ ΦΦ Φ
c
(t-τ) B
c
u(τ)dτ (4-61)
(2) Alternate derivation of Φ ΦΦ Φ
c
(t) - useful when deriving discrete state model
if Φ ΦΦ Φ
c
(t) is assumed to be an infinite series:
Φ ΦΦ Φ
c
(t) = K
0
+ K
1
t + K
2
t
2
+ K
3
t
3
+ … (4-62)
K
i
are constant, nonsingular matrices
by selecting u(t) = 0 and substituting (4-61) into (4-57) w/ Φ ΦΦ Φ
c
(t) =
!

=0 i
i
i
t K
v(t) =
!

=0 i
i
i
t K v(0) = (K
0
+ K
1
t + K
2
t
2
+ K
3
t
3
+ …)v(0)
v’(t) = (K
1
+ 2K
2
t + 3K
3
t
2
+ 4K
3
t
3
+…)v(0)
and v' (t) = A
c
!

=0 i
i
i
t K v(0) = A
c
K
0
t
0
+A
c
K
1
t
1
+A
c
K
2
t
2
+ A
c
K
3
t
3 4
+…
thus (K
1
+ 2K
2
t+3K
3
t
2
+ 4K
3
t
3
+…) = A
c
K
0
t
0
+A
c
K
1
t
1
+A
c
K
2
t
2
+ A
c
K
3
t
3 4
+…
without loss of generality, let K
0
= I, then we have
K
1
= A
c
K
0
= A
c
K
2
= A
c
K
1
/2 = A
c
2
K
0
/2= A
c
2
/2
K
3
= A
c
K
2
/3 = A
c
3
K
0
/3! = A
c
3
/3!
K
i
= A
c
K
i-1
/i = A
c
i
K
0
/i! = A
c
i
/i!
without loss of generality, let K
0
= I, then we have
Φ ΦΦ Φ
c
(t) ...
! 3
t
! 2
t
t
! i
t
3
3
c
2
2
c c
0 i
i
i
c
+ + + + = =
!

=
A A A I A (4-63)
15
(3) state models of physical system when x’(t) appears in right side of x’(t) and y(t)
• x’(t) = - x(t) + u(t) – x’(t)
• y(t) = x’(t)
x’(t) appears in right side of both eqns !
solve x’(t): x’(t) = -0.5x(t) + 0.5u(t)
then y(t) = -0.5x(t) + 0.5u(t)
method for obtaining state equations in standard format for this type of system
(i) redraw simulation diagram with integrator omitted
(ii) write x’(t) and y(t) in terms of inputs (x(t) and u(t) in this case)
(iii) redrawing with integrator omitted is not required
applying Mason’s Gain Formula:
x’(t) = ) t ( u ) t ( x
1 1
1
1 1
1
+
+
+

= -0.5x(t) + 0.5u(t)
y(t) = ) t ( u ) t ( x
1 1
1
1 1
1
+
+
+

= -0.5x(t) + 0.5u(t)
method for obtaining state equations in standard format for algebraic loops
algebraic loop: loop without integrator in figure
x’(t) = A
1
x’(t) + A
2
x(t) + B
1
u(t)
y(t) = C
1
x’(t) + C
2
x(t) + D
1
u(t)
(i) solve 1
st
equation: x’(t) = [I-A
1
]
-1
A
2
x(t) + [I-A
1
]
-1
B
1
u(t)
(ii) substitute into 2
nd
equation: y(t) = C
1
[I -A
1
]
-1
A
2
+ C
2
]x(t) + D
1
u(t)
4.10 Discrete State Equations
• determine discrete state equations of sampled data system from continuous state eqns
• preserve natural system states
consider state equations for continuous system
v’(t) = A
c
v(t) + B
c
u(t) (4-64)
y(t) = C
c
v(t) + D
c
u(t)
!solution is v(t) = Φ ΦΦ Φ
c
(t)v(0) +
"
t
t
0
Φ ΦΦ Φ
c
(t-τ) B
c
u(τ)dτ (4-65)
where Φ ΦΦ Φ
c
(t-t
0
) ...
!
) t t (
A ) t t ( A I
! i
) t t (
A
c c
i
i
i
c
+

+ − + ! =

=

= 2
2
0 2
0
0
0
(4-66)
and t
0
is intial time
x’(t)
u(t) x(t)
y(t)
+
" "" "
+
x’(t)
u(t) x(t)
y(t)
+ +
16
Discrete State Model:
• obtained by evaluating (4-65) at t
0
=kT and t = kT+T
• during interval [kT ≤ t < kT+T] u(t) = m(kT) ! replace u(t) by m(kT)
v(kT+T) = Φ ΦΦ Φ
c
(T)v(kT) + m(kT)
"
+T kT
kT
Φ ΦΦ Φ
c
(kT+T-τ) B
c
dτ (4-67)
compare with descrete equations in (4-52)
x(k+1) = Ax(k) + Bm(k) (4-64)
y(k) = C x(k) + D u(k)
(1) To obtain A and B matrices, substitute:
x(kT) = v(kT)
A = Φ ΦΦ Φ
c
(T)
B =
"
+T kT
kT
Φ ΦΦ Φ
c
(kT+T-τ) B
c

(2) Output equation is: y(t) = C
c
v(kT) + D
c
u(kT)
= C
c
x(kT) + D
c
m(kT)
where discrete matrices = continuous matrices
C = C
c
D = D
c
(3) simplify determination of B: let -σ = KT-τ,
then -dσ = -dτ
and kT+T-τ = kT+T –KT-σ = T – σ
new limiate are: at τ = kT+T ! σ = T and at τ = kT ! σ = 0
thus:
B =
"
T
0
Φ ΦΦ Φ
c
(T-σ) B
c

M(s) U(s) Y(s)
T
m(t) u(t) y(t)
1-ε εε ε
-Ts
s
G
p
(s)
17
(4) evaluate A and B either by
(i) Laplace Transform (difficult)
(ii) convergent power series:
A = Φ ΦΦ Φ
c
(t) ! =

=0 i
i
i
c
! i
t
A
let τ = T - σ !
"
T
0
Φ ΦΦ Φ
c
(T-σ) dσ =
"
0
T
Φ ΦΦ Φ
c
(τ) - dτ =
"
T
0
Φ ΦΦ Φ
c
(τ) dτ
= τ
τ τ
τ d ...
!
A
!
A A I
c c c
T
0
0
1
2
3
3
4
5
+ + + +
"
3 2
3
3
2
2
0
=
0
0
1
2
3
3
4
5
+ + + + ...
!
T
A
!
T
A
!
T
A IT
c c c
4 3 2
4
3
3
2
2
then B =
"
T
0
Φ ΦΦ Φ
c
(T-σ) B
c

= B
c "
T
0
Φ ΦΦ Φ
c
(τ) dτ
=
0
0
1
2
3
3
4
5
+ + + + ...
!
T
A
!
T
A
!
T
A IT
c c c
4 3 2
4
3
3
2
2
B
c
=
0
0
1
2
3
3
4
5
!
+

=
+
0
1
1 k
k
k
c
)! k (
T
A B
c
for multiple input & outputs
- D, D
c
are matrices
- each input must be output of ZOH or errors can result, especially if inputs change rapidly
18
[ ]
[ ]
[ ]
#
$
%
&
'
(
=
#
$
%
&
'
(
+
#
$
%
&
'
(
#
$
%
&
'
(
=
#
$
%
&
'
(
+
+
#
$
%
&
'
(
#
$
%
&
'
(
=
"
=
#
$
%
&
'
(
= =
#
$
%
&
'
(

− +
=
#
$
%
&
'
(

+
=
"
#
$
%
&
'
(

=
#
#
#
#
$
%
&
&
&
&
'
(
+
+
=
#
$
%
&
'
(
+

= − =
#
$
%
&
'
(
+
#
$
%
&
'
(

=
− =
+ =
=
= =
+
= →
+
=
=
=











(k) x
(k) x
1 y(k)
) t ( u
.
.
(k) x
(k) x
.
.
1) (k x
1) (k x
.
. .
B d ) ( B
.
.
| ) T ( A
T T
d ) (
s
) s ( s s
L
s
s
L A sI L ) t (
) t ( u ) t ( x ) t ( x
) s ( X ) s ( U ) s ( sX
10
) s ( X
10
) s ( X s
U(s)
) s ( X s ) s ( X
) s ( E ) s ( Y ) s ( X
) s ( E ) s s (
) s ( E
) s ( U
) s ( Y
) s ( s
) s ( G
0.1s T
: 4.13 example
2
1
2
1
2
1
c
T /
c
. T c
T
T
T /
c
t
t
c c
2 2
2 2
1 2
1
p
0
952 0
048 0
905 0 0
095 0 1
10
0
095 0 0
005 0 1 0
905 0 0
095 0 1
1 0
1
0
0
1 1
1
1
0
1
1 1
1 0
1
10
0
1 0
1 0
10
10
10
1
10
0
1 0
0
0
1
1
1
1
1
2
τ τ Φ
Φ
ε
ε
ε
ε τ τ
τ τ Φ
ε
ε
Φ
τ τ
τ
!
can also use power series: 3 significant figures of accuracy requires 3 terms
M(s) U(s) Y(s)
T
m(t) u(t) y(t)
1-ε εε ε
-Ts
s
G
p
(s)
U(s) X
2
(s) X
1
(s) = Y(s)
s
-1
s
-1
10
+
-
y(k) m(k)
+
0.952 T
x
2
(k)
0.905
T
x
1
(k)
+
0.048
0.095
19
4.11 Practical Calculations by Computer
• required for higher order systems.
• preferred for lower order systems
(1) Derive State Model for Analog Part of a System
v’(t) = A
c
v(t) + B
c
u(t)
y(t) = C
c
v(t) + D
c
u(t)
(2) If Transfer Function of Analog Part of System Required, then determine
sV(s) = A
c
V(s) + B
c
U(s)
V(s) = [sI-A
c
]
-1
BU(s)
Y(s) = C
c
V(s) + D
c
U(s)
Y(s) = C
c
[sI-A
c
]
-1
BU(s) + D
c
U(s)
Y(s) = [C
c
[sI-A
c
]
-1
B + D
c
]U(s)
then G
p
(s) = C
c
[sI-A
c
]
-1
B
c
+ D
c
(3) Calculate Discrete Matrices of Analog Part of System from A
c
, B
c
, C
c
,D
c
A = Φ ΦΦ Φ
c
(t) ...
!
t
A
!
t
A t A I
! i
t
A
c c c
i
i
i
c
+ + + + ! = =

= 3 2
3
3
2
2
0
B =
0
0
1
2
3
3
4
5
+ + + + ...
!
T
A
!
T
A
!
T
A IT
c c c
4 3 2
4
3
3
2
2
B
c
C = C
c
D = D
c
(4) Calculate Pulse Transfer Function
G(z) = C[zI-A]
-1
B + D