Contents

mfilt.iirwdfdecim

IIR wave digital filter decimator

Syntax

hm = mfilt.iirwdfdecim(c1,c2,...)

Description

hm = mfilt.iirwdfdecim(c1,c2,...) constructs an IIR wave digital decimator given the coefficients specified in the cell arrays c1, c2, and so on. The IIR decimator hm is a polyphase IIR filter where each phase is a cascade wave digital allpass IIR filter.

Each cell array ci contains a set of vectors representing a cascade of allpass sections. Each element in one cell array is one section. For more information about the contents of each cell array, refer to dfilt.cascadewdfallpass. The contents of the cell arrays are the same for both filter constructors and mfilt.iirwdfdecim interprets them same way as mfilt.cascadewdfallpass.

The following exception applies to interpreting the contents of a cell array — if one of the cell arrays ci contains only one vector, and that vector comprises a series of 0s and one element equal to 1, that cell array represents a dfilt.delay section with latency equal to the number of zeros, rather than a dfilt.cascadewdfallpass section. This exception occurs with quasi-linear phase IIR decimators.

Usually you do not construct IIR wave digital filter decimators explicitly. Instead, you obtain an IIR wave digital filter decimator as a result of designing a halfband decimator. The first example in the following section illustrates this case.

Examples

Design an elliptic halfband decimator with a decimation factor equal to 2. Both examples use the iirwdfdecim filter structure (an input argument to the design method) to design the final decimator.

The first portion of this example generates a filter specification object d that stores the specifications for the decimator.

tw  = 100;  % Transition width of filter to design, 100 Hz.
ast = 80;   % Stopband attenuation of filter 80 dB.
fs  = 2000; % Sampling frequency of the input signal.
m   = 2;    % Decimation factor. 
d = fdesign.decimator(m,'halfband','tw,ast',tw,ast,fs);

Now perform the actual design using d. Filter object hm is an mfilt.iirwdfdecim filter.

Hm = design(d,'ellip','FilterStructure','iirwdfdecim');
% Note that realizemdl requires Simulink
realizemdl(hm)     % Build model of the filter.

Design a linear phase halfband decimator for decimating a signal by a factor of 2.

tw  = 100;  % Transition width of filter, 100 Hz.
ast = 60;   % Filter stopband attenuation = 80 dB
fs  = 2000; % Input signal sampling frequency.
m   = 2;    % Decimation factor.
d = fdesign.decimator(m,'halfband','tw,ast',tw,ast,fs);

Use d to design the final filter hm, an mfilt.iirwdfdecim object.

hm = design(d,'iirlinphase','filterstructure',...
'iirwdfdecim');
% Note that realizemdl requires Simulink
realizemdl(hm)     % Build model of the filter.

The models that realizemdl returns for each example appear below. At this level, the realizations of the filters are identical. The differences appear in the subsystem blocks Phase1 and Phase2.

This is the Phase1 subsystem from the halfband model.

Phase1 subsystem from the linear phase model is less revealing—an allpass filter.

Was this topic helpful?