Fractional-delay filters

Document Sample
Fractional-delay filters Powered By Docstoc

                                     Chapter 3

                     Fractional-delay filters

Fractional-delay (FD) filters are a type of digital filter 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 filters that are used for this effect are termed fractional-delay filters.
   FD filters 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 filters 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 filters that can be used for making continuous-length changes in the
model. He uses FD filters 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 filters 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)

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 off 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
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, defined as the sum of its integer
part,⌊D⌋, and the fractional part, d:

                                     D = ⌊D⌋ + d

In the frequency domain, the ideal fractional-delay filter can be described as

                            Hid (ejω ) = H(z)           = e−jωD                    (3.2)

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

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)

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 filters: Lagrange interpolator

A wide range of fractional-delay filters 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 filter should have the following desirable characteristics:

   • Lowpass characteristics with an almost flat 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 filter that
are both easy to implement and have the desired properties listed above. Among IIR
filters, Thiran allpass filters are also considered suitable since they meet the listed
requirements. In this work, only Lagrange interpolators have been used because being
FIR filters, it is intuitively easier to understand how they work in a given application.
Their design and characteristics are now described.

   While designing a digital filter, the ideal magnitude and frequency responses are
always kept in mind. The response of an ideal fractional-delay filter was described
previously in Eq. 3.3 and 3.4. If an FIR FD filter is being designed, the general form
of an N th order (length L = N + 1) filter would look like
                                      H(z) =         h(n)z −n                      (3.5)

An error function E(ejω ) is defined as the difference between the actual and the ideal
filters at a given frequency:

                                  E(ω) = H(ω) − Hid (ω)                            (3.6)

Frequency-domain filter design involves minimizing the above error metric according
to criteria that lead to the filter design goals being met. For example, it may be useful
in certain applications to use a filter with zero error at ω = 0. In other situations
the squared error integrated over a range of frequencies, may be minimized. Different
constraints on the error E(ω) lead to different types of filters.
   Lagrange interpolators belong to a class of filters called maximally flat filters
since they have a constant (flat) 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. Specifically, 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

   The N + 1 linear equations that follow from Eq. 3.7 can be solved to obtain the
N + 1 coefficients of the FIR filter. 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:
                            k n h(k) = D n         for n = 0, 1, 2, . . . , N      (3.8)

On solving these equations, a closed-form representation of the FIR filter coefficients
can be obtained:
                    h(n) =                    for n = 0, 1, 2, . . . , N          (3.9)

The ease of computing filter taps is an important feature of Lagrange interpolators.
By virtue of their design criterion, they exhibit a flat magnitude response at low
frequencies with no ripples. The magnitude response and group delay characteristics
of odd and even-length filters 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 filter taps. The filter impulse response for a third-order filter is shown in
Fig. 3.1. For α = 0.5, the filter 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 filters 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 filter, which moves as
α varies in (0, 1).

   For an even-length (odd-order) filter,the point of interpolation lies between the
two central samples. In such a scenario, the delay characteristics are superior to odd-

        Magnitude Response

                             0.8                                                                     N=6




                                      0   0.1   0.2   0.3    0.4    0.5    0.6     0.7   0.8   0.9         1
                                                            Normalized Frequency
                             2.5                                                                     N=4
                    Group Delay





                                      0   0.1   0.2   0.3    0.4    0.5    0.6     0.7   0.8   0.9         1
                                                            Normalized Frequency

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.

                             0.9                                                                  N=5
        Magnitude Response






                                   0   0.1   0.2   0.3   0.4     0.5     0.6    0.7   0.8   0.9         1
                                                         Normalized Frequency

                              3                                                                   N=5
        Group Delay





                                   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.

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 first-order Lagrange interpolator has a very flat
passband up to a normalized frequency of 0.1, so the use of a simple first-order
filter (linear interpolator) is adequate for the highly over-sampled system being used.
Note that a linear interpolator is simply two filter 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 filter order, N.

Shared By: