Main Content

dsp.DyadicSynthesisFilterBank

Reconstruct signals from subbands

Description

The dsp.DyadicSynthesisFilterBank System object™ reconstructs signals from subbands with smaller bandwidths and lower sample rates. The filter bank uses a series of highpass and lowpass FIR filters to repeatedly reconstruct the signal.

To reconstruct signals from subbands with smaller bandwidths and lower sample rates:

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

dydsyn = dsp.DyadicSynthesisFilterBank returns a synthesis filter bank, dydsyn, that reconstructs a signal from its subbands with smaller bandwidths and smaller sample rates.

example

dydsyn = dsp.DyadicSynthesisFilterBank(Name,Value) returns a dyadic synthesis filter bank object, with each 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 the type of filter used to determine the highpass and lowpass FIR filters in the filter bank as one of Custom, Haar, Daubechies, Symlets, Coiflets, Biorthogonal, Reverse Biorthogonal, or Discrete Meyer. If you set this property to Custom, the CustomLowpassFilter and CustomHighpassFilter properties specify the filter coefficients. Otherwise, the object uses the wfilters (Wavelet Toolbox) function to construct the filters. Depending on the filter, the WaveletOrder or FilterOrder property might apply. For a list of the supported wavelets, see the following table.

FilterSample Setting for Related Filter Specification PropertiesCorresponding Wavelet Toolbox™ Function Syntax
HaarNonewfilters('haar')
DaubechiesH.WaveletOrder = 4wfilters('db4')
SymletsH.WaveletOrder = 3wfilters('sym3')
CoifletsH.WaveletOrder = 1wfilters('coif1')
BiorthogonalH.FilterOrder = '[3/1]'wfilters('bior3.1')
Reverse BiorthogonalH.FilterOrder = '[3/1]'wfilters('rbior3.1')
Discrete MeyerNonewfilters('dmey')

In order to automatically design wavelet-based filters, install the Wavelet Toolbox product. Otherwise, use the CustomLowpassFilter and CustomHighpassFilter properties to specify lowpass and highpass FIR filters.

Specify a vector of lowpass FIR filter coefficients, in descending powers of z. Use a half-band filter that passes the frequency band stopped by the filter specified in the CustomHighpassFilter property. To perfectly reconstruct a signal decomposed by the dsp.DyadicAnalysisFilterBank object, design the filters in the synthesis filter bank to perfectly reconstruct the outputs of the analysis filter bank. Otherwise, the reconstruction is imperfect. The default values of this property specify a perfect reconstruction filter for the default settings of the analysis filter bank (based on a third-order Daubechies wavelet).

Dependencies

This property applies when you set the Filter property to Custom.

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. Use a half-band filter that passes the frequency band stopped by the filter specified in the CustomLowpassFilter property. To perfectly reconstruct a signal decomposed by the dsp.DyadicAnalysisFilterBank object, design the filters in the synthesis filter bank to perfectly reconstruct the outputs of the analysis filter bank. Otherwise, the reconstruction is imperfect. The default values of this property specify a perfect reconstruction filter for the default settings of the analysis filter bank (based on a third-order Daubechies wavelet).

Dependencies

This property applies when you set the Filter property to Custom.

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

Specify the order of the wavelet selected in the Filter property.

Dependencies

This property applies when you set the Filter property to an orthogonal wavelet: Daubechies (Daubechies extremal phase), Symlets (Daubechies least-asymmetric), or Coiflets.

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

Specify the order of the wavelet for the synthesis filter stage as:

  • First order: '[1/1]', '[1/3]', or '[1/5]'.

  • Second order: '[2/2]', '[2/4]', '[2/6]', or '[2/8]'.

  • Third order: '[3/1]', '[3/3]', '[3/5]', '[3/7]', or '[3/9]'.

  • Fourth order: '[4/4]'.

  • Fifth order: '[5/5]'.

  • Sixth order: '[6/8]'.

Dependencies

This property applies when you set the Filter property to Biorthogonal or Reverse Biorthogonal.

Data Types: char

Specify the number of filter bank levels as a scalar integer. An N-level asymmetric structure has N + 1 input subbands, and an N-level symmetric structure has 2N input subbands.

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

Specify the structure of the filter bank as Asymmetric or Symmetric. In the asymmetric structure, the low-frequency subband input to each level is the output of the previous level, while the high-frequency subband input to each level is an input to the filter bank. In the symmetric structure, both the low- and high-frequency subband inputs to each level are outputs from the previous level.

Usage

Description

y = dydsyn(x) reconstructs the concatenated subband input x to output y. Each column of input x contains the subbands for an independent signal. Upper rows contain the high-frequency subbands, and lower rows contain the low-frequency subbands.

example

Input Arguments

expand all

Data input, specified as a column vector or a matrix. Each column of input x contains the subbands for an independent signal. Upper rows contain the high-frequency subbands, and lower rows contain the low-frequency subbands. The number of rows of x must be a multiple of 2N, where N is the value of the NumLevels property.

Data Types: single | double
Complex Number Support: Yes

Output Arguments

expand all

Reconstructed signal, returned as a column vector or a matrix.

Data Types: single | double
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

Denoise square wave input using dyadic analysis and synthesis filter banks.

t = 0:.0001:.0511;
x= square(2*pi*30*t);
xn = x' + 0.08*randn(length(x),1);
dydanl = dsp.DyadicAnalysisFilterBank;

The filter coefficients correspond to a haar wavelet.

dydanl.CustomLowpassFilter = [1/sqrt(2) 1/sqrt(2)];
dydanl.CustomHighpassFilter = [-1/sqrt(2) 1/sqrt(2)];
dydsyn = dsp.DyadicSynthesisFilterBank;
dydsyn.CustomLowpassFilter = [1/sqrt(2) 1/sqrt(2)];
dydsyn.CustomHighpassFilter = [1/sqrt(2) -1/sqrt(2)];
C = dydanl(xn);

Subband outputs.

C1 = C(1:256); C2 = C(257:384); C3 = C(385:512);

Set higher frequency coefficients to zero to remove the noise.

x_den = dydsyn([zeros(length(C1),1);...
    zeros(length(C2),1);C3]);

Plot the original and denoised signals.

subplot(2,1,1), plot(xn); title('Original noisy Signal');
subplot(2,1,2), plot(x_den); title('Denoised Signal');

Figure contains 2 axes objects. Axes object 1 with title Original noisy Signal contains an object of type line. Axes object 2 with title Denoised Signal contains an object of type line.

Algorithms

This object implements the algorithm, inputs, and outputs described on the Dyadic Synthesis Filter Bank block reference page. The object properties correspond to the block parameters, except:

The object only receives data as a vector or matrix of concatenated subbands.

Version History

Introduced in R2012a