Lesson 20 6DT - New Jersey Institute of Technologyjoelsd/signals/classwork/BME314... · 2015. 12....
Transcript of Lesson 20 6DT - New Jersey Institute of Technologyjoelsd/signals/classwork/BME314... · 2015. 12....
BME 333 Biomedical Signals and Systems - J.Schesser
100
Z Transforms
Lesson 206DT
BME 333 Biomedical Signals and Systems - J.Schesser
101
Z Transforms – A Definition
• In a sense similar to the LT except it is associated with discrete time functions.
• Let’s assume we have a continuous time function, f (t), and let’s create a discrete time function from it, f (n) by sampling it at a rate T. We would then have:
• Taking the LT of f(n) we would have:
[ ] ( ) ( )n
f n f t t nT
0 0
( ) £[ [ ]] ( ) ( ) ( ) ( )
( )
st st
n n
snT
n
F s f n f t t nT e dt f t t nT e dt
f nT e
BME 333 Biomedical Signals and Systems - J.Schesser
102
Z Transforms – A Definition Continued
• Replacing esT with z we have the definition of the z-transform:
• Note that this is a 2-sided summation. Since many signals are zero for t<0, we can also define a 1-sided z-transform as:
• Note that both versions F(z) can be written in closed form when the series converges
n
nznTfzF )()(
0
)()(n
nznTfzF
BME 333 Biomedical Signals and Systems - J.Schesser
103
Z-transform 2-sided Calculations - Examples
First, recall that the geometric series Arn
n0
converges to A
1 - r provided that r 1.
Example 1), let:f [n] eaTn for n 0; 0 otherwise
F(z) eaTnzn
eaTnzn
0
(eaT
z)n
0
Using the result of a geometric series:
F(z) 1
1 eaT
z
z
z eaT
and will converge when eaT
z 1 or z eaT
BME 333 Biomedical Signals and Systems - J.Schesser
104
Examples Continued
1
11
1 0
0
Example 2), let:[ ] for 0; 0 otherwise
( ) let we have:
( ) ( ) where m p 1
( )
Using the result of a geometric se
aTn
aTn n aTn n
aTm m aT m aT p
aT aT p
f n e n
F z e z e z m -n
e z e z e z
e z e z
ries:
1( ) ( ) 1
and will converge when 1 or z
aTaT aT
aT aT
zF z e ze z z e
e z e
We see that we have to provide a region of convergence, in addition, to the function F(z) to completely define the z-transform of a f [n].
BME 333 Biomedical Signals and Systems - J.Schesser
105
1-sided z-transforms
• Useful since most functions we use are zero for t<0.
F(z) f (nT )zn
n0
BME 333 Biomedical Signals and Systems - J.Schesser
106
1-sided z-transforms
• Some examples (see p. 396 Tables 6DT.1 & 6DT.2 for more):
00
0
0 0
1
1 2 20 0
(Unit sampling function) [ ] 1 for 0, 0 otherwise; ( ) 1 1
[ ] 1 for 0, 0 otherwise1 1( ) 1 ( ) converges for z 11 11
1[ ] ( ) co(1 ) ( 1)
n n
n n
n n F z z
u n n zF z z
z zz
Tz TznTu n nTz T nz z z
2
23
nverges for z 1
( 1)[ ] converges for z 1( 1)
T z zn u nz
BME 333 Biomedical Signals and Systems - J.Schesser
107
Proof0 0
0 1 2 3 4
1 2 3 1 2 3 1 2 3
1 2 3 1 2
1[ ] ( )
1 1 1 1 1{0( ) 1( ) 2( ) 3( ) 4( ) }
1 1 1 1 1 1 1 1 1 1 1{0 [1 2( ) 3( ) 4( ) ]} {0 [1 ( ) ( ) ( ) ( ) 2( ) 3( ) ]}
1 1 1 1 1 1 1{0 [1 ( ) ( ) ( ) [1 2( ) 3( )
n nnu n nTz T nz
Tz z z z z
T Tz z z z z z z z z z z
Tz z z z z z z
1 2 3 1 2 1 1
2 2
]]}
1 1 1 1 1 1 1 1 1 1{0 [1 ( ) ( ) ( ) [1 ( ) ( ) [1 ( ) ( ) ]]]}
1 1 1 1 1 1 1 1 1 1 1 1 1{ [ [ [ [ ]]]]} { ( )[1 [1 [1 [1 ]]]]}1 1 1 1 11 1 1 1 1
1 1 1 1 1 1 1{ ( )[1 ( ) ( ) ]} { (11 1
Tz z z z z z z z z z
T Tz z z z z z z z
z z z z z
T Tz z z z z
z
11 1
1
1 2 2
1)( )}1 11
1 1 1{ ( )( )} { ( )( )}1 1 1 1
converges for z 1(1 ) ( 1)
z zz zT z T
z z z z zTz Tz
z z
BME 333 Biomedical Signals and Systems - J.Schesser
108
1-sided z-transforms
• Some examples (see p. 396 Tables 6DT.1 & 6DT.2 for more):
eaTnu[nT ]z
z eaT converges for z eaT
aTnu[nT ] anT zn
n0
(aT
z)n
n0
1
1 aT
z
z
z aT converges for z aT
BME 333 Biomedical Signals and Systems - J.Schesser
109
Properties of z-transforms
Z{f1[nT ] f2[nT ]} F1(z) F2 (z)Z{af [nT ]} aF(z)Z{f [nT T ]} z1F(z)Z{f [nT mT ]} zmF(z)
Z{nTf [nT ]} TzdF(z)
dz
If f [nT ] f1[nT kT ] f2[kT ]k0
n
, then F(z) F1(z)F2 (z)
BME 333 Biomedical Signals and Systems - J.Schesser
110
Proof of Delay Property
Given:Z{f [nT T ]} z1F(z)Z{ f [nT ]} F(z)
Z{f [nT T ]} f (nT T )zn
n0
f ([n 1]T )zn
n0
Let n -1 m
f ([n 1]T )zn
n0
f (mT )zm1
m1
f (mT )zm
m0
z1
Since f (T ) 0
z1 f (mT )zm
m0
z1F(z)BME 333 Biomedical Signals and Systems
- J.Schesser110
BME 333 Biomedical Signals and Systems - J.Schesser
111
Proof of (nT)f[nT] Property
0
0
1 10
0 0
1 1
0 0
0
( ){ [ ]} [ ]
( ) [ ]
[ ]( ) - [ ] - [ ]
( ) - [ ] [ ]
[ ] { [ ]}
n
n
n
n
n
n nn
n n
n n
n n
n
n
dF znTf nT nTf nT z Tzdz
F z f nT z
d nT zdF z nf nT z nz f nT z
dz dzdF zTz Tz nz f nT z Tznz f nT z
dz
nTf nT z nTf nT
f
BME 333 Biomedical Signals and Systems - J.Schesser
112
Properties of z-transforms
If Z{nTf [nT ]} TzdF(z)
dz; then
Z{(nT )2 f [nT ]} Z{nTg[nT ]} TzdG(z)
dz
where g[nT ] nTf [nT ] but G(z) TzdF(z)
dz;
dG(z)dz
T {dF(z)
dz z
d 2F(z)dz2 }
And
Z{(nT )2 f [nT ]} TzdG(z)
dz Tz(T {
dF(z)dz
zd 2F(z)
dz2 })
T 2 {zdF(z)
dz z2 d 2F(z)
dz2 }
Z{(nT )M f [nT ]} TzdG(z)
dz;where G(z) Z{(nT )M 1 f [nT ]}
BME 333 Biomedical Signals and Systems - J.Schesser
113
Inverting the z-transform
• Several Methods:– Taylor series expansion:
results. same theyield also should of form closed theofdivision Long
|!1)(by ] of values theare[which series thisof tscoefficien
thecalculate , thereforeandexpansion seriesTaylor ajust is that thisnote and)()2()()0(
wherefunction new a definecan We)()2()()0()( Since
0
21
1
21
F(z)dyd
nnTff(n)
ynTfyTfyTffφ(y)zy(y)
znTfzTfzTffzF
yn
n
n
-
n
BME 333 Biomedical Signals and Systems - J.Schesser
114
Inverting the z-transform Continued
– Residue Method which relates the zT, F(z), to the LT, F(s):
assTn
n
n
sT
z-eF(s)as
dsd
n
F(s)z-e
F(s)zF
|]1
)[()!1(1
:asn order a)of(s pole afor calculated are residues The
of poles at the 1 of residues)(
shown that becan It
11
1
1
BME 333 Biomedical Signals and Systems - J.Schesser
115
Inverting the z-transform Continued
2)21(
2|)2(
2|])2(2[
2)21(2|)2(
2
2)12(
2|)1(
21)1(2)1)(2(
2)()1)(2(
2)(
21211
10
2221
12
012
2
zz
z
z
zzdzdM
zM
zK
zM
zM
zK
zzzzF
zzzzF
1for ][ ]12[2)(1
2)1(
22
2)(
12
)1(2
22)(
2
2
Tnunnfz
zz
zz
zzF
zzzzzF
n
( )Partial Fraction Expansion of (since most discrete functions we deal with are of the form [ ] [ ] z
and, therefore, due to [ ], ( ) will have a in its numerator; (
e.g.,Z{ [ ] [ ]} ( ) i
F z f n u n
u n F z zz
f n u n F z
)
and will have terms of the form which can be inverted.)( ) ( )
i
k k
pi
kp p
k kk
z z zAz z z z
BME 333 Biomedical Signals and Systems - J.Schesser
116
Another Inversion Example2 2
2 2 2 2
2
2 2
0 01 12 2
2 2
0 2 2
2
0
( 2 1) ( 2 1)( )( 1) ( ) ( )
( ) ( 2 1)( ) ( )
* *( ) ( )( 2 1) ( 2 1)|
( ) ( )( 1 2 1) 2( 1 )
(2 ) 41 (1 )21* (1 )2
z j
z z z z z zF zz z j z j
F z z zz z j z j
A AA Az j z j z j z jz z j jA
z j j jj j
j
j
A j
2
1 2
2
3 3
2
3 3
3
1
1
( 2 1)[ ] |( )
(2 2)( ) 2( 2 1)[ ] |( ) ( )
(2 2)( ) 2( 2 1)[ ]( ) ( )
(4( 1) 4 ) 2( 1) 4 2)[ ] 0( )
Likewise for * 0
z j
z j
d z zAdz z j
z z j z zz j z j
j j j j jj j j j
j jj j
BA
BME 333 Biomedical Signals and Systems - J.Schesser
117
Another Inversion Example Continued4 4
2 2 2 2 2 2
2 2 2
22
2
1 1 1( ) 2[ ]2 ( ) 2 ( ) 2 ( ) ( )
This looks like the term is related to ( ) ( )
( ){ [ ]} ; Recall { [ ]} ; 1( )
( ) 1( )(
j jj j
j j
j n
j
j
j z j z z zF z e ez j z j z e z e
z zz e z e
z dF zZ e u n Z nf n z Tz e dz
zddF z z e
dz dz
2 2
2 2 2 2 2 2 2
222
2 2
22
2 2
) ( ) ( ) ( )
( ) ( ) { [ ]}( )
Likewise
{ [ ]}( )
j j
j j j j
jj j n
j
jj n
j
z z e z ez e z e z e z e
zddF z zez ez z Z ne u n
dz dz z e
zeZ ne u nz e
BME 333 Biomedical Signals and Systems - J.Schesser
118
Another Inversion Example Continued
Continuing
F(z) 12
2[e j 4e j 2 ze j 2
(z e j 2 )2 e j 4e j 2 ze j 2
(z e j 2 )2 ]
f [n] 12
2[e j 4ne jn 2 e j 4ne jn 2 ]u[n]
12
2[ne j(n 2 4) ne j(n 2 4) ]u[n]
2[n{e j(n 2 4) e j(n 2 4)
2}]u[n]
2[ncos(n 2 4)]u[n]
BME 333 Biomedical Signals and Systems - J.Schesser
119
Difference Equations
• It can be shown that for a function which equals zero for t<0, any initial conditions will not affect the following formulation:
)()(
:as (n)),function, samplingunit the todue response theis(which function system thehave weAnd
)(
Or
)()()()(:yield willsystem this totransform-z theapplyingThen
][])1([][][])1([][:equation by thisgiven system a have weIf
01
1
01
1
01
101
1
0101
zXY(z)zH
H(z)
azazabzbzb
zXY(z)
zXbzbzbzYazaza
nxbTpnxbpTnxbnyaTmnyamTnya
mm
mm
pp
pp
pp
pp
mm
mm
ppmm
BME 333 Biomedical Signals and Systems - J.Schesser
120
Example
][ ]12[2][have weexample, preceding a From
)1)(2(2
)1()2(2)(
)2(2)(
And)2(
2)2)(1(
)1(2)23(
)1(2)()()(
)()1(2)()23()1(
)(
Then, otherwise. 0 ,0for ][ where][2]1[2][2]1[3]2[
have weAssume
22
2
2
2
nunnf
zzz
zz
zzV
zzY
zzzz
zzzzH
zVzY
zVzzYzzz
zzV
kkkvkvkvkykyky
n
BME 333 Biomedical Signals and Systems - J.Schesser
121
Example
-1
-1
-1
1
1
2But ( ) which is not in any table,( 2)
but if: [ ] { ( )} Then, [ 1] { ( )}
2{ } 2 2( 2)
[ 1] 2 for 01
Therefore, [ ] 2 for 1Alternatively, using { [ 1]} ( )
(
n
n
m
H zz
h n Z H zh n Z zH z
zZz
h n nn m
h m mZ f n z F z
H z
1 -1 1
1 1 1 1 1
2 2 2) ; but { } 2 2 2 [ ]( 2) ( 2) ( 2)
2 2And { } { } { ( )} [ 1] 2 [ 1]( 2) ( 2)
n n
- - - n
z zz Z u nz z z
zZ Z z Z z F z f n u nz z
BME 333 Biomedical Signals and Systems - J.Schesser
122
Another Exampler
vi(n+1)
g g
vi(n-1)
r
vo(n+1)
g
vo(n-1)
r
vi(n)
vo(n)
r
)()())2(
rglet and ]1[][)2(]1[][/1
][][]1[][][]1[:have wen, nodeat LawCurrent sKirchoff'By
:network iterative thisof voltagenodal thecalculate sLet'
11
0
00
zVzVz(-z
nvnvrgnvnrgvg
nvnvr
nvnvr
nvnv
o
ooi
iooo
2
21,2
1 2 1 2
2
1 2
( ) ;(2 ) 1
(1 ) (1 ) 12 2
since c 1, then 1 or and 1Therefore,
( )(2 ) 1 ( )( 1 )
( )( )( 1 ) ( ) ( 1 )
zH zz z
p
p p p p p /p
z zH zz z z p z p
K KH zz z p z p z p z p
By the way this looks like our first exercise when ( ) for 0; 0 otherwise - (the pole part)and ( ) for 0; 0 otherwise - the 1/ pole part. So the left hand side of [ ] can be asso
at
at
f t e t pf t e t p h n
ciated with a 0 1-sided ZT and the right hand side of [ ] with a 0 1-sided ZT.n h n n
][][1
][
1 where)/1
(1
)(
11|
11|
1
2
2
2/12
21
nuppppnh
pzppz
zpz
zppzH
pp
pppzK
pp
pppzK
nn
pz
pz
BME 333 Biomedical Signals and Systems - J.Schesser
123
One More ExampleR
0
C
v2(t)
and )( of version discrete a define First we.derivative theeapproximatmust first webut techiqueiterativean use We
)]()([1)(computer?digit aon thissolve wedo How
1122
212
(nT) v(t) v(nT) v tv
tvtvRCdt
tdv
v1(t)
AlgorithmEuler forward theasknown ][])1[()( 222
TnTvTnv
dttdv
][])1(1[][)1(1
)(
1]1)1[(
,1)]1(1[
)1(1)]1()[1()(
2
2
21
212
nunvz
zz
zzV
KK
zK
zK
zzzzV
n
RCT where1)()()]1([
)(][][)1(])1[(
][1][1][])1[(
12
122
1222
zzzVzVz
nuRCTnTvRC
TnTvRCTTnv
nTvRCnTvRCTnTvTnv
v2 (nT)
v2 [(n-1)T]v2 [(n+1)T]
BME 333 Biomedical Signals and Systems - J.Schesser
124
Forward Euler Algorithm ContinuedEstimate of the output voltage vs sampling time
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT0.1
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT0.5
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT1
-20
-15
-10
-5
0
5
0 5 10 15 20 25
CT5
BME 333 Biomedical Signals and Systems - J.Schesser
125
Continued
and of version discrete a define First we.derivative theeapproximatmust first webut techiqueiterativean use We
)]()([1)(computer?digit aon thissolve wedo How
1122
212
(nT) v(t) v(nT) v(t) v
tvtvRCdttdv
R
0
C
v2(t)
v1(t)
AlgorithmEuler backward theasknown ])1[(][)( 222
TTnvnTv
dttdv
][])1
1(1[][
)1(1
1
1)(
11
]1)1
1[(
)1
1(1,1
]1
11[
)1(1
111
)(
12
2
21
212
nunv
z
z
zzzV
KK
z
KzK
zzV
n
]11)[1(
1])1)[(1(
)(
RCT where1)()()]1([
)(][][)1(])1[(
][1][1])1[(][
12
121
122
1222
zz
z
zzzzV
zzzVzVz
nuRCTnTvRC
TnTvRCTTnv
nTvRCnTvRCTTnvnTv
v2 (nT)
v2[(n-1)T]v2 [(n+1)T]
BME 333 Biomedical Signals and Systems - J.Schesser
126
Backward Euler Algorithm Continued Estimate of the output voltage vs sampling time
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT0.1
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT0.5
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT1
0
0.2
0.4
0.6
0.8
1
1.2
0 5 10 15 20 25
CT5
BME 333 Biomedical Signals and Systems - J.Schesser
127
Time Domain to Frequency Domain Transformations
Time Domain Time Signal
Type Quadratic Content
Transformation
Type
Frequency Domain
Periodic & Continuous
)(tx
Finite
Fourier Series FS
2/
2/
2
)(1 T
T
tT
kj
k dtetxT
a
Discrete Spectrum
ka
Non-Periodic &
Continuous )(tx
Finite
Continuous Time Fourier Transform
CTFT
dtetxjX tj )()(
Continuous Spectral
Density )( jX
Discrete ][nx
Finite
Discrete Time Fourier Transform
DTFT
n
njj enxeX ˆˆ ][)(
Continuous Spectral
Density )( ̂jeX
Discrete
][nx
Finite
Discrete Fourier Transform DFT
21
0( ) [ ]
L j knN
nX k x n e
Discrete Spectral Density
)(kX
Non-Periodic, Continuous
& Zero for t < 0
)(tx
Not
Necessarily Finite
Laplace Transform
0
)()( dtetxsX st
Complex Spectrum
)(sX
Non-Periodic,
Discrete &
Zero for n < 0 ][nx
Not
Necessarily Finite
1-sided Z Transform
0
][)( nznxzX
Complex Spectrum
)(zX
BME 333 Biomedical Signals and Systems - J.Schesser
128
Homework
• Problems: 2.16 ,2.17
1
1 1
2.16Consider the LTI system and find the output [ ] for [ ] [ ]:
1[ ] [ 1] [ ], 03
2.17Find [ ] .
536( ) 1 1(1 )(1 )
4 3
y n x n u n
y n y n x n n
x n
zX z
z z
BME 333 Biomedical Signals and Systems - J.Schesser
129
Homework
• Problems: 2-19, 2-25
step.unit a],[ ofinput an for output theFind
)611)(
311(
1)(
forequation difference theFind2.25
][)31(][)
21(][
for transform- theFind2.19
11
nu
zzzH
nununx
z
nn