Package: dsp
Dyadic analysis filter bank
The DyadicAnalysisFilterBank
object uses a
series of highpass and lowpass FIR filters to provide approximate
octave band frequency decompositions of the input. Each filter output
is downsampled by a factor of two. With the appropriate analysis filters
and tree structure, the dyadic analysis filter bank is a discrete
wavelet transform (DWT) or discrete wavelet packet transform (DWPT).
To obtain approximate octave band frequency decompositions of the input:
Define and set up your dyadic analysis filter bank. See Construction.
Call step
to get the
octave half band frequency decompositions of the input according to
the properties of dsp.DyadicAnalysisFilterBank
. The
behavior of step
is specific to each object in the
toolbox.
H = dsp.DyadicAnalysisFilterBank
constructs
a dyadic analysis filter bank object, H
, that computes
the leveltwo discrete wavelet transform (DWT) of a column vector
input. For a 2D matrix input, the object transforms the columns using
the Daubechies thirdorder extremal phase wavelet. The length of the
input along the first dimension must be a multiple of 4.
H = dsp.DyadicAnalysisFilterBank('
returns a dyadic analysis filter bank object, PropertyName
',PropertyValue
,
...)H
,
with each property set to the specified value.

Type of filter used in subband decomposition Specify the type of filter used to determine the high and lowpass
FIR filters in the dyadic analysis filter bank as
 

Lowpass FIR filter coefficients Specify a vector of lowpass FIR filter coefficients, in powers
of z^{1}. Use a halfband
filter that passes the frequency band stopped by the filter specified
in the  

Highpass FIR filter coefficients Specify a vector of highpass FIR filter coefficients, in powers
of z^{1}. Use a halfband
filter that passes the frequency band stopped by the filter specified
in the  

Order for orthogonal wavelets Specify the order of the wavelet selected in the  

Analysis and synthesis filter orders for biorthogonal filters Specify the order of the analysis and synthesis filter orders
for biorthogonal filter banks as  

Number of filter bank levels used in analysis (decomposition) Specify the number of filter bank analysis levels a positive integer. A levelN asymmetric structure produces N+1 output subbands. A levelN symmetric structure produces 2^{N} output subbands. The default is 2. The size of the input along the first dimension must be a multiple of 2^{N}, where N is the number of levels.  

Structure of filter bank Specify the structure of the filter bank as When this property is $${M}_{k}=\{\begin{array}{ll}\frac{M}{{2}^{k}}\hfill & 1\le k\le N\hfill \\ \frac{M}{{2}^{N}}\hfill & k=N+1\hfill \end{array}$$ The default is 
clone  Create dyadic analysis filter bank object with same property values 
getNumInputs  Number of expected inputs to step method 
getNumOutputs  Number of outputs of step method 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics changes 
reset  Reset filter states 
step  Decompose input with dyadic filter bank 
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); hdydanl = dsp.DyadicAnalysisFilterBank; % The filter coefficients correspond to a 'haar' wavelet. hdydanl.CustomLowpassFilter = [1/sqrt(2) 1/sqrt(2)]; hdydanl.CustomHighpassFilter = [1/sqrt(2) 1/sqrt(2)]; hdydsyn = dsp.DyadicSynthesisFilterBank; hdydsyn.CustomLowpassFilter = [1/sqrt(2) 1/sqrt(2)]; hdydsyn.CustomHighpassFilter = [1/sqrt(2) 1/sqrt(2)]; C = step(hdydanl, 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 = step(hdydsyn, [zeros(length(C1),1);... zeros(length(C2),1);C3]); subplot(2,1,1), plot(xn); title('Original noisy Signal'); subplot(2,1,2), plot(x_den); title('Denoised Signal');
This object implements the algorithm, inputs, and outputs described on the Dyadic Analysis Filter Bank block reference page. The object properties correspond to the block parameters, except:
The dyadic analysis filter bank object always concatenates
the subbands into a single column vector for a column vector input,
or into the columns of a matrix for a matrix input. This behavior
corresponds to the block's behavior when you set the Output parameter
to Single port . 