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? (MATLAB).

Creation

Syntax

subAna = dsp.SubbandAnalysisFilter
subAna = dsp.SubbandAnalysisFilter(lpc,hpc)
subAna = dsp.SubbandAnalysisFilter(Name,Value)

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.

example

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.

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 (MATLAB).

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 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 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 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 object with a Signedness of Auto.

Dependencies

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

Usage

For versions earlier than R2016b, use the step function to run the System object™ algorithm. The arguments to step are the object you created, followed by the arguments shown in this section.

For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Syntax

[hi,lo] = subAna(x)

Description

example

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

Input Arguments

expand all

Data input, specified as a column vector or a matrix. The number of rows in the input must be an even number.

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. The number of rows in this output is half the number of input rows.

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. The number of rows in this output is half the number of input rows.

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

expand all

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).

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));

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

Introduced in R2012a