Daubechies wavelet filter computation
W = dbaux(N,SUMW)
W = dbaux(N)
W = dbaux(N,0)
W = dbaux(N,SUMW) is the order N Daubechies scaling filter such that sum(W) = SUMW. Possible values for N are 1, 2, 3, ...
W = dbaux(N) is equivalent to W = dbaux(N,1)
W = dbaux(N,0) is equivalent to W = dbaux(N,1)
This example shows to determine the Daubechies' extremal phase scaling filter with a specified sum. The two most common values for the sum are and 1.
Construct two versions of the 'db4' scaling filter. One scaling filter sums to and the other version sums to 1.
NumVanishingMoments = 4; h = dbaux(NumVanishingMoments,sqrt(2)); m0 = dbaux(NumVanishingMoments,1);
The filter with sum equal to is the synthesis (reconstruction) filter returned by wfilters and used in the discrete wavelet transform.
[LoD,HiD,LoR,HiR] = wfilters('db4'); max(abs(LoR-h))
ans = 4.2613e-13
For orthogonal wavelets, the analysis (decomposition) filter is the time-reverse of the synthesis filter.
ans = 4.2613e-13
The computation of the dbN Daubechies scaling filter requires the extraction of the roots of a polynomial of order 4N. Instability may occur when N is too large.
The algorithm used is based on a result obtained by Shensa (see "References"), showing a correspondence between the "Lagrange à trous" filters and the convolutional squares of the Daubechies wavelet filters.
The computation of the order N Daubechies scaling filter w proceeds in two steps: compute a "Lagrange à trous" filter P, and extract a square root. More precisely:
P the associated "Lagrange à trous" filter is a symmetric filter of length 4N-1. P is defined by
P = [a(N) 0 a(N-1) 0 ... 0 a(1) 1 a(1) 0 a(2) 0 ... 0 a(N)]
Then, if w denotes dbN Daubechies scaling filter of sum , w is a square root of P:
P = conv(wrev(w),w) where w is a filter of length 2N.
The corresponding polynomial has N zeros located at −1 and N−1 zeros less than 1 in modulus.
Note that other methods can be used; see various solutions of the spectral factorization problem in Strang-Nguyen (p. 157).
Daubechies, I. (1992), Ten lectures on wavelets, CBMS-NSF conference series in applied mathematics, SIAM Ed.
Shensa, M.J. (1992), "The discrete wavelet transform: wedding the a trous and Mallat Algorithms," IEEE Trans. on Signal Processing, vol. 40, 10, pp. 2464-2482.
Strang, G.; T. Nguyen (1996), Wavelets and Filter Banks, Wellesley-Cambridge Press.