0
$\begingroup$

I'm currently implementing a discrete wavelet transform (DWT) as a cascaded QMF filter bank (pictured below). I've put together a convolution function that attempts to filter an input signal in a non-causal fashion. Essentially, the convolution mask is center around the output which means the output is a function of previous, current, and future outputs. I'm doing this to achieve zero-phase filtering.

However, I've noticed that filters associated with wavelets tend to be even length which make it impossible to center the convolution mask around the output. The only solution to this would be to convert the even length filter to an odd length filter (probably increase length by 1).

Is there a systematic method for changing the filter order from even to odd using MATLAB?

enter image description here

$\endgroup$
1
  • $\begingroup$ remember the order of an FIR filter is one less than the length. an $L$-length FIR has order of $L-1$. $\endgroup$ Nov 30 '20 at 4:37
1
$\begingroup$

Standard even-length filters are somewhat inherent to 2-band real FIR orthogonal wavelets. And they are most often non symmetric.

If you really want odd length, or at least central symmetry, most probably you will have to relieve one of the above assumptions. The simplest could be to use some biorthogonal wavelets. The classical JPEG2000 9/7 pair is probably close enough to orthogonality for most purposes. Other filters can be tabulated, see for instance: Wavelet Biorthogonal 2.8 (bior2.8).

Then, there is a possibly to have complex filters, but honestly I am not familiar anymore with the literature.

You can also use $(2M+1)$-wavelet filter-banks, to quit the dyadic case. There are a couple of $3$-band wavelet designs with odd-length filters.

$\endgroup$
0
$\begingroup$

Is there a systematic method for changing the filter order from even to odd

No in the sense that you want. Certainly least not in a way that would preserve the "waveletness" of the filter while making it symmetric around a middle point.

using MATLAB?

If it can't be done with math, it can't be done with MATLAB.

$\endgroup$
2
  • $\begingroup$ I'm pretty sure that they don't exist, but you may want to do a deep dive into wavelets and see if there's such a thing as an odd-length one. The reason the filters associated with wavelets are even-length is because those filters pretty much are the wavelets, and wavelets tend to be $2^N$ long. I don't know if an odd-length wavelet transform can be implemented, but if it can it's probably out there. $\endgroup$
    – TimWescott
    Nov 29 '20 at 23:33
  • $\begingroup$ why can't the $h[n]$ be an odd length (which is even order)? i think the OP means for $g[n]=1-h[n]$ with all of the delays lined up. isn't that what is normally done with this filterbank approach? $\endgroup$ Nov 30 '20 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.