| DSP Blockset | ![]() |
Decompose a signal into a high-frequency subband and a low-frequency subband
Library
Filtering / Multirate Filters
Description
| Note By connecting many copies of this block, you can implement a multilevel dyadic analysis filter bank. In some cases, it is more efficient to use the Dyadic Analysis Filter Bank block instead. For more information, see Creating Multilevel Dyadic Analysis Filter Banks. |
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.
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.)
| Note
When you create a filter bank by connecting multiple copies of this block, the output values of the filter bank differ depending on whether there is latency. (See Table 7-20, Amount of Block Latency for All Possible Block Settings,.)
For instance, for frame-based inputs, the filter bank output values differ depending on whether you set the Framing parameter to Maintain input frame rate (no latency), or Maintain input frame size (one frame of latency for every block). Though the output values differ, both sets of values are valid; the difference arises from changes in latency. |
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:
Note
Open the demos using one of the following methods:
By default, the demos open the versions using the Two-Channel Analysis Subband Filter block. You can also see the version of the demos that use the Dyadic Analysis Filter Bank block by clicking the Frame-Based Demo button in the demos. |
Dialog Box
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 | ![]() |