TwoChannel Synthesis Subband Filter
Reconstruct signal from highfrequency and lowfrequency subbands
Libraries:
DSP System Toolbox /
Filtering /
Multirate Filters
Description
The TwoChannel Synthesis Subband Filter block reconstructs a signal from its highfrequency and lowfrequency subbands, each with half the bandwidth and half the sample rate of the original signal. Use this block to reconstruct signals decomposed by the TwoChannel Analysis Subband Filter block.
The block upsamples the high and lowfrequency subbands by 2, and then filters the results with a pair of highpass and lowpass FIR filters, as shown in this figure.
The block implements the FIR filtering and downsampling steps together using a polyphase filter structure, which is more efficient than the interpolatethenfilter algorithm shown in the preceding figure. You can implement a multilevel dyadic synthesis filter bank by connecting multiple copies of this block or by using the Dyadic Synthesis Filter Bank block. For more information, see Creating Multilevel Dyadic Synthesis Filter Banks.
You must provide a vector of filter coefficients for the lowpass and highpass FIR filters. Each filter should be a halfband filter that passes the frequency band that the other filter stops. You can use this block to reconstruct the output of a TwoChannel Analysis Subband Filter block. To do so, you must design the filters in this block such that they perfectly reconstruct the outputs of the analysis filters.
Ports
Input
Hi band — Highfrequency subband
vector  matrix
Specify the highfrequency subband as a vector or a matrix. Both the highfrequency subband and the lowfrequency subbands must have the same size and data type.
When the input is fixedpoint, it must be signed only.
Data Types: single
 double
 int8
 int16
 int32
 fixed point
Complex Number Support: Yes
Lo band — Lowfrequency subband
vector  matrix
Specify the lowfrequency subband as a vector or a matrix. Both the highfrequency subband and the lowfrequency subbands must have the same size and data type.
When the input is fixedpoint, it must be signed only.
Data Types: single
 double
 int8
 int16
 int32
 fixed point
Complex Number Support: Yes
Output
Output 1 — Synthesized output
vector  matrix
The block returns the synthesized output as a vector or a matrix. The number of rows in the output is the sum of the number of rows of the input signals.
Data Types: single
 double
 int8
 int16
 int32
 fixed point
Complex Number Support: Yes
Parameters
Main Tab
Lowpass FIR filter coefficients — Lowpass FIR filter coefficients
[0.3327 0.8069 0.4599 0.1350 0.0854
0.0352]
(default)
A vector of lowpass FIR filter coefficients, in descending powers of z. The lowpass filter should be a halfband 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 TwoChannel 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 Specify FIR Filters.
Highpass FIR filter coefficients — Highpass FIR filter coefficients
[0.0352 0.0854 0.1350 0.4599 0.8069
0.3327]
(default)
A vector of highpass FIR filter coefficients, in descending powers of z. The highpass filter should be a halfband 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 TwoChannel 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 Specify FIR Filters.
Input processing — Input processing
Columns as channels (frame
based)
(default)  Elements as channels (sample
based)
Specify how the block should process the input. You can set this parameter to one of the following options:
Columns as channels (frame based)
(default) — When you select this option, the block treats each column of the input as a separate channel.Elements as channels (sample based)
— When you select this option, the block treats each element of the input as a separate channel.
For more information, see FrameBased Processing and SampleBased Processing.
Rate options — Rate options
Enforce singlerate
processing
(default)  Allow multirate processing
Specify the rate processing rule for the block. You can set this parameter to one of the following options:
Enforce singlerate processing
— When you select this option, the block treats each column of the input as an independent channel and reconstructs each channel over time. The output has the same sample rate as the input, but the output frame size is twice that of the input frame size. To select this option, you must set the Input processing parameter toColumns as channels (frame based)
.Allow multirate processing
— When you select this option, the input and output of the block are the same size, but the sample rate of the output is twice that of the input.
Some settings of this parameter cause the block to have nonzero latency. See Latency for more information.
Data Types Tab
Rounding mode — Rounding mode
Floor
(default)  Ceiling
 Convergent
 Nearest
 Round
 Simplest
 Zero
Select the rounding
mode for fixedpoint operations. The filter coefficients do
not obey this parameter; they always round to
Nearest
.
Note
The Rounding mode and Saturate on integer overflow settings have no effect on numerical results when all the following conditions exist:
Product output is
Inherit: Inherit via internal rule
Accumulator is
Inherit: Inherit via internal rule
Output is
Inherit: Same as accumulator
With these data type settings, the block effectively operates in fullprecision mode.
Saturate on integer overflow — Saturate on integer overflow
off
(default)  on
When you select this parameter, the block saturates the result of its
fixedpoint operation. When you clear this parameter, the block wraps
the result of its fixedpoint operation. For details on
saturate
and wrap
, see overflow
mode for fixedpoint operations.
Note
The Rounding mode and Saturate on integer overflow parameters have no effect on numeric results when all these conditions are met:
Product output data type is
Inherit: Inherit via internal rule
.Accumulator data type is
Inherit: Inherit via internal rule
.
With these data type settings, the block operates in fullprecision mode.
Coefficients — Data type of the coefficients
Inherit: Same word length as
input
(default)  fixd(1,16)
 fixd(1,16,0)
Specify the coefficients data type. See FixedPoint Data Types and Multiplication Data Types for illustrations depicting the use of the coefficients data type in this block. You can set it to:
A rule that inherits a data type, for example,
Inherit: Same word length as input
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Coefficients parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
Coefficients Minimum — Minimum value of filter coefficients
[]
(default)  scalar
Specify the minimum value of the filter coefficients. The default value is
[]
(unspecified). Simulink^{®} software uses this value to perform automatic scaling of
fixedpoint data types.
Coefficients Maximum — Maximum value of filter coefficients
[]
(default)  scalar
Specify the maximum value of the filter coefficients. The default value is
[]
(unspecified). Simulink software uses this value to perform automatic scaling of
fixedpoint data types.
Product output — Product output data type
Inherit: Inherit via internal
rule
(default)  Inherit: Same as input
 fixd(1,16,0)
Specify the product output data type. See FixedPoint Data Types and Multiplication Data Types for illustrations depicting the use of the product output data type in this block. You can set it to:
A rule that inherits a data type, for example,
Inherit: Inherit via internal rule
. For more information on this rule, see Inherit via Internal Rule.Note
The actual product output word length can be equal to or greater than the calculated ideal product output word length, depending on the settings on the Hardware Implementation pane of the Configuration Parameters dialog box.
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Product output parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
Accumulator — Data type of accumulator
Inherit: Inherit via internal
rule
(default)  Inherit: Same as input
 Inherit: Same as product output
 fixd(1,16,0)
Specify the accumulator data type. See FixedPoint Data Types for illustrations depicting the use of the accumulator data type in this block. You can set this parameter to:
A rule that inherits a data type, for example,
Inherit: Inherit via internal rule
. For more information on this rule, see Inherit via Internal Rule.An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Accumulator parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
Output — Data type of output
Inherit: Same as
accumulator
(default)  Inherit: Same as input
 Inherit: Same as product output
 fixd(1,16,0)
Specify the output data type. See FixedPoint Data Types for illustrations depicting the use of the output data type in this block. You can set it to:
A rule that inherits a data type, for example,
Inherit: Same as accumulator
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Output parameter.
See Control Data Types of Signals (Simulink) for more information.
Output Minimum — Output Minimum
[]
(default)  scalar
Specify the minimum value that the block should output. The default
value is []
(unspecified). Simulink software uses this value to perform:
Simulation range checking (see Specify Signal Ranges (Simulink))
Automatic scaling of fixedpoint data types
Output Maximum — Output Maximum
[]
(default)  scalar
Specify the maximum value that the block should output. The default
value is []
(unspecified). Simulink software uses this value to perform:
Simulation range checking (see Specify Signal Ranges (Simulink))
Automatic scaling of fixedpoint data types
Lock data type settings against changes by the fixedpoint tools — Prevent fixedpoint tools from overriding data types
off
(default)  on
Select this parameter to prevent the fixedpoint tools from overriding the data types you specify in the block dialog box.
Block Characteristics
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

More About
Specify 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)]
.
$$H\left(z\right)=B\left(z\right)={b}_{1}+{b}_{2}{z}^{1}+\dots +{b}_{m}{z}^{(m1)}$$
Each filter should be a halfband filter that passes the frequency band that the other filter stops. You can use this block to reconstruct the output of a TwoChannel Analysis Subband Filter block. To do so, you must design the filters in this block such that they 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 TwoChannel Analysis
Subband Filter block. You can also use DSP System Toolbox™ and Signal Processing Toolbox™ functions.
The TwoChannel Synthesis Subband Filter block initializes all filter states to zero.
FrameBased Processing
When you set the Input processing parameter to
Columns as channels (frame based)
, the block accepts
any two MbyN matrices with the same frame
rates. The block treats each column of the input as the high or lowfrequency
subbands of the corresponding output channel. You can use the Rate
options parameter to specify how the block resamples the
input:
When you set the Rate options parameter to
Enforce singlerate processing
, the input to the block can be any two MbyN matrices with the same frame rate. The block treats each input column as the high or lowfrequency subbands of the corresponding output channel. The input to the topmost input port should contain the highfrequency subbands. The block outputs one matrix, where each column is reconstructed from the corresponding columns of each input matrix. The input and output frame rates are the same, but the frame size of the output is twice that of the input.When you set the Rate options parameter to
Allow multirate processing
, the block treats each column of the input as the high or lowfrequency subbands of the corresponding output channel. The input to the topmost input port should contain the highfrequency subbands. The block outputs one matrix, where each column is reconstructed from the corresponding columns of the input matrices. The input and output frame sizes are the same, but the frame rate of the output is twice that of the input. Thus, the overall sample rate of the output is twice that of the input sample rate.In this mode, the block has one frame of latency, as described in the Latency section.
SampleBased Processing
When you set the Input processing parameter to
Elements as channels (sample based)
, the block
accepts any two MbyN matrices with the same
sample rates. The block treats each MbyN
matrix as M · N independent subbands. Each element of the input matrices is the
high or lowfrequency subband of the corresponding channel in the output matrix.
The input to the topmost input port should contain the highfrequency subbands. The
block outputs one matrix with the same dimensions as the input matrices, but a
sample rate that is twice that of the input. The block reconstructs each element of
the output from the corresponding elements in the input matrices.
Depending on the setting of your Simulink configuration parameters, the output may have one sample of latency, as described in the Latency section.
Latency
When you set the Input processing parameter to
Columns as channels (frame based)
and the
Rate options parameter to Enforce singlerate
processing
, the TwoChannel Synthesis Subband
Filter block always has zerotasking latency. Zerotasking
latency means that the block propagates the first input sample
(received at time t= 0) as the first output sample.
When you set the Rate options parameter to Allow
multirate processing
, the TwoChannel Synthesis Subband
Filter block may exhibit latency. The amount of latency depends on the
setting of the Input processing parameter of this block and the
setting of the Simulink
Treat each discrete rate as a separate task configuration
parameter. The following table summarizes the conditions that produce latency when
the block is performing multirate processing.
Input processing  Treat each discrete rate as a separate task  Latency 


Off
 None. 
On
 One sample. The first output sample in each channel always
has a value of  

Off or On
 One frame. All samples in the first output frame have a
value of 
Note
For more information on latency and the Simulink tasking modes, see Excess Algorithmic Delay (Tasking Latency) and TimeBased Scheduling and Code Generation (Simulink Coder).
Creating Multilevel Dyadic Synthesis Filter Banks
The TwoChannel Synthesis Subband Filter block is the basic unit of a dyadic synthesis filter bank. You can connect several of these blocks to implement an nlevel 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. Though the output values differ, both sets of values are valid; the difference arises from changes in latency. See the Latency section for more information about when latency can occur in the TwoChannel Analysis Subband Filter block.
In some cases, rather than connecting several TwoChannel Analysis Subband Filter blocks, you can use the Dyadic Analysis Filter Bank block, which is faster and requires lesser memory. In particular, the Dyadic Analysis Filter Bank block is more efficient under the following conditions:
You are reconstructing a signal from 2^{n} or n+ 1 subbands.
The frame size of the signal you are reconstructing is a multiple of 2^{n}.
The properties of the subbands you are working with match those of the outputs of the Dyadic Analysis Filter Bank block. 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 waveletbased filters that the block designs by using a wavelet you specify.
FixedPoint Data Types
Fixedpoint data types in the TwoChannel Synthesis Subband Filter block.
The TwoChannel Synthesis Subband Filter block is composed of two FIR Interpolation blocks as shown in the following diagram.
For fixedpoint signals, you can set the coefficient, product output, accumulator, and output data types used in the FIR Interpolation blocks as discussed in Parameters. 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 (Simulink) block shown in the previous diagram 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 TwoChannel Synthesis Subband Filter block is in the output data type. You also set these data types in the block dialog box as discussed in the Parameters section.
If the input is fixed point, it must be a signed integer or a signed fixed point value with a poweroftwo slope and zero bias.
References
[1] Fliege, N. J. Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets. West Sussex, England: John Wiley & Sons, 1994.
[2] Strang, G. and T. Nguyen. Wavelets and Filter Banks. Wellesley, MA: WellesleyCambridge Press, 1996.
[3] Vaidyanathan, P. P. Multirate Systems and Filter Banks. Englewood Cliffs, NJ: Prentice Hall, 1993.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Generated code relies on the memcpy
or
memset
function (string.h
) under certain
conditions.
FixedPoint Conversion
Design and simulate fixedpoint systems using FixedPoint Designer™.
If the input is fixed point, it must be a signed integer or a signed fixed point value with a poweroftwo slope and zero bias.
Version History
Introduced before R2006a
See Also
Functions
Blocks
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)