dsp.SubbandSynthesisFilter

Reconstruct signal from high-frequency and low-frequency subbands

Description

The dsp.SubbandSynthesisFilter System object™ reconstructs a signal from high-frequency and low-frequency subbands.

To reconstruct a signal from high-frequency and low-frequency subbands:

  1. Create the dsp.SubbandSynthesisFilter 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

subSyn = dsp.SubbandSynthesisFilter
subSyn = dsp.SubbandSynthesisFilter(lpc,hpc)
subSyn = dsp.SubbandSynthesisFilter(Name,Value)

Description

subSyn = dsp.SubbandSynthesisFilter returns a two-channel subband synthesis filter, subSyn, that reconstructs a signal from its high-frequency subband and low-frequency subband. Each subband contains half the bandwidth of the original signal.

example

subSyn = dsp.SubbandSynthesisFilter(lpc,hpc) returns a two-channel subband synthesis filter, subSyn. The object has the LowpassCoefficients property set to lpc and the HighpassCoefficients property set to hpc.

subSyn = dsp.SubbandSynthesisFilter(Name,Value) returns a two-channel subband synthesis filter, subSyn, 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.

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 Full precision, Same as input, or 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

y = subSyn(hi,lo)

Description

example

y = subSyn(hi,lo) reconstructs a signal from a high-frequency subband, hi, and a low-frequency subband, lo.

Input Arguments

expand all

High-frequency subband, specified as a column vector or a matrix. Both inputs must have the same size and data type.

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

Low-frequency subband, specified as a column vector or a matrix. Both inputs must have the same size and data type.

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

Output Arguments

expand all

Synthesized output, reconstructed 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 | 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 Synthesis Subband Filter block reference page. The object properties correspond to the block parameters, except:

  • The SubbandSynthesisFilter object does not have a property that corresponds to the Input processing parameter of the Two-Channel Synthesis Subband Filter block. The object only performs sample-based processing and always maintains the input frame rate.

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

Extended Capabilities

Introduced in R2012a