Digital Signal Processing Reference
In-Depth Information
rosZxformVI to a new file name and then modify the m-code in the new VI's MathScript node to allow
all four zeros to be used (see exercises below).
A script for use with MATLAB that performs functions similar to that of the VI above is
ML _ DragZeros
This script, when called, opens a GUI that allows you to select a single zero, a complex conjugate
pair of zeros, or a quad of zeros (a complex conjugate pair and their reciprocals). The magnitude and
phase of the z -transform as well as the real and imaginary parts of the equivalent impulse response are
dynamically plotted as you move the cursor in the z -plane. This script, unlike the VI above, does not
devolve to use of one or two zeros only in certain cases; four zeros are always used to create the FIR
transfer function. Note that the quad of zeros always results in a linear phase characteristic and a real
impulse response that is symmetrical about its midpoint. Phase linearity is of great value and FIRs can
easily be designed having linear phase by ensuring that zeros of the transfer function are either single
real zeros having magnitude 1.0, real pairs having reciprocal magnitudes, complex conjugate pairs having
magnitude 1.0, or quads.
2.6.4 INFINITE IMPULSE RESPONSE (IIR) SINGLE POLE
The single pole IIR's z -transform
1
Y (z)/X(z)
=
pz 1
1
with ROC:
|
z
|
>p (and
|
p
|
< 1) becomes
1
Y (z)/X(z)
=
pe
1
after letting z = e .
Example 2.36. Write several lines of m-code to evaluate and plot the magnitude of the z -transform of
the difference equation
y
[
n
]=
x
[
n
]+
0 . 9 y
[
n
1
]
at 2000 evenly-spaced frequency samples between 0 and 2 π radians.
Initially, a vector of values of z at which to evaluate the z -transform must be formed, and then a
vectorized expression can be written to evaluate the z -transform at all the chosen values of z . We choose
(for this example), to evaluate the z -transform at 2000 values evenly spaced along the unit circle, and thus
write
N = 2000; zarg = 0:2*pi/(N-1):2*pi;
zVec = exp(j*zarg); DenomVec=1-0.9*( zVec.ˆ(-1));
NetzXform = 1./DenomVec;
figure(10001); plot(zarg/pi,abs(NetzXform))
xlabel('Frequency, Units of pi')
 
Search WWH ::




Custom Search