Digital Signal Processing Reference
In-Depth Information
having ROC:
> 0 . 9. We'll be using values of z lying on the unit circle, which is in the ROC. We thus
use the following code (where we rename num as den ):
CoeffVec = [1, -1.27, 0.81];
SR = 256; zVec = exp(j*pi*(0:1/SR:1));
nzCoef = find(abs(CoeffVec) > 0); den = zeros(1,length(zVec));
for Ctr = 1:1:length(nzCoef )
AnsThisCoeff = CoeffVec(nzCoef(Ctr))*(zVec.ˆ (-nzCoef(Ctr)+1));
den = den + AnsThisCoeff; end
den = 1./den;
figure(777); plot(abs(den))
A script (see exercises below) which evaluates the magnitude of a generalized z -transform using
the efficient code of the examples above for sparse coefficient vectors and which generates a 3-D plot is
|
z
|
LV xP lotZXf ormMagCoeff (NumCoeff V ec,
...DenCoeff V ec, rLim, Optr 0 ,NSamps)
This script, which is intended for use with z -transforms having their ROCs lying outside a circle
of radius equal to the magnitude of the largest pole of the z -transform, plots the magnitude of a z -
transform that is supplied as a Numerator Coefficient Vector ( NumCoeffVec ), a Denominator Coefficient
Vector ( DenomCoeffVec ), the desired number of circular contours to use ( rLim ), an optional initial contour
radius, Optr0 (pass as [] if not used), and NSamps , the number of frequency samples to use. When
evaluating an FIR, pass DenCoeffVec as [1].
We can generate a 3-D plot of the magnitude of the z -transform of an eight-sample rectangular
impulse response, as shown in Fig. 2.15 by making the call
LVxPlotZXformMagCoeff([1,1,1,1,1,1,1,1],[1],1,1,512)
Positive frequencies are represented by angles between 0 (normalized frequency 0) and 180 degrees
(normalized frequency 1.0, or radian frequency π ), measured counter-clockwise relative to the positive
real axis. Negative frequencies are represented by angles between 0 and -180 degrees, or equivalently,
between 180 and 360 degrees relative to the positive real axis.
Example 2.35. Evaluate the z-transform of an eight-point rectangular impulse response along contours
within the unit circle.
The call
LVxPlotZXformMagCoeff([1,1,1,1,1,1,1,1],[1],30,0.95,512)
yields a figure which shows a surface formed by taking the z -transform magnitude along many circular
contours in the z -plane, starting at radius 0.95 and moving outward to about radius 1.5, as shown in
Fig. 2.16. A finite impulse response, which is often said to contribute only zeros to a transfer function,
nonetheless has L
1 trivial poles at the origin of the complex plane ( L is the impulse response length),
which drive the value of the z -transform to infinity at the origin, as can readily be inferred by inspection
of Fig. 2.16. The plot in Fig. 2.16 was generated by evaluating the z -transform at a limited number of
points along a limited number of circular contours; as a result, fine structure, if any, between the evaluation
points will be lost.
Search WWH ::




Custom Search