DSPCIS Chapter 10 CosineModulated Filter Banks Special Topics
DSP-CIS Chapter 10: Cosine-Modulated Filter Banks & Special Topics Marc Moonen Dept. E. E. /ESAT-STADIUS, KU Leuven marc. moonen@esat. kuleuven. be www. esat. kuleuven. be/stadius/
Part-II : Filter Banks Chapter-7 : Preliminaries • Filter bank set-up and applications • `Perfect reconstruction’ problem + 1 st example (DFT/IDFT) • Multi-rate systems review (10 slides) Chapter-8 : Maximally decimated FBs • Perfect reconstruction filter banks (PR FBs) • Paraunitary PR FBs Chapter-9 : Modulated FBs • Maximally decimated DFT-modulated FBs • Oversampled DFT-modulated FBs Chapter-10 : Cosine-modulated FBs & Special topics • Cosine-modulated FBs • Time-frequency analysis & Wavelets • Frequency domain filtering DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 2
Cosine-Modulated Filter Banks Motivation : Cosine-modulated FBs offer an alternative to DFT-modulated FBs… • Similar to DFT-modulated FBs, cosine-modulated FBs offer economy in design- and implementation complexity • Unlike DFT-modulated FBs, cosine-modulated FBs can be PR/FIR/paraunitary under maximal decimation (with design flexibility). DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 3
Cosine-Modulated Filter Banks • Uniform DFT-modulated filter banks: Ho(z) is prototype lowpass filter, cutoff at for N filters H 0 H 1 H 2 H 3 • Cosine-modulated filter banks : Po(z) is prototype lowpass filter, cutoff at Then. . . for N filters P 0 Ho etc. . . DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 H 1 p. 4
Cosine-Modulated Filter Banks • Cosine-modulated filter banks : - if Po(z) is prototype FIR lowpass filter with real coefficients po[k], k=0, 1, …, L then i. e. `cosine modulation’ (with real coefficients) instead of `exponential modulation’ (with complex coeffs, see DFT-modulated FBs Chapter-9) - if Po(z) = `good’ lowpass filter, then Hk(z)’s = `good’ bandpass filters DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 5
Cosine-Modulated Filter Banks Realization based on polyphase decomposition (analysis): - if Po(z) has 2 N-fold polyphase expansion (ps: 2 N-fold for N filters!!!) u[k] then. . . : : DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 6
Cosine-Modulated Filter Banks e d i Realization based on polyphase decomposition (continued): l s p i k s i h t S With DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 ignore all details here !!!!!!!! - if Po(z) has L+1=m. 2 N taps, and m is even (similar formulas for m odd) (i. e. `m’ is the number of taps in each polyphase component) then. . . p. 7
Cosine-Modulated Filter Banks e d i Realization based on polyphase decomposition (continued): l s - Note that C (the only dense matrix here) is Nx. N DCT-matrix (`Type 4’) s i h t hence fast implementation (=fast matrix-vector product) based on fast discrete cosine transform (DCT) procedure, with complexity O(N. log. N) p i k Modulated filter bank gives economy in * design (only prototype Po(z) ) * implementation (prototype + modulation (DCT)) S u[k] : : Similar structure for synthesis bank DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 8
Cosine-Modulated Filter Banks Maximally decimated cosine modulated (analysis) bank : u[k] N N : N = u[k] N N : N DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 9
e d i Question: How do we obtain Maximal Decimation + PR/FIR/Paraunitariness? Theorem: (proof omitted) s i h t l s -If prototype Po(z) is a real-coefficient (L+1)-taps FIR filter, (L+1)=2 N. m for integer m and po[k]=po[L-k] (linear phase), with polyphase components En(z), n=0, 1, … 2 N-1, -then the (FIR) cosine-modulated analysis bank is PARAUNITARY if and only if (n=0. . N-1) are power complementary, i. e. form a lossless 1 input/2 output system p i k S . . this is the hard part… Cosine-Modulated Filter Banks FIR synthesis bank (for PR) can then be obtained by paraconjugation !!! = great result… DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 10
Cosine-Modulated Filter Banks Perfect Reconstruction (continued) Design procedure: e d i l s Parameterize lossless systems for n=0, 1. . , N-1 Optimize all parameters in this parametrization so that the prototype Po(z) based on these polyphase components is a linear-phase lowpass filter that satisfies the given specifications s i h t Example parameterization: p i k Parameterize lossless systems for n=0, 1. . , N-1, -> lattice structure (see Part-II), where parameters are rotation angles S DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 11
Cosine-Modulated Filter Banks lossless 1 -in/2 -out p. 9 = u[k] N : : N : PS: Linear phase property for po[n] implies that only half of the power complementary pairs have to be designed. The other pairs are then defined by symmetry properties. DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 12
Cosine-Modulated Filter Banks PS: Cosine versus DFT modulation In a maximally decimated cosine-modulated (analysis) filter bank 2 polyphase components of the prototype filter, , actually take the place of only 1 polyphase component in the DFTmodulated case. For paraunitariness (hence FIR-PR) in a cosine-modulated bank, each such pair of polyphase filters should form a power complementary pair, i. e. represent a lossless system. provides flexibility for FIR-design In the DFT-modulated case, imposing paraunitariness is equivalent to imposing losslessness for each polyphase component separately, i. e. each polyphase component should be an `allpass’ transfer function. Allpass functions are always IIR, except for trivial cases (pure delays). Hence all FIR paraunitary DFT-modulated banks (with maximal decimation) are trivial modifications of the DFT bank. p. 13 no FIR-design flexibility DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014
Time-Frequency Analysis & Wavelets Starting point is discrete-time Fourier transform: = infinitely long sequence u[k] is evaluated at infinitely many frequencies Inversion/reconstruction/synthesis (=filter bank jargon) is. . = sequence u[k] is represented as weighted sum of basis functions DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 14
Time-Frequency Analysis & Wavelets • `uncertainty principle’ says that if u[k] has a narrow support (i. e. is localized), then U(. ) has a wide support (i. e. is nonlocalized), and vice versa • Hence notion of `frequency that varies with time’ not accommodated (e. g. `short lived sine’ will correspond to non-localized spectrum) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 15
Time-Frequency Analysis & Wavelets Tool to fill this need is `short-time Fourier transform’(STFT) where w[k] is your favorite window function (typically with `compact support’ (=FIR) ) • Window slides past the data. For each window position k, compute discrete-time Fourier transform PS: If w[k]=1 (all k) then result is goodold discrete-time FT for all window positions • In following slides, will provide a filter bank version of STFT, also leading to simple inversion formula DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 16
Time-Frequency Analysis & Wavelets Rewrite STFT formula as… or similarly…(swap k and k-bar) • If we forget about the fase factor up front (=modulate window i. o input), then this corresponds to performing a convolution of u[k] with a filter (see Chapter-2, p. 19) In practice, will compute this for a discrete set of (N) frequencies… leading to a set of filters… • This is a DFT-modulated analysis bank, prototype filter = window function DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 17
• If window length>N, can use efficient implementation based on polyphase decomposition window length/N of prototype Ho + DFT-modulation u[k] • Often window length=N, hence 1 -tap polyphase components u[k] DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 freq. resolution N Time-Frequency Analysis & Wavelets p. 18
Time-Frequency Analysis & Wavelets In practice, will consider ‘window shift’ >1 (decimation D>1) • If maximally decimated (D=N), then analysis FB operation is xn[k] = decimated subband signals u[k] = `STFT-coefficients’ = infinitely long sequence u[k] is evaluated at N frequencies, infinitely many times (i. e. for infinitely many window positions) 4 4 . . . to be compared to page 14 DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 19
Time-Frequency Analysis & Wavelets • Corresponding (PR) synthesis filter bank (also DFT-modulated) is i. e. synthesis prototype filter fo[k] = ‘synthesis window’ = 4 4 + 4 + • Reconstruction/synthesis formula (=inverse STFT) is. . to be compared to page 14 DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 20
Time-Frequency Analysis & Wavelets • If oversampled (D=N/d), then analysis FB operation is Example: d=2 (‘window shift’= N/2) u[k] 2 2 u[k] = 2 2 B(z) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 21
Time-Frequency Analysis & Wavelets • Corresponding (PR) synthesis filter bank (also DFT-modulated) with PR condition for synthesis window v_k • Can easily generalize this for other oversampling factors d, leading to PR condition explain… (and try examples with Hann windows) • This is referred to as Weighted Over. Lap-Add (WOLA) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 22
Time-Frequency Analysis & Wavelets Now, for some applications (e. g. audio) would like to have a non-uniform filter bank, hence also with non-uniform (maximum) decimation, for instance H 0(z) u[k] 8 H 1(z) 8 H 2(z) 4 H 3(z) 2 H 0 H 1 H 2 H 3 • non-uniform filters = low frequency resolution at high frequencies, high frequency resolution at low frequencies (as human hearing) • non-uniform decimation = high time resolution at high frequencies, low time resolution at low frequencies DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 23
Time-Frequency Analysis & Wavelets This can be built as a tree-structure, based on a 2 -channel filter bank with 2 2 2 u[k] 2 2 2 H 0 H 1 H 2 DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 H 3 p. 24
Time-Frequency Analysis & Wavelets Note that may be viewed as a prototype filter, from which a series of filters is derived The lowpass filters are then needed to turn these multi-band filters into bandpass filters (i. e. remove images) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 25
Time-Frequency Analysis & Wavelets Similar synthesis bank can be constructed with 2 2 + • If and form a PR FB, then the complete analysis/synthesis structure is PR (why? ) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 26
Time-Frequency Analysis & Wavelets • Analysis bank corresponds to `discrete-time wavelet transform’ (DTWT) (xk[n] = `DTWT-coefficients’) • With a corresponding (PR) synthesis filter bank, the reconstruction/synthesis formula (inverse DTWT) is . . to be compared to page 14 & 20 DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 27
Time-Frequency Analysis & Wavelets • Reconstruction formula may be viewed as an expansion of u[k], using a set of basis functions (infinitely many) • If the 2 -channel filter bank is paraunitary, then this basis is orthonormal (which is a desirable property) : =`orthonormal wavelet basis’ DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 28
Time-Frequency Analysis & Wavelets • Example : `Haar’ wavelet (after Alfred Haar) • Compare to 2 -channel DFT/IDFT bank • Derive formulas for Ho, H 1, H 2, H 3, … Derive formulas for Fo, F 1, F 2, F 3, … Paraunitary FB (orthonormal wavelet basis) ? DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 29
Time-Frequency Analysis & Wavelets e d i Not treated here : l s • `continuous wavelet transform’ (CWT) of a continuous-time function u(t) • s i h t h(t)=prototype p, q are real-valued continuous variables p introduces `dilation’ of prototype, q introduces `shift’ of prototype `discrete wavelet transform’ (DWT) is CWT with discretized p, q S p i k T is sampling interval p-bar, q-bar are real-valued integer variables mostly a=2 DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 30
Time-Frequency Analysis & Wavelets Not treated here : • Theory - multiresolution analysis - wavelet packets - 2 D transforms - etc … • Applications : - audio: de-noising, … - communications : wavelet modulation - image : image coding p i k s i h t e d i l s S DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 31
Frequency Domain Filtering Chapter 6! • See DSP-I : cheap FIR realization based on frequency domain processing (`time domain convolution equivalent to component-wise multiplication in the frequency domain’), cfr. `overlap-add’ & `overlap-save’ procedures • This can be cast in the subband processing setting, as a non-critically downsampled (2 -fold oversampled) DFTmodulated filter bank based operation! • Leads to more general approach to performance/delay trade-off PS: formulae given for N=4, for conciseness (but without loss of generality) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 32
Frequency Domain Filtering Have to know a theorem from linear algebra here: • A `circulant’ matrix is a matrix where each row is obtained from the previous row using a right-shift (by 1 position), the rightmost element which spills over is circulated back to become the leftmost element • The eigenvalue decomposition of a `circulant’ matrix is trivial…. example (4 x 4): with F the Nx. N DFT-matrix, this means that the eigenvectors are equal to the column-vectors of the IDFT-matrix, and that then eigenvalues are obtained as the DFT of the first column of the circulant matrix (proof by Matlab) DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 33
Frequency Domain Filtering Starting point is this (see Chapter-8) : 4 4 + T(z)*u[k-3] meaning that a filtering with can be realized in a multirate structure, based on a pseudo-circulant matrix DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 N*N filters, L/N taps each at an N-fold lower rate (N=4) u[k] 4 4 p. 34
Frequency Domain Filtering Now some matrix manipulation… : DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 35
Frequency Domain Filtering • An (8 -channel) filter bank representation of this is. . . Analysis bank: Subband processing: Synthesis bank: 4 4 + y[k] 2 N filters, L/N taps each at an N-fold lower rate || N/2 -fold complexity reduction u[k] 4 4 This is a 2 N-channel filter bank, with N-fold downsampling. The analysis FB is a 2 N-channel uniform DFT filter bank (see Chapter 9, p. 30 !). The synthesis FB is matched to the analysis bank, for PR: DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 36
Frequency Domain Filtering • This is known as an `overlap-save’ realization : – Analysis bank: performs 2 N-point DFT (FFT) of a block of (N=4) samples, together with the previous block of (N) samples (hence `overlap’) `block’ `previous block’ – Synthesis bank: performs 2 N-point IDFT (IFFT), throws away the first half of the result, saves the second half (hence `save’) `throw away’ `save’ – Subband processing corresponds to `frequency domain’ operation DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 37
Frequency Domain Filtering `Overlap-add’ can be similarly derived : DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 38
Frequency Domain Filtering • This is known as an `overlap-add’ realization : – Analysis bank: performs 2 N-point DFT (FFT) of a block of (N=4) samples, padded with N zero samples `block’ `zero padding’ – Synthesis bank: performs 2 N-point IDFT (IFFT), adds second half of the result to first half of previous IDFT (hence `add’) `overlap’ `add’ – Subband processing corresponds to `frequency domain’ operation DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 39
Frequency Domain Filtering • Standard `Overlap-add’ and `overlap-save’ realizations are derived when 0 th order poly-phase components are used in the above derivation, i. e. each poly-phase component represents 1 tap of an L-tap filter T(z). (N=L) The corresponding 0 th order subband processing (H) then corresponds to what is usually referred to as the `component-wise multiplication’ in the frequency domain. Note that for an L-tap filter, with large L, this leads to a cheap realization based on FFT/IFFTs instead of DFT/IDFTs. However, for large L, as 2 L-point FFT/IFFTs are needed, this may also lead to an unacceptably large processing delay (latency) between filter input and output. DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 40
Frequency Domain Filtering • In the more general case, with higher-order polyphase components (hence N smaller than the filter length L), a smaller complexity reduction is achieved, but the processing delay is also smaller. • This provides an interesting trade-off between complexity reduction and latency !! DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 41
Conclusions • Great (=FIR/paraunitary) perfect reconstruction FB designs based on `modulation’: – Oversampled DFT-modulated FBs (Chapter-9) – Maximally decimated (and oversampled (not treated here)) cosine-modulated FBs • `Perfect reconstruction’ concept provides framework for time-frequency analysis of signals • Filter bank concept provides framework for frequency domain realization of long FIR filters DSP-CIS / Chapter-10 : Cosine-Modulated Filter Banks & Special Topics / Version 2013 -2014 p. 42
- Slides: 42