0% found this document useful (0 votes)
2 views

FDF1

Fractional delay filters are digital filters that delay an input signal by a fraction of the sampling period, useful in various digital signal processing applications such as speech coding and sampling rate conversion. The document discusses the design methods for these filters, including FIR and IIR approximations, and highlights their characteristics and ideal behavior. It emphasizes the need for fractional delay systems in improving synchronization in digital modems and enhancing speech synthesis and coding efficiency.

Uploaded by

Litarp Litarp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

FDF1

Fractional delay filters are digital filters that delay an input signal by a fraction of the sampling period, useful in various digital signal processing applications such as speech coding and sampling rate conversion. The document discusses the design methods for these filters, including FIR and IIR approximations, and highlights their characteristics and ideal behavior. It emphasizes the need for fractional delay systems in improving synchronization in digital modems and enhancing speech synthesis and coding efficiency.

Uploaded by

Litarp Litarp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Fractional Delay Filters

Contents:

1. Introduction
2. Filters
3. System with simple delay
4. Fractional delay filters
5. Design method for fractional delay filters
6. Results
7. Conclusion
8. References

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 1


Fractional Delay Filters

1. Introduction

A fractional delay filter is a digital filter which delays the input signal by a fraction of
sampling period. Such filters can be used in many areas of digital signal processing. For
example, time delay estimation, timing adjustment of digital modems, speech coding, speech
synthesis, arbitrary sampling rate conversion, echo cancellation... Design of a fractional delay
filter should meet two specifications: first the filter magnitude response must have an all-pass
behaviour in wide frequency range and it’s the phase response must be linear. Two main design
approaches are time domain approach and frequency domain approach. In time domain approach
filter coefficients are obtained through interpolation formula. Frequency domain approach is
based on frequency optimization.

One way to accomplish fractional delay is to convert the discrete time signal into
continuous time signal, then delay the analog signal by required time interval and then resample
the delayed analog signal to get a new discrete time signal. But this method is inefficient as one
need to design a continuous time system and conversion of the discrete time signal to an analog
signal and back to digital signal is also inefficient and unnecessary. We can design a discrete
time LTI system that delays a discrete time signal by a fractional number of samples.

2. Filters

Filters are the frequency selective circuits which passes only desired band of frequencies
and blocks or attenuates signals of frequencies outside this band. Filters can be classified in
number of ways:

1. Analog or Digital
2. Active or Passive
3. Audio (AF) or Radio frequency (RF)
4. Low pass , high pass, band pass , band reject and all pass filters

Depending on the type of the signal to be processed the filters are classified as analog
filters and digital filters. Analog filters are designed to process analog or actual signals while
digital filters process sampled values of analog signals using digital techniques. Depending on
the type of elements used in their construction, the filters are classified as passive or active

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 2


Fractional Delay Filters

filters. Elements used in passive filters are resisters, capacitors and inductors. Active filters
employ transistors or op-amps in addition to resisters and capacitors. The type of the elements
used dictates the operating frequency range of the filter. For example, RC filters are commonly
used for audio or low frequency operations whereas, LC or crystal filters are used for RF or high
frequency operations. A low-pass filter is a filter that passes signals with a frequency lower than
a certain cutoff frequency and attenuates signals with frequencies higher than cutoff frequency.
A high-pass filter is a filter that passes signals with a frequency higher than a certain cutoff
frequency and attenuates signals with frequencies lower than cutoff frequency. A band-pass filter
passes frequencies within certain range and rejects (attenuates) frequencies outside that range.
Band reject filter passes most frequencies unaltered, but attenuates those in a specific range to
very low levels. An all-pass filter passes all frequencies equally in gain, but changes the phase
relationship among various frequencies.

3. System with simple delay

Time delay is very common phenomenon in the engineering world. The system which
introduces delay to the signal is called delay element. The output of such system will be delayed
version of the input signal.

3.1 Continuous time system for arbitrary delay

Consider a delay element, which is a linear system whose purpose is to delay an


incoming continuous-time signal x(t) by  (in seconds). The output signal y(t) of this system can
be expressed as,

y ( t ) =x (t−x) (1)

The Fourier transform X() of a continuous-time signal x(t) is defined as,

x
X ( x )=∫ x ( t ) e
− j xt
dt (2)
−x

where  = 2 f is the angular frequency in radians.

The Fourier transform Y() of the delayed signal y(t) can be written in terms of X()

−j xx
Y ( x )=e X ( x) (3)

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 3


Fractional Delay Filters

The transfer function Hid() of the delay element can be expressed by means of Fourier
transforms X() and Y().

Y ( x ) − jx x
H id ( x )= =e (4)
X (x )

The term e-j corresponds to the Fourier transform of the delay of.

3.2 Discrete-time system for arbitrary delay

The continuous-time signal x(t) may be expressed by its samples x(nT), where n is the sample
index and T is the sample interval which is inverse of the sampling rate. The discrete-time
version of the delay operation for a sampled signal x(n) can simply be written as,

y ( n )=x ( n−D) (5)

where D=/T is the desired delay as multiples of the unit delay. The samples of the output
sequence y(n) are equal to the delayed samples of the input sequence x(n), and the delay element
is called a digital delay line. The spectrum of a discrete-time signal can be expressed by means of
the discrete- time Fourier transform (DTFT),

x
X ( ω )=∑ x (n)e− jωn ;∨ω∨≤ x (6)
−x

where ω= 2 f T is the normalized angular frequency.

The DTFT of the output signal y(n) can be written as,

− jωD
Y ( ω )=e X ( ω) (7)

The transfer function of an ideal discrete-time delay element can be given as,

Y ( ω ) − jωD
H ( ω )= =e ;∨ω∨≤ x (8)
X ( ω)

In the form of z-transform notation,

Y ( z) −D
H ( z )= =z (9)
X (z )

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 4


Fractional Delay Filters

4. Fractional delay filters

In digital signal processing it is easy to implement constant delay. If D is real, the delay
operation would not be simple, since the output value would lie somewhere between the known
samples of x(n). The sample values of y(n) would then have to be obtained by way of
interpolation from the sequence x(n). However this is different than the sampling rate
conversion. In fractional delay (FD) processing only one new sample per sampling interval needs
to be computed, whereas in interpolation for increasing the sampling rate, several new samples
per original sample interval may be needed and in the FD problem the fractional interval d to be
approximated is in general irrational, whereas in sample-rate conversions, simple rational ratios
are often used.

D  R+ is the length of the delay in samples may be written in the form,

D=D∫ ¿+d ¿ ( 10 )

where, Dint is integer part of the delay and 0 < d < 1 is the fractional delay.

4.1 Need for fractional delay systems

FDF provide useful building blocks that can be used for fine-tuning the sampling instants.
They can be utilized in many areas of digital signal processing. Synchronization in digital
modems, sampling rate conversion (irrational ratio), speech coding, speech synthesis, tuning the
music, time delay estimation, image re-sampling are some applications where FD filters are
useful.

1. Synchronization in digital modems

In digital data transmission, the transmitter transmits data symbols using analog
waveforms which carry one or more bits of information each. The main task of the receiver is
to detect these symbols as reliably as possible. Hence the receiver must be synchronized to
the symbols of the incoming data signal. Even though the receiver usually knows the nominal
symbol rate of the transmitter, the analog oscillators that are used to generate the frequency

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 5


Fractional Delay Filters

in practice have a limited precision and the frequency tends to vary with temperature and
aging. Further in mobile communications there will be frequency shifts due to the Doppler
effects. Hence, in practice the synchronization requires constant monitoring and adjustment.
Timing can be fine tuned by controlling appropriate FD filters. Low order FD filters are
sufficient for this application.

2. Sampling rate conversion (irrational ratio)

Changing the sampling rate is one of the standard problems in digital signal processing.
In many situations there is need for conversion between the different sampling frequencies
used in digital audio, which include 44.1 kHz (used in the CD-quality audio), 48 kHz (used
by the recorders), 32 kHz, 22.05 kHz, 11.025 kHz and 8 kHz among others. The sampling-
rate conversion is straightforward if the ratio of the input and output sampling rates is an
integer or a ratio of small integers. The sampling rate conversion for irrational ratios is more
difficult. In practice, the situation is often made even harder by the fact that the sampling rate
ratios are not only irrational but also time-varying. A conceptually simple solution can be
obtained using fractional delay filters, where every output sample is obtained from the input
sample by applying an FD filter approximating an appropriate delay.

3. Speech coding

Linear predictive coding is based on two processing steps: modelling the vocal tract
system and modelling the acoustic source or excitation. Here new samples are predicted by
forming a linear combination of past samples. Since shape of the vocal tract and accordingly
its resonance are varying relatively slowly, the weights called the prediction coefficients have
to be determined every 20-40ms. FD filters are very useful in improving speech coding
process. For example, to estimate pitch period a conventional pitch detector uses delay line
which approximates the pitch period and 3 tap FIR filter to improve prediction. Hence 4
parameters have to be encoded: length of the delay line and 3 predictor coefficients. With
fractional delay filter only two parameters have to be encoded: length of the delay line and
one predictor coefficient. This results in improved gain and quality with fewer bits for
encoding compared to the conventional method.

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 6


Fractional Delay Filters

4. Speech synthesis

Fractional delay waveguide filters can be used to model variable sections of the vocal
tract in articulatory speech synthesis. They are also useful in adjusting the length of a vocal
tract model based on the transmission-line, which is very similar to the digital waveguide
approach.

5. Music synthesis

Physical modelling of musical instruments is an emerging approach to sound synthesis.


The idea is to implement computational model of sound producing mechanism to guarantee
natural sound quality in different playing situations. FD filters needed for successful
synthesis of desired sound. For example, in signal processing model for vibrate string the
pitch of the sound is controlled by length of the delay line in the feedback. This can be
implemented as a combination of integer delay line and fractional delay filter. The pitch
values available without fractional delay do not match with generally used musical scales at
high frequencies. A low order FD filter can be used for fine tuning the delay line length.

4.2 Characteristics of the Ideal Fractional Delay Element

Frequency response of the ideal fractional delay filter is,

− jωD
H id ( ω ) =e ;∨ω∨≤ x ( 11 )

Magnitude response is unity for all frequencies i.e.,

¿ H id ( ω ) ∨¿ 1 ( 12 )

and phase response is given by

arg {H id ( ω ) }=Θid ( ω )=−Dω ( 13 )

Therefore the delay element is a linear-phase all-pass system. Its phase delay and the group delay
are,
 id ( )
 p ,id ( )  D ( 14 )

and
M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 7
Fractional Delay Filters

 id ( )
 g ,id ( )  D
 ( 15 )

respectively.

Therefore impulse response of an ideal fractional delay filter is a shifted and sampled sinc
function, that is,

h ( n )=sinc (n−D) ( 16 )

where n is the (integer) sample index.

Like the ideal low pass filter, the ideal fractional delay system cannot be exactly realized.
Because its impulse response is infinitely long, non-causal and not BIBO stable. To produce
realizable fractional delay filter we need to use some finite length approximation for the sinc
function.

5. Design methods for fractional delay filters

Two approaches are FIR approximation of fractional delay and IIR (All pass) approximation of
Fractional Delay.

Design methods for fractional delay FIR filters

1. Least squared(LS) integral error design

2. LS design with reduced bandwidth

3. Windowing the ideal impulse response

4. General least squares FIR approximation of a complex frequency response

5. Mini-max design of FIR FD filters

Design methods for all-pass filter approximation

1. Least squares (LS) phase approximation

2. LS phase delay approximation

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 8


Fractional Delay Filters

3. Maximally-flat group delay approximation

4. Iterative weighted LS phase error design

5. Iterative weighted LS phase delay error design

Here fractional delay filter implemented by method of windowing the ideal impulse response and
general least squares FIR approximation of a complex frequency response.

5.1 Windowing the Ideal Impulse Response

The impulse response of an FIR filter designed by the windowing method can be written in the
form,

h(n) = w ( n−D ) sinc ( n−D ) ( 17 )

where, w(n) is rectangular window

1 ;  ( M  1) n ( M  1)
w( n)  2 2
0 ; otherwise ( 18 )

where,

{
N
round ( D )− ; for even N
M= 2
( 19 )
N −1
floor ( D ) − ; for odd N
2

where, N is window length. The midpoint of the window function w(n) has been shifted by D so
that the shifted sinc function will be windowed symmetrically with respect to its centre. The
windowing method is suitable for real-time systems where the fractional delay is changed, since
the coefficients can be updated quickly. The samples of the sinc and the window function can be
stored in memory for several values of D. The approximation error will be larger with a window
function than without it. Thus, this design method does not minimize the LS error measure, but it
is an ad hoc modification of the LS technique. In general, the frequency response of an FD FIR
filter designed using this technique has a lower ripple but also a wider transition band than a
M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 9
Fractional Delay Filters

corresponding LS filter. A drawback is that the control of the magnitude error is difficult when
changing the parameters of window.

5.2 General Least Squares FIR Approximation of a Complex Frequency Response

In principle, the FIR fractional delay filter with the smallest LS error in the defined
approximation band is accomplished by defining the response only in that part of the frequency
band and by leaving the rest out of the error measure as a ‘don’t care’ band. This scheme also
enables frequency-domain weighting of the LS error. This technique is called general least
squares (GLS) FIR filter approximation and it results in the following error function,

xx xx
1 1
EGLS = ∫ W ( ω ) ¿ E ( e ) ∨¿ dω= ∫ W ( ω ) ¿ H ( e )−H id ( e )∨¿ dω ¿ ¿
jω 2 jω jω 2
( 20 )
x 0 x 0

Where, the error is defined in the low-pass frequency band [0, ] only and W(ω) is the
nonnegative frequency-domain weighting function. The DTFT of the FIR filter can be written as,

H ( e jω )=h T e ( 21 )

where h is the coefficient vector

T
h=[h ( 0 ) h ( 1 ) ⋯ h ( N ) ] ( 22 )

and e is defined as,

− jω − jNω T
e=[1 e ⋯e ] ( 23 )

The error function

xx
1
EGLS = ∫
x 0
jω jω x
W ( ω ) [¿ h e−H id ( e ) ][h¿¿ T e−H id ( e ) ] dω ¿ ¿
T
( 24 )

where the superscript ‘’ denotes complex conjugation.

xx
1
EGLS = ∫ W ( ω ) ¿ ¿ ( 25 )
x 0

where,

C=ℜ { e e H } ( 26 )

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 10


Fractional Delay Filters

Here the superscript ‘H’ stands for the Hermitian operation, i.e., transposition with conjugation.
Then the error function can be expressed as,

T T
EGLS =h Ph−2h p 1+ p 0 ( 27 )

where ,

xx
1
P= ∫ W ( ω ) Cdω ( 28 )
x 0
xx
1
p1= ∫ W ( ω ) [¿ ℜ { H id ( e ) } c−ℑ { H id ( e ) } s ]dω ¿
jω jω
( 29 )
x 0


1
p0 
 W ( ) |H
0
id (e j ) |2 d
( 30 )
T ( 31 )
c=[1cos ( ω ) … cos (N ω)]

T
s=[0 sin ( ω ) … sin(N ω)] ( 32 )

The optimal solution is obtained by solving for the minimum of the error measure. The unique
minimum-error solution is found by setting its derivative with respect to h to zero. This results in
the following normal equation

2 Ph−2 p 1=0 ( 33 )

which yields,

−1
h=P p 1 ( 34 )

The design is much easier if the weighting function is not used, i.e., W(ω) = 1, since the solution
can be given in closed form. Then elements of P and p1 can be expressed as


1
Pk ,l 
 cos[( k  l ) ]d  sin c[ (k  1)]
0

( 35 )

and

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 11


Fractional Delay Filters


1
p1, k 
 cos[( k 
0
D) ]d  sin c[ (k  D)]
( 36 )

Here matrix P is independent of the delay parameter D and only needs to be inverted once. The
resulting FIR filter coefficients depend on the choice of frequency band parameter  and the
weighting function.

6. Results

Figure 1: Magnitude Response

Figure 2: Phase delay response

Figure 1 and 2 present magnitude and phase delay response for third-order GLS filter with unity
weighting function W(ω) = 1 and  = 0.5 (i.e., half-band approximation) respectively. At high

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 12


Fractional Delay Filters

frequencies the error has slightly increased since the approximation error outside the pass-band
[0, 0.5] has not been considered in the design.

Figure 3: The curves plotted for 11 fractional delay values between 1.0 and 2.0

Figure 4: Delayed signal with delay D=1.2

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 13


Fractional Delay Filters

Figure 5: Delayed signal with delay D=1.9

Figure 3 shows output curves plotted for 11 fractional delay values between 1.0 and 2.0. Figure
4 and 5 show delayed signal with delay D=1.2 and D=1.9 respectively.

7. Conclusion

General least square’s approximation for fractional delay filter design is implemented in
Matlab for arbitrary fractional delay D and the results are analysed. It is seen that maximum error
in both magnitude and phase delay has been reduced in the approximation band. At high
frequencies error has slightly increased, since approximation error outside the pass band is not
considered in the design.

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 14


Fractional Delay Filters

8. References

[1]. V. Valimaki and T. I. Laakso, “Fractional delay filters—design and applications,” in Theory
and Applications of Nonuniform Sampling, F. Marvasti, ed. New York: Plenum/Kluwer, April
2000

[2]. M.Lang. “Allpass filter design and applications” IEEE Trans. Signal Process., vol.46, no.9,
pp. 2505-2514, September 1998

[3]. T. I. Laakso, V. Valimaki, M. Karjalainen, and U. K. Laine, “Split- ting the unit delay—
tools for fractional delay filter design,” IEEE Signal Process. Mag., vol. 13, no. 1, pp. 30–60,
January 1996.

[4]. H.W.Schubler and P.Steffen. “On the design of allpass with the prescribed group delay”. In
Proc. IEEE Int. Conf. Acoust., Speech, Signal Processing (ICASSP), vol. 3, pp. 1313-1316,
Albuquerque, April 1990

[5]. J.P.Thiran. “Recursive digital filters with maximally flat group delay” IEEE Trans. on
Circuit Theory, vol.18, no.6, pp. 659-664, November 1971

M.Tech., Digital Communications, Dept. of ECE, BEC, Bagalkot. Page 15

You might also like