






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























The sampling process
Taking the Laplace Transform
[ ( )] ( ) ( )
st
t
L r t rt t kT e
−
∞
=
∫ 0
[ ( )] (^) ∑ ( )
∞
=
−⋅ = ⋅ 0
k
skT Lr t rkT e
Letting
k skT z e
[ ( )] (^) ∑ ( )
∞
=
− = ⋅ 0
k
k Lr t rkT z
Welcome to the z-Transform!
The sampling process
Analog Sample and Hold to generate discrete time samples
For a unit input at time 0, the zero-order hold would output the following.
The Laplace transform is
T
t
st Lzoht e
0
s s
e
s
e zohs
sT T st
− − 1
0
( ) ( )
sT sT e s
e s s
zoh s
− − = − ⋅ = ⋅ 1 −
Alternately transformation for ZOH,
sT
t
st e s s
L zoht ut ut T e
−
∞
=
− = −⋅ − = − ⋅ ∫
0
Summing the zero order hold functions
Summing the zero order hold function at different sample rates
The Laplace domain solution for p(t)
For a zero order hold discrete time system, the Laplace transform can still be constructed
as
∫
∞
−∞
st p =^ ∫ ⋅ ⋅ = ⋅
∞ −⋅
0
∞ −⋅
=
−⋅ ∞ −⋅ ∫ ∑ s
e L s pt e dt rkT e
sT
k
st skT p
0
0
While the Z-transform of the input r(t) was just
( ) (^) ∑ ( )
∞
=
− = ⋅ k 0
k Lr z rkT z
Therefore, they are the same except for the ZOH function!
Note:
The Z-transform describes the discretized waveform. (impulse samples)
It does not describe a discretized-ZOH waveform (“boxcar” samples).
When processing “sampled output” systems, we are typically using “boxcar” samples.
There are other shapes instead of the “boxcar” …
Sampling rates much greater than the Nyquist rate … (fmax /2<<1/Ts =f (^) s )
We like to think that for high enough sample rates that a discrete system and a continuous
system can be made equivalent.
∞ −⋅
=
−⋅ ∞ −⋅ ∫ ∑ s
e L s pt e dt rkT e
sT
k
st skT p
0
0
Let’s look at the Taylor series expansion for small exponentials.
2 3 x x e x
x
If s ⋅ T is small,
s
s T s T sT
s s
e
s T +L
−⋅ 2! 3!
2 3
−⋅
2 3
s
sT
s
s T T s s s
e
sT
s
s T
s
s T T s
e
sT
−⋅
L 2! 3!
2 3
Substituting back into the Laplace transform for p(t).
k
st skT p (^) ⎥⋅ ⎦
= ⋅ ⋅ = ∑ ⋅ ∫
∞
=
−⋅ ∞ −⋅
0 0
But this is a scaled version of the z-transform for r(t)! Maybe they can be made the same
(if the sampling rate is high enough/sample period is short enough).
The Z-Transform
The Z-Transform Step
Perform the z-transform of a time sampled unit step function
− − −
∞
=
− ∑
1 2 2
0
1 E z 1 z 1 z z z k
Using the identity (Taylor series expansion for small x)
x x x for x x
We can see that (the math trick)
1 1
1 2 2 < −
− −
− − − for z z
E z z z z L
And finally
1 < −
− for z z
z E z
An alternate way is to multiply the “sequence” by z, subtract the original sequence, and
then resolve the “equation” for the summation.
Rewriting the first term as positive powers in z
− T − T z e
z
z
z e
z
z
z
z
T z
z
z G z
2
Combining the fractions into numerator and denominator polynomials
( ) ( ) ( ) ( )
( ) ( )
T
T T
z z e
T z e z z e z G z −
− −
2
( ) ( )
T
T T T
z z e
z T T e z z z e e z z G z −
− − −
2 2
( )
( ) ( )
T
T T T
z z e
z T e T e e G z −
− − −
( ) ( ) ( )
2 1 1
1 1
1
1 1
− −
− −
−
− −
z z e e
z e e
z z e
z e e Gz
The numerical coefficients are ( 0.
− e )
2 − ⋅ +
z z
z Gz
Can MATLAB do this?
Ts=1;
num=1;
den=[1 1 0];
sys=tf(num,den)
sysd=c2d(sys,Ts,'ZOH')
Result:
Transfer function:
1
s^2 + s
Transfer function:
0.3679 z + 0.
z^2 - 1.368 z + 0.
Sampling time: 1
Determining the output response for example 13.
( )
z z e e
z e e Y z ⎥⋅
⎦
− −
− −
2 1 1
1 1
( )
− −
− −
2 1 1
1 1
z z e e
z e e Yz
Perform long-hand polynomial division and the solution will be of the form
− − − 3 3
2 2
1 Yz a 1 z a z a z
The output sequence observed will then be the coefficients in time …
See MATLAB Chap13_Ex3 impulse response output
Impulse Response
Time (sec)
Amplitude
0 2 4 6 8 10 12 14 16 18 20
0
1 Cont c2d
C2D Conversion of continuous-time models to discrete time.
SYSD = C2D(SYSC,Ts,METHOD) converts the continuous-time LTI model SYSC to a discrete-time model SYSD with sample time Ts. The string METHOD selects the discretization method among the following: 'zoh' Zero-order hold on the inputs 'foh' Linear interpolation of inputs (triangle appx.) 'tustin' Bilinear (Tustin) approximation 'prewarp' Tustin approximation with frequency prewarping. The critical frequency Wc (in rad/sec) is specified as fourth input by SYSD = C2D(SYSC,Ts,'prewarp',Wc) 'matched' Matched pole-zero method (for SISO systems only). The default is 'zoh' when METHOD is omitted.
For state-space models, [SYSD,G] = C2D(SYSC,Ts,METHOD) also returns a matrix G that maps continuous initial conditions into discrete initial conditions. Specifically, if x0,u0 are initial states and inputs for SYSC, then equivalent initial conditions for SYSD are given by xd[0] = G * [x0;u0], ud[0] = u.
See also D2C, D2D, LTIMODELS.
Overloaded methods help zpk/c2d.m help tf/c2d.m help ss/c2d.m help lti/c2d.m help frd/c2d.m
Using C2D
sysc=tf(1,[1 0])
sysd1=c2d(sysc,1)
sysd2=c2d(sysc,0.5)
sysd3=c2d(sysc,0.25)
sysd4=c2d(sysc,0.125)
step(sysc,sysd1,sysd2,sysd3,sysd4)
Transfer function: 1
z - 1
Sampling time: 1
Transfer function:
z - 1
Sampling time: 0.
Transfer function:
z - 1
Sampling time: 0.
Transfer function:
z – 1
Note: Remember the 1/T from before?
0 1 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
6
7
8
9
10
Step Response
Time (sec)
Amplitude
Z-Domain Operations for the Closed Loop
From the previous example, we see an input to output relationship with a corresponding
transformation as seen in continuous time systems. Therefore, we use (b) to represent
processing of the digitized signal r(t) from (a) below.
The discrete feedback equation:
Gz
Rz
Yz
Note: If a discrete system is driving a continuous time system, the goal of a discrete time
representation is to provide the same result as the continuous time system at the sampling
points. It will not describe the behavior of the continuous time signal between the
sampling points.
Example 13.
Response of a closed loop system.
Express the known plant transform function
s s
G (^) p s
Model the system as a discrete time implementation (using Table 13.1)
( ) ( ) ( )
2 1 1
1 1
1
1 1
− −
− −
−
− −
z z e e
z e e
z z e
z e e Gz
G z
Rz
Yz
p
p
( )
( )
( )
2 1 1 1 1
1 1
2 1 1
1 1
2 1 1
1 1
− − − −
− −
− −
− −
− −
− −
z z e e z e e
z e e
z z e e
z e e
z z e e
z e e
Rz
Y z
2 1
1 1
−
− −
z z e
z e e
Rz
Yz