Presentation is loading. Please wait.

Presentation is loading. Please wait.

ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 13: Multirate processing and wavelets fundamentals Instructor: Dr. Gleb V. Tcheslavski Contact:

Similar presentations


Presentation on theme: "ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 13: Multirate processing and wavelets fundamentals Instructor: Dr. Gleb V. Tcheslavski Contact:"— Presentation transcript:

1 ELEN 5346/4304 DSP and Filter Design Fall Lecture 13: Multirate processing and wavelets fundamentals Instructor: Dr. Gleb V. Tcheslavski Contact: Office Hours: Room 2030 Class web site: p/index.htm p/index.htm

2 ELEN 5346/4304 DSP and Filter Design Fall Filter banks A digital filter bank (FB) is a set of digital bandpass (usually) filters with either a common input (analysis FB) or a summed output (synthesis FB). Analysis FB separates the analyzed signal x n into a set of M spectral bands. A uniform filter bank – equal passband widths Let a causal IIR LPF with a real impulse response h 0,n have a transfer function: (13.2.1) Assume that the filter has its passband and stopband frequencies around /M as indicated in the picture, where M is an arbitrary integer.

3 ELEN 5346/4304 DSP and Filter Design Fall Filter banks Let us consider next the casual filter with the impulse response obtained by modulating h 0,n with the exponent: The corresponding transfer function is (13.3.1) (13.3.2)

4 ELEN 5346/4304 DSP and Filter Design Fall Filter banks The frequency response of the filter is Therefore, the frequency response is obtained by shifting the frequency response of the LPF to the right by the amount 2 k/M as shown. By designing M-1 filters obtained by modulating (shifting) the low pass prototype, we get M-1 uniformly shifted (in frequency) versions of the prototype H 0. These M filters can be arranged into a uniform filter bank. (13.4.1) Note: a DFT algorithm can be viewed in terms of a uniform filter bank.

5 ELEN 5346/4304 DSP and Filter Design Fall Filter banks Two-channel Quadrature Mirror (QM) filter bank In many applications, a discrete-time signal x n is first split into a number of subband signals {v k,n } by an analysis FB; the subband signals are then (somehow) processed and finally combined by a synthesis FB to form an output y n. If the bandwidths of the subband signals are (chosen to be) much smaller than the bandwidth of the original signal, subband signals can be downsampled (sampled at a lower sampling rate) before the processing. This allows more efficient processing. N p s Downsampling by the factor Q N = N /Q Q p Q s

6 ELEN 5346/4304 DSP and Filter Design Fall Filter banks After processing, these signals are upsampled and then combined by the synthesis bank into the output (higher rate) signal. The structure performing such operations is called a quadrature-mirror (QM) filter bank. Assuming no processing, a two-channel QM FB is: Analyzing this structure: Note that for two channels, Q = 2. Downsampling and upsampling can be represented as: Here, k = 0,1. (13.6.1) (13.6.2) (13.6.3)

7 ELEN 5346/4304 DSP and Filter Design Fall Filter banks The last equation can be rewritten as: Therefore, the output of the FB is: Which can be rewritten as: where is the distortion transfer function is the aliasing term. (13.7.1) (13.7.2) (13.7.3) (13.7.4) (13.7.5)

8 ELEN 5346/4304 DSP and Filter Design Fall Filter banks Aliasing cancellation condition Will hold when, for instance: In general, QM FB are Linear Time-Varying systems. However, by selecting the analysis and synthesis filters such that aliasing effects are canceled, QM FB can be made an LTI system. In this situation: If T(z) is an allpass filter, i.e. |T(z)| = c 0 (13.8.1) (13.8.2) (13.8.3) (13.8.4) (13.8.5) Therefore, amplitude distortions are possible. We can also show that no phase distortions will be introduced if T(z) has a linear phase.

9 ELEN 5346/4304 DSP and Filter Design Fall Filter banks Perfect reconstruction condition An alias-free QM FB having no amplitude and phase distortions is called a perfect reconstruction QM FB. In this case: which implies that: Therefore: and Indicating that the reconstructed output is a delayed by l samples replica of the input. (13.9.1) (13.9.2) (13.9.3) (13.9.4)

10 ELEN 5346/4304 DSP and Filter Design Fall Filter banks (QM FB example) Let us consider a two-channel QM FB with the analysis filters: and the synthesis filters: ( ) ( ) Therefore: the two-channel QM FB is an alias-free system. ( )

11 ELEN 5346/4304 DSP and Filter Design Fall Filter banks (QM FB example) On the other hand: Therefore, this FB is a perfect reconstruction system. ( ) In a time domain, the outputs of the analysis filters are: Note: the scaling factor preserves energy. In a matrix form: where is the Haar transform matrix The reconstruction: ( ) ( ) ( ) ( )

12 ELEN 5346/4304 DSP and Filter Design Fall Filter banks From alias-free and perfect reconstruction requirements: Therefore: For a real filter: Indicating that if h 0 is a LPF, than h 1 is a HPF; in fact, its mirror image with respect to the /2 – the quadrature frequency. Therefore, two analysis filters and two synthesis filters in the QM FB are essentially determined from one prototype transfer function. ( ) ( ) ( ) ( ) QM FB can be build from FIR or IIR filters.

13 ELEN 5346/4304 DSP and Filter Design Fall Filter banks Orthogonal QM FB Biorthogonal QM FB – QM FB obtained for the perfect reconstruction condition and represented by nonorthogonal transfer matrices (and filters). Implying that if H 0 (z) is a causal FIR filter, three other filters must be causal FIR filters. Also, if H 0 (z) is a LPF, than H 1 (z) is a HPF. ( ) Third-order FIR filters forming analysis QM FB 7-order FIR filters forming analysis QM FB

14 ELEN 5346/4304 DSP and Filter Design Fall Filter banks L-channel QM FB is a generalization of a two-channel QM FB. ( ) ( ) ( )

15 ELEN 5346/4304 DSP and Filter Design Fall Filter banks The vector of downsampled subband signals of an L-channel QM FB can be expressed in the matrix form as: Where: The input is: The analysis FB modulation matrix: ( ) ( ) ( ) ( )

16 ELEN 5346/4304 DSP and Filter Design Fall Filter banks The output of the QM FB is which in the matrix form is The synthesis FB modulation matrix: where the output is: ( ) ( ) ( ) ( ) The transfer matrix: ( )

17 ELEN 5346/4304 DSP and Filter Design Fall Filter banks From the alias cancellation condition, the set of synthesis filters can be determined: Where and the distortion transfer function is: If T(z) has a constant magnitude, the QM FB is magnitude-preserving. If T(z) has a linear phase, the QM FB has no phase distortion. If T(z) is a pure delay, it is a perfect reconstruction QM FB i.e.: ( ) ( ) ( ) ( ) Three-channel FIR QM FB

18 ELEN 5346/4304 DSP and Filter Design Fall Filter banks Multilevel FB A multichannel FB can be replaced by a multilevel FB called a tree-structured FB. Analysis and synthesis filters can be related between these two structures: ( )

19 ELEN 5346/4304 DSP and Filter Design Fall Filter banks ( ) FB considered so far have equal passband widths (full tree FB). Sometimes, it is beneficial to make FB with unequal passband widths (partial tree FB). Corresponding filters magnitude responses

20 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) It turns out that perfect reconstruction octave band QM FB can be represented by a certain discrete wavelet transform (DWT). For this binary tree, there are two parent analysis FIR filters: H 0 (z) – LPF, and H 1 (z) – HPF. Which can also be represented by the equivalent structure where 0 k L and: ( ) ( )

21 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) Assuming that the input x n is a sequence of length M, the outputs will have the following approximate lengths and bandwidths: downsampling by 2 The downsampling leads to: In the wavelet decomposition, u 0,n represents the finest details (the highest frequency components) of the input x n, while u 4,n is its coarsest representation (its lowest frequency components).

22 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) The process of generating the set of output subsequences u k,n where 0 k L from the finite-length input x n by the structure that can be represented as an L- level octave-band perfect reconstruction QM FB is called the discrete wavelet transform (DWT). The analysis sequences for the equivalent representation are: or in the time domain: The subband sequences: ( ) ( ) ( )

23 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) The process of reconstruction (synthesis) of the output sequence y n – which is a replica of the input x n – from the subband sequences u n can be accomplished by the L-level octave-band perfect reconstruction QM FB: Which has an equivalent structure, where ( ) ( )

24 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) Therefore, the output will be: ( ) or, in the time domain: ( ) Using the notation: the output will be: ( ) ( ) Which is the inverse DWT. u k,m are the wavelet coefficients of x m with respect to the basis function k,m,n

25 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) Biorthogonal wavelets The biorthogonal wavelets are generated from biorthogonal octave-band perfect reconstruction QM FB. The simplest examples are Haar wavelets:

26 ELEN 5346/4304 DSP and Filter Design Fall Discrete Wavelet Transform (DWT) Orthogonal wavelets The orthogonal wavelets are generated from orthogonal octave-band perfect reconstruction QM FB. One example would be the four-level Daubechies 4/4-tap wavelet:

27 ELEN 5346/4304 DSP and Filter Design Fall On the Uncertainty Principle Observations: A short-duration (narrow) waveform (signal) yields a long-duration (wide) spectrum. A narrow spectrum yields a long-duration (wide) waveform. Waveform and spectrum cannot be made arbitrary small simultaneously. These observations are explained by the Uncertainty Principle: ( ) = for Gaussian signals Here t 2 is a variance in time – a measure of the duration of the signal; 2 is a variance in frequency – a measure of the bandwidth of the signal (most of the signal energy will be concentrated in 2B = 2 rad/s. Consequence: the same signal cannot have both: fine resolution in time and fine resolution in frequency.

28 ELEN 5346/4304 DSP and Filter Design Fall Non-stationary… So what? Signals Estimated spectra Case 1: Stationary: S 1 + S 2 Case 2: Non – stationary: S 1 S 2

29 ELEN 5346/4304 DSP and Filter Design Fall Non-stationary… So what? Ideally: from Modern DSP by Cristi

30 ELEN 5346/4304 DSP and Filter Design Fall Short-Time Fourier Transform* The Short-Time Fourier Transform (STFT) of a windowed signal with the window centered at t is: ( ) * - based on the lecture notes for Advanced topics in Signal Processing by Dr. Ben H. Jansen, UH, 2006 where w(t) is a low pass analysis window function, and (typically): The inverse STFT is defined as: Given that: ( ) ( ) ( )

31 ELEN 5346/4304 DSP and Filter Design Fall Short-Time Fourier Transform A natural choice for the synthesis window (t), is to make it equal to the analysis window w(t). 1.STFT is a linear time-frequency representation; 2.STFT depends on the choice of w(t); 3.STFT is generally complex. Defining a spectrogram as: which is a representation of the energy distribution in the time-frequency plane, i.e. a quadratic time-frequency representation. We can show that: ( ) ( ) ( )

32 ELEN 5346/4304 DSP and Filter Design Fall Short-Time Fourier Transform We can notice that: ( ) Therefore, the STFT can be viewed as a filtering operation by a LPF with impulse response w*(-t) as shown in (A): Also: ( ) Therefore, the STFT can also be viewed as a filtering operation with a BPF with impulse response e j t w*(-t) as shown in (B):

33 ELEN 5346/4304 DSP and Filter Design Fall Discrete STFT Define a sampled version of STFT as: Therefore, the DSTFT: The IDSTFT: or: The IDSTFT holds if: ( ) ( ) ( ) ( ) ( )

34 ELEN 5346/4304 DSP and Filter Design Fall STFT: Gabor expansion (transform) Note that ( ) can be viewed as a series expansion of a 1-D signal in terms of 2-D time-frequency functions. The Gabor expansion is defined as: where g(t) is a 1-D function: If the basis functions g n,k (t) are selected such that they are well localized in time and well concentrated in frequency, then the Gabor coefficients G x (n,k) will reflect the signals time-frequency content around (nT, kF). Gabor proposed which is a Gaussian signal with The Gabor expansion is always possible if F T 1, but the Gabor coefficients are not unique (the DSTFT is just one possible solution). Note: FT of a Gaussian is a Gaussian. ( ) ( ) ( )

35 ELEN 5346/4304 DSP and Filter Design Fall Time-Frequency resolution of STFT Using the filter representation of STFT, we observe: 1.All the BPFs have the same duration impulse response, hence the time resolution of the STFT is the same at all frequencies and is proportional to window length. 2.All the BPFs have the same bandwidth, hence the frequency resolution is the same at all times and is inversely proportional to window length. 1/T T Although, according to the uncertainty principle,, t could be made large for low frequency components and small for high frequency components… leading to corresponding changes in the frequency resolution.

36 ELEN 5346/4304 DSP and Filter Design Fall Continuous Wavelet Transform (CWT) Rather than using constant bandwidth BPFs (as STFT does), we use constant Q BPFs, where bandwidth center frequency ( ) In other words, the impulse response will decrease in duration (and the bandwidth increase) as center frequency increases: therefore, use scaled versions of w * (-t). For simplification, we will use (as window functions) the scaled versions of the same prototype (t): Here (t) is the analyzing (mother) wavelet function: a bandpass function centered around c. ( )

37 ELEN 5346/4304 DSP and Filter Design Fall Continuous Wavelet Transform (CWT) The CWT is defined as: Using b = c /, the CWT can also be defined as a time-scale representation: The energy distribution in the time-domain is evaluated by the scalogram: ( ) ( )

38 ELEN 5346/4304 DSP and Filter Design Fall STFT vs. CWT STFT estimates the similarity (cross-correlation) between x(t) and g, (t): Where: ( ) ( ) CWT estimates the similarity (cross-correlation) between x(t) and h b, (t): Where: ( ) ( )

39 ELEN 5346/4304 DSP and Filter Design Fall STFT vs. CWT Same time and frequency resolutions STFT: F T = const, F = const, T = const CWT: F T = const, F const, T const from Modern DSP by Cristi


Download ppt "ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 13: Multirate processing and wavelets fundamentals Instructor: Dr. Gleb V. Tcheslavski Contact:"

Similar presentations


Ads by Google