Main Content

dsp.SubbandAnalysisFilter

Decompose signal into high-frequency and low-frequency subbands

Description

The dsp.SubbandAnalysisFilter object decomposes a signal into high-frequency and low-frequency subbands, each with half the bandwidth of the input.

To decompose a signal into high-frequency and low-frequency subbands:

  1. Create the dsp.SubbandAnalysisFilter object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

subAna = dsp.SubbandAnalysisFilter returns a two-channel subband analysis filter, subAna, that decomposes the input signal into a high-frequency subband and a low-frequency subband, each with half the bandwidth of the input.

subAna = dsp.SubbandAnalysisFilter(lpc,hpc) returns a two-channel subband analysis filter, subAna, with the LowpassCoefficients property set to lpc and the HighpassCoefficients property set to lpc.

example

subAna = dsp.SubbandAnalysisFilter(Name,Value) returns a two-channel subband analysis filter, subAna, with each specified property set to the specified value.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Specify a vector of lowpass FIR filter coefficients, in descending powers of z. For the lowpass filter, use a half-band filter that passes the frequency band stopped by the filter specified in the HighpassCoefficients property. The default values of this property specify a filter based on a third-order Daubechies wavelet.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Specify a vector of highpass FIR filter coefficients, in descending powers of z. For the highpass filter, use a half-band filter that passes the frequency band stopped by the filter specified in the LowpassCoefficients property. The default values of this property specify a filter based on a third-order Daubechies wavelet.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Fixed-Point Properties

Specify whether to use full precision rules. If you set FullPrecisionOverride to true, which is the default, the object computes all internal arithmetic and output data types using full precision rules. These rules provide the most accurate fixed-point numerics. It also turns off the display of other fixed-point properties because they do not apply individually. These rules guarantee that no quantization occurs within the object. Bits are added, as needed, to ensure that no roundoff or overflow occurs. If you set FullPrecisionOverride to false, fixed-point data types are controlled through individual fixed-point property settings. For more information, see Full Precision for Fixed-Point System Objects.

Data Types: logical

Specify the rounding method.

Dependencies

This property applies only if the object is not in full precision mode.

Specify the overflow action as Wrap or Saturate.

Dependencies

This property applies only if the object is not in full precision mode.

Specify the FIR filter coefficients fixed-point data type as Same word length as input or Custom.

Specify the FIR filter coefficients fixed-point type as a numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the CoefficientsDataType property to Custom.

Specify the product data type as one of Full precision | Same as input | Custom.

Specify the product fixed-point type as a scaled numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the ProductDataType property to Custom.

Specify the accumulator data type as Full precision, Same as input, Same as product, or Custom.

Specify the accumulator fixed-point type as a scaled numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the AccumulatorDataType property to Custom.

Specify the output data type as Same as accumulator, Same as product, Same as input, or Custom.

Specify the output fixed-point type as a scaled numerictype (Fixed-Point Designer) object with a Signedness of Auto.

Dependencies

This property applies only when you set the OutputDataType property to Custom.

Usage

Description

[hi,lo] = subAna(x) decomposes the input signal, x, into a high-frequency subband, hi, and a low-frequency subband, lo.

example

Input Arguments

expand all

Data input, specified as a column vector or a matrix size P-by-Q. The number of input rows P can be arbitrary and does not have to be even.

This object supports variable-size input signals, that is, the frame length (number of rows) of the signal can change even when the object is locked. However, the number of channels (columns) must remain constant.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fi
Complex Number Support: Yes

Output Arguments

expand all

High-frequency subband, returned as a column vector or a matrix.

When the input is of size P-by-Q, and P is not even, the high-frequency subband output has an upper bound size of ceil(P/2)-by-Q. If P is even, then the output is of size (P/2)-by-Q. The number of channels (columns) does not change.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fi
Complex Number Support: Yes

Low-frequency subband, returned as a column vector or a matrix.

When the input is of size P-by-Q, and P is not even, the low-frequency subband output has an upper bound size of ceil(P/2)-by-Q. If P is even, then the output is of size (P/2)-by-Q. The number of channels (columns) does not change.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fi
Complex Number Support: Yes

Object Functions

To use an object function, specify the System object™ as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

Decompose a signal into low frequency and high frequency subbands using the subband analysis filter. Reconstruct the signal using the subband synthesis filter.

load dspwlets; % load the filter coefficients lod, hid, lor and hir
subAna = dsp.SubbandAnalysisFilter(lod, hid);
subSynth = dsp.SubbandSynthesisFilter(lor, hir);
u = randn(128,1);

[hi, lo] = subAna(u); % Two channel analysis
y = subSynth(hi, lo); % Two channel synthesis

Plot difference between original and reconstructed signals with filter latency compensated.

plot(u(1:end-7)-y(8:end));

Figure contains an axes object. The axes object contains an object of type line.

Algorithms

This object implements the algorithm, inputs, and outputs described on the Two-Channel Analysis Subband Filter block reference page. The object properties correspond to the block parameters, except:

  • The SubbandAnalysisFilter object does not have a property that corresponds to the Input processing parameter of the Two-Channel Analysis Subband Filter block. The object assumes the input is frame based and always maintains the input frame rate.

  • The Rate options block parameter is not supported by the dsp.SubbandAnalysisFilter object.

Extended Capabilities

Version History

Introduced in R2012a

expand all