DSP Blockset    
Two-Channel Analysis Subband Filter

Decompose a signal into a high-frequency subband and a low-frequency subband

Library

Filtering / Multirate Filters

Description

The Two-Channel Analysis Subband Filter block decomposes the input into a high-frequency subband and a low-frequency subband, each with half the bandwidth and half the sample rate of the input.

The block filters the input with a pair of highpass and lowpass FIR filters, and then downsamples the results by 2, as illustrated in the following figure.

Note the block implements the FIR filtering and downsampling steps together using a polyphase filter structure, which is more efficient than the straightforward filter-then-decimate algorithm illustrated above. Each subband is the first phase of the respective polyphase filter.

You must provide the vector of filter coefficients for the two filters. Each filter should be a half-band filter that passes the frequency band that the other filter stops. For frame-based inputs, you also need to specify whether the change in the sample rate of the output gets reflected by a change in the frame size, or the frame rate.

See other sections of this reference page for more information.

Sections of This Reference Page

Specifying the FIR Filters

You must provide the vector of numerator coefficients for the lowpass and highpass filters in the Lowpass FIR filter coefficients and Highpass FIR filter coefficients parameters.

For example, to specify a filter with the following transfer function, enter the vector [b(1) b(2) ... b(m)].

Each filter should be a half-band filter that passes the frequency band that the other filter stops. If you plan to use the Two-Channel Synthesis Subband Filter block to reconstruct the input to this block, you will need to design perfect reconstruction filters to use in the synthesis subband filter.

The best way to design perfect reconstruction filters is to use the wfilters function in the Wavelet Toolbox to design both the filters in both this block, and the filters in the Two-Channel Synthesis Subband Filter block. You can also use functions from the Filter Design Toolbox and Signal Processing Toolbox. To learn how to design your own perfect reconstruction filters, see References.

The block initializes all filter states to zero.

Sample-Based Operation

Valid Sample-Based Inputs.   The block accepts all M-by-N sample-based matrix inputs. The block treats such inputs as  independent channels, and decomposes each channel over time.

Sample-Based Outputs.   Given a sample-based M-by-N input, the block outputs two M-by-N sample-based matrices whose sample rates are half the input sample rate. Each output matrix element is the high- or low-frequency subband output of the corresponding input matrix element. Depending on the Simulink simulation parameters, some sample-based outputs may have one sample of latency, as described in Latency.

Frame-Based Operation

Valid Frame-Based Inputs.   The block accepts M-by-N frame-based matrix inputs where M is a multiple of two. The block treats such inputs as N independent channels, and decomposes each channel over time.

Frame-Based Outputs.   Given a valid frame-based input, the block outputs two frame-based matrices. Each output column is the high- or low-frequency subband of the corresponding input column.

The sample rate of the outputs are half that of the input. The Framing parameter sets whether the block halves the sample rate by halving the output frame size, or halving the output frame rate:

Latency

In some cases, the block has nonzero tasking latency, which means that there is a constant delay between the time that the block receives an input, and produces the corresponding output, as summarized below and in the following table:

For more information about block rates and the Simulink tasking modes, see Excess Algorithmic Delay (Tasking Latency) and the topic on the Simulation Parameters dialog box in the Simulink documentation.

Table 7-20: Amount of Block Latency for All Possible Block Settings
Input
Latency
No Latency
Sample-based
One sample of latency when Mode = MultiTasking or Auto in the Simulation Parameters dialog (Ctrl + E). First output sample of each channel is always 0.
Mode = SingleTasking in the Simulation Parameters dialog (Ctrl + E).
Frame-based
One frame of latency when
Framing = Maintain input frame size. First output frame is always all zeros.
Framing = Maintain input frame rate

Creating Multilevel Dyadic Analysis Filter Banks

The Two-Channel Analysis Subband Filter block is the basic unit of a dyadic analysis filter bank. You can connect several of these blocks to implement an n-level filter bank, as illustrated in the following figure. (For a review of dyadic analysis filter banks, see Review of Dyadic Analysis Filter Banks in the Dyadic Analysis Filter Bank reference page.)

In some cases, rather than connecting several Two-Channel Analysis Subband Filter blocks, it is more efficient (faster and requires less memory) to use the Dyadic Analysis Filter Bank block. In particular, use the Dyadic Analysis Filter Bank block when you want to decompose a frame-based signal with frame size a multiple of 2n into n+1 or 2n subbands. In all other cases, use Two-Channel Analysis Subband Filter blocks to implement your filter banks.

The Dyadic Analysis Filter Bank block allows you to specify the filter bank filters by providing vectors of filter coefficients, just as this block does. The Dyadic Analysis Filter Bank block provides an additional option of using wavelet-based filters that the block designs by using a wavelet you specify.

Examples

See the following DSP Blockset demos, which use the Two-Channel Analysis Subband Filter block:

Dialog Box

Lowpass FIR filter coefficients
A vector of lowpass FIR filter coefficients, in descending powers of z. The lowpass filter should be a half-band filter that passes the frequency band stopped by the filter specified in the Highpass FIR filter coefficients parameter. The default values of this parameter specifies a filter based on a 3rd-order Daubechies wavelet. If you plan to use the Two-Channel Synthesis Subband Filter block to reconstruct the input to this block, you will need to design perfect reconstruction filters to use in the synthesis subband filter. For more information, see Specifying the FIR Filters.
Highpass FIR filter coefficients
A vector of highpass FIR filter coefficients, in descending powers of z. The highpass filter should be a half-band filter that passes the frequency band stopped by the filter specified in the Lowpass FIR filter coefficients parameter. The default values of this parameter specifies a filter based on a 3rd-order Daubechies wavelet. If you plan to use the Two-Channel Synthesis Subband Filter block to reconstruct the input to this block, you will need to design perfect reconstruction filters to use in the synthesis subband filter. For more information, see Specifying the FIR Filters.
Framing
For frame-based inputs, the method by which to implement the decimation: by halving the output frame rate (Maintain input frame size), or halving the output frame size (Maintain input frame rate). For more information, see Frame-Based Operation. Some settings of this parameter causes the block to have nonzero latency, as described in Latency.

References

Fliege, N. J. Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets. West Sussex, England: John Wiley & Sons, 1994.

Strang, G. and T. Nguyen. Wavelets and Filter Banks. Wellesley, MA: Wellesley-Cambridge Press, 1996.

Vaidyanathan, P. P. Multirate Systems and Filter Banks. Englewood Cliffs, NJ: Prentice Hall, 1993.

Supported Data Types

To learn how to convert to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.

See Also

Dyadic Analysis Filter Bank
DSP Blockset
Two-Channel Synthesis Subband Filter
DSP Blockset
fir1
Signal Processing Toolbox
fir2
Signal Processing Toolbox
firls
Signal Processing Toolbox
remez
Signal Processing Toolbox

For related information, see Multirate Filters. Also see Filtering for a list of all DSP Blockset filtering blocks.


  Triggered To Workspace Two-Channel Synthesis Subband Filter