Tampere University of Technology 1
POLYNOMIAL-BASED INTERPOLATION
FILTERS FOR DSP APPLICATIONS
DESIGN, IMPLEMENTATION, AND APPLICATIONS
Djordje Babic, Jussi Vesma, Tapio Saramäki,
Vesa Lehtinen, Markku Renfors
Tampere University of Technology, Finland
• This pile of lecture notes is based on the research
work done by Dr. Tech. Jussi Vesma, Prof. Tapio
Saramäki, Dr. Tech. Djordje Babic, and Prof. Markku
Renfors.
• The lecture notes have been prepared by Prof.
Saramäki and Dr. Vesma, and updated by Dr. Babic
and M.Sc. Vesa Lehtinen.
Tampere University of Technology 2
POLYNOMIAL-BASED INTERPOLATION
FILTERS FOR DSP APPLICATIONS
DESIGN, IMPLEMENTATION, AND APPLICATIONS
Speaker: Vesa Lehtinen
Tampere University of Technology, Finland
e-mail: [email protected]
Contents
1. Interpolation Filters
2. Fractional-Delay Filters
3. Lagrange Interpolation
4. Analog Model for Interpolation Filter
5. Polynomial-Based Interpolation Filters
6. Design
7. Applications
Tampere University of Technology 3
INTERPOLATION FILTERS
• In many DSP applications there is a need to know the
value of a signal also between the existing discrete-
time samples x(n).
• Special interpolation filters can be used to compute
new sample values y(l)=ya(tl) at arbitrary points
t l = (nl + µl)Tin.
• Here ya(t) approximates the original continuous-time
signal xa(t).
• The output sample time is thus determined by the
fractional interval (or delay) µl∈[0,1) and the integer
index nl.
• Terms "interpolator" and "fractional delay (FD) filter"
are also used in the literature.
ya(t) = x(n)
= y(l)
µl-1Tin µlTin µl+1Tin
nl-1Tin tl-1 nlTin tl nl+1Tin tl+1 Time
Fig. 1. Interpolation in the time domain.
Tampere University of Technology 4
Terminology pitfalls:
Mathematical interpolation
vs. interpolation in DSP
vs. decimation
• In mathematics, interpolation stands for constructing a
smooth curve that travels through all given points.
o Constructing a curve that is as close as possible
but does not include all the given points is
referred to as approximation. Cf., e.g., least-
squares approximation.
• In DSP, upsampling + antiimage filtering commonly
referred to as “interpolation” (vs. decimation).
o Not all DSP “interpolators” interpolate in the
mathematical sense.
o Filters that interpolate in the math sense are also
known as Nyquist filters (recall the zero
intersymbol interference property).
o It is the antiimage filter that performs the
interpolation, not the upsampler.
• In decimation by fractional (nonintegral) ratios,
output samples are generated between the input
samples.
=> Fractional decimation incorporates interpolation /
approximation for the purpose of antialiasing.
Tampere University of Technology 5
Applications for Interpolation Filters
• Timing adjustment in all-digital receivers (symbol
synchronization)
• Time delay estimation
• Conversion between arbitrary sample rates
• Conversion between uniform and nonuniform sample
grids
• Echo cancellation
• Phased array antenna systems
• Speech coding and synthesis
• Computer simulation of continuous-time systems
• Image processing (image resizing and rotation)
Tampere University of Technology 6
Statement of the general interpolation problem
for uniformly sampled input
x(n) Interpolation filter y(l)
h(k,µl)
nl µl
Fig. 2. Simplified block diagram for interpolation filter.
• The input parameters nl and µl are used to determine
the time instant tl for the lth output sample y(l)=ya(tl)
as t l = (nl + µl)Tin.
• Given tl, these parameters are determined by
nl = tl / Tin and µl = tl / Tin − tl / Tin (1)
• After knowing nl and µl, the interpolation filter
calculates y(l) according to the convolution
N / 2−1
∑y(l) = x(nl − k)h(k, µl ).
(2)
k=−N /2
where N is the length and h(k, µl) is the (discrete-time)
impulse response of the interpolation filter.
Tampere University of Technology 7
Interpretation of the convolution sum
• First, the location of the existing sample preceding (or
occurring at) the new sampling instant tl is determined
and denoted by nl.
• Based on the location of this sample, the existing
samples located at n=nl−N/2+1, nl−N/2+2,···, nl+N/2
are used. This means that there are N/2 existing
discrete-time samples before and after the desired new
time instant tl.
• Second, the distance between tl and nlTin is measured
as a fraction of Tin, giving the fractional interval µl.
• In the above convolution, µl determines the
coefficient values h(k,µl). The purpose is to determine
them in such a way that y(l) is found according to
some criterion to be discussed next.
Tampere University of Technology 8
Requirements for the impulse-response coefficients
h(k, µl)
1.h(k, µl) should be optimized such that
y(l)≈xa((nl+µl)Tin) for all values of µl∈[0,1) and l.
2.The fundamental idea in the optimization is that ya(t)
approximates the original continuous-time signal xa(t)
according to some time-domain or frequency-domain
criterion.
3.Frequency-domain criteria are preferred for DSP
applications.
4.The interpolation filter should have an efficient digital
implementation structure.
Tampere University of Technology 9
Filter Synthesis and Analysis Problem
• The problem is now to design a filter which calculates
the interpolated samples y(l) for a given value of µl
based on the above discussion.
• And to analyze the performance of the filter (what is
the error between ya(t) and xa(t)).
• Note that the direct analysis of the above interpolation
filter is difficult, because the system is time-varying.
Three approaches to find a solution
1.The frequency response of the ideal fractional delay is
e−jωµ, find a FIR filter to approximate this response
(FD filter approach) for each value of µ.
2.Use some classical interpolation method to calculate
y(l), e.g., Lagrange or B-spline interpolation (time-
domain approach).
3.Utilize the continuous-time (analog) model for the
interpolation filter (frequency-domain approach).
Tampere University of Technology 10
FD FILTERS
• There are several synthesis methods [1] to design FIR
filters having a phase delay of Dint+µ, where
Dint=N/2−1 is the integer delay determined by the
length of the filter N and µ∈[0,1) is the fractional
delay.
• The amplitude response of this FIR filter should
approximate unity on the given frequency band.
• Good solution when µ is fixed. Otherwise, several FD
FIR filters are designed and coefficients are stored in a
lookup table. ⇒ Need for a large memory.
• See Matlab demo #1.
Tampere University of Technology 11
Example: FD Filter
• The length of the filter N=8, Ωp=[0, 0.75π], six
different filters having µ=0, 0.1, 0.2, 0.3, 0.4, and 0.5
1Amplitude Response
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Angular Frequency ω / π
Fig. 3. Amplitude response for the example FD filter.
Phase Delay Response3.5
3.4
3.3
3.2
3.1
3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Angular Frequency ω / π
Fig. 4. Phase delay response.
Tampere University of Technology 12
LAGRANGE INTERPOLATION
• In Lagrange interpolation, the interpolated signal ya(t)
is a piecewise polynomial of an odd degree M.
ya((n+µ)Tin)=ŷn((n+µ)Tin)
I.e., the polynomial ŷn(t) is used for
t∈[nTin, (n+1)Tin).
• The polynomial pieces ŷn(t) are defined such that
ŷn(kTin)=x(kTin) for N=M+1 consecutive sample points
k=n−N/2+1,…,n+N/2. Notice that these points extend
beyond the range in which ŷn(t) is applied.
• Disadvantage: Does not utilize the frequency-domain
information of the input signal x(n).
• Lagrange interpolation is discussed in more detail later
on.
• See Matlab demo #2.
Tampere University of Technology 13
Example: Lagrange Interpolation
• How to obtain y(l)?
ZERO-ORDER HOLD = x(n)
= y(l)
ya(t)
µlTin = x(n)
= y(l)
nl (nl+µl)Tin nl+1
LINEAR INTERPOLATION
ya(t)
µlTin = x(n)
= y(l)
nl (nl+µl)Tin nl+1
CUBIC LAGRANGE INTERPOLATION
ya(t)
µlTin
nl (nl+µl)Tin nl+1
Fig. 5. Lagrange interpolation.
Tampere University of Technology 14
ANALOG MODEL FOR INTERPOLATION
FILTER
x(n) xs(t) ha(t) ya(t) y(l)
DAC
Sample at
tl = ( n l + µ l ) Tin
Fig. 6. Analog model for interpolation filter.
• Interpolation is a reconstruction problem where the
approximating signal ya(t) is reconstructed based on
the existing discrete-time samples x(n).
• Therefore, one useful way to model discrete-time
interpolation filters is to use the analog system shown
in Fig. 6.
• In this system, x(n) is first converted to the sequence
of weighted and shifted Dirac impulses xs(t).
• xs(t) is then filtered using an analog, linear time-
invariant (LTI) reconstruction filter ha(t) resulting in
the following convolution:
∞∞
∫ ∑ya (t) = xs (τ )ha (t − τ )dτ = x(k )ha (t − kTin ).
−∞ k =−∞ (3)
Tampere University of Technology 15
Why to Use the Analog Model?
• Interpolation is generally considered as a time-domain
polynomial fitting problem which is not a very
practical approach for DSP applications. This is
because the time-domain characteristics of the signal
are not known usually. What is known is the
frequency band of the signal.
• The use of the analog model turns interpolation from a
time-domain problem to a frequency-domain filtering
problem.
• Various interpolation methods can, indeed, be
expressed as convolution when the input samples are
uniformly spaced.
Tampere University of Technology 16
Role of ha(t) in the Frequency Domain
• How to design ha(t) in the frequency domain?
• Such that it preserves the signal components in the
range [0, Fin/2] and attenuates them elsewhere.
Xa( f )
f
Fin/2
Fig. 7. The spectrum of the original continuous-time signal.
X(e j2π f /Fin) Ha( j2π f )
f
Fin/2 Fin 2Fin
Fig. 8. The spectrum of the input signal x(n) and the frequency
response of the reconstruction filter ha(t).
Tampere University of Technology 17
Farrow structure – traditional approach
• The main idea of this part is the understanding of the
special implementation form of polynomial-based
interpolation filters.
• y(l) is then obtained by sampling ya(t) at tl giving
N / 2−1 (4)
∑y(l) = ya (tl ) = x(nl − k )ha ((k + µl )Tin ) .
k=−N /2
• It is assumed that ha(t) is zero outside the interval
−NTin /2 ≤t ≤NTin /2.
• By comparing (2) and (4), it can be seen that the
impulse responses of the analog and discrete-time
filters are related as follows:
h(k, µl ) = ha((k + µl )Tin ) (5)
for k=−N/2, −N/2+1,···, N/2−1.
• In the causal case, ha(t) is delayed by NTin/2 and the
output is given by
N −1
∑y(l) = x(nl − k + N / 2)ha ((k + µl − N / 2)Tin ).
k =0 (6)
Tampere University of Technology 18
• For a polynomial-based interpolation filter, the
impulse response ha(t) is expressed in each interval of
length Tin by means of a polynomial as follows:
∑ha ((k + µl ) Tin ) = M cˆm (k )µl m (7)
m=0
for k=−N/2,···, N/2−1. Here the cˆm (k) ’s are the
coefficients and M is the degree of the polynomials.
• By using the analog model, the digital implementation
structure for polynomial-based interpolation filters can
be derived by substituting (7) into (6) giving
N −1 M cˆm (k − N / 2)µl m = M vm (nl )µl m
x(nl / 2)
k =0
∑ ∑ ∑y(l) =
−k + N (8)
m=0 m=0
where (9)
N −1
∑vm (nl ) = x(nl − k + N / 2)cˆm (k − N / 2)
k =0
are the output samples of the M+1 FIR filters having
the transfer functions
N −1 (10)
∑Cˆm (z) = cˆm (k − N / 2)z−k .
k =0
Tampere University of Technology 19
Interpretation of the Above Equation
• According to Equation (9), the lth output sample y(l)
at the time instant t = (nl+µl)Tin can be generated
based on the N existing samples x(n) being located at
n=nl−N/2+1, nl−N/2+2,···, nl+N/2 in the following
three steps:
• First, these samples are filtered using M+1 FIR filters
having the transfer functions of the form given in (10)
• Second, the outputs of these filters, denoted by vm(nl),
are multiplied with constants µl m .
• Third, the multiplication results are added, leading to
the so-called original Farrow structure shown in Fig.
10.
• In this figure, the input to both structures is denoted
by x(nl + N/2) to emphasize the fact that this is the last
existing sample value when evaluating y(l).
• If desired, the transfer functions Cˆ m (z) can share the
delay elements.
Tampere University of Technology 20
x(nl)
C^M(z) C^2(z) C^1(z) C^0(z)
vM(nl) v2(nl) v1(nl) v0(nl)
Hold & sample
y(l)
µl
Fig. 9. The Farrow structure for interpolation.
x(nl + N/2) c1(0) c0(0)
Fin cM(0) −1 −1
−1 Z c1(1) Z c0(1)
Z cM(1)
−1 −1 −1
Z ZZ
cM(N − 1) c1(N − 1) c0(N − 1)
vM (nl) v1(nl) v0(nl) Fout
µl
y(l)
Fig. 10. The Farrow structure.
Tampere University of Technology 21
Characteristics of the Farrow Structure
• The number of FIR subfilters is M+1.
• The length of these subfilters is N.
• Filter coefficients are directly determined by the
polynomial coefficients of the impulse response ha(t).
• The main advantage of the Farrow structure is that all
the filter coefficients are fixed.
• The only changeable parameters are the fractional
interval µl as well as nl that depend on the lth output
sampling instant.
• During computation, the control of µl is easier than in
the implementation based on fixed FD filters.
• The resolution of µl is limited only by the precision of
the arithmetic, not by the size of the coefficient
memory.
• These characteristics of the Farrow structure make it a
very attractive structure to be implemented using a
VLSI circuit or a signal processor.
• In fact, the Farrow structure is a general-purpose
adjustable FIR filter whose taps are polynomials in a
control variable. Any filter property may be varied.
Tampere University of Technology 22
POLYNOMIAL-BASED INTERPOLATION
FILTERS
General approach: How to construct the impulse
response ha(t)
• ha(t) nonzero for 0 ≤t<NT and zero elsewhere.
• In each subinterval nT ≤t<(n+1)T for n=0, 1, …, N−1,
ha(t) is expressible as ha (t) = ∑mM=0 cm (n) fm (n,T ,t) that is,
ha(t) is a piecewise-polynomial for 0 ≤t<NT and is of
degree M in each subinterval.
• ha(t) is symmetric around t = NT/2, that is, ha(NT−t) =
ha(t), possibly excluding the segment edges (time
instants t = nT for n=0, 1, …, N/2−1 and n= N/2+1,
N/2+2, …, N).
• Lagrange interpolation filters have the same
properties (plus some more).
• Mathematical representation:
ha (t) = N −1 M cm (n) f m (n, T , t ) (11)
∑ ∑
n=0 m=0
(2t − nT ) 1 m
T
fm (n, T , t) = − for nT ≤t < (n +1)T (12)
0 otherwise,
Tampere University of Technology 23
• The symmetry property ha(−t)=ha(t) is achieved by
cm (n) = (−1)m cm (−n − 1) (13)
for m=0, 1,···, M and n=0, 1,···, N/2−1. This
condition halves the number of unknowns.
• ha(t) can be now constructed as follows
N / 2−1 M
∑ ∑ha (t) =
cm (n)g(n,m,t) (14)
n=0 m=0
where cm(n)’s are unknown coefficients and g(n,m,t)’s
are the basis functions given by
gm (n, T , t) = (−1)m fm (n, T , t − NT / 2) (15)
+ fm (N −1 − n, T , t − NT / 2) .
Amplitude 1
0
−1 2
−2 −1 0 1
Time in T
in
Fig. 11. The basis function g(n, m, t) for n = 1 and m = 3.
Tampere University of Technology 24
Example how to construct ha(t) for N = 8 and M= 3.
0.7
0 (a)
−0.2 (b)
(c)
0.6 (d)
0 (e)
−0.6
0.17
0
−0.14
0.1
0
−0.1
1
Overall impulse response ha ( t )
0
−0.2
−8 −6 −4 −2 0 2 4 6 8
t/T
Fig. 12. Construction of the overall impulse response ha(t) for N = 8
and M = 3. (a)−(d) The weighted basis functions cm(n)g(n, m, t) for
m = n = 0, 1 , 2, and 3. (e) The resulting impulse response ha(t).
• T, the length of polynomial segments can be chosen as
T = βTin or T = βTout, where β is unity, an integer, one
divided by an integer.
• The polynomial based filters are efficiently
implemented by using Farrow structure and its
modifications.
Tampere University of Technology 25
“MODIFIED” FARROW STRUCTURE
• In this case, the desired ha(t) is obtained from (2) by
selecting T to be input sampling period in Fig. 1, that
is, T = Tin, yielding
ha (t) = N −1 M cm (n) fm (n,Tin , t ) (16)
∑ ∑
n=0m=0
where the basis functions fm(n, Tin, t) are given by
(2t − nTin ) 1 m
Tin
fm (n, Tin , t) = − for nTin ≤t < (n + 1)Tin (17)
0 otherwise .
• By substituting the resulting ha(t) into (6), the lth
output sample can be expressed, after some
manipulations, in the following form:
y (l ) = N −1 M x(nl −k + N / 2)cm (k)(2µl −1)m , (18)
∑∑
k = 0m = 0
where (19)
nl = lTout Tin and µl = lTout Tin − nl .
Tampere University of Technology 26
• Compared to the ‘regular’ case, here, instead of using
µl we use 2µl−1 as a basis polynomial to construct
ha(t) as follows:
M m
∑ha ((n + µl )Tin ) =
cm (n)(2µl − 1) (20)
m=0
for n=−N/2, −N/2+1,···, N/2−1. Here the cm(n)’s are
the unknown polynomial coefficients.
Amplitude 1111
−1 −1 −1 −1 1
0 10 10 10
(21)
Time in Tin (22)
Fig. 13. Polynomials (2µl − 1)m for m = 0, 1, 2, and 3.
• Alternatively, y(l) can be rewritten as
y(l) = M vm (nl )(2µ l −1)m ,
∑
m=0
where
vm (nl ) = N∑−1x(nl − k + N / 2)cm (k)
k =0
Tampere University of Technology 27
“Modified” Farrow structure
• Note that the polynomial coefficients cm(n) are
symmetrical according to (13).
• And 2µl−1 is used instead of µl.
• Therefore, interpolation filters based on this approach
can be implemented using the Modified Farrow
structure
• This modified structure has two differences compared
to the original structure.
1.The output samples vm(nl) of the FIR filters are
multiplied with 2µl−1 instead of µl.
2.FIR filters having the transfer functions
N −1
∑Cm (z) = cm (k − N / 2)z−k
k =0 for m = 0,1,!, M (23)
possess the properties given by (13).
• When exploiting the above symmetries, the number of
coefficients to be implemented can be reduced from
(M+1)N to (M+1)N/2 for N even.
Tampere University of Technology 28
x(nl)
CM(z) C2(z) C1(z) C0(z)
vM(nl) v2(nl) v1(nl) v0(nl)
Hold & sample
y(l)
2µl-1
Fig. 14. The Modified Farrow structure for interpolation.
x(nl + N/2) c1(0) c0(0)
Fin cM(0) −1 −1
−1 Z c1(1) Z c0(1)
Z cM(1)
−1 −1 −1
Z ZZ
cM(N − 1) c1(N − 1) c0(N − 1)
vM (nl) v1(nl) v0(nl) Fout
2µl −1 y(l)
Fig. 15. The Modified Farrow structure, subfilter
structure (unoptimized) shown.
Tampere University of Technology 29
TRANSPOSED FARROW STRUCTURE
• In interpolation (increasing the sample rate), the same
Farrow interpolator can be used for various rate
conversion factors.
o The antiimage filtering effect & requirements are
independent of the output sample rate!
• In decimation, the direct Farrow structure often
performs poorly, and the coefficients need to be
optimized separately for each decimation factor, i.e.,
the flexibility is lost.
=> Is there something for decimation that would
correspond to Farrow in interpolation??
• Yes! It is known as the transposed Farrow structure.
• Entire structure & subblocks transposed. Hold &
sample (H&S) becomes its dual, integrate & dump
(I&D).
• When generating the transposed Modified Farrow
structure, the desired ha(t) is obtained from (2) by
selecting the length T of the polynomial segments to
equal the output sample period, that is, T = Tout,
giving
ha (t) = N −1 M cm (n) f m (n, Tout , t ), (24)
∑ ∑
n = 0m = 0
Tampere University of Technology 30
where
f m (n, Tout , t) = ((2t − nTout ) Tout −1)m for nTout ≤ t < (n + 1)Tout (25)
otherwise.
0
By substituting the resulting ha(t) into (3), the lth output sample can
be expressed, after some manipulations,
y(l) = M N∑−1cm (n)vm (n, l), (26)
(27)
∑ (28)
m=0 n=0
where vm (n, l) = kup (n,l ) x(k )(2µ k − 1)m
with
∑
k = k low (n,l )
klow (n, l) = (l + N / 2 − n −1) Tout Tin ,
kup (n, l) = s(n, l) −1 if s(n, l) is an integer
s(n, l) (29)
otherwise,
s(n, l) = (l + N / 2 − n)Tout / Tin , (30)
and µk = kTin / Tout − kTin / Tout .
(31)
• Here, the fractional interval µk is the distance between
the current input sample x(k) and the previous output
sample position y(l−1) divided by Tout.
• This structure is used only for decimation.
Tampere University of Technology 31
2µk − 1 −1 I&D
x(k)
Fin Z
−1 −1 ov(l)
vM(n,l)
ZZ
Fout v0(n,l) v1(n,l) cM(0) −1
c0(0) c1(0) Z
c0(1) c1(1) cM(1) −1
Z
c0(N − 1) c1(N − 1) cM(N − 1) y(l)
Fig. 16. Transposed Modified Farrow structure.
• In single-rate FD filtering, H&S and I&D vanish,
hence the direct & transposed Farrow structures are as
good.
• Notice that in FD filtering, if µ changes relatively
seldom, Farrow is inefficient – it is better to only
calculate all the N filter taps whenever µ changes and
to use those values until µ changes again.
=> N multiplies per sample instead of (M+1)N/2.
Tampere University of Technology 32
TIME-SCALED FARROW VARIANTS *
• The impulse response of a polynomial interpolator can
be scaled in the time domain.
o Stretching in time domain
= shrinking in frequency domain
o Shrinking in time domain
= stretching in frequency domain
• Time-shrinking: J polynomial segments per input
sample interval
o Lower polynomial degree
o Longer subfilters, i.e., more coefficients
o Subfilter output only needs to be computed for
those segments for which output is requested.
o Referred to as the “generalized Farrow structure”
by some authors.
• Time-stretching: Each polynomial segment covers J
input sample intervals.
o Narrower passband with the same subfilter
coefficients.
o Requires J sets of basis multipliers.
o Known as the prolonged Farrow structure.
Tampere University of Technology 33
STRUCTURE CONSISTING OF A
CASCADE OF A LINEAR-PHASE FIR
INTERPOLATOR AND A MODIFIED
FARROW STRUCTURE
• The proposed structure consists of two basic building
blocks. The first block is a linear-phase FIR filter
transfer function of the following form:
HI (z) = KI hI (k ) z − k , (32)
∑
k =0
where the impulse-response of HI (z) is symmetric, that is,
hI (K I − k) = hI (k) for k = 0,1, …, K I . (33)
The second building block involves generating the desired lth
output sample of Fig. 17 according to
y (l ) = N −1 M z(nl −k + N / 2)cm (k)(2µl − 1) m (34)
∑∑
k = 0m = 0
where
nl = lTout (LTin ) and µl = lTout (LTin ) − nl . (35)
x(n) ↑L FIR filter z(j) Farrow y(l)
Fin LFin HI(z) LFin structure Fout
Fig. 17. Linear-phase FIR interpolation filter in cascade with
Modified Farrow structure for interpolation.
Tampere University of Technology 34
• Alternatively, the resulting overall system
corresponds to that of Fig. 6, where ha(t) is replaced
by
ga (t) = NI hI (l )ha (t − lTin / L). (36)
∑
l=0
• The resulting impulse response ga(t) is characterized
by the following properties:
1)ga(t) is formed as a shifted and weighted sum of the
start-up piecewise polynomial ha(t) with the length of
polynomial segments being equal to Tin/L.
2)The resulting ga(t) is nonzero for 0 ≤t<(KI+N)Tin/L
and of order M in each of the subintervals nTin/L
≤t<(n+1) Tin/L for n=0, 1, …, KI+N −1.
• The main advantage of using the cascaded structure of
Fig. 17, instead of the direct Modified Farrow
structure of Fig. 14, lies in the fact that when jointly
optimizing the two building blocks the computational
complexity to generate practically the same filtering
performance is drastically decreased. This is due to
the following facts:
1) The implementation of a fixed linear-phase FIR
interpolator is not very costly.
2) The requirements for implementing the Modified
Farrow structure become significantly milder.
Tampere University of Technology 35
TRANSPOSED CASCADED STRUCTURE
• The previous interpolation structure has its dual
implementation form. The main properties are the
same.
x(n) Transposed z(j) FIR filter ↓L y(l)
Fin Farrow LFout HD(z) LFout Fout
Fig. 18. Transposed Farrow structure in cascade with a linear-
phase FIR decimation filter for decimation.
Tampere University of Technology 36
What Do We Have Up to Now:
1.The fundamental idea is that the approximating signal
ya(t) approximates the original continuous-time signal
xa(t) according to some condition, and then the output
sample is y(l)=ya((nl +µl)Tin).
2.By using the analog model, this approximation
problem can be converted to the problem of designing
the reconstruction filter ha(t).
3.If ha(t) is a piecewise polynomial, then the Farrow
structure or its modifications can be used for
implementation.
• Next we will discuss how to obtain the coefficients
cˆm (k) for the polynomial-based impulse response
ha(t).
Tampere University of Technology 37
DESIGN
• We consider only polynomial-based interpolation
filters because they can be efficiently implemented
using the Farrow structure or its modifications.
• Design methods for polynomial-based interpolation
filters to be considered
1.Conventional time domain design: Lagrange
interpolation.
2.Frequency domain design based on the analog
model: Minimax and least-mean-square
optimization of the interpolation filters.
• The design methods will be compared by using the
impulse response and frequency response of the
corresponding reconstruction filter ha(t).
Tampere University of Technology 38
Lagrange Interpolation
• Lagrange interpolation was originally used in
mathematics, not in signal processing (discovered by
Joseph-Louis Lagrange 1736-1813).
• Does not offer a good filtering characteristics.
• Filter design is done in the time domain and the filter
coefficients can be given in a closed form.
⇒ No need for optimization.
1.Choose the degree M of interpolation, the length of
the filter is then N=M+1.
2.Based on the time-domain conditions for ya(t) in (3),
the polynomial coefficients for ha(t) are determined by
the following equation:
∑ ∏M = N /2 j−x
cˆm (k )xm j =− N / 2+1 −k+ j
(37)
m=0
j≠k
for k=−N/2, −N/2+1,···, N/2−1.
Tampere University of Technology 39
Example
1.2
1
Impulse response h (t) 0.8
a 0.6
0.4
0.2
0
−0.2 −1 0 1 2
−2
Time in Tin
Fig. 19. Impulse response ha(t) for the cubic (solid line) and linear
(dashed line) Lagrange interpolation filters
0Magnitude in dB
−10
−20
−30
−40
−50
−60
0 0.5 1 1.5 2 2.5 3 3.5 4
Frequency in Fin
Fig. 20. Magnitude responses for the cubic (solid line) and linear
(dashed line) Lagrange interpolation filters
Tampere University of Technology 40
Disadvantages of the Lagrange interpolation filters
• The frequency response can not be changed: stopband
attenuation, passband ripple as well as edge
frequencies are fixed.
• If the degree of the interpolation is M, then the length
of the filter is always N=M+1.
• The stopband attenuation can not be improved easily
by increasing the degree of the interpolation (e.g., 5 or
7), but the number of filter coefficients increases fast.
• Do not have characteristics of a good lowpass
(reconstruction) filter, at least if the input signal
contains frequency components close to half the
sampling frequency.
• Solution: make the input signal narrowband by
increasing the sampling rate before the Farrow
structure.
• For instance, the third order Lagrange interpolation
filter attenuates the image frequencies at least by 60dB
if the bandwidth of the input signal is 0.1Fin as shown
in Fig. 21.
Tampere University of Technology 41
Magnitude in dB 0
−10
−20
M=1
−30
−40
M=9
−50
−60
−70
−80
−90
0 0.5 1 1.5 2 2.5 3 3.5 4
Frequency in Fin
Fig. 21. The magnitude responses |Ha( f)| of the Lagrange
interpolation filters with degree M = 1, 3, 5, 7, and 9 (solid
lines) and the spectrum Xs( j2π f) of the input signal with
the bandwidth of 0.1Fin (dashed-line).
Tampere University of Technology 42
The frequency response of polynomial–based filter
ha(t) in general
• The zero-phase frequency response of polynomial-
based filter in general is given by:
N / 2−1 M
∑ ∑Ha ( f ) =
cm (n)G(n,m, f ) (38)
n=0 m=0
• Since g(n,m,t) is symmetrical around t=0, G(n,m,f) is
real and is given by
2 cos(ω (n + 1 ))(−1)m/ 2 m!Φ(m, f ) + sin(ω / 2)
2 ω / 2
G(n,m,ω ) = for m even
2(−1)(m+1)/ 2 m!sin(ω (n + 1 ))Φ(m, f ) for m odd, (39)
2
with ω=2πfT and
Φ(m, f (m−1) / 2 f T) 2k −m (−1)k sin(π f T ) cos(π f T ) .
(2k )! πfT
) = ∑ (π − (2k +1) (40)
k =0
Tampere University of Technology 43
General Frequency-Domain Synthesis Technique
for Interpolation Filters
• It is desired to design in the analog model of Fig. 6
the reconstruction filter with impulse response ha(t)
only subject to the restriction that the overall system
can be implemented using the Farrow structure or
its modifications.
• In this case, M and N can be selected arbitrarily.
• The main goal to is to optimize the coefficients of the
Farrow structure and the corresponding impulse
response ha(t) in such a manner that the overall system
provides the desired frequency-domain behavior that
depends on the application.
• The purpose is to determine the coefficients in such a
manner that the amplitude response of the
reconstruction filter approximates an arbitrary
amplitude response either in the least-squares (L2)
sense or in the minimax (L∞) sense.
• It is also desired to allow the use of some time-
domain conditions for the overall impulse response
ha(t).
Tampere University of Technology 44
Optimization problem: find the unknowns cm(n) to
minimize
δ∞ = max W ( f ) Ha( f ) − D( f ) (41)
f ∈X
where X is the approximation region, D(f) is the
desired function, and W(f) is the weighting function.
• These interpolation filters can also be optimized in L2
sense. In this case, the function to be minimized is
∫δ 2 = X {W ( f )[Ha ( f ) − D( f )]}2df (42)
• It is also possible to set some time-domain conditions
for ha(t), e.g., ha(t)=1 for t=0 and ha(kTin)=0 for
k=±1, ±2,…, ±N/2.
• For minimax problem, linear programming can be
used to optimize the filter coefficients.
• Design parameters for the optimization are
−edge frequencies for passband(s) and stopband(s)
−desired amplitude and weight for every band
−the length of the filter and
−the polynomial degree
Tampere University of Technology 45
Example I (minimax)
• Design parameters are:
−M = 7, N = 24, fp =0.4Fin, fs=0.6Fin, weights:
Wp=0.002, and Ws=1
Magnitude in dB 0
Impulse response ha(t) −20
−40
−60
−80
−100
0 0.5 1 1.5 2 2.5 3 3.5 4
Frequency in Fin
1
0.8
0.6
0.4
0.2
0
−0.2
−12 −10 −8 −6 −4 −2 0 2 4 6 8 10 12
Time in Tin
Tampere University of Technology 46
Example II (L2-norm)
• Design parameters are:
−M = 5, N = 8, fp =0.35Fin, fs=0.65Fin, weights:
Wp=0.02, and Ws=1
Magnitude in dB 0
−10
Impulse response ha(t)−20
−30
−40
−50
−60
−70
−80
−90
0 0.5 1 1.5 2 2.5 3 3.5 4
Frequency in F
in
1
0.8
0.6
0.4
0.2
0
−0.2
−4 −3 −2 −1 0 1 2 3 4
Time in T
in
Tampere University of Technology 47
APPLICATIONS
Conversion Between Arbitrary Sample Rates
Criteria for Uniform Sampling: Interpolation and
Decimation
• If y(l) is generated at the time instants tl = lTout , then
∞ (43)
∑Y (e j2πf / Fout ) = Fout Ya ( j2π ( f − kFout )),
k =−∞
where Fout = 1/Tout is the sampling rate of the output
signal y(l) and the baseband of interest is [0, Fout/2].
• The case β = Fout / Fin > 1 corresponds to interpolation.
• The case β = Fout / Fin < 1 corresponds to decimation.
• In both cases, the ideal response for Ha(j2πf)
avoiding both imaging and aliasing is given by
D ( f ) = 1/ Fin for 0 ≤ f ≤ FC /2 (44)
0 for f > FC /2, (45)
where
FC = min(Fin , )Fout .
Tampere University of Technology 48
• Note that in the interpolation case, it is enough to
attenuate the images of X(ej2πf /Fin).
• In the decimation case, X(ej2πf /Fin) should be band-
limited into the range [0, Fout/2], that is, the region
[Fout/2, Fin/2] should be attenuated in order to avoid
aliasing.
Y(e j2π f /Fout Ha( j2π f )
f
Fout/2 Fout 2Fout
Fig. 22. The spectrum of the output signal y(l) and the frequency
response of the filter ha(t).
Tampere University of Technology 49
Practical Criteria
• Like for conventional digital interpolators and
decimators, the criteria can be stated as
(46)
[ ]1− δ p ≤ Fin H a ( j2πf ) ≤ 1+ δ p for f ∈ 0, f p
Fin H a ( j2πf ) ≤ δ s for f ∈ Ωs , (47)
where f p < FC / 2 and
[FFCC / 2, ∞) for Type A
for Type B
− fp,∞
=[ )Ωs (48)
∪[ ] ∞ kFC fp
k =1 − f p , kFC + for Type C.
• For Type A, no aliasing or imaging is allowed.
• For Type C decimation case, aliasing is allowed into
the transition band [fp, Fout/2]. For Type B, aliasing
into this band is allowed only from band [ Fout/2,
Fout−fp].
• In the interpolation case, Types B and C are useful if
most of the energy of the incoming signal is in the
range [0, fp].
Tampere University of Technology 50
• The Farrow structure can be directly used for
providing the conversion between an arbitrary input
sampling rate Fin and an arbitrary output sampling rate
Fout.
• It is desired that Ha(f) approximates unity for
0 ≤ f ≤ 0.4Fout with tolerance of 0.01 and zero for
f ≥ 0.5Fout with tolerance of 0.001 (60-dB
attenuation). The sample rate is reduced (decimation).
• When using the minimax optimization, and direct
implementation of the transposed Modified Farrow
the given criteria are met by N = 28 and M = 4. This
implementation requires 5 fixed branch filters of
length 28.
• The implementation can be simplified using fixed
linear-phase FIR interpolators before the Farrow
structure, i.e., cascaded structure.
• N = 4 and M = 3 are required if the sampling rate is
decreased by a factor of four by using a two-stage
fixed decimator with decimation factors of two and
two and FIR filters of order 3 and 52, respectively.
• The same requirements are met by the prolonged
Modified Farrow structure by N = 14, M = 6, and J =
2. This implementation requires 7 fixed branch filters
of length 14.