Evaluates the frequency response of a Z-transform.
ZFREQ(b, a, N, Fs, whole)
b |
- |
A series. The numerator (i.e. zero) coefficients in ascending powers of |
||||
a |
- |
A series. The denominator (i.e. pole) coefficients in ascending powers of |
||||
N |
- |
Optional. An integer, the number of output samples, defaults to 2048. |
||||
Fs |
- |
Optional. A real, the sample rate of data. If the rates of the numerator and denominator coefficients are equal, the rate defaults to the coefficient rate, else the rate defaults to 1.0. |
||||
whole |
- |
Optional. An integer or string, the evaluation contour. Valid inputs are:
If whole is a string, the transform is evaluated over the entire unit circle. |
ZFREQ(c, N, Fs, whole)
c |
- |
A series. The system coefficients in cascaded |
||||
N |
- |
Optional. An integer, the number of output samples, defaults to 2048. |
||||
Fs |
- |
Optional. A real, the sample rate of data. Defaults to the rate of the coefficients. |
||||
whole |
- |
Optional. An integer or string, the evaluation contour. Valid inputs are:
If whole is a string, the transform is evaluated over the entire unit circle. |
A complex series.
W1: mag(zfreq({1}, {1, -0.5, 0.6}))
setxlog(w1, 1);setylog(w1, 1);
gridsol;gridhv;scales(2)
W1 contains 2048 uniformly spaced samples of the magnitude of the frequency response of the
The frequency samples range from 0 to 0.5 Hz.
W1: zfreq( {1}, {1, -0.5, 0.6}, 0..1/200..0.5)
Same as the previous example, except the complex response is returned and explicit frequencies (in Hertz) are specified.
W2: zfreq( {1}, {0.5, -0.6} )
Since the leading pole coefficient is not 1.0, the coefficients are assumed to be in difference equation form, i.e. the coefficients represent the system:
The
W1: zfreq( {1}, {1, -0.5, 0.6}, 1024, 1.0, 1 )
Same as the first example, except the 1024 samples of the frequency response are evaluated over the entire unit circle, i.e. the frequency samples range from 0.0 to 1.0 Hz.
ZFREQ uses the FFT method to evaluate the specified number of uniformly spaced samples over the unit circle of a
z |
= |
e jω complex frequency |
N |
= |
number of numerator terms |
M |
= |
number of denominator terms |
This form represents the following difference equation:
If the leading term of the denominator is not 1.0,
or equivalently:
For zfreq(c, N, Fs, whole), the input c is assumed to be a single column of coefficients in cascaded
or equivalently:
where G is the system gain, bk and ak are the filter coefficients for the kth stage.
If c contains 2 columns, the coefficients are assumed to be in direct form, where the first column is b and the second column is a.
ZFREQ returns a complex series. Use MAG or PHASE to obtain the magnitude and/or phase components separately.
See IMPZ to display the impulse response of a
See FREQZ to automatically display the magnitude and phase responses in two separate Windows.