Two-Channel Synthesis Subband Filter - Reconstruct signal from high-frequency subband and low-frequency subband

Library

Filtering / Multirate Filters

dspmlti4

Description

The Two-Channel Synthesis Subband Filter block reconstructs a signal from its high-frequency subband and low-frequency subband, each with half the bandwidth and half the sample rate of the original signal. Use this block to reconstruct signals decomposed by the Two-Channel Analysis Subband Filter block.

The block upsamples the high- and low-frequency subbands by 2, and then filters the results with a pair of highpass and lowpass FIR filters, as illustrated in the following figure.

Note that the block implements the FIR filtering and downsampling steps together using a polyphase filter structure, which is more efficient than the straightforward interpolate-then-filter algorithm illustrated above.

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. To use this block to reconstruct the output of a Two-Channel Analysis Subband Filter block, the filters in this block must be designed to perfectly reconstruct the outputs of the analysis filters.

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. To use this block to reconstruct the output of a Two-Channel Analysis Subband Filter block, the filters in this block must be designed to perfectly reconstruct the outputs of the analysis filters.

The best way to design perfect reconstruction filters is to use the Wavelet Toolbox wfilters function for the filters in both this block and in the corresponding Two-Channel Analysis Subband Filter block. You can also use Filter Design Toolbox functions and Signal Processing Toolbox functions. 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 any two M-by-N sample-based matrices with the same sample rates. The block treats each M-by-N matrix as MxN independent subbands, where MxN is the product of the matrix dimensions. Each matrix element is the high- or low-frequency subband of the corresponding channel in the output matrix. The input to the topmost input port should contain the high-frequency subbands.

Sample-Based Outputs

Given valid sample-based inputs, the block outputs one sample-based matrix with the same dimensions as the inputs. The output sample rate is twice that of the input. Each element of the output is a single channel, reconstructed from the corresponding elements in each input matrix. Depending on the Simulink configuration parameters, some sample-based outputs can have one sample of latency, as described in Latency.

Frame-Based Operation

Valid Frame-Based Inputs

The block accepts any two M-by-N frame-based matrices with the same frame rates. The block treats each input column as the high- or low-frequency subbands of the corresponding output channel. The input to the topmost input port should contain the high-frequency subbands.

Frame-Based Outputs

Given valid frame-based inputs, the block outputs a frame-based matrix. Each output column is a single channel, reconstructed from the corresponding columns in each input matrix.

The sample rate of the output is twice that of the input. The Framing parameter sets whether the block doubles the sample rate by doubling the output frame size, or doubling 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:

Amount of Block Latency for All Possible Block Settings

InputLatencyNo Latency

Sample based

One sample of latency when the Tasking mode for periodic sample times parameter is set to MultiTasking or Auto in the Solver pane of the Configuration Parameters dialog box. The first output sample of each channel is always 0.

The Tasking mode for periodic sample times parameter is set to SingleTasking in the Solver pane of the Configuration Parameters dialog box.

Frame based

One frame of latency when the Framing parameter is set to Maintain input frame size. The first output frame is always all zeros.

The Framing parameter is set to Maintain input frame rate.

Creating Multilevel Dyadic Synthesis Filter Banks

The Two-Channel Synthesis Subband Filter block is the basic unit of a dyadic synthesis 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 synthesis filter banks, see the Dyadic Synthesis Filter Bank block reference page.

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 the previous table, 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 Synthesis Subband Filter blocks, it is faster and requires less memory to use the Dyadic Synthesis Filter Bank block. In particular, use the Dyadic Synthesis Filter Bank block to reconstruct a frame-based signal (with frame size a multiple of 2n) from 2n or n+1 subbands whose properties match those of the Dyadic Analysis Filter Bank block's outputs. These properties are described in the Dyadic Analysis Filter Bank reference page.

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

Fixed-Point Data Types

The Two-Channel Synthesis Subband Filter block is comprised of two FIR Interpolation blocks as shown in the following diagram.

For fixed-point signals, you can set the coefficient, product output, accumulator, and output data types used in the FIR Interpolation blocks as discussed in Dialog Box below. For a diagram showing the usage of these data types within the FIR blocks, see the FIR Interpolation block reference page.

In addition, the inputs to the Sum block in the diagram above are accumulated using the accumulator data type. The output of the Sum block is then cast from the accumulator data type to the output data type. Therefore the output of the Two-Channel Synthesis Subband Filter block is in the output data type. You also set these data types in the block dialog as discussed in Dialog Box below.

Examples

See the following Signal Processing Blockset demos, which use the Two-Channel Synthesis Subband Filter block:

Dialog Box

The Main pane of the Two-Channel Synthesis Subband Filter block dialog appears as follows.

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. To use this block to reconstruct the output of a Two-Channel Analysis Subband Filter block, you must design the filters in this block to perfectly reconstruct the outputs of the analysis filters. 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. To use this block to reconstruct the output of a Two-Channel Analysis Subband Filter block, you must design the filters in this block to perfectly reconstruct the outputs of the analysis filters. For more information, see Specifying the FIR Filters.

Framing

Select the method by which to implement the interpolation for frame-based inputs:

Select Maintain input frame size to double the output frame rate

Select Maintain input frame rate to double the output frame size

For more information, see Frame-Based Operation. Some settings of this parameter causes the block to have nonzero latency, as described in Latency.

The Fixed-point pane of the Two-Channel Synthesis Subband Filter block dialog appears as follows.

Round mode

Select the rounding mode for fixed-point operations. The filter coefficients do not obey this parameter; they always round to Nearest.

Overflow mode

Select the overflow mode for fixed-point operations. The filter coefficients do not obey this parameter; they are always saturated.

Coefficients

Choose how you specify the word length and the fraction length of the FIR filter coefficients:

When you select Same word length as input, the word length of the filter coefficients match that of the input to the block. In this mode, the fraction length of the coefficients is automatically set to the binary-point only scaling that provides you with the best precision possible given the value and word length of the coefficients.

When you select Specify word length, you can enter the word length of the coefficients, in bits. In this mode, the fraction length of the coefficients is automatically set to the binary-point only scaling that provides you with the best precision possible given the value and word length of the coefficients.

When you select Binary point scaling, you can enter the word length and the fraction length of the coefficients, in bits.

When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the coefficients. This block requires power-of-two slope and a bias of zero.

The filter coefficients do not obey the Rounding mode and the Overflow mode parameters; they are always saturated and rounded to Nearest.

Product output

Use this parameter to specify how you would like to designate the product output word and fraction lengths. See Fixed-Point Data Types of the FIR Interpolation reference page and Multiplication Data Types for illustrations depicting the use of the product output data type in the FIR Interpolation blocks of this block:

When you select Inherit via internal rule, the product output word length and fraction length are calculated automatically. For information about how the product output word and fraction lengths are calculated when an internal rule is used, see Inherit via Internal Rule.

When you select Same as input, these characteristics match those of the input to the block.

When you select Binary point scaling, you can enter the word length and the fraction length of the product output, in bits.

When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the product output. This block requires power-of-two slope and a bias of zero.

Accumulator

As depicted above, inputs to the accumulator are cast to the accumulator data type. The output of the adder remains in the accumulator data type as each element of the input is added to it. Use this parameter to specify how you would like to designate this accumulator word and fraction lengths.

You also use this parameter to specify the accumulator word and fraction lengths resulting from a complex-complex multiplication in the FIR Interpolation blocks in this block. See Multiplication Data Types for more information:

When you select Inherit via internal rule, the accumulator word length and fraction length are calculated automatically. For information about how the accumulator word and fraction lengths are calculated when an internal rule is used, see Inherit via Internal Rule.

When you select Same as product output, these characteristics match those of the product output

When you select Same as input, these characteristics match those of the input to the block.

When you select Binary point scaling, you can enter the word length and the fraction length of the accumulator, in bits.

When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the accumulator. This block requires power-of-two slope and a bias of zero.

Output

Choose how you specify the output word length and fraction length of the FIR Interpolation blocks, as well as of the final overall filter output:

When you select Same as accumulator, these characteristics match those of the accumulator.

A special case occurs when Inherit via internal rule is specified for Accumulator, and block inputs and coefficients are complex. In that case, the output word length is one less than the accumulator word length.

When you select Same as product output, these characteristics match those of the product output

When you select Same as input, these characteristics match those of the input to the block.

When you select Binary point scaling, you can enter the word length and the fraction length of the output, in bits.

When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the output. This block requires power-of-two slope and a bias of zero.

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

See Also

Dyadic Synthesis Filter BankSignal Processing Blockset
FIR InterpolationSignal Processing Blockset
Two-Channel Analysis Subband FilterSignal Processing Blockset
fir1Signal Processing Toolbox
fir2Signal Processing Toolbox
firlsSignal Processing Toolbox
wfiltersWavelet Toolbox

For related information, see Multirate Filters.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS