Document Sample

29 Chapter 3 Fractional-delay filters Fractional-delay (FD) ﬁlters are a type of digital ﬁlter designed for bandlimited in- terpolation. Bandlimited interpolation is a technique for evaluating a signal sample at an arbitrary point in time , even if it is located somewhere between two sampling points. The value of the sample obtained is exact because the signal is bandlimited to half the sampling rate (Fs /2). This implies that the continuous-time signal can be exactly regenerated from the sampled data. Once the continuous-time representation is known, it is easy to evaluate the sample value at any arbitrary time, even if it is “fractionally delayed” from the last integer multiple of the sampling interval. FIR or IIR ﬁlters that are used for this eﬀect are termed fractional-delay ﬁlters. FD ﬁlters have been widely used before in areas as diverse as arbitrary sampling rate conversion, synchronization of digital modems and speech coding. An excellent review paper on FD ﬁlters is by Laakso et al. [13]. It describes the design and performance of various types of FIR and IIR interpolators. For the purpose of vocal a a tract modeling using digital waveguides, V¨lim¨ki [7] provides a discussion on the choice of FD ﬁlters that can be used for making continuous-length changes in the model. He uses FD ﬁlters to place scattering junctions at points which are not located unit delays apart along the delay line. This technique will be discussed in detail in the next chapter. The underlying theory of a fractional delay and the design of FD ﬁlters are now described. 3.1 Ideal fractional delay The delayed version of a discrete-time signal x(n) may be represented as y(n) = x(n − D) (3.1) 30 where D is a positive integer that denotes the amount by which the signal is delayed. In traditional digital signal processing theory, D can only take integer values. In other words, if the desired continuous-time delay is τ and the sampling period is T , the value of D may be obtained by rounding oﬀ the result of τ /T to the nearest integer. In many applications it is desirable that the delay D accurately represent the fractional delay, rather than the (rounded and hence inaccurate) integer delay. If the Z-transform of Eq. 3.1 is taken, the transfer function of an ideal delay element may be written as Y (z) Hid (z) = = z −D X(z) The underlying assumption while doing this operation is that D is an integer, or else the transform will have to be expressed as a series expansion. However, for the sake of discussion, assume that D is a positive real number, deﬁned as the sum of its integer part,⌊D⌋, and the fractional part, d: D = ⌊D⌋ + d In the frequency domain, the ideal fractional-delay ﬁlter can be described as Hid (ejω ) = H(z) = e−jωD (3.2) z=ejω i.e, the magnitude response for an ideal delay element is unity for all frequencies, while the phase response is linear with a slope of −D. This can be called an allpass system with linear phase response. |Hid (ejω )| = 1 (3.3) arg Hid (ejω ) = −Dω (3.4) According to Shannon’s sampling theorem, a sinc interpolator can be used to exactly evaluate a signal value at any point in time, as long as it is bandlimited to an 31 upper frequency of Fs /2. This can be done by convolving a discrete-time signal y(n) with sinc(n-m) to give the signal sample at any arbitrary continuous time D: ∞ y(D) = y(n)sinc(n − D) n=−∞ The delayed sinc function is referred to as an ideal fractional-delay interpolator: sin (π(n − D)) hD (n) = sinc(n − D) = π(n − D) Note that the above impulse response can be obtained by taking the inverse Fourier transform of the frequency response in Eq. 3.2. 3.2 Fractional-delay ﬁlters: Lagrange interpolator A wide range of fractional-delay ﬁlters have been explored in the tutorial paper by Laakso et al. [13]. For the purpose of digital waveguide modeling of the vocal tract, the fractional-delay ﬁlter should have the following desirable characteristics: • Lowpass characteristics with an almost ﬂat magnitude response in the passband. • Magnitude response less than unity at all frequencies, so as not to cause insta- bility in the vocal tract model. • Accurate model of the desired fractional delay. • Easy and intuitive incorporation into the vocal tract model. a a According to V¨lim¨ki [7], Lagrange interpolators are one type of FIR ﬁlter that are both easy to implement and have the desired properties listed above. Among IIR ﬁlters, Thiran allpass ﬁlters are also considered suitable since they meet the listed requirements. In this work, only Lagrange interpolators have been used because being FIR ﬁlters, it is intuitively easier to understand how they work in a given application. Their design and characteristics are now described. 32 While designing a digital ﬁlter, the ideal magnitude and frequency responses are always kept in mind. The response of an ideal fractional-delay ﬁlter was described previously in Eq. 3.3 and 3.4. If an FIR FD ﬁlter is being designed, the general form of an N th order (length L = N + 1) ﬁlter would look like N H(z) = h(n)z −n (3.5) n=0 An error function E(ejω ) is deﬁned as the diﬀerence between the actual and the ideal ﬁlters at a given frequency: E(ω) = H(ω) − Hid (ω) (3.6) Frequency-domain ﬁlter design involves minimizing the above error metric according to criteria that lead to the ﬁlter design goals being met. For example, it may be useful in certain applications to use a ﬁlter with zero error at ω = 0. In other situations the squared error integrated over a range of frequencies, may be minimized. Diﬀerent constraints on the error E(ω) lead to diﬀerent types of ﬁlters. Lagrange interpolators belong to a class of ﬁlters called maximally ﬂat ﬁlters since they have a constant (ﬂat) magnitude response around a particular frequency of interest. The response of Lagrange interpolators is made identical to that of the ideal interpolator at zero frequency. Speciﬁcally, the derivatives of the error function E(ω) are set to zero at the frequency of interest: dn E(ω) =0 for all n = 0, 1, 2, . . . , N (3.7) dω n ω=ω0 The N + 1 linear equations that follow from Eq. 3.7 can be solved to obtain the N + 1 coeﬃcients of the FIR ﬁlter. The resultant set of equations is of the form shown below, where D is as before, a positive real number representing the desired total delay: N k n h(k) = D n for n = 0, 1, 2, . . . , N (3.8) k=0 33 On solving these equations, a closed-form representation of the FIR ﬁlter coeﬃcients can be obtained: N D−k h(n) = for n = 0, 1, 2, . . . , N (3.9) k=0,k=n n−k The ease of computing ﬁlter taps is an important feature of Lagrange interpolators. By virtue of their design criterion, they exhibit a ﬂat magnitude response at low frequencies with no ripples. The magnitude response and group delay characteristics of odd and even-length ﬁlters are shown in Figures 3.3 and 3.2 for a fractional delay value of α = 0.5; i.e. the point of interpolation is located mid-way between the two center ﬁlter taps. The ﬁlter impulse response for a third-order ﬁlter is shown in Fig. 3.1. For α = 0.5, the ﬁlter is perfectly symmetric and the phase is linear in the entire frequency range of the interpolators. This is borne out in the group delay plot of Fig. 3.2(b). For other values of α in (0,1), the odd-order ﬁlters are not symmetric. h(1) h(2) h(0) h(3) α 1−α Figure 3.1. A third-order Lagrange interpolator for a fractional delay value of α = 0.5. Dotted vertical line shows “center of gravity” for the ﬁlter, which moves as α varies in (0, 1). For an even-length (odd-order) ﬁlter,the point of interpolation lies between the two central samples. In such a scenario, the delay characteristics are superior to odd- 34 1 N=2 Magnitude Response N=4 0.8 N=6 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Frequency (a) 3 N=2 2.5 N=4 N=6 Group Delay 2 1.5 1 0.5 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Frequency (b) Figure 3.2. Magnitude and group delay characteristics of odd-order Lagrange in- terpolators. Filter order, N ∈ [1, 3, 5] and D = N/2 in Eq. 3.9. 35 1 N=3 0.9 N=5 Magnitude Response N=7 0.8 0.7 0.6 0.5 0.4 0.3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Frequency 3.5 N=3 3 N=5 N=7 2.5 Group Delay 2 1.5 1 0.5 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Frequency Figure 3.3. Magnitude and group delay characteristics of even order Lagrange interpolators. Filter order, N ∈ [2, 4, 6] and D = (N + 1)/2 in Eq. 3.9. 36 length interpolators [7]. For this reason, only odd-order Lagrange interpolators are used in this work. It is also important to analyze the magnitude response of the interpolators. In speech synthesis, the upper value of frequencies that are of interest is about 5 kHz. While the waveguide model being used in this work produces speech output at a sampling rate of 44.1 kHz, the spatial resolution of the vocal tract is twice as much. This is because one segment length is 0.397 cm, which is equivalent to a sampling rate of 88.2 kHz (Eq. 2.5). The interpolation method to be used for length variations can be visualized as “spatial interpolation” where the “samples” are 1/88200 s apart. The 0-5 kHz band thus corresponds to a maximum normalized frequency of about 0.06. Fig. 3.2(a) shows that even a ﬁrst-order Lagrange interpolator has a very ﬂat passband up to a normalized frequency of 0.1, so the use of a simple ﬁrst-order ﬁlter (linear interpolator) is adequate for the highly over-sampled system being used. Note that a linear interpolator is simply two ﬁlter taps, [α, 1 − α], when α is the desired fractional delay (Eq. 3.9). Since linear interpolation is a particular type of the Lagrange interpolation, the generic term will be used in the remainder of this work and all the algorithms presented will work for any odd ﬁlter order, N.

DOCUMENT INFO

Shared By:

Categories:

Tags:

Stats:

views: | 13 |

posted: | 1/8/2012 |

language: | English |

pages: | 8 |

OTHER DOCS BY dffhrtcv3

How are you planning on using Docstoc?
BUSINESS
PERSONAL

By registering with docstoc.com you agree to our
privacy policy and
terms of service, and to receive content and offer notifications.

Docstoc is the premier online destination to start and grow small businesses. It hosts the best quality and widest selection of professional documents (over 20 million) and resources including expert videos, articles and productivity tools to make every small business better.

Search or Browse for any specific document or resource you need for your business. Or explore our curated resources for Starting a Business, Growing a Business or for Professional Development.

Feel free to Contact Us with any questions you might have.