You are on page 1of 122

1

Advanced Digital Signal Processing


Abdellatif Zaidi
Department of Electrical Engineering
University of Notre Dame
azaidi@nd.edu

Outline:
1. Introduction
2. Digital processing of continuous-time signals
Retition: Sampling and sampling theorem
Quantization
AD- and DA-conversion
3. DFT and FFT
Leakage effect
Windowing
FFT structure
4. Digital filters
FIR-filters: Structures, linear phase filters, least-squares
frequency domain design, Chebyshev approximation
IIR-filters: Structures, classical analog lowpass filter
approximations, conversion to digital transfer functions
Finite word-length effects
5. Multirate digital signal processing
Decimation and interpolation
Filters in sampling rate alteration systems
Polyphase decomposition and efficient structures
Digital filter banks

6. Spectral estimation
Periodogram, Bartletts method, Welchs method,
Blackman-Tukey method
ARMA modeling, Yule-Walker equation and solution

Literature
J. G. Proakis, D. G. Manolakis: Digital Signal Processing: Principles, Algorithms, and Applications, Prentice
Hall, 2007, 4th edition
S. K. Mitra: Digital Signal Processing: A ComputerBased Approach, McGraw Hill Higher Education, 2006,
3rd edition
A. V. Oppenheim, R. W. Schafer: Discrete-time signal
processing, Prentice Hall, 1999, 2nd edition
M. H. Hayes: Statistical Signal Processing and Modeling, John Wiley and Sons, 1996 (chapter 6).

Parts of this textbook have been realized in close collaboration with Dr. Joerg Kliewer whom I warmly thank.

Numerical integration and differentiation


Determination of mean value, correlation, p.d.f., . . .

1. Introduction
1.1 Signals, systems and signal processing
What does Digital Signal Processing mean?
Signal:

Physical quantity that varies with time, space or any other


independent variable
Mathematically: Function of one or more independent
variables, s1(t) = 5 t, s2(t) = 20 t2
Examples: Temperature over time t, brightness (luminance) of
an image over (x, y), pressure of a sound wave over (x, y, z)
or (x, y, z, t)
Speech signal:

Amplitude

x 10

0.5
0

0.1

0.2

0.3

0.4
t [s]

0.5

0.6

Digital signal processing: Processing of signals by digital means


(software and/or hardware)
Includes:
Conversion from the analog to the digital domain and back
(physical signals are analog)

Mathematical specification of the processing operations


Algorithm: method or set of rules for implementing the system
by a program that performs the corresponding mathematical
operations
Emphasis on computationally efficient algorithms, which are
fast and easily implemented.

0.5
1

Properties of the system (e.g. linear/nonlinear) determine the


properties of the whole processing operation
System: Definition also includes:
software realizations of operations on a signal, which
are carried out on a digital computer ( software
implementation of the system)
digital hardware realizations (logic circuits) configured
such that they are able to perform the processing operation,
or
most general definition: a combination of both

0.7

Signal Processing:

Passing the signal through a system

Examples:
Modification of the signal (filtering, interpolation, noise
reduction, equalization, . . .)
Prediction, transformation to another domain (e.g. Fourier
transform)
3

Basic elements of a digital signal processing system

1.2 Digital signal processors (DSPs)

Analog signal processing:

Programmable microprocessor (more flexibility), or hardwired


digital processor (ASIC, application specific integrated circuit)
(faster, cheaper)

Analog
input
signal

Analog
signal
processor

Analog
output
signal

Often programmable DSPs (simply called DSPs) are used for


evaluation purposes, for prototypes and for complex algorithms:

Digital signal processing:


(A/D: Analog-to-digital, D/A: Digital-to-analog)
Analog
input
signal

A/D
converter

Digital
input
signal

Digital
signal
processor

Digital
output
signal

D/A
converter

Analog
output
signal

Fixed-point processors: Twos-complement number representation.


Floating-point processors: Floating point number representation (as for example used in PC processors)

Why has digital signal processing become so popular?

Overview over some available DSP processors see next page.

Digital signal processing has many advantages compared to


analog processing:

Performance example: 256-point complex FFT

Property

Digital

Analog

Dynamics

only
limited
by
complexity
generally
unlimited
(costs, complexity
precision)
without problems
low

generally limited

Precision

Aging
Production
costs
Frequency
range
Linear-phase
frequency
responses
Complex
algorithms

generally limited (costs


increase drastically with
required precision)
problematic
higher

dmin amin , dmax amax


exactly realizable

approximately realizable

realizable

strong limitations

(from [Evaluating DSP Processor Performance, Berkeley Design Technology, Inc., 2000])

Some currently available DSP processors and their properties (2006):


Manufacturer

Family

Arithmetic

Data
width (bits)

BDTImark
2000(TM)

Core
clock speed

Unit price
qty. 10000

Analog Devices

ADSP-219x
ADSP-2126x
ADSP-BF5xx
ADSP-TS20x
DSP563xx
DSP568xx
MSC71xx
MSC81xx
TMS320C24x
TMS320C54x
TMS320C55x
TMS320C64x
TMS320C67x

fixed-point
floating-point
fixed-point
floating/fixed-point
fixed-point
fixed-point
fixed-point
fixed-point
fixed-point
fixed-point
fixed-point
fixed-point
floating-point

16
32/40
16
8/16/32/40
24
16
16
16
16
16
16
8/16
32

410
1090
4190
6400
820
110
3370
5610
n/a
500
1460
9130
1470

160 MHz
200 MHz
750 MHz
600 MHz
275 MHz
80 MHz
300 MHz
500 MHz
40 MHz
160 MHz
300 MHz
1 GHz
300 MHz

$11-26
$5-15
$5-32
$131-205
$4-47
$3-12
$13-35
$77-184
$2-8
$3-54
$4-17
$15-208
$12-31

Freescale

Texas-Instuments

2. Digital Processing of Continuous-Time Signals


Digital signal processing system from above is refined:
Anti-aliasing
lowpass filter

Sample-andhold circuit

A/D

Lowpass reconstruction filter

Sample-andhold circuit

D/A

Digital signal
processor

2.1 Sampling

Generation of discrete-time signals from continuous-time


signals
Ideal sampling
Ideally sampled signal xs(t) obtained by multiplication of the
continuous-time signal xc(t) with the periodic impulse train

s(t) =

n=

(t nT ),

where (t) is the unit impulse function and T the sampling


period:

xs(t) = xc(t)
=

n=

n=

(t nT )

xc(nT ) (t nT )

(2.1)

(2.2)

10

we finally have for the Fourier transform of xs(t)

(sifting property of the impulse function)


xc (t)
(a)

Xs(j) =
t

s(t)
(b)

(lengths of Dirac deltas correspond to their weighting)

1 X
Xc(j( ks)).
T k=

(2.4)

Periodically repeated copies of Xs(j)/T , shifted by integer


multiples of the sampling frequency

Xc (j)

t
0

2T

3T

4T

(a)

5T
.

xs (t)

(lengths of Dirac deltas correspond to their weighting)


N

(c)

S(j)

2T

3T

4T

2
T

(b)

t
5T

3s

How does the Fourier transform F {xs(t)} = Xs(j) look


like?

2s

2s

3s

s
2s
(s N )

3s

Xs (j)
1
T

(c)

Fourier transform of an impulse train:

2 X
s(t) S(j) =
( ks)
T k=

3s

2s

s N

(2.3)
6

= T

Xs (j)

s = 2/T : sampling frequency in radians/s.


Writing (2.1) in the Fourier domain,

(d)

= Aliasing

1
T

Xs(j) =

1
Xc(j) S(j),
2

s 2s
(s N )

11

12

(a) Fourier transform of a bandlimited continuous-time input


signal Xc(j), highest frequency is N
(b) Fourier transform of the Dirac impulse train
(c) Result of the convolution S(j) Xc(j). It is evident that
when
s N > N or s > 2N
(2.5)
the replicas of Xc(j) do not overlap.
xc(t) can be recovered with an ideal lowpass filter!

Representation with the discrete (normalized) frequency

= T = 2f T (f frequency in Hz) for the discrete signal xc (nT ) = x(n)


with F {x(n)} = X(ej ), F {} denoting the Fourier transform for
discrete-time aperiodic signals (DTFT)

Nonideal sampling

Modeling the sampling operation with the Dirac impulse train


is not a feasible model in real life, since we always need a finite
amount of time for acquiring a signal sample.
Nonideally sampled signal xn(t) obtained by multiplication of a
continuous-time signal xc(t) with a periodic rectangular window
function an(t): xn(t) = xc(t) an(t) where

an(t) = a0(t)

n=

(t n T ) =

n=

(2.8)

rect(t) sinc(/2),
sinc(x) := sin(x)/x

Fourier transform of an(t):


Fourier transform of the rectangular time window in (2.7) (see
properties of the Fourier transform)

A0(j) = F {a0(t)} = T sinc(T /2) e

(2.7)

a 0 (t )

(d) If (2.5) does not hold, i.e. if s 2N , the copies of


Xc(j) overlap and the signal xc(t) cannot be recovered by
lowpass filtering. The distortions in the gray shaded areas are
called aliasing distortions or simply aliasing.
Also in (c):

a0(t) denotes the rectangular prototype window:




t T /2
a0(t) = rect
T
(
0 for |t| > 1/2
with rect(t) :=
1 for |t| < 1/2

a0(t nT )
(2.6)
13

jT /2

(2.9)

Fourier transform of an(t) in (2.6) (analog to (2.3)):

An(j) = A0(j)
= 2

2 X
( ks)
T k=

sinc(ks T /2) e

jks T /2

(ks)

k=

= 2

sinc(k) e

jk

(ks)

k=

(2.10)
14

Since

xn(t) = xc(t) an(t) Xn(j) =

1
(Xc(j)An(j))
2

Solution: Sampling is performed by a sample-and-hold (S/H)


circuit

we finally have by inserting (2.10)

Xn(j) =

sinc(k) e

jk

k=

Xc(j( ks)).
(2.11)

From (2.11) we can deduce the following:

Compared to the result in the ideal sampling case (cp. (2.4))


here each repeated spectrum at the center frequency ks is
weighted with the term sinc(k) ejk.
The energy |Xn(j)|2 is proportional 2: This is
problematic since in order to approximate the ideal case we
would like to choose the parameter as small as possible.

(from [Proakis, Manolakis, 1996])

(a) Basic elements of an A/D converter, (b) time-domain response of an ideal


S/H circuit

The goal is to continously sample the input signal and to hold


that value constant as long as it takes for the A/D converter to
obtain its digital representation.
Ideal S/H circuit introduces no distortion and can be modeled
as an ideal sampler.
Drawbacks for the nonideal sampling case can be avoided
(all results for the ideal case hold here as well).

15

16

Then, with the definition of the rect() function in (2.8) we have

2.2 Sampling Theorem


Reconstruction of an ideally sampled signal by ideal lowpass
filtering:
s(t) =

(t nT )

n=

(a)
xc (t)

Hr (j)

xs (t)

(d)

Xc (j)
(b)

xc(t) =

Hr (j)

xr (t)
T

Hr (j) = T rect(/s) hr (t) = sinc(st/2).


(2.14)
Combining (2.13), (2.14), and (2.2) yields

N < c < (s N )

n=

(e)

Xs (j)

1
T

(c)

2s

s N

s
2s
(s N )

In order to get the input signal xc(t) back after reconstruction,


i.e. Xr (j) = Xc(j), the conditions

N <

s
2

and

N < c < (s N )

(2.12)

xc(nT ) sinc

( nT ) sinc


1
s(tnT )
2

1
s(t )
2

1
s(t )
2

Sampling theorem:
Every bandlimited continuous-time signal xc(t) with
N < s/2 can be uniquely recovered from its samples
xc(nT ) according to

xc(t) =

n=

have both to be satisfied. Then,

Xc(j) = Xr (j) = Xs(j) Hr (j)

xc(nT )

n=

xc(nT ) ( nT ) sinc

n=

Xr (j)

Z X

xc(nT ) sinc

1
s(tnT )
2

(2.15)

Remarks:

xc(t) = xr (t) = xs(t) hr (t). (2.13)

Eq. (2.15) is called the ideal interpolation formula, and the


sinc-function is named ideal interpolation function

We now choose the cutoff frequency c of the lowpass filter as


c = s/2 (satisfies both inequalities in (2.12)).
17

18

Reconstruction of a continuous-time signal using ideal


interpolation:

S/H circuit serves as a deglitcher:


Output of the D/A converter is held constant at the previous
output value until the new sample at the D/A output reaches
steady state

(from [Proakis, Manolakis, 1996])

Anti-aliasing lowpass filtering:


In order to avoid aliasing, the continuous-time input signal has to
be bandlimited by means of an anti-aliasing lowpass-filter with
cut-off frequency c s/2 prior to sampling, such that the
sampling theorem is satisfied.
2.3 Reconstruction with sample-and-hold circuit
In practice, a reconstruction is carried out by combining a D/A
converter with a S/H circuit, followed by a lowpass reconstruction
(smoothing) filter
digital
input signal

D/A

S/H
h0 (t)

x0 (t)

Lowpass
hr (t)

(from [Proakis, Manolakis, 1996])

xDA (t)

D/A converter accepts electrical signals that correspond to


binary words as input, and delivers an output voltage or current
being proportional to the value of the binary word for every
clock interval nT
Often, the application on an input code word yields a
high-amplitude transient at the output of the D/A converter
(glitch)
19

Analysis:
The S/H circuit has the impulse response


t T /2
h0(t) = rect
T

(2.16)

which leads to a frequency response

H0(j) = T sinc(T /2) e

jT /2

(2.17)
20

No sharp cutoff frequency response characteristics we


have undesirable frequency components (above s/2), which
can be removed by passing x0(t) through a lowpass
reconstruction filter hr (t). This operation is equivalent
to smoothing the staircase-like signal x0(t) after the S/H
operation.

(a)

|Xs (j)|
1
T

|Xc (j)|

When we now suppose that the reconstruction filter hr (t) is


an ideal lowpass with cutoff frequency c = s/2 and an
amplification of one, the only distortion in the reconstructed
signal xDA(t) is due to the S/H operation:

2s

T sinc(T /2)

(b)

2s

2s

|X0 (j)|

(c)

|XDA(j) = |Xc(j)| |sinc(T /2)|

1
T

(2.18)

|Xc(j)| denotes the magnitude spectrum for the ideal


reconstruction case.

|Hr (j)|

(d)

Additional distortion when the reconstruction filter is not ideal


(as in real life!)
Distortion due to the sinc-function may be corrected by prebiasing the frequency response of the reconstruction filter

c = s /2

|XDA (j)|

(e)

Spectral interpretation of the reconstruction process (see next page):


(a) Magnitude frequency response of the ideally sampled continuous-time
signal

(b) Frequency response of the S/H circuit (phase factor ejT /2 omitted)
(c) Magnitude frequency response after the S/H circuit
(d) Magnitude frequency response: lowpass reconstruction filter
(e) Magnitude frequency response of the reconstructed continuous-time signal
21

22

2.4 Quantization
Conversion carried out by an A/D converter involves quantization
of the sampled input signal xs(nT ) and the encoding of the
resulting binary representation

Example: midtreat quantizer with L = 8 levels and range


R = 8
4
d1 =

x1 d2 x2 d3 x3 d4 x4 d5 x5 d6 x6 d7 x7 d8 x8

d9 =

Amplitude

Quantization is a nonlinear and noninvertible process which


realizes the mapping
xs(nT ) = x(n) xk I,

(2.19)

where the amplitude xk is taken from a finite alphabet I .

Signal amplitude range is divided into L intervals In using the


L+1 decision levels d1, d2, . . . , dL+1:
In = {dk < x(n) dk+1},
Quantization Decision
levels
levels

d3 x3 d4 x4 d5

k = 1, 2, . . . , L

Range R of quantizer

Quantization error e(n) with respect to the unquantized


signal

(2.21)
< e(n)
2
2
If the dynamic range of the input signal (xmax xmin) is
larger than the range of the quantizer, the samples exceeding
the quantizer range are clipped, which leads to e(n) > /2.
Quantization characteristic function for a midtreat quantizer
with L = 8:

Ik
dk xk dk+1

Amplitude

Mapping in (2.19) is denoted as x


(n) = Q[x(n)]

Uniform or linear quantizers with constant quantization step


size are very often used in signal processing applications:
= xk+1 xk = const.,

for all k = 1, 2, . . . , L1
(2.20)

Midtreat quantizer: Zero is assigned a quantization level


Midrise quantizer: Zero is assigned a decision level
(from [Proakis, Manolakis, 1996])

23

24

significant bit (LSB), has the value

Coding
The coding process in an A/D converter assigns a binary number
to each quantization level.
b

With a wordlength of b bits we can represent 2 > L binary


numbers, which yields
b log2(L).

(2.22)

The step size or the resolution of the A/D converter is given as


=

R
2b

with the range R of the quantizer.

x = 0 +

b1
X

(2.24)

=1

Number representation has no influence on the performance of


the quantization process!
Performance degradations in practical A/D converters:

(2.23)

Commonly used bipolar codes:

(from [Proakis, Manolakis, 1996])

Twos complement representation is used in most fixedpoint DSPs: A b-bit binary fraction [012 . . . b1], 0
denoting the most significant bit (MSB) and b1 the least
25

(from [Proakis, Manolakis, 1996])

26

Quantization errors
Quantization error is modeled as noise, which is added to the
unquantized signal:
Actual system

x(n)

Quantizer
Q(x(n))

where x2 denotes the signal power and e2 the power of the


quantization noise.
Quantization noise is assumed to be uniformly distributed in the
range (/2, /2):
p(e)

x
(n)

1


e(n)

Mathematical model

x(n)


2

x
(n) = x(n) + e(n)


2

Zero mean, and a variance of

Assumptions:

The quantization error e(n) is uniformly distributed over the

range
2 < e(n) < 2 .

The error sequence e(n) is modeled as a stationary white


noise sequence.

The error sequence e(n) is uncorrelated with the signal


sequence x(n).

2
e

/2

1
=
e p(e) de =

/2

Effect of the quantization error or quantization noise on the


resulting signal x
(n) can be evaluated in terms of the signal-tonoise ratio (SNR) in Decibels (dB)

SNR := 10 log10

(2.25)

2
e de =
12
/2
/2

(2.26)

e =

Assumptions do not hold in general, but they are fairly well


satisfied for large quantizer wordlengths b.

Inserting (2.23) into (2.26) yields

The signal sequence is assumed to have zero mean.

x2
e2

22b R2
,
12

(2.27)

and by using this in (2.25) we obtain

!
12 22b x2
= 10 log10
SNR = 10 log10
R2
 
R
= 6.02 b + 10.8 20 log10
dB.
(2.28)
x
|
{z
}
x2
e2

()

Term () in (2.28):
27

28

x root-mean-square (RMS) amplitude of the signal v(t)


x to small decreasing SNR
Furthermore (not directly from ()): x to large range R
is exceeded

2.5 Analog-to-digital converter realizations


Flash A/D converter

Signal amplitude has to be carefully matched to the range of


the A/D converter
For music and speech a good choice is x = R/4. Then the SNR
of a b-bit quantizer can be approximately determined as
SNR = 6.02 b 1.25 dB.

Analog
comparator:

(2.29)

Each additional bit in the quantizer increases the signal-to-noise


ratio by 6 dB!

(from [Mitra, 2000], N = b: resolution in bits)

Analog input voltage VA is simultaneously compared with a


set of 2b 1 separated reference voltage levels by means of a
set of 2b1 analog comparators locations of the comparator
circuits indicate range of the input voltage.

Examples:
Narrowband speech: b = 8 Bit SNR = 46.9 dB
Music (CD): b = 16 Bit SNR = 95.1 dB
Music (Studio): b = 24 Bit SNR = 143.2 dB

All output bits are developed simultaneously very fast


conversion
Hardware requirements increase exponentially with an
increase in resolution
Flash converters are used for low-resultion (b < 8 bit) and
high-speed conversion applications.
Serial-to-parallel A/D converters
Here, two b/2-bit flash converters in a serial-parallel
configuration are used to reduce the hardware complextity
at the expense of a slightly higher conversion time
29

30

Subranging A/D converter:

approximation in the shift register is converted into an (analog)


reference voltage VD by D/A conversion (binary representation
[01 . . . k k+1 . . . b1], k {0, 1}k):

Case 1: Reference voltage VD < VA increase the binary


number by setting both the k-th bit and the (k+1)-th bit to 1
Case 2: Reference voltage VD VA decrease the binary
number by setting the k-th bit to 0 and the (k+1)-th bit to 1

(from [Mitra, 2000], N = b: resolution in bits)

High resolution and fairly high speed at moderate costs, widely


used in digital signal processing applications

Ripple A/D converter:

Oversampling sigma-delta A/D converter, to be discussed in Section 5. . .

2.6 Digital-to-analog converter realizations


Weighted-resistor D/A converter
(from [Mitra, 2000], N = b: resolution in bits)

Advantage of both structures: Always one converter is idle while


the other one is operating
Only one b/2-bit converter is necessary
Sucessive approximation A/D converter

(from [Mitra, 2000], N = b: resolution in bits)

Output Vo of the D/A converter is given by

Vo =

N
1
X
=0

(from [Mitra, 2000], N = b: resolution in bits)

Iterative approach: At the k-th step of the iteration the binary


31

(2N

RL
VR
1)RL + 1

VR : reference voltage
Full-scale output voltage Vo,F S is obtained when = 1 for all
= 0, . . . , N 1:
32

Vo,F S

(2N 1)RL
N
= N
VR VR , since (2 1)RL 1
(2 1)RL + 1

Disadvantage: For high resolutions the spread of the resistor


values becomes very large

3. DFT and FFT


3.1 DFT and signal processing
Definition DFT from Signals and Systems:

Resistor-ladder D/A converter


DFT: v(n) VN (k) =

=0

(3.2)

3.1.1 Linear and circular convolution

VR
RL
N 1
2(RL + R) 2

Linear convolution of two sequences v1(n) and v2(n), n ZZ:

In practice, often 2RL R, and thus, the full-scale output


voltage Vo,F S is given as

Vo,F S

(3.1)

n=0

with WN := ej2/N , N : number of DFT points

R2R ladder D/A converter, most widely used in practice.


Output Vo of the D/A converter:
Vo =

kn

v(n) WN

N 1
1 X
kn
VN (k) WN
IDFT: VN (k) v(n) =
N k=0

(from [Mitra, 2000], N = b: resolution in bits)

N
1
X

N
1
X

yl (n) = v1(n) v2(n) = v2(n) v1(n)


=

(2N 1)

VR
2N

k=

v1(k) v2(n k) =

k=

v2(k) v1(n k) (3.3)

Circular convolution of two periodic sequences v1(n) and


v2(n), n = {0, . . . , N1,2 1} with the same period
N1 = N2 = N and n0 ZZ:

Oversampling sigma-delta D/A converter, to be discussed in Section 5. . .

33

34

Substitution of the DFT definition in (3.1) for v1(n) and v2(n):

yc(n) = v1(n)
v2(n) = v2(n)
v1(n)
=

n0 +N 1

k=n0

v1(k) v2(n k) =

n0 +N 1

k=n0

v2(k) v1(n k)
(3.4)

"
#
# " N 1
N 1 N 1
X
1 X X
kn
kl
km
y(n) =
v2(l)WN WN
v1(m)WN
N k=0 m=0
l=0
#
"
N
1
N 1
N
1
X
X
1 X
k(nml)
WN
v1(m)
v2(l)
=
N m=0
k=0
l=0
(3.7)

We also use the symbol


N instead of
.
DFT and circular convolution
Inverse transform of a finite-length sequence v(n),
n, k = 0, . . . , N 1:

v(n) VN (k) v(n) = v(n + N )

(3.5)

DFT of a finite-length sequence and its periodic extension is


identical!
Circular convolution property (n, k = 0, . . . , N 1)
(v1(n) and v2(n) denote finite-length sequences):
y(n) = v1(n)
N v2 (n) Y (k) = V1 (k) V2 (k)
N
N

Term in brackets: Summation over the unit circle


(
N
1
X
N
for l = nm+N, ZZ
j2k(nml)/N
e
=
0
otherwise
k=0
(3.8)
Substituting (3.8) into (3.7) yields the desired relation

y(n) =

k=0

Proof:

v1(k)

v2(n k + N )
{z

=: v2 ((nk))N (periodic extension)

(3.6)

N
1
X
N
1
X
k=0

v1(k)v2((n k))N

(3.9)

= v1(n)
N v2 (n)

N 1
1 X
kn
IDFT of Y (k): y(n) =
Y (k)WN
N k=0
N 1
1 X
kn
V1N (k)V2N (k)WN
=
N k=0
35

36

operation for linear filtering is linear convolution. How can


this be achieved by means of the DFT?

Example: Circular convolution y(n) = v1(n)


N v2 (n):
v2 (n)

Given: Finite-length sequences v1(n) with length N1 and v2(n)


with length N2

n
0

Linear convolution:

v1 (n) = (n1)

y(n) =

k=0

n
0

k
N

v2 ((1 k))N , k = 0, . . . , N 1, n = 1

k
0

This result can be summarized as follows:


The circular convolution of two sequences v1(n) with length N1
and v2(n) with length N2 leads to the same result as the linear
convolution v1(n) v2(n) when the lengths of v1(n) and v2(n)
are increased to N = N1 +N2 1 points by zero padding.

N
N v2 (n)
y(n) = v1 (n)

n
0

v1(k) v2(n k)

Length of the convolution result y(n): N1 + N2 1


Frequency domain equivalent: Y (ej ) = V1(ej ) V2(ej )
In order to represent the sequence y(n) uniquely in the
frequency domain by samples of its spectrum Y (ej ), the
number of samples must be equal or exceed N1 + N2 1
DFT of size N N1 + N2 1 is required.
Then, the DFT of the linear convolution y(n) = v1(n)
v2(n) is Y (k) = V1(k) V2(k), k = 0, . . . , N 1.

v2 ((0 k))N , k = 0, . . . , N 1, n = 0

N1 1
X

3.1.2 Use of the DFT in linear filtering

Filtering operation can also be carried out in the frequency


domain using the DFT attractive since fast algorithms (fast
Fourier transforms) exist
DFT only realizes circular convolution, however, the desired
37

Other interpretation:
Circular convolution as linear
convolution with aliasing
IDFT leads to periodic sequence in the time-domain:

P y(n N ) n = 0, . . . , N 1,
yp(n) = =

0
otherwise
38

with Y (k) = DFTN {y(n)} = DFTN {yp(n)}

3.1.3 Filtering of long data sequences

For N < N1 + N2 1: Circular convolution equivalent to


linear convolution followed by time domain aliasing
Example:

n
N1 = N2

N1

Overlap-add method
1. Input signal is segmented into separate blocks:
v (n) = v(n + N1), n {0, 1, . . . , N11}, ZZ.
2. Zero-padding for the signal blocks v (n) v
(n) and the

impulse response h(n) h(n) to the length N = N1 +


N2 1.
Input signal can be reconstructed according to

x1 (n) = x2 (n)
N1 = N2 = 6

Filtering of a long input signal v(n) with the finite impulse


response h(n) of length N2

y(n) = x1 (n) x2 (n)

n
0

2N1 1

N1

v(n) =

y(nN1 ), N1 = 6

N1

N1

Y (k) = V (k) H(k),

y(n+N1 ), N1 = 6

N1

x1 (n)
N x2 (n)
N1 = N2 = 6
n
N1 = N2

N1

y(n) =

N x2 (n)
x1 (n)
N = 12

n
0

k = 0, . . . , N 1.

4. The N -point IDFT yields data blocks that are free from
aliasing due to the zero-padding in step 2.
5. Since each input data block v (n) is terminated with N N1
zeros the last N N1 points from each output block y (n)
must be overlapped and added to the first NN1 points of the
succeeding block (linearity property of convolution):

n
0

N1

v
(n N1)

since v
(n) = 0 for n = N1 +1, . . . , N .
3. The two N -point DFTs are multiplied together to form

n
0

y (n N1)

Overlap-add method

2N1 1

39

40

Linear FIR (finite impulse response) filtering by the overlap-add


method:
Input signal:

x
0 (n)

5. In order to avoid the loss of samples due to aliasing the last


N N1 samples are saved and appended at the beginning of
the next block. The processing is started by setting the first
N N1 samples of the first block to zero.

11
00
00
11

N N1 zeros
x
1 (n)

11
00
00
11

Linear FIR filtering by the overlap-save method:


Input signal:

N N1 zeros
x
2 (n)

11
00
00
11
00
11
00
11

11
00
00
11

N N1 zeros

Output signal:
y0 (n)

11
00
00
11
00
11
00
11

N N1 samples
added together
y1 (n)

x0 (n)

N N1 zeros

11
00
00
11
00
11
00
11

N N1 samples
added together
y2 (n)

11
00
00
11

11
00
00
11
00
11
00
11
NL

4. Since the input signal block is of length N the first N N1


points are corrupted by aliasing and must be discarded. The
last N2 = N N1 1 samples in y (n) are exactly the same
as the result from linear convolution.

x1 (n)

Output signal:

Overlap-save method
1. Input signal is segmented into by N N1 samples overlapping
blocks:
v (n) = v(n + N1), n {0, 1, . . . , N 1}, ZZ.

2. Zero-padding of the filter impulse response h(n) h(n)


to
the length N = N1 +N2 1.

11
00
00
11

11
00
00
11
00
11
00
11

x2 (n)

11
00
00
11

y0 (n)

Discard
N N1 samples

11
00
00
11

y1 (n)

Discard
N N1 samples

11
00
00
11

y2 (n)

Discard
N N1 samples

3. The two N -point DFTs are multiplied together to form

Y (k) = V (k) H(k)


, k = 0, . . . , N 1.

Nore computationally efficient than linear convolution? Yes, in


combination with very efficient algorithms for DFT computation.

41

42

We finally have

3.1.4 Frequency analysis of stationary signals


Leakage effect
Spectral analysis of an analog signal v(t):

Antialiasing lowpass filtering and sampling with s 2b,


b denoting the cut-off frequency of the signal
For practical purposes (delay, complexity): Limitation of the
signal duration to the time interval T0 = L T (L: number of
samples under consideration, T : sampling interval)

i
1 h
j
j
j
V (e ) =
V (e )
W (e )
2
i
1h
j(0 )
j(+0 )
W (e
) + W (e
)
=
2

(3.13)

(ej )| for L = 25:


Nagnitude frequency response |V

Limitation to a signal duration of T0 can be modeled as


multiplication of the sampled input signal v(n) with a rectangular
window w(n)
(from [Proakis, Nanolakis, 1996])

v
(n) = v(n) w(n) with w(n) =

1 for 0 n L1,

0 otherwise.

(3.10)
Suppose that the input sequence just consists of a single sinusoid,
that is v(n) = cos(0n). The Fourier transform is
j

V (e ) = (( 0) + ( + 0)).

(3.11)

W (e ) =

L1
X
n=0

jn

First zero crossing of W (ej ) at z = 2/L:


The larger the number of sampling points L (and thus also the
width of the rectangular window) the smaller becomes z (and
thus also the main lobe of the frequency response).

Decreasing the frequency resolution leads to an increase


of the time resolution and vice versa (duality of time and
frequency domain).

For the window w(n) the Fourier transform can be obtained as

(ej ) is not localized to one frequency,


Windowed spectrum V
instead it is spread out over the whole frequency range
spectral leaking

1 ejL
j(L1)/2 sin(L/2)
=
.
=e
j
1e
sin(/2)
(3.12)
43

In practice we use the DFT in order to obtain a sampled


(ejk ),
representation of the spectrum according to V
k = 0, . . . , N 1.
44

Special case: If

N = L and 0 =

2
,
N

= 0, . . . , N 1

then the Fourier transform is exactly zero at the sampled


frequencies k , except for k = .
Example: (N = 64, n = 0, . . . , N 1, rectangular window
w(n))


 

2

2
n , v1(n) = cos
5
+
n
v0(n) = cos 5
N
N
N
v0(n)=cos(2/N 5n)

v1(n)=cos((2/N 5+/N) n)

0.5

0.5

k = k2/N except for k = 5, since 0 is exactly an integer


multiple of 2/N
periodic repetition of v0(n) leads to a pure cosine
sequence
Right hand side: slight increase of 0 6= 2/N for ZZ
V1(ejk ) 6= 0 for k = k2/N , periodic repetition is
not a cosine sequence anymore
Windowing and different window functions
Windowing not only distorts the spectral estimate due to leakage
effects, it also reduces the spectral resolution.
Consider a sequence of two frequency components
v(n) = cos(1n)+cos(2n) with the Fourier transform
j

V (e ) =

1h
j(1 )
j(2 )
W (e
) + W (e
)+
2
+ W (e

0.5

0.5

20

40

60

n
DFT(v0(n) w(n)), rect. window
1

0.8

0.8

0.6

0.6

0.4

0.4

0.2

0.2

10

20

40

30

10

20

+ W (e

j(+2 )
)

where W (ej ) is the Fourier transform of the rectangular


window from (3.12).

60

n
DFT(v1(n) w(n)), rect. window

20

j(+1 )
)

2/L < |12|: Two maxima, main lobes for both window
spectra W (ej(1)) and W (ej(2)) can be separated
|1 2| = 2/L: Correct values of the spectral samples,
but main lobes cannot be separated anymore
|1 2| < 2/L: Nain lobes of W (ej(1)) and
W (ej(2)) overlap
30

Left hand side: V0(ejk ) = V0(ejk )


W (ejk ) = 0 for
45

Ability to resolve spectral lines of different frequencies is


limited by the main lobe width, which also depends on the length
of the window impulse response L.
46

Example: Magnitude frequency response |V (ej )| for

v(n) = cos(0n) + cos(1n) + cos(2n)

window, specified as

(3.14)

with 0 = 0.2 , 1 = 0.22 , 2 = 0.6 and (a) L = 25,


(b) L = 50, (c) L = 100

wHan(n) =

h

1 1 cos
2

2
L1 n

i

for 0 n L 1,
otherwise.

(3.15)
(ej )| from (3.13), where
Nagnitude frequency response |V
W (ej ) is replaced by WHan(ej ) (L = 25):

(from [Proakis, Nanolakis, 1996])

Spectrum of the signal in (3.14) after it is windowed with wHan(n)


in (3.15):

(from [Proakis, Nanolakis, 1996])

The cosines with the frequencies 0 and 1 are only resolvable


for L = 100.
To reduce leakage, we can choose a different window function
with lower side lobes (however, this comes with an increase of
the width of the main lobe). One choice could be the Hanning
47

(from [Proakis, Nanolakis, 1996])

48

The reduction of the sidelobes and the reduced resolution


compared to the rectangular window can be clearly observed.
Alternative: Hamming window
wHam (n) =



2 n
0.54 0.46 cos L1
0

for 0 n L 1,
otherwise.

(3.16)

Comparison of rectangular, Hanning and Hamming window


(L = 64):
20 log

Rectangular window wrect(n)

10

3.2 Fast computation of the DFT: The FFT


Complexity of the DFT calculation in (3.1) for v(n) C
I,
VN (k) C
I:

dB

|Wrect(ej )|

is increasing N ). However, the spectral resolution is not


increased (separation of two closely adjacent sine spectra
lines).
An increase in resolution can only be obtained by increasing
the length of the input signal to be analyzed (that is
increasing L), which also results in a longer window (see
examples above).

0.5

VN (k) =

50

N
1
X
n=0

20

40

100

60

0.2

0.4
0.6
/

0.8

N compl. mult., N compl. add.

Hanning window wHan(n)

20 log10 |WHan(e )|

kn

for k = 0, . . . , N 1
v(n)WN
{z
}
|
| {z }
N results
1 complex multiplication
{z
}

Overall N 2 complex multiplications and additions.

49

50

dB

Sampling grid can be made arbitrarily fine by increasing


the length of the windowed signal with zero padding (that

Remarks:
1 complex multiplication 4 real-valued mult. + 2 realvalued additions
1 complex addition 2 real valued additions
A closer evaluation reveals that there are slightly less than N 2
operations:
N values have to be added up (N 1) additions.

Factors ej0, ej, ej 2 no real multiplications.


For k = 0 no multiplication at all.
Complexity of the the DFT becomes extremely large for
large values of N (i.e. N = 1024) efficient algorithms
advantageous.

0.5

20

40

50

100

60

0.2

0.8

0.8

Hamming window wHam(n)

20 log10 |WHam(e )|
0

dB

0.5

0.4
0.6
/

20

40

60

50

100

0.2

0.4
0.6
/

Remark: Spectral analysis with DFT

Fast algorithms for DFT calculation (as the fast Fourier transform,
FFT) exploit symmetry and periodicity properties of WNkn as

k(Nn)
complex conjugate symmetry: WN
= WNkn = (WNkn )
k(n+N )
(k+N )n
periodicity in k and n: WNkn = WN
= WN
.

Since
2

WN = e

=e

N/21

= WN/2

N/21
kn
v(2n) WN/2

n=0

Principle:
Decomposing the DFT computation into DFT computations
of smaller size by means of decomposing the N -point input
sequence v(n) into smaller sequences decimation-in-time

j2/(N/2)

we can rewrite (3.17) as

V (k) =

3.2.1 Radix-2 decimation-in-time FFT algorithms

2j2/N

k
WN

kn

v(2n + 1) WN/2

n=0

= G(k) + WN H(k),

k = 0, . . . , N 1

(3.18)
(3.19)

Prerequisite:
N integer power of two, i.e. N = 2m, m = log2(N ) IN
radix-2

Each of the sums in (3.18) represents a N/2 DFT over the


even- and odd-numbered points of v(n), respectively.
G(k) and H(k) need only to be computed for 0, . . . , N/2
1 since both are periodic with period N/2.

Decomposing a N -point DFT into two N/2-point transforms

Signal flow graph for N = 8 (v x, V X ):

DFT V (k) (we drop the subscript N for clarity) can be written
as

V (k) =

N
1
X

kn

v(n) WN ,

n=0

k = 0, . . . , N 1

N/21

n=0

N/21
2kn
v(2n) WN

k(2n+1)

v(2n + 1) WN

n=0

(3.17)
(from [Oppenheim, Schafer, 1999])

where in the last step v(n) is separated into two N/2-point


sequences consisting of the even- and odd-numbered points in
v(n).
51

Complexity:
2 DFTs of length N/2 2 N 2/4 = N 2/2 operations +
52

N operations for the combination of both DFTs


N + N 2/2 operations (less than N 2 for N > 2)

The overall flow graph now looks like (v x, V X ):

Decomposition into 4 N/4-point DFTs

G(k) and H(k) from (3.19) can also be written as


N/41

N/41

G(k) =

kn

g(2n) WN/4 + WN/2

N/41

H(k) =

kn

g(2n+1) WN/4,

n=0

n=0

(3.20)

N/41
kn
h(2n) WN/4

n=0

k
WN/2

kn

h(2n+1) WN/4

(from [Oppenheim, Schafer, 1999])

n=0

(3.21)

where k = 0, . . . , N/21.
Signal flow graph for N = 8 (v x, V X ):

Complexity:
4 DFTs of length N/4 N 2/4 operations
+ 2 N/2 + N operations for the reconstruction

N 2/4 + 2N complex multiplications and additions

Final step: Decomposition into 2-point DFTs


DFT of length 2:

(3.22)

(3.23)

V2 (0) = v (0) + W2 v (1) = v (0) + v (1)


V2 (1) = v (0) + W2 v (1) = v (0) v (1)

(from [Oppenheim, Schafer, 1999])

Flow graph:
v (0)
0

v (1)
0

V2 (0)
0

1
1

V2 (1)
0

Inserting this in the resulting structure from the last step yields the
overall flow graph for (N = 8)-point FFT: (v x, V X ):
53

54

N/2

WN

= ej(2/N )N/2 = ej = 1. Therefore we have


+N/2

WN

N/2

= WN WN

= WN .

Using this modification, the resulting flow graph for N = 8 is


given as (v x, V X ):

(from [Oppenheim, Schafer, 1999])

In general, our decomposition requires m = log2(N ) = ld N


stages and for N 1 we have

N m = N ld N

complex multiplications and additions.

(instead of N 2)
(from [Proakis, Nanolakis, 1996])

Examples:
N = 32 N 2 1000, N ld N 160 factor 6
N = 1024 N 2 106, N ld N 104 factor 100

In-place computations
()

Butterfly computations
Basic building block of the above flow graph is called butterfly
( {0, . . . , N/21}):
1

WN

Simplication
1

1
(+N/2)

WN

WN

(1)

(k2),

(1)

(k2)

()

(1)

(k1) + WN VN

()

(1)

(k1) WN VN

VN (k1) = VN
VN (k2) = VN

The intermediate results VN (k1,2) in the -th stage,


= 0, . . . , m1 are obtained as

(butterfly computations) where k1, k2, {0, . . . , N 1}


vary from stage to stage.

The simplification is due to the fact that


55

56

Only N storage cells are needed, which first contain the


values v(n), then the results from the individual stages and
finally the values VN (k) In-place algorithm

Inverse FFT
According to (3.2) we have for the inverse DFT
N 1
1 X
kn
VN (k) WN ,
v(n) =
N k=0

Bit-reversal

v(n)-values at the input of the decimation-in-time flow graph


in permuted order
Example for N = 8, where the indices are written in binary
notation:
# flow graph input
v(n)

000
v(000)

001
v(100)

010
v(010)

011
v(110)

# flow graph input


v(n)

100
v(001)

101
v(101)

110
v(011)

111
v(111)

that is
N 1
1 X
kn
v(n) =
VN (k) WN ,
N k=0

v(N n) =

1
DFT{VN (k)}
N

(3.24)

Input data is stored in bit-reversed order

With additional scaling and index permutations the IDFT can


be calculated with the same FFT algorithms as the DFT!

Bit-reversed order is due to the sorting in even and odd indices in


every stage, and thus is also necessary for in-place computation:
(v x):

3.2.2 FFT alternatives


Alternative DIT structures
Rearranging of the nodes in the signal flow graphs lead to
FFTs with almost arbitrary permutations of the input and output
sequence. Reasonable approaches are structures
(a) without bitreversal, or
(b) bit-reversal in the frequency domain

(from [Oppenheim, Schafer, 1999])

57

58

Signal flow graph for N = 8 (v x, V X ):

(a)

(b)

(from [Proakis, Nanolakis, 1996])

Radix r and mixed-radix FFTs


When we gerally use

N =r

for

r 2,

r, m IN

(3.25)

we obtain DIF or DIT decompositions with a radix r . Besides


r = 2, r = 3 and r = 4 are commonly used.
(from [Oppenheim, Schafer, 1999], v x, V X )

The flow graph in (a) has the disadvantage, that it is a non-inplace


algorithm, because the butterfly-structure does not continue past
the first stage.
Decimation-in-frequency algorithms
Instead of applying the decomposition to time domain, we could
also start the decomposition in the frequency domain, where
the sequence of DFT coefficients VN (k) is decomposed into
smaller sequences. The resulting algorithm is called decimationin-frequency (DIF) FFT.
59

Radix-4 butterfly
(q = 0, . . . , N/41)
(N N ):
(from [Proakis, Nanolakis, 1996])

For special lengths, which can not be expressed as N = r m,


so called mixed-radix FFT algorithms can be used (i.e. for
N = 576 = 26 32).
60

Thus, we have

3.3 Transformation of real-valued sequences

v(n) IR FFT program/hardware: vR (n) + j vI (n) C


I
| {z }
=0

Inefficient due to performing arithmetic calculations with zero


values
In the following we will discuss methods for the efficient usage of
a complex FFT for real-valued data.
3.3.1 DFT of two real sequences

VN1 (k) =

where

Given: v1(n), v2(n) IR, n = 0, . . . , N 1


How can we obtain VN1 (k) v1(n), VN2 (k) v2(n)?


1
VNR (k) + VNR (N k) ,
2

1
VNI (k) VNI (N k) .
VNIo (k) =
2

VNRe (k) =

Define

v(n) = v1(n) + j v2(n)

(3.26)

leading to the DFT

VN (k) = DFT{v(n)} = VN1 (k) +j VN2 (k) .


| {z }
| {z }
I
C

(3.27)

Likewise, we have for VN2 (k) the relation

I
C

Separation of VN (k) into VN1 (k), VN2 (k)?

VN2 (k) =

Symmetry relations of the DFT:

v(n) = vRe (n) + vRo (n) + j vIe (n) + j vIo (n)


|
{z
} |
{z
}
= v1 (n)


1
VNR (k) + VNR (N k) +
2

j
+
VNI (k) VNI (N k) , (3.31)
2

(3.28)

= v2 (n)


1
VNI (k) + VNI (N k)
2

j
VNR (k) VNR (N k) , (3.32)

with

Corresponding DFTs:

vRe (n) VNRe (k), vRo (n) j VNIo (k),

(3.29)

j vIe (n) j VNIe (k), j vIo (n) VNRo (k).

(3.30)
61


1
VNI (k) + VNI (N k) ,
2

1
VNRo (k) =
VNR (k) VNR (N k) .
2
VNIe (k) =

62

Rearranging (3.31) and (3.32) finally yields

VN1 (k) =

Define

v
(n) := v(2n) + j v(2n + 1),


1

VN (k) + VN (N k) ,
2

(3.33)


j

VN2 (k) = VN (k) VN (N k) .


2

Due to the Hermitian symmetry of real-valued sequences

VN(1,2) (k) = VN

(1,2)

(N k)

(3.34)

the values VN(1,2) (k) for k {N/2 + 1, . . . , N 1} can be


obtained from those for k {0, . . . , N/2}, such that only a
calculation for N/2+1 values is necessary.
Application: Fast convolution of two real-values sequences with
the DFT/FFT
3.3.2 DFT of a 2N -point real sequence
Given: v(n) IR, n = 0, . . . , 2 N 1
Wanted:

V2N (k) = DFT{v(n)} =

2N
1
X

=: v1(n) + j v2(n),
where the even and odd samples of v(n) are written alternatively
into the real and imaginary part of v
(n). Thus we have a complex
sequence consisting of two real-valued sequences of length N
with the DFT

VN (k ) = VN1 (k ) + j VN2 (k ),

k = 0, . . . , N 1.
(3.36)

VN1 (k ) and VN2 (k ) can easily be obtained with (3.33) as



1

VN (k ) + VN (N k ) ,
2

j

VN2 (k ) =
VN (k ) VN (N k )
2

VN1 (k ) =

for k = 0, . . . , N 1.
In order to calculate V2N (k) from VN1 (k) and VN2 (k) we
rearrange the expression for DFT{v(n)} according to

kn

v(n) W2N

n=0

V2N (k) =

with k = 0, . . . , 2N 1.
Hermitian symmetry analog to (3.34) since v(n) IR for all n:

V2N (2N k) = V2N (k),

n = 0, . . . , N 1,
(3.35)

k = 0, . . . , N

N
1
X

n=0 = v (n)
1

N
1
X
n=0

63

v(2n)
| {z }

2kn
W2N

kn
v1(n) WN

N
1
X
n=0

k
W2N

(2n+1)k

v(2n + 1) W2N
| {z }

= v2 (n)

N
1
X

nk

v2(n) WN ,

n=0

64

4. Digital Filters

Finally we have
k

V2N (k) = VN1 (k)+W2N VN2 (k), k = 0, . . . , 2N 1


(3.37)
Due to the Hermitian symmetry
k only
needs to be evaluated from 0 to N with VN1/2 (N ) = VN1/2 (0).

V2N (k) = V2N


(2Nk),

Digital filter = linear-time-invariant (LTI) causal system with a


rational transfer function (without loss of generality: numerator
degree N = denominator degree)

Signal flow graph:


VN (k)

VN1 (k)

1/2

V2N (k)
k = 0, . . . , N

H(z) =

k=N k=0
VN (N k)

i=0
N
P

i=0

j
1/2

N
P

k
VN2 (k) W2N

Computational savings by a factor of two compared to the


complex-valued case since for real-valued input sequences only
an N point DFT is needed

bN i z i
aN i

bi z i

i=0

zi

N
P

1+

N
P

i=1

(4.1)

ai

z i

where a0 = 1 without loss of generality.


ai, bi: parameters of the LTI system ( coefficients of the digital
filter), N is said to be the filter order
Product notation of (4.1):

H(z) = b0

N
Q

(z z0i)

i=1
N
Q

i=1

(4.2)

(z zi)

where the z0i are the zeros, and the zi are the poles of the
transfer function (the latter are responsible for stability).
Difference equation:

y(n) =

N
X

i=0

65

bi v(n i)

N
X

i=1

ai y(n i),

(4.3)

66

with v(n) denoting the input signal and y(n) the resulting signal
after the filtering
Remarks

Generally, (4.3) describes a recursive filter with an infinite


impulse response (IIR filter):
y(n) is calculated from v(n), v(n1), . . . , v(nN ) and
recursively from y(n1), y(n2), . . . , y(nN ).
The calculation of y(n) requires memory elements in order to
store v(n1), . . . , v(nN ) and
y(n1), y(n2), . . . , y(nN ) dynamical system.
bi 0 for all i 6= 0:
H(z) =

b0 z N
N
P

i=0

aN i z i

b0 z N
N
Q

i=1

N
X

i=1

(4.5)

y(n) =

i=0

bi v(n i)

Poles zi = 0, i = 1, . . . , N , but not relevant for


stability all-zero filter
According to (4.6): y(n) obtained by a weighted average
of the last N + 1 input values Moving average (MA)
filter (as opposite to the AR filter from above)
From (4.7) it can be seen that the impulse response has
finite length Finite impulse response (FIR) filter of
length L = N + 1 and order N

Difference equation given by (4.6)


Transfer function given by (4.7)

Unit sample response is equal to the coefficients bi


(
bn
for 0 n L1
h(n) =
0
otherwise
4.1.1 Direct form structures

ai 0 for all i 6= 0, a0 = 1 (causal filter required!):


Difference equation is purely non-recursive:
N
X

(4.7)

4.1 Structures for FIR systems

(z zi)

ai y(n i)

N
N
X
1 X
i
i
H(z) = N
bN i z =
bi z
z i=0
i=0

(4.4)

Filter has no zeros All-pole or autoregressive (AR-)


filter.
Transfer function is purely recursive:
y(n) = b0 v(n)

Transfer function:

The direct form structure follows immediately from the


nonrecursive difference equation given in (4.6), which is
equivalent to the linear convolution sum

(4.6)

y(n) =

Non-recursive filter

L1
X
k=0

67

h(k) v(n k).


68

Transversal filter in the second direct form:


v(n)

(from [Proakis, Manolakis, 1996], v x, L M )

Tapped-delay-line or transversal filter in the first direct form


If the unit impulse v(n) = (n) is chosen as input signal, all
samples of the impulse response h(n) appear successively at the
output of the structure.

h(L1)

h(L2)

z 1

z 1

h(3)
z 1

h(2)

h(1)

z 1

h(0)

z 1

y(n)

When the FIR filter has linear phase (see below) the impulse
response of the system satisfies either the symmetry or asymmetry
condition
h(n) = h(L 1 n).
(4.8)
Thus, the number of multiplications can be reduced from L to
L/2 for L even, and from L to (L+1)/2 for L odd.
Signal flow graph for odd L:

In the following we mainly use the more compact signal flow


graph notation:
v(n)

z 1

z 1

z 1

z 1

z 1

z 1

h(1)

h(2)

h(3)

z 1

z 1

z 1

z 1
z 1

z 1
v(n)

h(0)

z 1

h(L2)

h(L1)

z 1

h(0)

z 1

h(1)

z 1

h(2)

z 1

z 1

h(3)

y(n)

The second direct form can be obtained by transposing the flow


graph:

Reversing the direction of all branches,

L3
2

L1
2

y(n)

4.1.2 Cascade-form structures


By factorizing the transfer function

H(z) = H0

exchanging the input and output of the flow graph

z 1

P
Y

Hp(z)

(4.9)

p=1

exchanging summation points with branching points and vice


versa.

we obtain a cascade realization. The Hp(z) are normally secondorder, since in order to obtain real coefficients, conjugate complex

69

70


zeros z0i and z0i
have to be grouped:

Hp(z) = (1 z0iz
= 1 + b1 z

The behavior of the i-th stage can be written in matrix notation as

)(1 z0iz

+ b2 z



Xi(z)
1
=
Yi(z)
qi

 

qi z 1
Xi1(z)

.
z 1
Yi1(z)

(4.10)

After the first stage we have


For linear-phase filters due to the special symmetry (4.8) the zeros
1

1
and (z0i
) are
appear in quadruples: Both z0i and z0i
, and z0i
a pair of complex-conjugate zeros. Consequently, we have
1

)(1z0iz

+ b2 z

Hp(z) = (1z0iz
= 1 + b1 z

1 1

+ b1 z

)(1z0i z
3

+z

)(1(z0i)

1 1

),

X1(z) = V (z) + q1 z

V (z),

Y1(z) = q1 V (z) + z

V (z).

It follows

.
H1(z) =

4.1.3 Lattice structures


Lattice structures are mainly used as predictor filter (i.e. in digital
speech processing) due to their robustness against coefficient
quantization:

X1(z)
1
1
= 1 + q1 z = 01 + 11 z ,
V (z)

G1(z) =

Y1(z)
1
1
= q1 + z = 01 + 11 z .
V (z)

Second stage:

General structure:

v(n)

(4.11)

1-th stage

x1 (n)

x2 (n)

y1 (n)

2-th stage y2 (n)

(L1)-th

xL1 (n)

stage

yL1 (n)

i-th stage lattice filter:


xi1 (n)

Y1(z),

Y2(z) =q2 X1(z) + z

Y1(z).

(4.12)

Inserting (4.11) into (4.12) yields


1

xi (n)

qi

yi1 (n)

X2(z) =X1(z) + q2 z

z 1

qi

X2(z) = V (z) + q1z


1

V (z) + q2q1z

Y2(z) = q2V (z) + q1q2z

yi (n)

71

V (z) + q1z

V (z) + q2z

V (z) + z

V (z),

V (z),
72

which finally leads to the transfer functions

H2(z) =

X2(z)
1
2
= 1 + (q1 + q1 q2)z + q2 z , (4.13)
V (z)

= 02 + 12 z
G2(z) =

we obtain the direct form I realization:

+ 22z

= 02 + 12 z

+ 22z

(4.14)

G2(z

Gi(z

),

for

a1
z 1

z 1
a2

b2

z 1

z 1

a3

b3

),

that is, the zeros of H2(z) can be obtained by reflecting the zeros
of G2(z) at the unit circle. Generally, it can be shown that

Hi(z) = z

z 1
b1

By comparing (4.13) and (4.14) we can see that

H2(z) = z

y(n)

z 1

Y2(z)
1
2
= q2 + (q1 + q1 q2)z + z ,
V (z)
1

b0

v(n)

i = 1, . . . , L 1.

(4.15)

z 1

z 1

z 1

z 1
aN 1

bN 1

z 1

z 1
aN

bN

4.2 Structures for IIR systems


All-zero system N (z)

4.2.1 Direct form structures


Rational system function (4.1) can be viewed as two systems in
cascade: H(z) = N (z)/D(z) = H1(z) H2(z) with

H1(z) =

N
X

i=0

bi z ,

H2(z) =
1+

1
N
P

i=1

ai z i

All-pole system 1/D(z)

Another realization can be obtained by exchanging the order of


the all-pole and all-zero filter. Then, the difference equation for
the all-pole section is

w(n) =

N
X

i=1

ai w(n i) + v(n),

The all-zero H1(z) can be realized with the direct form from
Section 3.1.1. By attaching the all-pole system H2(z) in cascade,

where the sequence w(n) is an intermediate result and represents

73

74

the input to the all-zero section:

y(n) =

N
X

i=0

structure, which requires the same number of multiplications,


additions, and memory locations as the original structure:

bn w(n i).

v(n)

b0

y(n)
z

b0

a1

b1

The resulting structure is given as follows:


v(n)

z 1

y(n)

a2

b2
z 1
z 1

b1

a1

a3

b3
z 1
b2

a2

z 1

z 1
b3

a3

z 1
aN 1

bN 1

z 1

z 1
aN

bN
z 1
bN 1

aN 1

4.2.2 Cascade-form structures

z 1
aN

Analog to Section 4.1.2 we can also factor an IIR system H(z)


into first and second order subsystems Hp(z) according to

bN

Only one single delay line is required for storing the delayed
versions of the sequence w(n). The resulting structure is called
a direct form II realization. Furthermore, it is said to be canonic,
since it minimizes the number of memory locations (among other
structures).
Transposing the direct form II realization leads to the following
75

H(z) =

P
Y

Hp(z).

(4.16)

p=1

Degrees of freedom in grouping the poles and the zeros

76

First order subsystems:

Example:

Canonical direct form for N = 1:

A so called Chebyshev lowpass filter of 5-th order and the cut-off frequency
fco = 0.25 fs (fs denoting the sampling frequency) is realized. A filter design
approach (we will discuss the corresponding algorithms later on) yields the
transfer function

b0

v(n)
z

y(n)

b1

a1

H(z) = 0.03217

Corresponding transfer function:

H(z) =

Y (z)
b0 + b1 z 1
=
V (z)
1 + a1 z 1

(4.17)

Every first order transfer function can be realized with the above
flow graph:

b + b1 z 1 (b0/a0) + (b1/a0) z 1 b0 + b1 z 1
=
=
H(z) = 0
a0 + a1 z 1
1 + (a1/a0) z 1
1 + a1 z 1
Second order subsystems:

1 + 5 z 1 + 10 z 2 + 10 z 3 + 5 z 4 + z 5
1 0.782 z 1 + 1.2872 z 2 0.7822 z 3 + 0.4297 z 4 0.1234 z 5
(4.19)
The zeros are all at z = 1: z0i = 1 for i = 1, 2, . . . , 5.
The location of the poles are:
z1,2 = 0.0336 j 0.8821,
z3,4 = 0.219 j 0.5804,

Canonical direct form for N = 2:


b0

3,4 (z) =
H

b1
z 1

a2

b0 + b1 z 1 + b2 z 2
Y (z)
=
V (z)
1 + a1 z 1 + a2 z 2

1 + 2 z 1 + z 2
1 0.4379 z 1 + 0.3849 z 2

Real-valued pole z5 leads to a first-order subsystem

b2

5 (z) =
H

Corresponding transfer function:

H(z) =

1 + 2 z 1 + z 2
1 + 0.0672 z 1 + 0.7793 z 2

Grouping of poles z3,4 :

y(n)

z 1
a1

(4.20)

Grouping of poles z1,2 :

1,2 (z) =
H

v(n)

z5 = 0.4113.

1 + z 1
.
1 0.4113 z 1

(4.18)

For the implementation on a fixed-point DSP it is advantageous to ensure


that all stages have similar amplification in order to avoid numerical
problems. Therefore, all subsystems are scaled such that they have

77

78

Resulting signal flow graph (V U ):

approximately the same amplification for low frequencies:

5 (z)
H

H1 (z) =
H2 (z) =

H3 (z) =

5 (z = 1)
H

3,4 (z)
H
3,4 (z = 1)
H
1,2 (z)
H
1,2 (z = 1)
H

0.2943 + 0.2943 z 1
1 0.4113 z 1

0.2367 + 0.4735 z 1 + 0.2367 z 2


1 0.4379 z 1 + 0.3849 z 2
1

0.4616 + 0.9233 z
+ 0.4616 z
1 0.4379 z 1 + 0.3849 z 2

Remark: The order of the subsystems is in principle arbitrary. However,


1,2 (z)
here we know from the pole analysis in (4.20) that the poles of H
are closest to the unit circle. Thus, using a fixed-point DSP may lead more
3,4 (z) and H
5 (z). Therefore,
likely to numerical overflow compared to H
it is advisable to realize the most sensible filter as the last subsystem.
Frequency responses:
20 log

10

20

20
0
dB

dB

0
20
40
0

0.5
/
10

|H (ej )|
20

20
40

10

|H(ej )| (overall filter)

N
X

20

Ai
.
1 ziz 1

(4.21)

Ai
Ai
+
z 1 =
1 zi z 1
1 zi

2 {Ai } 2 {Ai zi
}z 1
b0 + b1 z 1
=:
1 2 {zi }z 1 + |zi |2 z 2
1 + a1 z 1 + a2 z 2
(4.22)

40
0.5
/

In the following we assume that we have only distinct poles


(which is quite well satisfied in practice). The partial-fraction
expansion of a transfer function H(z) with numerator and
denominator degree N is then given as

The Ai, i {1, . . . , N } are the coefficients (residues) in


the partial-fraction expansion, A0 = bN /aN .
We furthermore assume that we have only real-valued
coefficients, such that we can combine pairs of complexconjugate poles to form a second order subsystem
(i {1, . . . , N }):

0
dB

dB

0.5
/

20 log

An alternative to the factorization of a general transfer function


is to use a partial-fraction expansion, which leads to a parallelform structure

i=1

20

4.2.3 Parallel-form structures

H(z) = A0 +

40

20 log
20

20 log10 |H2(e )|

|H (e )|

(from [Fliege: Analoge und digitale Filter, Hamburg University of Technology, 1990])

0.5
/

79

80

Two real-valued poles can also be combined to a second order


transfer function (i, j {1, . . . , N }):
Aj

Ai
+
=
1 zi z 1
1 zj z 1

(Ai + Aj ) (Ai zj + Aj zi ) z

1 (zj + zi ) z 1 + (zj zi ) z 2

=:

b0 + b1 z
1 + a1 z 1 + a2 z 2
(4.23)

If N is odd, there is one real-valued pole left, which leads to


one first order partial fraction (see example).

Example:
Consider again the 5-th order Chebyshev lowpass filter with the transfer
function from (4.19). The partial fraction expansion can be given as

H(z) = 0.2607 +
+

A1
A1
+
z 1 +
1 z1 z 1
1 z1

A3
A5
A3
+
+

1
1
1 z3 z
1 z3 z
1 z5 z 1

with the poles from (4.20) and the residues

z1 = 0.0336 + j 0.8821,

Parallel structure:

z3 = 0.219 + j 0.5804,

H0

A3 = 0.5533 + j 0.00926,

z5 = 0.4114,

A5 = 1.1996.

With (4.22) the resulting transfer function writes

H1(z)
H2(z)

V (z)

A1 = 0.1 + j 0.0941,

H(z) = 0.2607 +

1.1996
1.1066 + 0.3498 z 1
+
.
1 0.4379 z 1 + 0.3849 z 2
1 0.4114 z 1

Y (z)

HP (z)

0.2 0.1592 z 1
+
1 + 0.0673 z 1 + 0.7793 z 2

Resulting signal flow graph (V U ):

P : number of parallel subsystems

Signal flow graph of a second order section:


bp0

v(n)
z

yp (n)

ap1

bp1
z 1

ap2

p = 1, . . . , P

(from [Fliege: Analoge und digitale Filter, Hamburg University of Technology, 1990])

81

82

can be represented with one of the three following formats


4.3 Coefficient quantization and round-off effects
In this section we discuss the effects of a fixed-point digital filter
implementation on the system performance.
4.3.1 Errors resulting from rounding and truncation
Number representation in fixed-point format:
A real number v can be represented as

v = [A, . . . , 1, 0, 1, . . . , B ] =

B
X

v1C = [1.12 . . . b1] for v < 0,

=A

Most important in digital signal processing:

Positive numbers are represented as

2 .

(4.25)

=1

Negative fraction:
b1
X

2 ,

(4.28)

with = 1 denoting the ones complement of .


Alternative definition:
0

v1C = 12 +

b1
X

(1)2

= 22

b+1

=1

Binary representation with r = 2 and {0, 1}, A MSB,


B LSB.
b-bit fraction format: A = 0, B = b1, binary point between
0 and 1 numbers between 0 and 2 2b+1 are possible.

v = [0.12 . . . b1] =

(4.27)

Example: [101.01]2 = 1 22 + 0 21 + 1 20 + 0 21 + 1 22

b1
X

vSM = [1.12 . . . b1] for v < 0.


Ones-complement format:

(4.24)
where is the digit, r is the radix (base), A the number of integer
digits, B the number of fractional digits.

v = [0.12 . . . b1] =

Sign-magnitude format:

(4.26)

=1

|v| (4.29)

Twos-complement format:
v2C = [1.12 . . . b1]
+ [00 . . . 01] for v < 0,
(4.30)
where
+ denotes a binary addition. We thus have by using
(4.29)
v2C = v1C + 2

b+1

= 2 |v|.

(4.31)

Does (4.30) really represent a negative number? Using the


identity
b1
X

b+1
2 +2
1=
=1

83

84

we can express a negative number as


b1
X

= 1 +

b1
X

v=

Example:

=1

=1

Important property: If the sum of numbers is within the range


it will be computed correctly, even if individual partial sums
result in overflow.

+11

Truncation and rounding:

(1 ) 2
| {z }

+2

b+1

= v2C 2.

Express the fractions 7/8 and 7/8 in sign-magnitude, twos-complement,


and ones-complement format.

v = 7/8 can be represented as 21 + 22 + 23 , such that v = [0.111]. In


sign-magnitude format, v = 7/8 is represented as vSM = [1.111], in ones
complement we have v1C = [1.000], and in twos-complement the result is
v2C = [1.000]
+ [0.001] = [1.001].
(For further examples see also the table in Section 2.4.)

Remarks:
Most DSPs use twos-complement arithmetic. Thus any b-bit
number v has the number range

v {1, 1 + 2

b+1

,...,1 2

b+1

Problem: Multiplication of two b-bit numbers yields a result of


length (2b1) truncation/rounding necessary can again be
regarded as quantization of the (filter) coefficient v
Suppose that we have a fixed-point realization in which a number
v is quantized from bu to b bits.
We first discuss the truncation case. Let the truncation error be
defined as Et = Qt[v] v .

For positive numbers the error is


(2

b+1

bu +1

) Et 0

(truncation leads to a number smaller than the unquantized


number)

For negative numbers and the sign-magnitude representation


the error is

}.

Twos-complement arithmetic with b bits can be viewed as


arithmetic modulo 2b (Example for b = 3):

0 Et (2

b+1

bu +1

).

(truncation reduces the magnitude of the number)

For negative numbers in the twos-complement case the error


is
b+1
b +1
(2
2 u ) Et 0
(negative of a number is obtained by subtracting the
corresponding positive number from 2, see (4.31))

(from [Proakis, Manolakis, 1996])

85

86

Quantization characteristic functions for a continuous input


signal v (v x):
Sign-magnitude representation:

Twos-complement representation:

4.3.2 Numerical overflow


If a number is larger/smaller than the maximal/minimal possible
number representation

+1

(1 2b+1) for sign magnitude and oness-complement


arithmetic;

+1

+1

+1

1 and 1 2b+1, resp., for twos-complement arithmetic,


we speak of an overflow/underflow condition.
Overflow example in twos-complement arithmetic
(range: 8, . . . , 7)

(from [Proakis, Manolakis, 1996])

Rounding case, rounding error is defined as Er = Qr [v] v :

Rounding affects only the magnitude of the number and is thus


independent from the type of fixed-point realization.
Rounding error is symmetric around zero and falls in the range
1 b+1
1 b+1
b +1
b +1
2 u ) Er (2
2 u ).
(2
2
2

+ [0.001] = [1.000]
[0.111]
| {z }
| {z }
| {z }
7

resulting error can be very large when overflow/underflow


occurs
Twos-complement quantizer for b = 3, = 2b (v x):

Quantization characteristic function, bu = (v x):

+1

+1

(from [Oppenheim, Schafer, 1999])

Alternative: saturation or clipping, error does not increase


abruptly in magnitude when overflow/underflow occurs:

(from [Proakis, Manolakis, 1996])

87

88

As an example, we are interested in the deviation


zi = zi zi, when the denominator coefficients ai
are quantized (zi denotes the resulting pole after quantization).
It can be shown [Proakis, Manolakis, 1996, pp. 569] that this
deviation can be expressed as:

zi =
(from [Oppenheim, Schafer, 1999])

N
X

n=1

N
Q

=1, 6=i

N n
zi

an,

i = 1, . . . , N.

(zi z)
(4.32)

Disadvantage: Summation property of the twos-complement


representation is violated

From (4.32) we can observe the following:

4.3.3 Coefficient quantization errors

By using the direct form, each single pole deviation zi


depends on all quantized denominator coefficients a
i.

In a DSP/hardware realization of an FIR/IIR filter the accuracy


is limited by the wordlength of the computer Coefficients
obtained from a design algorithm have to be quantized

The error zi can be minimized by maximizing the distance


|zi z| between the poles zi and z.

Wordlength reduction of the coefficients leads to different


poles and zeros compared to the desired ones. This may lead
to
modified frequency response with decreased selectivity
stability problems

Splitting the filter into single or double pole sections (first or


second order transfer functions):

Sensitivity to quantization of filter coefficients

Realization in cascade or parallel form: The error of a

particular pole pair zi and zi


is independent of its distance
from the other poles of the transfer function.

Direct form realization, quantized coefficients:

a
i = ai + ai,

i = 1, . . . , N,

bi = bi + bi,

i = 0, . . . , N,

Combining the poles zi and zi


into a second order section
leads to a small perturbation error zi, since complex
conjugate poles are normally sufficiently far apart.

Example: Effects of coefficient quantization


Elliptic filter of order N = 12 (Example taken from [Oppenheim, Schafer,
1999]):

ai and bi represent the quantization errors.


89

90

Poles: z1,2 = r ej ,
Coefficients:
a1 = 2r cos , a2 = r 2,
Stability condition: |r| 1

v(n)

y(n)
z 1
2r cos
z 1
r2

Quantization of a1 and a2 with b = 4 bits: possible pole


positions:

Unquantized:
(a) Magnitude frequency response 20 log10 |H(ej )|
(b) Passband details

Nonuniformity of the pole position is due to the fact that


a2 = r 2 is quantized, while the pole locations z1,2 = r ej
are proportional r .
Sparse set of possible pole locations around = 0 and = .
Disadvantage for realizing lowpass filters where the poles are
normally clustered near = 0 and = .

Quantized with b = 16 bits:


(c) Passband details for cascade structure
(d) Passband details for parallel structure
(e) Magnitude frequency response (log) for direct structure

Alternative: Coupled-form realization

Pole locations of quantized second order sections


Consider a two-pole filter with the transfer function

H(z) =

y1(n) = v(n) + r cos y1(n 1) r sin y(n 1),

1
.
1 (2r cos ) z 1 + r 2 z 2

y(n) = r sin y1(n 1) + r cos y(n 1),

91

(4.33)
92

Disadvantage: Increased computational complexity compared


to the direct form.

which corresponds to the following signal flow graph:


y1 (n)

v(n)

z 1

r cos

Cascade or parallel form?


r sin

r sin
y(n)
r cos

z 1

By transforming (4.33) into the z-domain, the transfer function of


the filter can be obtained as

P
Y
bp0 + bp1 z 1 + bp2 z 2
1 + ap1 z 1 + ap2 z 2
p=1

Cascade form:

H(z) =

Parallel form:

H(z) = A0 +

P
X

p=1

Y (z)
(r sin ) z 1
H(z) =
=
.
V (z)
1 (2r cos ) z 1 + r 2 z 2
We can see from the signal flow graph that the two coefficients
r sin and r cos are now linear in r , such that a
quantization of these parameters lead to equally spaced pole
locations in the z-plane:

cp0 + cp1 z 1
1 + ap1 z 1 + ap2 z 2

Cascade form: Only the numerator coefficients bpi of


an individual section determine the perturbation of the
corresponding zero locations (an equation similar to (4.32) can
be derived) direct control over the poles and zeros
Parallel form: A particular zero is affected by quantization
errors in the numerator and denominator coefficients of all
individual sections numerator coefficients cp0 and cp1 do
not specify the position of a zero directly, direct control over
the poles only
Cascade structure is more robust against coefficient
quantization and should be used in most cases
Example:
Elliptic filter of order N = 7, frequency and phase response
(taken from [Proakis, Manolakis, 1996]):

93

94

Cascade form (3 digits =


b b 10 bits, 4 digits =
b b 14 bits)

Coefficient quantization in FIR systems


In FIR systems we only have to deal with the locations of the
zeros, since for causal filters all poles are at z = 0.
Remarks:

For FIR filters an expression analogous to (4.32) can be


derived for the zeros FIR filters should also be realized
in cascade form according to
H(z) = H0

P
Y

(1 + bp1 z

+ bp2 z

p=1

with second order subsections, in order to limit the effects of


coefficient quantization to the zeros of the actual subsection
only.

Parallel form (b = 10 bits)

However, since the zeros are more or less uniformly spread in


the z-plane, in many cases the direct form is also used with
quantized coefficients.
For a linear-phase filter with the symmetry (4.8) in the
impulse response, quantization does not affect the phase
characteristics, but only the magnitude.
4.3.4 Round-off effects
Direct-form I IIR structure
Starting point for the analysis: Direct-form I structure with the
difference equation

y(n) =

N
X

i=0

95

bi v(n i)

N
X

i=1

ai y(n i).
96

All signal values and coefficients are represented by b-bit


binary fixed-point numbers (for example in twos-complement
representation):

As already stated in Section 2.4 the result of each single


quantization stage can be modeled by adding a noise source ei(n)
with the following properties:

truncation or rounding of the (2b 1)-bit products to b bit


necessary

modelling as a constant multiplication followed by a quantizer

Each ei(n) corresponds to a wide-sense-stationary whitenoise process.


Each ei(n) has an uniform distribution of amplitudes over one
quantization interval (uniform p.d.f.).
Each ei(n) is uncorrelated with the quantizer input, all other
quantization noise sources and the input signal of the filter.

We have shown above that for b-bit quantization the rounding


error falls in the range

1 b+1
1 b+1
(2
) ei(n) (2
),
2
2

and for twos-complement truncation we have

b+1

ei(n) 0.

Mean and variance for rounding

e = 0,

e =

22b+2
,
12

(4.35)

and for truncation


(from [Oppenheim, Schafer, 1999], v x)

e =

This can be described with the difference equation

y(n) =

N
X

i=0

Q[bi v(n i)]

N
X

i=1

2b+1
,
2

e =

22b+2
.
12

(4.36)

Autocorrelation (white noise process):

Q[ai y(n i)]. (4.34)


97

ee(n) = e (n) + e .

(4.37)
98

In the following we will restrict ourselves to the rounding case,


where ee(n) = e2(n) and thus, for the power spectral density
we have (ej ) = e2:

The following structure can be obtained by summing up all the


noise sources:
4
X
ei(n),
e(n) =
i=0

quantization noise e(n) now is given as

f (n) =

N
X

i=1

aif (n i) + e(n),

(4.39)

since e(n) can be regarded as the input to an all-pole system


with output f (n).

Suppose that the allpole-filter has the transfer function


Hef (z) with

Hef (z) =

1
,
D(z)

H(z) =

N (z)
D(z)

analog to (4.1).

(from [Oppenheim, Schafer, 1999], v x)

Mean of f (n): f = e Hef (ej0) = 0 for rounding.

Overall noise variance in the special case from above:


2
e

4
X

i=0

2
i

e = 5

Power spectral density (power spectrum)


f f (ej ) = e2 |Hef (ej )|2.

22b+2
12

Variance f2 = F1{f f (ej )}|n=0:


2
f

Overall noise variance in the general case:


2
e

= (2N + 1)

2b+2

12

(4.38)

2
= e
2

|Hef (e )| d = e

n=

|hef (n)| ,

(4.40)
where the last expression is obtained by applying Parsevals
theorem.

Due to linearity the output of the whole filter is y(n) =


y(n) + f (n).
Thus, the difference equation for the

By combining (4.38) and (4.40) we can now state the total output

99

100

approaches the unit circle In order to neep the noise variance


below a certain level, the wordlength b has to be increased.

variance due to internal round-off as

2
f

22b+2
= (2N +1)
2 12

d
|D(ej )|2

Round-off noise in a second-order system


(4.41)

Second-order direct form I system:

22b+2 X
2
= (2N +1)
|hef (n)|
12 n=

b0 + b1 z 1 + b2 z 2
(1 r ej z 1)(1 r ej z 1)

H(z) =
Thus we have

Round-off noise in a first-order system


2
f

Given: Transfer function

H(z) =

b0
,
1 a1z 1

|a1| < 1

Impulse response: h(n) = b0 an1 u(n) (u(n): unit step


function)
e(n) = ea1 (n) + eb0 (n)

v(n)

b0

22b+2 1
=5
12 2

d
.
|(1 r ej ej )|2 |(1 r ej ej )|2

With a1 = 2r cos and a2 = r 2 it can be shown via a partial


fraction expansion that
!
22b+2 1 + r 2
1
2
f = 5
. (4.43)
12
1 r 2 r 4 + 1 2r 2 cos(2)
As in the first-order case we can see that the total variance
increases if the poles approach the unit circle (r 1).

y(n)
z 1

Direct-form II structure

a1

Considering (4.41) and the two error sources ea1 (n), eb0 (n), we
have




22b+2 X
22b+2
1
2n
=2
|a1| =
.
12 n=0
6
1 |a1|2
(4.42)
The output noise variance increases when the pole z = a1
2
f

101

In this case, the nonlinear difference equations are of the form

w(n) =
y(n) =

N
X

i=1

N
X

i=0

Q[ai w(n i)] + v(n),


(4.44)

Q[bi w(n i)].


102

Signal flow graph:

and by applying a relation similar to (4.40)


2
f

22b+2 X
22b+2
2
=N
|h(n)| + (N + 1)
.
12 n=
12

(4.47)

White noise produced in implementing the poles is filtered


by the entire system, whereas the white noise produced in
implementing the zeros is added directly to the output of the
system.
A comparison with (4.41) for the direct form I structure shows
that both structures are affected differently by the quantization
of products.

4.3.5 Zero-input limit cycles


(from [Oppenheim, Schafer, 1999], v x)

For rounding (e = 0) the power spectrum of the output noise is:

f f (e ) = N

22b+2
22b+2
j 2
|H(e )| + (N + 1)
.
12
12
(4.45)

We then have:

Stable IIR filters implemented with infinite-precision


arithmetic: If the excitation becomes zero and remains
zero for n > n0 then the output of the filter will decay
asymptotically towards zero.
Same system implemented with fixed-point arithmetic: Output
may oscillate indefinitely with a periodic pattern while the
input remains equal to zero: Zero-input limit cycle
behavior, due to nonlinear quantizers in the feedback loop or
overflow of additions.
No general treatment, but two examples are given

2
f

22b+2 1
=N
12 2

22b+2
,
|H(e )| d + (N + 1)
12
j

(4.46)
103

Limit cycles due to round-off and truncation


Given: First-order system with the difference equation

y(n) = a y(n 1) + v(n),

|a| < 1.
104

Register length for storing a and the intermediate results: 4 bits


(sign bit plus 3 fractional digits) product a y(n 1) must be
rounded or truncated to 4 bits, before being added to v(n)

A constant steady value is obtained for n 3.

Signal flow graphs:

Such periodic outputs are called limit cycles.

For a = 1/2 we have a periodic steady-state oscillation


between 1/8 and 1/8.

Infinite-precision linear system


v(n)

y(n)
z

Nonlinear system due to quantization


v(n)

y(n)
z 1

Q[]
a

Nonlinear difference equation (Q[] represents twos-complement


rounding):

y(n) = Q[a y(n 1)] + v(n).


Suppose we have a = 1/2 = [0.100], v(n) = 7/8 (n) =
[0.111] (n):

y(0) = 7/8 = [0.111]

(from [Oppenheim, Schafer, 1999])

Limit cycles due to overflow

y(1) = Q[a y(0)] = Q [ [0.100] [0.111] ]

Consider a second-order system realized by the difference


equation

= Q [ [0.011100] ] = Q[7/16] = [0.100] = 1/2


y(2) = Q[a y(1)] = [0.010] = 1/4
y(3) = Q[a y(2)] = [0.001] = 1/8
y(4) = Q[a y(3)] = Q [ [0.000100] ] = [0.001] = 1/8
105

y(n) = v(n) + Q [a1 y(n 1)] + Q [a2 y(n 2)] ,


(4.48)
Q[] represents twos-complement rounding with one sign and
3 fractional digits.
106

Overflow can occur with the twos-complement addition of the


products in (4.48).
Suppose that a1 = 3/4 = [0.110], a2 = 3/4 = [1.010],
y(1) = 3/4 = [0.110], y(2) = 3/4 = [1.010],
v(n) = 0 for all n 0:

4.4 Design of FIR filters


General remarks (IIR and FIR filters)

Ideal filters are noncausal, and thus physically unrealizable for


real-time signal processing applications.

= Q[ [0.100100] ] + Q[ [0.100100] ] = [0.101] + [0.101]

Causality implies that the a filter frequency response H(ej )


cannot have an infinitely sharp cutoff from passband to
stopband, and that the stopband amplification can only be zero
for a finite number of frequencies .

= [1.010] = 3/4

Magnitude characteristics of physically realizable filters:

y(0) = Q[ [0.110] [0.110] ] + Q[ [1.010] [1.010] ]

y(1) = [1.011] + [1.011] = [0.110] = 3/4


y(n) continues to oscillate unless an input is applied.
Remarks
Some solutions for avoiding limit cycles:

Use of structures which do not support limit-cycle oscillations.


Increasing the computational wordlength.
Use of a double-length accumulator and quantization after the
accumulation of products.
FIR-filters are limit-cycle free since there is no feedback involved
in its signal flow graph.

(from [Proakis, Manolakis, 1996])

1: passband ripple, 2: stopband ripple,


p: passband edge frequency, s: stopband edge frequency
Filter design problem:

Specify 1, 2, p, and s corresponding to the desired


application.
Select the coefficients ai and bi (free parameters), such that
the resulting frequency response H(ej ) best satisfies the
requirements for 1, 2, p, and s.
The degree to which H(ej ) approximates the specifications
depends on the criterion used for selecting the ai and bi and

107

108

also on the numerator and denominator degree N (number of


coefficients)
4.4.1 Linear phase filters
Important class of FIR filters, which we will mainly consider in
the following. Definition: A filter is said to be a linear-phase
filter, if its impulse response satisfies the condition (L = N +1):

h(n) = h(L 1 n).

(4.49)

With the definition S := (L 1)/2 and for L odd this leads to


a z-transform

H(z) =

L1
X

h(n)z

which is the z-transform equivalent to (4.49). Consequences:

The roots of the polynomial H(z) are identical to the roots of


1
is
the polynomial H(z 1): If z0i is a zero of H(z) then z0i
also a zero.
If additionally the impulse response h(n) is real-valued, the
roots must occur in complex-conjugate pairs: If z0i is a zero

of H(z) then z0i


is also a zero.
The zeros of a real-valued linear-phase filter occur in
quadruples in the z-plane (exception: zeros on the real axis, zeros
on the unit circle)

(4.50)

n=0

=z

"

h(S) +

S1
X

h(n) z

n=0

(Sn)

(Sn)

(4.51)

for L even we have

(a) Type-1 linear phase system

L/21

H(z) = z

h(n) z

n=0

(Sn)

(Sn)

(4.52)

When we now substitute z 1 for z in (4.50) and multiply both


sides by z (L1) we obtain with (4.49)

(from [Proakis, Manolakis, 1996])

(L1)

H(z

) = H(z),

(4.53)
109

Definition: Odd length L, even symmetry h(n) = h(L1n)


Frequency response from (4.51):
j

H(e ) = e

=e

jS

jS

"

h(S) + 2

S1
X
n=0

h(n) cos ((S n))

(4.54)

H01()
110

H01(): amplitude frequency response, real-valued (generally


denoted with H0())

type 3, odd length (L=31)


0.5

h(n)

linear phase 1() = arg H(ej ) = S


type 1, odd length (L=31)

h(n)

0.5
0

10
15
20
n
type 3, amplitude frequency response

25

30

1
10

15
20
n
type 1, amplitude frequency response

25

0.5

30

03

H ()

0
0.5

01

H ()

1
0

0.5

1.5

2
/

0.5

0.5

1.5

2
/

2.5

3.5

=e

Frequency response from (4.52):

Definition: Odd length L, odd symmetry h(n) = h(L1n)


Frequency response from (4.51):

H(e ) = e

3.5

Definition: Even length L, even symmetry h(n) = h(L1n)

(b) Type-3 linear phase system

(c) Type-2 linear phase system

0
0

2.5

jS

jS

"

j h(S) + 2

S1
X
n=0

j H03() = e

h(n) sin ((S n))

jS+j/2

(4.55)

H(e ) = e
=e

jS

jS

L/21

n=0

H02()

h(n) cos ((S n)) (4.56)

H03()
linear phase 2() = arg H(ej ) = S

linear phase 3() = arg H(ej ) = S /2


H(ej0) = 0, S IN H(ej ) = 0

S = (21)/2, IN H(ej ) = 0
111

112

Amplitude frequency response has 4 -periodicity:

(d) Type-4 linear phase system

L/21

H02() = 2

n=0

h(n) cos ((S n))

L/21

H02( + 2) = 2

n=0

h(n) cos ((S n)( + 2))

Definition: Even length L, odd symmetry h(n) = h(L1n)


Frequency response from (4.52):

L/21
X
j
jS
H(e ) = e
j 2
h(n) sin ((S n))
n=0

(4.57)

L/21

=2

n=0

=e

h(n) cos ((S n))


cos ((S n)2)
{z
}
|

= cos((L12n)) = 1

= H02()

Remark: H(ej ) is 2 -periodic again due to the ejS phase


factor

jS

j H04() = e

jS+j/2

H04()

linear phase 4() = arg H(ej ) = S /2


H(ej0) = 0
Similar to the type-2 filter the amplitude frequency response
has 4 -periodicity: H04( + 2) = H04(). The
multiplication with the exponential factor ejS+j/2 then
again leads to 2 -periodicity for H(ej ).
type 4, even length (L=30)
0.5

h(n)

h(n)

type 2, even length (L=30)

0.5
0
0

10

15
20
n
type 2, amplitude frequency response

25

25

30

0.5
04

H ()

0.5
H02()

10
15
20
n
type 4, amplitude frequency response

0.5

0.5

1
0

30

0.5

1.5

2
/

2.5

3.5

113

0.5

1.5

2
/

2.5

3.5

114

Type-1 and Type-2 filters used for ordinary filtering,


however type 2 filters are unsuitable for highpass filtering
Type-3 and Type-4 filters for example used for 90 degree phase
shifters and so called Hilbert transformers
4.4.2 Design of linear-phase filters using a window function

L with the desired frequency response


(
ej(L1)/2 for 0 || < c,
j
Hd(e ) =
0
otherwise,

Given: Desired frequency response


j

Hd(e ) =

hd(n) e

jn

1
hd(n) =
2
(4.58)

n=

Impulse response hd(n) can be obtained with the inverse


Fourier-Transform

hd(n) =

1
2

Hd(e ) e

jn

d.

1 n = 0, . . . , L 1
h(n) =
0 otherwise

hd (n) n = 0, . . . , L 1
otherwise
0

Frequency response of the rectangular window: see (3.12)

115


sin c n
n

L1
2

L1
2



L1
2

n 6=

d.

n 6=

L1
2

(4.61)

L1
,
2

n = 0, . . . , L 1

1.2

1
L=61, c=0.2

0.8
0.6

0.6
0.4

0.2

0.2
0.2

0.4
0.6
/

0.8

L=101, c=0.2

0.8

0.4

0
0

Suppose, we want to design a linear-phase lowpass filter of length

1.2

|H(ej )|

w(n) =

j(n(L1)/2)

Example for c = 0.2 , L = 61 and L = 101:

Rectangular window:

h 
i
sin c n L1
2


h(n) =
,
n L1
2
For L odd:

Zc

Multiplication with a rectangular window of length L leads to

(4.59)

Impulse response has generally infinite length truncation


to length L by multiplication with a window function w(n)
necessary: h(n) = hd(n) w(n).

(4.60)

where c is denoting the cut-off frequency.


Corresponding unit sample response:

|H(ej )|

Applications:

0
0

0.2

0.4
0.6
/

0.8

Disadvantage of using an rectangular window:


116

Large sidelobes lead to in undesirable ringing effects (overshoot


at the boundary between pass- and stopband) in the frequency
response of the resulting FIR filter

(n n, L M , I0 : Bessel function of the first kind of order zero)

Gibbs phenomenon:

Result of approximating a discontinuity in the frequency


response with a finite number of filter coefficients and a mean
square error criterion
Eq. (4.58) can be interpreted as a Fourier series representation
for Hd(ej ) with the Fourier coefficients hd(n) Gibbs
phenomenon resulting from a Fourier series approximation
R
(Hd(ej ) H(ej ))2 d
Squared integral error E =

approaches zero with increasing length of h(n). However, the


maximum value of the error |Hd(ej )H(ej )| approaches
a constant value.

Use of other appropriate window functions with lower


sidelobes in their frequency responses

(from [Proakis, Manolakis, 1996])

Frequency-domain characteristics of some window functions


(taken from [Proakis, Manolakis, 1996]):

Type of window
Rectangular
Bartlett
Hanning
Hamming
Blackman

Approximate transition
width of main lobe

Peak
sidelobe [dB]

4/L
8/L
8/L
8/L
12/L

-13
-27
-32
-43
-58

Parameter in the Kaiser window allows to adjust the width of


the main lobe, and thus also to adjust the compromise between
overshoot reduction and increased transition bandwidth in the
117

118

resulting FIR filter.

Frequency response of an FIR filter (requirement):

Magnitude frequency response 20 log10 |H(ej )| of the


resulting linear-phase FIR filter, when different window functions
are used to truncate the infinite-length impulse response from
(4.61) (desired frequency response Hd(ej ) in (4.60)):
Rectangular window

20

40

0.2

0.8

100
0

Blackman window

20

0.2

0.8

L=61, c=0.2

20

40

0.4
0.6
/

Kaiser window, =4

20 log10 |H(ej )|

L=61, c=0.2

20 log

j 2 (k+)
L
)

L1
X

j2k/L

Hd(e

60

80

80

100
0

100
0

0.2

0.4
0.6
/

0.8

L1
X

h(n)e

j2(k+)n/L

(4.63)

j 2 (k+)
L
)

k=0

40

60

jn

Multiplication of (4.63) with ej2k/L, = 0, . . . , L 1 and


summation over k = 0, . . . , L1 yields to

10

|H(ej )|

0.4
0.6
/

h(n)e

n=0

80

20 log

Hd(e

60

80

L1
X

With (4.62) we obtain for k = 0, . . . , L1:

40

60

100
0

L=61, =0.2
c

20 log10 |H(ej )|

20

n=0

Hamming window

L=61, =0.2
c

10

|H(ej )|

Hd(e ) =

L1
L1 X
X

h(n)e

j2(k+)n/L

j2k/L

k=0 n=0

0.2

0.4
0.6
/

0.8

L1
X

h(n)e

j2n/L

n=0

MATLAB-command for windowed linear-phase FIR design:


fir1
4.4.3 Frequency sampling design
Desired frequency response Hd(ej ) is specified as a set of
equally spaced frequencies:


2
1
k =
.
(k + ), k = 0, 1, . . . , L 1, 0,
L
2
(4.62)
119

= L h() e

L1
X

j2(n)k/L

k=0

j2/L

Thus, the impulse response h(n) can be obtained from the


sampled desired frequency response as (n = 0, . . . , L1):
L1
1 X
j2(k+)n/L
j 2 (k+)
h(n) =
)e
Hd(e L
L k=0

(4.64)

120

Example:

Remarks:

For = 0 (4.64) is identical to the IDFT fast evaluation


with IFFT

Determine the coefficients of a type 2 linear-phase filter with length L = 32,


and the desired sampled frequency response

In general Hd(ej L (k+)) has to be specified in amplitude


and phase for every k.
Exception: Type 1/3 linear-phase filters, where Hd() can be
real-valued with an additional shift of the obtained impulse
response (see below).
If h(n) is a real-valued sequence, the frequency response and thus
also its sampled version have the Hermitian symmetry

Hd(e

j 2 (k+)
L
)

= Hd (e

1
2 (k+)
j 2 (k+)
j L1
2 L
Hd (e L
)=e
T1

k = 0, 1, . . . , 5,
k = 6,
k = 7, 8, . . . , 15.

The parameter T1 is responsible for the transition band behavior and is


obtained via numerical optimization in order to reduce the magnitude of the
sidelobes. The corresponding values are tabulated in the literature ([Rabiner,
Gold, McGonegal, 1970], [Proakis, Manolakis, 1996]).

j 2 (Lk)
L
).

The number of frequency specifications can be reduced, and


(4.62) becomes

L odd,
k = 0, 1, . . . , L1

2
2
L
k =
(k + ),
L even,
k = 0, 1, . . . , 2 1

 0, 1 .

For L = 32 we obtain T1 = 0.3789795 for = 0, and T1 = 0.3570496 for


= 1/2.

Coefficients of the impulse response h(n):

(4.65)

Linear-phase FIR filters:

Symmetry in h(n) can be additionally exploited such that


(4.64) only has to be evaluated for n = 0, . . . , L2 1 for L
even, and n = 0, . . . , L1
2 for L odd, resp.
Linear-phase property may be included by specifying real2
valued frequency response samples Hd(ej L (k+))
Application of (4.64) leads to a zero-phase response which has
to be shifted to the right by L1
2 samples.
121

122

Magnitude frequency responses (20 log10 |H(ej )|):

Linear-phase filters revisited

L = 32, = 0:

As we have shown in section 4.4.1, every linear-phase filter has a


frequency response of the form

L = 32, = 0.5:

H(e ) = (j) A()e

j(L1)/2

m {0, 1}, (4.66)

where A() is a real-valued positive or negative function (amplitude frequency response) (cmp. (4.54), (4.55), (4.56), (4.57)).
It can be shown that for all types of linear-phase symmetry A()
can always be written as a weighted sum of cosines. For example
for type 1 linear-phase filters we have

(from [Proakis, Manolakis, 1996])

MATLAB-command for the frequency sampling design of


linear-phase FIR filters: fir2
4.4.4 Optimum equiripple design (Chebyshev approximation)

Windowing design techniques (section 4.4.2) try to reduce


the difference between the desired and the actual frequency
response (error function) by choosing suitable windows
How far can the maximum error be reduced?
Theory of Chebyshev approximation answers this question
and provides us with algorithms to find the coefficients
of linear-phase FIR filters, where the maximum frequency
response error is minimized
Chebyshev approximation: Approximation that minimizes the
maximum errors over a set of frequencies
Resulting filters exhibit an equiripple behavior in their
frequency responses equiripple filters

(L1)/2

A() =

an cos(n)

(4.67)

n=0





L1
L1
with a0 = h
, an = 2 h n +
. (4.68)
2
2
Remaining linear-phase filters ( 2f ):

(from [Parks, Burrus: Digital Filter Design, 1987])

123

124

then a necessary and sufficient condition that A() be the


unique, best weighted Chebyshev approximation to a given
continuous function D() on F is that the weighted error
function E() = W () (D() A()) exhibit at least
r + 1 extremal frequencies in F . These frequencies are points
for which 1 < < r < r+1,

Problem definition
Acceptable frequency response for the resulting FIR filter:

Linear phase,
transition bandwidth between pass- and stopband,
passband deviation 1 from unity,
stopband deviation 2 from zero.

(Multiple bands are possible as well.)

We will restrict ourselves in the following to lowpass type 1 linearphase filters.

E(m) = E(m+1),

m = 1, 2, . . . , r,

|E(i)| = max E(),

i = 1, . . . , r + 1.

and
F

Approximation problem: Given

a compact subset F of [0, ] in the frequency domain


(consisting of pass- and stopband in the lowpass filter case),
a desired real-valued frequency response D(), defined on
F,
a positive weight function W (), defined on F , and
the form of A(), here (type-1 linear-phase)
P r1
A() =
n=0 an cos(n).

Consequences from the alternation theorem: Best Chebyshev


approximation must have an equiripple error function E(),
and is unique.
Example: Amplitude frequency response of an optimum
type 1 linear-phase filter with L = 13 r = 7
A() =

L = 13

(4.69)

over an by the choice of A().

Alternation theorem (without proof):


If A() is a linear combination of r cosine functions,

A() =

r1
X

an cos(n)

n=0

Goal: Minimization of the error

Emax = max W () |D() A()|

(L1)/2
P

(from [Parks, Burrus: Digital Filter Design, 1987])

If the r+1 extremal frequencies were known, we could use the


frequency-sampling design from above to specify the desired

an cos(n),

n=0

125

126

values 1 1 at the extremal frequencies in the passband, and


2 in the stopband, respectively.
How to find the set of extremal frequencies?
Remez exchange algorithm (Parks, McClellan, 1972)

It can be shown that the error function


E() = D()

r1
X

an cos(n)

(4.70)

n=0

can always be forced to take on some values for any given


set of r+1 frequency points i, i = 1, . . . , r + 1.
Simplification: Restriction to W () = 1, leading to 1 =
2 = .
This can be written as a set of linear equations according to

D(i) =

r1
X

an cos(ni)+(1) ,

2. Interpolate to find the frequency response on the entire grid


of frequencies.
3. Search over the entire grid of frequencies for a larger error
magnitude than k obtained in step 1.
4. Stop, if no larger magnitude error has been found.
Otherwise, take the r + 1 frequencies, where the error
attains its maximum magnitude as a new trial set of
extremal frequencies and go to step 1.
Flowchart ( f ):

i = 1, . . . , r+1,

n=0

(4.71)
from which we obtain a unique solution for the coefficients
an, n = 0, . . . , r1 and the error magnitude .
In the Remez exchange algorithm {F } is usually chosen as
an equally spaced grid of frequency points with the number of
frequency points being approximately 10 L. The algorithm
is initialized with a trial set of arbitrarily chosen frequencies
T = {1, 2, . . . , r+1}.
The Remez algorithm now consists of the following basic
computations:
1. Solve the linear equations in (4.71), yielding an error
magnitude k in the k-th iteration.
127

(from [Parks, Burrus: Digital Filter Design, 1987])

Example:
Choose the two coefficients d0 and d1 such that they minimize the Chebyshev
error
2
max |x (d0 + d1 x1 )|
x[0,1]

(approximation of a parabola by a straight line) three extremal points


128

achieves its maximum magnitude: T1 = [0.0, 0.625, 1.0]


Linear equations to solve:

resulting linear equations to be solved:


2

xi = d0 + d1 xi + (1) ,

i = 0, 1, 2

(4.72)

1
1
1

0.0
0.625
1.0

1 = 0.1171875


0.0
1
d0
1 d1 = 0.390625
0
1.0
1

3. Next trial set: T2 = [0.0, 0.5, 1.0]


Linear equations to solve:

1
1
1

0.0
0.5
1.0


0.0
1
d0
1 d1 = 0.25
1.0
0
1

1 = 0.125 =
b maximum error T2 is the extremal point set

After the extremal points i are found, the coefficients an from


Step 1 of the above algorithm are used to obtain the filter
coefficients with (4.68).
MATLAB-command for optimum equiripple design: remez
Estimation of the filter length
(from [Parks, Burrus: Digital Filter Design, 1987])

Given the stop- / passband ripple 1, 2, and the transition


bandwidth = s p the necessary filter order N can
be estimated as (Kaiser, 1974)

1. Arbitrarily chosen trial set: T0 = [0.25, 0.5, 1.0]


Matrix version of the linear equations in (4.72):


0.0625
1 0.25
1
d0
1
0.5
1 d1 = 0.25
1.0
0
1
1.0
1

N =

0 = 0.0625

10 log10(1 2) 13
.
2.324

(4.73)

MATLAB-command for estimating the filter order: remezord

2. Next trial set chosen as those three points, where the error
2

E(x) = x (d0 + d1 x)
129

130

the filter-length by one, L = 28:

Design example
Design a linear-phase lowpass filter with the specifications

Impulse response

Magnitude frequency response

0.6

p = 0.4,

s = 0.6.

0.4

weighting 2/1 = 10 in the stopband.

20
40

0.2

60

Inserting these values into (4.73) leads to N 25.34 and


rounding up (to be on the save side) yields a filter length
L = N +1 = 27.
Impulse response

20 log10 |H(ej )| [dB]

2 = 0.001,

h(n)

1 = 0.01,

80

0.2
0

10

15
n

20

Magnitude frequency response

100
0

25

0.2

0.4
0.6
/

0.8

Passband detail

0.6
20 log10 |H(ej )| [dB]

0
1.01

20

1.005

|H(ej )|

h(n)

0.4

40

0.2

60

0.995

80
0.99

0.2
0

10

15

20

100
0

25

0.2

0.4
0.6
/

0.8

Passband detail

0.4

In the following only design algorithms are discussed which


convert an analog into a digital filter, however, there are also
numerous algorithms for directly designing an IIR filter in the
z-domain (frequency sampling method, least-squares design).

1.01
|H(e )|

0.2
/

4.5 Design of IIR filters

1.005
1

0.995
0.99
0.985
0

0.985
0

0.2
/

0.4

In the passband the specifications are not satisfied Increasing


131

Why starting point analog filter? Analog filter design is a well


developed field (lots of existing design catalogs). Problem can
be defined in the z-domain, transformed into the s-domain and
solved there, and finally transformed back into the z-domain.
132

Analog filter: Transfer function

Frequency response (ideal sampling assumed, compare (2.4)):


M
P

N (s)
n=0
=
Ha(s) =
N
P
D(s)

n sn
(4.74)

sn

n=0

with the filter coefficients n, n, and the filter order N .


Furthermore,

Ha(s) =

h(t) e

st

dt




1 X
2n
H(j) =
Ha j j
T n=
T

T should be selected sufficiently small to avoid aliasing.


Method is not suitable to design highpass filters due to the
large amount of possible aliasing.
Suppose that the poles of the analog filter are distinct. Then the
partial-fraction expansion of Ha(s) writes

(4.75)

Ha(s) =

Note that linear-phase designs are not possible for causal and
stable IIR filters, since the condition
H(z) = z

N
X

Ai
,
s si

i=1

(Laplace transform).

H(z

ha(t) =

N
X

Ai e

si t

N
X

Ai e

si nT

i=1

Transfer function H(z) h(n):

H(z) =

n=0

133

t 0.

Periodical sampling:

4.5.1 Filter design by impulse invariance

where T is the sampling interval.

i=1

h(n) = ha(nT ) =

Goal: Design an IIR filter with an impulse response h(n) being


the sampled version of the impulse response ha(t) of the analog
filter:
h(n) = ha(nT ), n = 0, 1, 2, . . . ,

(4.77)

the Ai are the coefficients of the partial-fraction expansion, and


the si denote the poles of the analog filter. Inverse Laplace
transform of (4.77) yields

has to be satisfied (compare (4.53)) mirror-image pole


outside the unit-circle for every pole inside the unit-circle
unstable filter.

(4.76)

h(n)z

n=0

N
X

i=1

Ai e

si nT

134

We then have

H(z) =

From (4.78) we then finally have

N
X

i=1

Ai


X

si T

n=0

n

N
X

i=1

H(z) =

Ai
1 esiT z 1

Thus, given an analog filter Ha(s) with poles si, the transfer
function of the corresponding digital filter using the impulse
invariant transform is

H(z) =

N
X

i=1

Ai
s
e iT

z 1

0.5
1 e(0.1j3)T z 1

0.5
1 e(0.1+j3)T z 1

1 (e0.1T cos(3T )) z 1

.
1 (2 e0.1T cos(3T )) z 1 + e0.2T z 2

Magnitude frequency responses:


Digital filter: 20 log10 |H(ej )|

Analog filter: 20 log10 |Ha (j)|

(4.78)

(from [Proakis, Manolakis, 1996])

with poles at zi = esiT , i = 1, . . . , N . Note: (4.78)


holds only for distinct poles, generalization to multiple-order
poles possible.

Algebraic transformation between the variables s and z , mapping


of the entire j-axis of the s-plane to one revolution of the unit
circle in the z -plane.

Example:
Convert the analog filter with transfer function

Ha (s) =

s + 0.1
(s + 0.1)2 + 9

Definition:

2
s=
T

into a digital filter using the impulse invariant method.


Poles of Ha (s): s0,1 = 0.1 j3
Partial-fraction expansion:

Ha (s) =

4.5.2 Bilinear transform

1 z 1
1 + z 1

(4.79)

T denoting the sampling interval.


The transfer function of the corresponding digital filter can be
obtained from the transfer function of the analog filter Ha(s)

0.5
0.5
+
s + 0.1 j3
s + 0.1 + j3
135

136

Nonlinear mapping between and (warping of the


frequency axis) according to

according to

H(z) := Ha

"

1 z 1
1 + z 1

2
T

!#

= Ha(s).

2
tan(/2),
T

= 2arctan(T /2).

(4.81)

Properties

Solving (4.79) for z yields


z=

1 + (T /2)s
,
1 (T /2)s

(4.80)

and by substituting s = + j we obtain

z=

1 + T /2 + jT /2
.
1 T /2 jT /2

< 0 |z| < 1, > 0 |z| > 1 for all


causal, stable continuous-time filters map into causal stable
discrete-time filters
By inserting s = j into (4.80), it can be seen that |z| = 1 for
all values of s on the j-axis j-axis maps onto the unit
circle.
Relationship between and : From (4.79) we obtain with
s = j and z = ej

2
=
T

j sin(/2)
cos(/2)

1 ej
1 + ej

2
j =
T


(from [Oppenheim, Schafer, 1999])

Remarks:

Design of a digital filter often begins with frequency


specifications in the digital domain, which are converted
to the analog domain by (4.81). The analog filter is
then designed considering these specifications (i.e. using the
classical approaches from the following section) and converted
back into the digital domain using the bilinear transform.
When using this procedure, the parameter T cancels out and
can thus be set to an arbitrary value (T = 1).
Example:

2j
tan(/2)
T

Design a digital single-pole lowpass filter with a 3 dB frequency (cutoff


frequency) of c = 0.2 , using the bilinear transform applied to the

137

138

Butterworth filters

analog filter with the transfer function

Ha (s) =

Lowpass Butterworth filters are allpole-filters characterized by the


squared magnitude frequency response

c
,
s + c

c denoting the analog cutoff frequency.


c is obtained from c using (4.81)
c =

|H()| =

2
0.65
tan(c /2) =
.
T
T

0.65/T
,
s + 0.65/T

which is transformed back into the digital domain using the bilinear
transform in (4.79), leading to the transfer function of our desired digital
filter:
0.245 (1 + z 1 )
.
H(z) =
1 0.509 z 1
Note that the parameter T has been divided out. The frequency response is

H(e

)=

(4.82)

N is the order of the filter, c is the 3 dB frequency (cutoff


frequency).
Since H(s) H(s)|s=j = |H(j)|2 we have from (4.82)
by analytic continuation into the whole s-plane

The analog filter now has the transfer function

Ha (s) =

1
,
1 + (/c)2N

0.245 (1 + ej )
,
1 0.509 ej

especially we have H(ej0 ) = 1, and |H(ej0.2 )| = 0.707, which is


the desired response.

H(s) H(s) =

1
.
1 + (s2/2c )N

Poles of H(s) H(s):


s2
1/N
j(2n+1)/N
= (1)
=e
2
c

s,n = c e

j/2

j(2n+1)/(2N )

n = 0, . . . , 2N 1
(4.83)

In the following we briefly discuss the characteristics of


commonly used analog (lowpass) filters.

From (4.83): The 2N poles of H(s) H(s) occur on a


circle of radius c at equally spaced points in the s-plane.
The N poles for n = 0, . . . , N 1 in (4.83) are located in
the left half of the s-plane and belong to H(s).
The N remaining poles lie in the right half of the s-plane and
belong to H(s) (stability!).
Furthermore, a Butterworth filter has N zeros at .

139

140

4.5.3 Characteristics of commonly used analog filters

Design of a digital filter can be reduced to design an


appropriate analog filter and then performing the conversion
from H(s) to H(z).

Pole locations in the s-plane:

for the design of the corresponding digital filter obtained via


bilinear transform.
Example:
Determine the order and the poles of a lowpass Butterworth filter that has a
3 dB bandwidth of 500 Hz and an attenuation of 40 dB at 1000 Hz.

(from [Proakis, Manolakis, 1996])

3 dB frequency c = 2 fc = 1000 ,

Frequency responses ( , |H(p)|2 = 1/(1 + 2))

stopband frequency s = 2 fs = 2000 ,


attenuation of 40 dB 2 = 0.01.
From (4.84) we then obtain

N =

log10 (104 1)
= 6.64
2 log10 2

In order to be on the safe side we choose N = 7.


(from [Proakis, Manolakis, 1996])

Properties of the resulting digital filter designed with butter for N = 7,


fsamp = 8000 Hz, and the above parameters (continuous-time filter
transformed by bilinear transform into the discrete-time domain):

Estimation of the required filter order N :


At the stopband edge frequency s (4.82) can be written as

Magnitude frequency response

20

0.8
|H(ej )|

40

which leads to

N =

log((1/22)

1)
.
2 log(s/c)

(4.84)

60

141

100
0

0.6
0.4
0.2

80

MATLAB commands: buttord for order estimation, butter

Transition band

0
20 log10 |H(ej )| [dB]

1
2
= 2 ,
1 + (s/c)2N

0.1

0.2

0.3
0.4
/

0.5

0.6

0
0

0.05

0.1
0.15
/

0.2

0.25

142

Phase response

0.5

TN +1(x) = 2 x TN (x) TN 1(x),

5
Im{z}

arg H(ej ) [rad]

The Chebyshev polynomials can be obtained by the recursive


equation

Pole/zero locations

10

Examples:

0.5

T0(x) = 1, T1(x) = cos(cos1(x)) = x

1
15
0

0.2

0.4
0.6
/

0.8

0.5

0
Re{z}

0.5

T2(x) = cos(2 cos1(x)) = 2cos2(cos1x) 1


= 2 x2 1

Chebyshev filters
Two types of Chebyshev filters:

Type 1 filters are all-pole filters with equiripple behavior


in the passband and monotonic characteristic (similar to a
Butterworth filter) in the stopband.
Type 2 filters have poles and zeros (for finite s), and equiripple
behavoir in the stopband, but a monotonic characteristic in the
passband.
Type 1 Chebyshev filter:
Squared magnitude frequency response:
2

|H()| =

1
,
1 + 2 TN2 (/p)

(4.85)

where is a parameter related to the passband ripple, and TN (x)


is the N -th order Chebyshev polynomial defined as

TN (x) =

cos(N cos1(x))
cosh(N cosh

N = 1, 2, . . .

for |x| 1,

(x)) for |x| > 1.

T3(x) = cos(3 cos1(x))


= 4 cos3(cos1x) 3 cos(cos1(x)) = 4 x3 3 x
...

TN (x) represents a polynom of degree N in x.


Chebyshev behavior (minimizing the maximal error) in the
passband (or in the stopband for type 2 filters).
The filter parameter in (4.85) is related to the passband ripple:
For N odd, TN (0) = 0 |H(0)|2 = 1,
1
for N even, TN (0) = 1 |H(0)|2 = 1+
2
At the passband edge frequency = p we have TN (1) = 1,
such that
s
1
1
= 11 =
1, (4.87)

2
(1 1)2
1+
which establishes a relation between the passband ripple 1 and
the parameter .

(4.86)

Typical squared magnitude frequency response for a Chebyshev


type 1 filter:

143

144

Estimation of the filter order:


Chebyshev filter only depend on the parameters N , , 2, and the
ratio s/p. Using these values, it can be shown that the required
order can be estimated as


 q
q
2
2
2
log
1 2 + 1 2 (1 + ) /( 2)
h
i
.
N =
p
log s/p + (s/p)2 1
(4.89)
MATLAB commands:

(from [Proakis, Manolakis, 1996])

Type 2 Chebyshev filter:


Squared magnitude frequency response:
2

|H()| =

1
1 + 2 [TN2 (s/p)/TN2 (s/)]

(4.88)

contains zeros at s < and poles

Order estimation: cheb1ord for type 1, cheb2ord for


type 2.
Design of the corresponding digital filter, obtained from the
analog version by bilinear transform: cheby1 for type 1,
cheby2 for type 2.
Elliptic (Cauer) filters

Typical squared magnitude frequency response for a Chebyshev


type 2 filter:

Elliptic filters have equiripple (Chebyshev) behavior in both


pass- and stopband.
Transfer function contains both poles and zeros, where the
zeros are located on the j-axis.
Squared magnitude frequency response
2

|H()| =

1
,
1 + 2 UN (/p)

(4.90)

where UN (x) denotes the Jacobian elliptic function of order


N , and the parameter controls the passband ripple.
Characteristic squared magnitude frequency response for a
elliptic filter:

(from [Proakis, Manolakis, 1996])

145

146

5. Multirate Digital Signal Processing


In many practical signal processing applications different
sampling rates are present, corresponding to different
bandwidths of the individual signals multirate systems.
22

Often, a signal has to be converted from one rate to another.


This process is called sampling rate conversion.

22

(from [Proakis, Manolakis, 1996])

Filter design is optimal in pass- and stopband in the equiripple


sense: However, other types of filters may be preferred due to
their better phase response characteristics (i.e. approximately
linear-phase), for example the Butterworth filter.
Estimation of the filter order:
Required order to achieve the specifications
with the parameters
1,2 and p/s, (1 1 = 1/ 1 + 2, 1 2 =
1/ 1 + 2):
p
K(p/s) K( 1 (/)2)
N =
(4.91)
p
K(/) K( 1 (p/s)2)
where K(x) denotes the complete elliptic integral of the first kind
(tabulated)
Z/2
d
K(x) =
.
p
2 sin2
1

x
0

MATLAB commands: ellipord for order estimation, ellip


for the design of the corresponding digital filter obtained via
bilinear transform.
147

Sampling rate conversion can be carried out by analog


means, that is D/A conversion followed by A/D conversion
using a different sampling rate D/A converter
introduces signal distortion, and the A/D converter leads
to quantization effects.
Sampling rate conversion can also be carried out
completely in the digital domain: Less signal distortions,
more elegant and efficient approach.

Topic of this chapter is multirate signal processing and


sampling rate conversion in the digital domain.
5.1 Basic multirate operations
5.1.1 Sampling rate reduction
Reduction of the sampling rate (downsampling) by factor M :
Only every M -th value of the signal x(n) is used for further
processing, i.e. y(m) = x(m M )
.

x(n)
.

y(m)

Example: Sampling rate reduction by factor 4


148

With (5.3) the z-transform X0(z) can be obtained as

X0(z) =

x0(m)z

m=

X0(z) = X0(z ) =

x(mM )z

M 1
1 X
k
X(zWM ).
Y (z ) =
M k=0

mM

m=

(5.5)

M m

y(m)(z )

m=
M

= Y (z ) = Y (z ) y(m)

(5.1)

Frequency response after downsampling


Starting point: orthogonality of the complex exponential sequence
(
M 1
1 X j2km/M
1 for m = M, ZZ,
e
=
(5.2)
M k=0
0 otherwise.
With x0(mM ) = x(mM ) it follows

x0(m) = x(m)

(5.4)

By replacing Y (z M ) = X0(z) in (5.4) we have for the ztransform of the downsampled sequence y(m)

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

In the z-domain we have

M 1
1 X X
k
m
x(m)(WM z) .
M k=0 m=

M 1
1 X
km
W
,
M k=0 M

WM := e

j2/M

With z = ej and = M the corresponding frequency


response can be derived from (5.5):

Y (e

M 1
1 X
j( k2)/M )
)=
X(e
)
M k=0

(5.6)

Downsampling by factor M leads to a periodic repetition of


the spectrum X(ej ) at intervals of 2/M (related to the high
sampling frequency).

(5.3)

Example: Sampling rate reduction of a bandpass signal


by M = 16 ( )

149

150

a)

Antialiasing filtering followed by downsampling is often


called decimation.
Specification for the desired magnitude frequency response of the
lowpass antialiasing (or decimation) filter:
(
1 for || c/M,
j
(5.7)
|Hd(e )| =
0 for /M || ,

|Q(e j)|
|Q(e j)| |H(e j)| = |X(e j)|
0

= 3
m
8
8

b)
|X(e j(+m))|

= 3
m
8
8

where c < denotes the highest frequency that needs to be


preserved in the decimated signal.

c)

= 3
m
8
8

0 2

16

32

Downsampling in the frequency domain, illustration for M = 2:


(a) input and filter spectra, (b) output of the decimator, (c) no
filtering, only downsampling (V X ):

(from [Vary, Heute, Hess: Digitale Sprachsignalverarbeitung, 1998])


j

(a) Bandpass spectrum X(e ) is obtained by filtering.


(b) Shift to the baseband, followed by decimation with M = 16.

(c) Magnitude frequency response |X(ej )| at the lower sampling rate.

Remark: Shifted versions of X(ej ) are weighted with the factor


1/M according to (5.6).
Decimation and aliasing
If the sampling theorem is violated in the lower clock rate,
we obtain spectral overlapping between the repeated spectra
Aliasing
How to avoid aliasing? Bandlimitation of the input signal v(n)
prior to the sampling rate reduction with an antialiasing filter
h(n) (lowpass filter).
v(n)
.

h(n)

x(n)

.
M

y(m)
(from [Mitra, 2000])

151

152

More general approach: Sampling rate reduction with phase


offset

Using (5.8) we have

Up to now we have always used y(0) = x(0), now we introduce


an additional phase offset into the decimation process.

x(m) = x(m)

M 1
1 X
k(m)
WM
,
M k=0

(5.9)

and transforming (5.9) into the z-domain yields

Example for = 2

X(z) =

M 1

1 X X
k
m
k
x(m)(WM z) WM
M k=0 m=
M 1
1 X
k
k
X(zWM ) WM .
M k=0

(5.10)

The frequency response can be obtained from (5.10) by


substituting z = ej and = M as

`
0

Y(e

`
2

 = m `=M

Y(e

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

Note that y2 (m) in (c) is a formal description for the output signal of the
downsampler with non-integer sample indices. The real output signal y2 () is

jM

M 1
1 X
j( 2k)/M
k
X(e
) WM ,
)=
M k=0
M 1
1 X
jj2k/M
k
)=
X(e
) WM .
M k=0

(5.11)

(5.12)

obtained by assuming integer sample locations.

We can see that each repeated spectrum is weighted with a


complex exponential (rotation) factor.

Derivation of the Fourier transform of the output signal y(m):

5.1.2 Sampling rate increase

Orthogonality relation of the complex exponential sequence:

(5.8)

Increase of the sampling rate by factor L (upsampling): Insertion


of L 1 zero samples between all samples of y(m)
(
y(n/L) for n = L, ZZ,
(5.13)
u(n) =
0
otherwise.

153

154

M 1
1 X j2k(m)/M
e
=
M k=0

1 for m = M + ,
0 otherwise.

ZZ,

.
y(m)
.

u(n)

Notation: Since the upsampling factor is named with L in conformance with

the majority of the technical literature in the following we will denote the length
of an FIR filter with LF .

Example: Sampling rate increase by factor 4

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

Interpolation
The inserted zero values are interpolated with suitable values,
which corresponds to the suppression of the L 1 imaging
spectra in the frequency domain by a suitable lowpass
interpolation filter.

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

In the z-domain the input/output relation is


L

U (z) = Y (z ).

(5.14)

y(m)
.

u(n)

.
g(n)

v(n)

g(n): Interpolation or antiimaging lowpass filter


Frequency response after upsampling
Specifications for the interpolation filter:

From (5.14) we obtain with z = ej


j

U (e ) = Y (e

jL

).

(5.15)

The frequency response of y(m) does not change by


upsampling, however the frequency axis is scaled differently. The
new sampling frequency is now (in terms of for the lower
sampling rate) equal to L 2 .
155

Suppose y(m) is obtained by sampling a bandlimited continuoustime signal ya(t) at the Nyquist rate (such that the sampling
theorem is just satisfied). The Fourier transform Y (ej ) can thus
be written with (2.4) and = /T0 as




j( 2k)
1 X
Ya
,
Y (e ) =
T0 k=
T0
j

156

where T0 denotes the sampling period. If we instead sample ya(t)


at a much higher rate T = T0/L we have
j

V (e ) =




1 X
j( 2k)
Ya
,
T k=
T

Upsampling in the frequency domain, illustration for L = 2:


(a) input spectrum, (b) output of the upsampler, (c) output after
interpolation with the filter h(n):

(5.16)




j( 2k)
L X
Ya
.
=
T0 k=
(T0/L)
On the other hand by upsampling of y(m) with factor L we
obtain the Fourier transform of the upsampled sequence u(n)
analog to (5.15) as
j

U (e ) = Y (e

jL

).

If u(n) is passed through an ideal lowpass filter with cutoff


frequency at /L and a gain of L, the output of the filter will be
precisely v(n) = F 1{V (ej )} in (5.16).

Therefore, we can now state our specifications for the lowpass


interpolation filter:
(
L for || c/L,
j
|Gd(e )| =
(5.17)
0 for /L || ,

where c denotes the highest frequency that needs to be


preserved in the interpolated signal (related to the lower sampling
frequency).

(from [Mitra, 2000])

5.1.3 Example: Decimation and interpolation


Consider the following structure:
x(n)
.

h(n)

u(n)

y(m)

v(n)

.
f (n)

x(n)

Input-output relation?
Relation between Y (z) and U (z) (see (5.5)), where z is replaced
157

158

Example:

by z 1/M :

Y (z) =

1
M

M
1
X

U (z

1/M

M = 4, no aliasing:

WM ),

k=0

which by using U (z) = H(z)X(z) leads to


M 1
1 X
1/M
k
1/M
k
H(z
WM ) X(z
WM ).
Y (z) =
M k=0

(5.18)

With V (z) = Y (z M ) it follows


M 1
1 X
k
k
V (z) =
H(zWM ) X(zWM ),
M k=0

(5.19)

and we finally have


M 1
1 X
k
k
M

F (z) H(zWM ) X(zWM ).


X(z) = F (z)Y (z ) =
M k=0

with aliasing:

(5.20)

(from [Mertins: Signal Analysis, 1999])

5.1.4 Polyphase decomposition

A polyphase decomposition of a sequence x(n) leads to M


subsequences x(m), = 0, . . . , M 1, which contain
159

160

only every M -th value of x(n). Example for M = 2:


Decomposition into an even and odd subsequence.

Important tool for the derivation of efficient multirate filtering


structures later on.

x0(0) = x(0),

x0(1) = x(3),

...

x1(0) = x(1),

x1(1) = x(4),

...

Three different decomposition types:

x2(0) = x(2),

x2(1) = x(5),

...

Type-1 polyphase components:


Decomposition of x(n) into x(m), = 0, 1, . . . , M 1
with
x(m) = x(mM + ),

n = mM + .

Type-2 polyphase components:


X(z) =

(5.21)

With x(m) X(z) the z-transform X(z) can be


obtained as

M
1
X

(M 1)

X(z )

(5.23)

=0

with X(z) x(n) = x(nM + M 1 ) (5.24)


Example for M = 3:

X(z) =

M
1
X

X(z )

(5.22)

=0

x1(1) = x(4),

x2(1) = x(3),

x2(0) = x(0),

0 1 2
x0 (m)

X(z) =

...

...

...

Type-3 polyphase components:

x(n)

x0(1) = x(5),

x1(0) = x(1),

Example for M = 3:

x0(0) = x(2),

M
1
X


M
z X
(z )

(5.25)

=0

x1 (m)
m

(z) x
with X
(n) = x(nM )

x2 (m)
0

(5.26)

161

162

5.1.5 Nyquist-Filters

Properties:

Nyquist- or L-band filters:

Impulse response of a zero-phase L-th band filter:

Used as interpolator filters since they preserve the nonzero


samples at the output of the upsampler also at the interpolator
output.
Computationally more efficient since they contain zero
coefficients.
Preferred in interpolator and decimator designs.
y(m)
.

u(n)

g(n)

G1(z ) + + z

(L1)

(from [Mitra, 2000])

It can be shown for = 1/L that for a zero-phase L-th band


filter

Suppose now that the m-th polyphase component of G(z) is a


constant, i.e. Gm(z) = . Then the interpolator output V (z)
can be expressed as

L1
X

Y (z ) +

G(zWL) = L = 1.

(5.29)

=0

The sum of all L uniformly shifted versions of G(ej )


add up to a constant.
z = ej
G(z)

V (z) = z

(5.28)

otherwise.

g(n)

GL1(z ),

where the G(z), = 0, . . . , L1 denote the type 1 polyphase


components of the filter G(z).

L1
X

v(n)

The filter G(z) can be written in polyphase notation according to


L

for n = 0,

every L-th coefficient is zero (except for n = 0)


computationally attractive

Using (5.14) the input-output relation of the interpolator can be


stated as V (z) = G(z) Y (z L).

G(z) = G0(z ) + z

g(Ln) =

G(zWL ) G(zWL2 )

G(zWLL1 )

G(z )Y (z ).

=0, 6=m

(5.27)
v(Ln+m) = y(n); the input samples appear at the output
of the system without any distortion for all n. All in-between
(L 1) samples are determined by interpolation.
163

(from [Mitra, 2000])

Half-band filters
Special case of L-band filters for L = 2:
164

Transfer function G(z) = + z 1G1(z 2)

For = 1/2 we have from (5.29) for the zero-phase filter


g(n)
G(z) + G(z) = 1.
(5.30)
If g(n) is real-valued then G(ej ) = G(ej()) and by
using (5.30) it follows
j

G(e ) + G(e

j()

) = 1.

The convolution with the length LF FIR filter h(n) can be


described as

x(n) =

k=0

y(m) =
j

G(ej )

h(k) v(n k),

and the downsampling with y(m) = x(m M ). Combining both


equations we can write the decimation operation according to

(5.31)

G(e ) exhibits a symmetry with respect to the half-band


frequency /2 halfband filter.

LF 1
X

LF 1
X
k=0

h(k) v(m M k).

Visualization (M = 3):
h(k)
h(0)

h(LF 1)
k

v(k)
v(0)
p

x(0) y(0)

v(1 k)

(from [Mitra, 2000])

v(0)

FIR linear-phase halfband filter:


LF = 4 1, IN

x(1) is removed

Length is restricted to

v(2 k)
v(0)

5.2 Structures for decimation and interpolation

x(2) is removed
k

5.2.1 FIR direct form realization for decimation

v(3 k)
v(0)

v(n)
.

(5.32)

h(n)

x(n)

x(3) y(1)

.
M

y(m)

165

166

Multiplication of h(n) with v(1 n) and v(2 n) leads to


the results x(1) and x(2) which are discarded in the decimation
process these computations are not necessary.

which is depicted in the following:


g(k)

More efficient implementation (v(n) u(n), LF N ):

k
y(m)

m
u(k)

k
(from [Fliege: Multiraten-Signalverarbeitung, 1993])

(a) Antialiasing FIR filter in first direct form followed by


downsampling.
(b) Efficient structure obtained from shifting the downsampler
before the multipliers:

v(0)

The output sample v(0) is obtained by multiplication of g(n)


with u(n), where a lot of zero multiplications are involved,
which are inserted by the upsampling operation.
More efficient implementation (v(n) x(n), LF N ):

Multiplications and additions are now performed at the lower


sampling rate.
Additional reductions can be obtained by exploiting the
symmetry of h(n) (linear-phase).
5.2.2 FIR direct form realization for interpolation

y(m)
.

u(n)

.
g(n)

v(n)

(a) Upsampling followed by interpolation FIR filter in second


direct form
(b) Efficient structure obtained from shifting the upsampler behind
the multipliers:

The output v(n) of the interpolation filter can be obtained as

v(n) =

LF 1
X
k=0

g(k) u(n k),

Multiplications are now performed at the lower sampling


167

168

rate, however the output delay chain still runs in the higher
sampling rate.
Zero multiplications are avoided.
Additional reductions can be obtained by exploiting the
symmetry of h(n) (linear-phase).
5.3 Decimation and interpolation with polyphase filters
5.3.1 Decimation

From Section 5.1.4 we know that a sequence can be


decomposed into polyphase components.
Here type-1
polyphase components (5.21) are considered in the following.
Type-1 polyphase decomposition of the decimation filter
h(n): The z-transform H(z) can be written according to
(5.22) as
M
1
X

M
H(z) =
z H(z ),
(5.33)

(a): Decimator with decimation filter in polyphase representation


(b): Efficient version of (a) with M times reduced complexity
Remark: The structure in (b) has the same complexity as the direct
form structure from Section 5.2.1, therefore no further advantage.
However, the polyphase structures are important for digital filter
banks which will be discussed later on.
Structure (b) in time domain (v(n) u(n)):

=0

M
denoting
the
downsampling
factor
and

H(z ) h(m) the z-transform of the type-1 polyphase


components h(m), = 0, . . . , M 1.

Resulting decimator structure (V (z) U (z)):


Y (z )
0

Y (z )
0

(z 0 )
(z 0 )

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

(z 0 )

5.3.2 Interpolation

(z 0 )

Transfer function of the interpolation filter can be written analog

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

169

170

z 1 for every sampling rate in a multirate system in the following (instead of

to (5.33) for the decimation filter as

G(z) =

L1
X

introducing a special z for each sampling rate as in the sections before).

G(z ),

=0

L denoting the upsampling factor, and g(m) the type-1


polyphase components of g(n) with g(m) G(z ).
Resulting interpolator structure (V (z) X(z)):
Y (z )
0

Y (z )

In practice often there are applications where data has to be


converted between different sampling rates with a rational
ratio.
Noninteger (synchronous) sampling rate conversion by factor
L/M : Interpolation by factor L, followed by a decimation
by factor M ; decimation and interpolation filter can be
combined:

Y (z)

(z 0 )

"L

Y1(z)

G(z)

X1(z)

X (z)

#M

Magnitude frequency responses:

(z 0 )
(z 0 )

(z )
0

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

(a): Interpolator with interpolation filter in polyphase


representation
(b): Efficient version of (a) with L times reduced complexity
As in the decimator case the computational complexity of the
efficient structure in (b) is the same as for the direct form
interpolator structure from Section 5.2.2.

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

5.4 Noninteger sampling rate conversion

Efficient conversion structure

Notation: For simplicity a delay by one sample will be generally denoted with

In the following derivation of the conversion structure we assume

171

172

a ratio L/M < 1. However, a ratio L/M > 1 can also be used
with the dual structures.
1. Implementation of the filter G(z) in polyphase structure,
shifting of all subsamplers into the polyphase branches:

(c) Finally, if M and L are coprime, it can be shown that upand downsampler may be exchanged in their order:
.

G (z)

z`

#M

"L

m0

(d) In every branch we now have a decimator (marked with the


dashed box), which can again be efficiently realized using
the polyphase structure from Section 5.3.1. Thus, each
type-1 polyphase component g(n) is itself decomposed
again in M polyphase components g(n) G(z),
= 0, . . . , L 1, = 0, . . . , M 1.
Resulting structure:
(from [Fliege: Multiraten-Signalverarbeitung, 1993])

2. Application of the following structural simplifications:


(a) It is known that if L and M are coprime (that is they have
no common divider except one) we can find 0, m0 IN
such that

0 L m0 M = 1 (diophantic equation)

(5.34)

delay z in one branch of the polyphase structure can


be replaced with the delay z (0 Lm0 M )
.

G (z)

z `

"L

( 0

L m0 M )

#M

(b) The factor z 0L can be shifted before the upsampler, and


the factor z m0M behind the downsampler:
.

G (z)

z`

"L

#M

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

m0

Delays z m0 are realized with the output delay chain.


173

174

The terms z 0 are noncausal elements: In order to obtain a


causal representation, we have to insert the extra delay block
z (L1)0 at the input of the whole system, which cancels out
the negative delays z 0 .

presented methods can easily be extended to band- or highpass


filters.

Polyphase filters are calculated with the lowest possible


sampling rate.

If the stopband edge frequency of a lowpass filter is substantially


smaller than half of the sampling frequency, it may be advisable
to perform the filtering at a lower sampling rate:

L/M > 1 is realizable using the dual structure (exchange:


input output, downsamplers upsamplers, summation
points branching points, reverse all branching directions)
Example for L = 2 and M = 3:
Application: Sampling rate conversion for digital audio signals
from 48 kHz to 32 kHz sampling rate

5.5.1 Filtering with lower sampling rate

V (z) f

H (z)

fs1 = fs =M

H (z)

s1

"

H (z)
i

f Y (z)
s

H (z)
Hd(z) is the (input) decimation filter, the actual filtering is carried
out with the core filter Hc(z) in the M -times lower sampling rate
with sampling frequency fs1 = fs/M , and after upsampling
the output signal is interpolated with Hi(z) Single-stage
implementation
Stopband- and passband edge frequencies of the decimation and
interpolation filters have to be adjusted to the filter specifications
of the core filter:

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

j dj j ij
H

Polyphase filters are calculated with 16 kHz sampling rate


compared to 96 kHz sampling rate in the original structure.

j j
H

fpass

Rate conversion from 32 kHz to 48 kHz: Exercise!

; H

fstop

fs1 =

f
fs1

fstop

fs1

In the following we only consider lowpass filtering, however, the

Stop- and passband edge frequencies fstop and fpass of the


core filter Hc(z) are identical with those for the overall filter
H(z) = Y (z)/V (z).

175

176

5.5 Efficient multirate filtering

Stopband edge frequency for the decimation filter then has to


be chosen less or equal than (fs1 fstop).

The interpolation filter can be chosen identical to the


decimation filter, since then it is guaranteed that all imaging
components are in the stopband region of the interpolation
filter.
Transition bandwidth for H(z) is M -times smaller than for
Hc(z) design with a fairly small number of coefficients
for Hc(z) possible (compared to a direct design of H(z)).
Stopband ripple 2 for the overall filter H(z):
2 =

2,c (1 + 1,i )(1 + 1,d ) 2,c , fstop f (fs1 fstop ),


2,c 2,d 2,i ,
(fs1 fstop ) < f fs
(5.35)

5.5.2 Interpolating FIR (IFIR) filters


Alternative to multirate filters with decimation and interpolation,
also suitable for very narrowband filters.
Principle:
.

V (z )

1 + 1 = (1 + 1,c) (1 + 1,d) (1 + 1,i),


(5.36)
=

1 1,c + 1,d + 1,i,

(5.37)

where the last approximation is valid for small passband


ripples 1,c, 1,d, and 1,i.

Y (z )

H (z )

No real multirate filter since both filters are calculated with the
same (input) sampling rate. Multirate technique is applied to
the coefficients of the impulse response h(n).
Realization of G(z K ) in the first direct structure:
v(n)

z K

g(0)

z K

z K

g(1)

g(2)

z K

z K

g(3)

z K

g(LF 2)

g(LF 1)

y(n)

Passband ripple 1 for H(z):

F (z )

where the approximation for fstop f (fs1 fstop) holds


for small decimation and interpolation filter passband ripples
1,d and 1,i.

approximation

G(z K )

G(z ) is a function where all z


are replaced by z K ,
which is equivalent to inserting K 1 zeros between the
coefficients of G(z).
G(ej ) G(ejK ): Frequency response G(ej ) is
compressed by factor K , K1 imaging spectra are present:
|G(ej )|

jK

|G(e

)|

Complexity savings (#multiplications and #additions) can be


obtained by roughly a factor of 100. An even higher gain can
be achieved by multistage implementations.

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

177

178

Furthermore, the transition bandwidth and the width of


the passband for G(ejK ) are K -times smaller than for
the original filter G(ej ) with the same number of filter
coefficients.

The filter F (z) removes the imaging spectra, and


H(z) = G(z K ) F (z) only consists of the baseband
part of G(ejK ).
Design: Starting point for the design: Passband and stopband
edge frequencies s, p for the overall filter H(z) search for
a suitable factor K leading to a less complex interpolation filter
f (n).

Ks

2
s.
K

(5.39)

1 + 1 = (1 + 1,G) (1 + 1,F ).

(5.40)

p,F = p,

s,F =

Passband ripple 1 for H(z):

Small passband ripples 1,G for G(z) and 1,F for F (z),
resp., lead to the simplification

1 1,G + 1,F .

For small passband ripples 1,G, 1,F we have approximately

2 2,F = 2,G.
p s

Design a lowpass IFIR filter with the following specifications:

d = 0.05,

Requirements for passband and stopband edge frequency of


the prototype G(z):
s,G = K s.

(5.43)

Example:

(from [Fliege: Multiraten-Signalverarbeitung, 1993])

p,G = K p,

(5.41)

Stopband ripple 2 for H(z):


(
2,G (1 + 1,F ) for s s,F ,
(5.42)
2 =
2,F (1 + 1,G) for s,F < .

Filter specifications (H, F, G are all magnitude frequency responses)

Kp

the interpolation filter F (z):

(5.38)

Requirements for passband and stopband edge frequency of


179

s = 0.1,

20 log10 (1 + 1 ) = 0.2 dB 1 0.023, 20 log10 (|2 |) = 40 dB


1. We select a factor K = 4: Prototype G(z) has the parameters

p,G = 0.2,

s,G = 0.4,

1G 0.0116 20 log10 (1+1,G ) 0.1 dB,


20 log10 (|2,G |) = 40 dB,
180

Impulse response

ripple is equally distributed between G(z) and F (z), see (5.41).

Magnitude frequency response

20 log10 |G(ejK)| [dB]

Impulse response

Magnitude frequency response

0.4
0.3

0.1

40

0.4

60

0.1

0
20 log10 |G(ej)| [dB]

0.3

0.2
0

20

0.2
g(n)

20

0.2
g1(n)

2. We use an linear-phase FIR Chebyshev design and insert these values for
G(z) into (4.73), yielding a filter order N = 19. However, several test
designs show that the above specifications are only met for N = 21,
leading to a filter length of LF = N +1 = 22.

0.1

40
n

60

80
0

80

5. Final IFIR filter h(n) = g1 (n) f (n):

40

20

Magnitude frequency response

0.2

0.4
0.6
/

0.8

Passband detail

60

0.1

1.02

10
n

15

20

0.2

0.4
0.6
/

0.8

3. Specifications for the interpolation filter F (z):

p,F = p = 0.05,

s,F =

20 log10 (1 + 1,F ) 0.1 dB,

40

2
s = 0.4,
K

0.99

60
0.98
80
0

20 log10 (|2,F |) = 40 dB.

0.2

0.4
0.6
/

0.8

0.02

0.04
/

0.06

6. H(z) in the IFIR realization has an overall length of 35 coefficients. On


the other hand we obtain from (4.73) an estimated length of 65 coefficients
for the direct form implementation.

resulting filter order ((4.73)) N = 12:


Impulse response

1.01

20

|H(ej )|

80
0

20 log10 |H(ej )| [dB]

0.2
0

Magnitude frequency response

0.3

5.6 Application: Oversampled A/D and D/A converter

20 log10 |F(ej)| [dB]

f(n)

0.2

0.1

20

5.6.1 Oversampled A/D converter

40

Extension of the A/D and D/A conversion concepts from


Section 2.

60

Structure:
0.1
0

6
n

10

12

80
0

0.2

0.4
0.6
/

4. Upsampling of the impulse response g(n) by factor K


g1 (n) G(ejK ):

0.8

x(t)

= 4

181

x(nT /2L ) = xL (n)


C

Q
b bit

T /2

Q[xL (n)]

h(n)

y(n)

2L

y(n)

A/D converter

182

Continuous-time input signal is band-limited by the analog


lowpass such that the frequency u represents the maximum
frequency in the interesting frequency range for the input
signal:

Sampling with a sampling frequency 2 s 2 u,


L {0, 1, 2, . . . }, after the analog filtering. Here s
denotes the lowest possible sampling frequency in order not
to violate the sampling theorem: s = 2 u = 2/T .

A/D converter here is idealized as concatenation of sampler


and quantizer.

After A/D conversion a lowpass filtering is carried out where


the lowpass has the idealized frequency response
j

|H(e )| =

1 for || < /2L,

0 otherwise.

The resulting bandlimited signal can then be downsampled by


factor 2L.
Quantization noise variance of a b-bit midtreat quantizer
according to (2.27), where the range R of the quantizer is chosen
as R = 2:
22b+2
2
e =
.
12
As an alternative e2 can also be obtained via the power spectral
density (power spectrum) ee(ej ) as
2
e

1
=
2

The filtering with the lowpass h(n) now reduces the quantization
noise variance by factor 2L, since

(L,b)

1
=
2

L
/2
Z

(L)

/2L

22b+2
.
12 2L

(5.44)

Reduction of the noise variance due to oversampling by


factor 2L:

e2
= 10 log10(2L) = L3.01 dB.
Gain = 10 log10 2
e
(L,b)

(5.45)
An increase of the oversampling factor 2L by factor 2 leads to
an increase in quantizer resolution by half a bit (compare (2.29))
and to an increase of the signal-to-noise ratio (SNR) in (2.29) by
3 dB!
Visualization:
j
ee (e )

e2
(a)

11111111111111
00000000000000
00000000000000
11111111111111
00000000000000
11111111111111
00000000000000
11111111111111
00000000000000
11111111111111

(L)

ee (ej )
e2
(b)

11
00
00
11
00
11
00
11
00
11
00
11
00
11
00
0011
11
00
11

2L

ee(e ) d.

ee (e ) d =

2L

Gain in (5.45) can also be used for reducing the quantizer


wordlength while keeping the SNR constant:

183

184

Reduction of the hardware complexity of the core A/D


converter
Extreme case: Quantizer wordlength is reduced to b = 1 bit
only a simple comparator is necessary

Analysis:

L(n) e(n 1)],


y(n) = [xL(n)]Q = Q[x
= xL(n) e(n 1) + e(n),
= xL(n)+ e(n) (1(n1)) (5.47)

Requirements:

e2

(L,bL )

e2

(0,b0 )

2bL +2

2
!
= 1 = L 2b +2
2 2 0

L
bL = b0 , (5.46)
2

with bL denoting the quantizer wordlength for a given L leading


to the same quantization noise variance as b0 for L = 0, bL b0.
Example:

Given a b0 = 16 bit A/D converter, where the analog input signal is sampled
at the Nyquist rate. Choose the parameter L in the oversampled A/D converter
from above such that the same quantization noise variance for bL = 1 bit is
achieved.
From (5.46) we obtain L = 30, leading to an oversampling factor of

2L 109 .

Y (z) = XL(z) + E(z)(1


z ).

Therefore, the z-transform of the overall quantization error


sequence can be expressed as


1

E(z) = E(z) 1 z
,

which leads to the quantization noise power spectrum


j

ee(e ) = ee(e )|1 e

[xL (n)]Q

|ee(e )|

xL (n)

z 1

22b+2
(1 cos()).
6

(5.49)

x 10

1/3 22b+2

5
+

| .

2b+2

The quantizer in the above block is now replaced by the following


structure:
xL (n)

j 2

With ee(ej ) = 2 12
(noise power spectrum of a b-bit
midtreat quantizer with range R = 2) we have

ee(e ) =

Improvement: Shaping of the quantization noise

(5.48)

4
3
2

e(n)

1
0
0

185

0.2

0.4
0.6
/

0.8

186

Quantization noise power spectrum now has highpass


character noiseshaping
The noise variance after lowpass filtering with h(n) in the above
oversampled A/D converter structure is now given with (5.49) as

Improved noiseshaping by other techniques, where the


quantization noise power spectrum shows even stronger highpass
character (sigma-delta modulation, more selective shaping filters).
5.6.2 Oversampled D/A converter

2
e
(L,b)

1
=
2

L
/2
Z

Structure:
j

ee(e ) d,

x(n)

/2L

22b+2
=
12

b bit

L+1

2
L
sin(2 )

(5.50)

Gain = 10 log10

L+1

2
L
sin(2 )

e2

(L,bL )

1
= 1 bL = b0+ log2
2
!

L+1

h(n)

xL (n)

(5.51)

2
L
sin(2 )

(5.52)

Example:
The above example is again carried out for the noiseshaping case: For

b0 = 16 bit and bL = 1 bit we obtain from (5.52) via a computer search


(fix-point iteration) L 10.47 When the input signal is sampled with

fs = 44.1 kHz and b0 = 16 the new sampling frequency in the oversampled


A/D converter would be fsover = 211 fs 90 MHz for bL = 1.
187

Q[xL (n)]
b1 < b bit

h1 (n)

b1 bit

DAC

1. Input signal sampled with b bits is upsampled by factor 2L and


then interpolated with h(n).
2. The resulting signal xL(n) is requantized to a wordlength
of b1 < b bits, leading to a worse SNR due to higher
quantization noise.
3. Filtering by h1(n) removes the quantization noise in the
unused spectral regions, which increases the SNR again.

Reducing the quantizer wordlength for constant SNR:


(0,b0 )

b bit

For L = 4: Gain 31 dB (compared to 12 dB without noise


shaping, see (5.45)).

e2

xL (n)

y(t)

Reduction of the noise variance due to oversampling by factor 2L:

2L

4. The b1 bit DAC in combination with a simple analog lowpass


converts the signal back into the analog domain.
Reason for performing a requantization: Use of a cheap low
resolution D/A converter is possible, often with b1 = 1 bit.
In combination with a noiseshaping approach the same SNR is
obtained as when a b bit converter would be used directly on the
input signal (but with higher costs).

Favored converter principle in CD players ( bitstream


conversion for b1 = 1 bit)
188

5.7 Digital filter banks

A digital filter bank consists of a set of filters (normally


lowpass, bandpass and highpass filters) arranged in a parallel
bank.
The filters split the input signal x(n) into a number of subband
signals yk (n), k = 0, . . . , K 1 (analysis filter bank).
Subband signals are processed and finally combined in a
synthesis filter bank leading to the output signal x
(n).
If the bandwidth of the subband signal is smaller than the
bandwidth of the original signal, they can be downsampled
before processing processing is carried out more efficiently.

investigated in the following simplified structure:


x(n)

H0(z)

H1(z)

y0 (m)

y1 (m)

F0(z)

F1(z)

x(n)

Critically subsampled filter bank: The number of subband


equals the subsampling factor in every subband.
Typical frequency responses for the analysis filters:

h1 (n)

hK1 (n)

u1 (n)

uK1 (n)

M0

M1

MK1

y0 (m0 )

M0

subband processing

h0 (n)

x(n)

u0 (n)

y1 (m1 )

M1

v0 (n)

v1 (n)

f0 (n)

x(n)

(from [Mitra, 2000])


f1 (n)

Frequency responses of the subband signals (for ideal filters)


( ) :
b)

yK1 (mK1 )

MK1

vK1 (n)

fK1 (n)

a)

X(ej)

synthesis filter bank

analysis filter bank


.

Subband processing: Quantization (wordlength reduction)


coding, (adaptive) filtering equalization, . . .

0
0

0
0

"1"

"0"

2
4

2
4

c)

"0"
2

"1" 1
0
0

5.7.1 Two-channel filter banks: Structure and analysis

"0"
3

"1" 1

(From [Vary, Heute, Hess: Digitale Sprachsignalverarbeitung, 1998])

Basic two-channel subband coder:

H1(z)

2
2

Encoder

Encoder

Channel

Demultiplexer

H0(z)

Multiplexer

x(n)

Decoder

F0(z)

Decoder

F1(z)

x(n)

(a): Magnitude frequency response of the input signal, (b) magnitude frequency
response of the lowpass, and (c) highpass branch after analysis filtering and
downsampling

Only the errors in the above system related to the filter bank are

Highpass subband: Baseband spectra in frequency reversed


order

189

190

Replacing z by z 2 then leads to

Analysis
How do we have to design the filters such that

Y (z ) =

x
(n) = x(n D) holds?
(D denotes the delay of the overall analysis-synthesis system in
samples)
We have the following relations:

1
[H0(z) X(z) + H0(z)X(z)]
2
1
2
Y1(z ) = [H1(z) X(z) + H1(z)X(z)]
2
2

Y0(z ) =

(5.53)
(5.54)

Proof:
These relations can be obtained from (5.18)

Y (z) =

M 1
1 X
1/M
k
1/M
k
H(z
WM ) X(z
WM )
M k=0

=e

j2k/2

=e

jk

Y (z) =
=

1
2

k 1/2

H((1) z

1
[H0(z) F0(z) + H1(z) F1(z)] X(z).
2
(5.57)
(5.57) consists of two parts:

for n even,

1 for n odd,

k 1/2

) X((1) z

and finally by combining (5.56), (5.53), and (5.54) the inputoutput relation for the two-channel filter bank writes

we have
1
X

where (5.53), (5.54) can be obtained by replacing H with H0 and


H1, resp.
2
The connection between the subband signals and the reconstructed
signal is
h
i
2
2

X(z)
= Y0(z ) F0(z) + Y1(z ) F1(z) ,
(5.56)

X(z)
= [H0(z) F0(z) + H1(z) F1(z)] X(z)+
2

for M = 2. With
k
W2

1
[H(z) X(z) + H(z) X(z)] ,
2

S(z) = [H0(z) F0(z) + H1(z) F1(z)] ,

(5.58)

G(z) = [H0(z) F0(z) + H1(z) F1(z)]

(5.59)

S(z): Transfer function for the input signal X(z) through


the filter bank, desirable is

k=0

i
1h
1/2
1/2
1/2
1/2
H(+z ) X(+z ) + H(z ) X(z ) .
2
(5.55)
191

S(z) = 2z

(5.60)

192

G(z): Transfer function for the aliasing component X(z),


desirable is (no aliasing!)
!

G(z) = 0.

(5.61)

1. If G(z) = 0, but S(z) 6= c z D , then the reconstructed


signal x
(n) is free of aliasing, however, linear distortions are
present.
2. If G(z) = 0 and S(z) = c z D , then we have a perfect
reconstruction (PR) system, except of a scaling factor c/2 and
an additional delay of D samples.
5.7.2 Two-channel quadrature-mirror filter (QMF) banks
(Crosier, Esteban, Galand, 1976)
Quadrature-mirror filter (QMF) banks allow the cancelation of
all aliasing components, but generally lead to linear distortions
(i.e. phase and amplitude distortions)
Starting point: Given (lowpass) prototype H0(z), all other filters
are chosen as

H1(z) = H0(z),

S(z) = H0 (z) H0 (z),


that is, the prototype H0(z) has to be designed such that

Two cases have now to be distinguished:

F0(z) = H0(z),

Cancelation of all aliasing components


For the linear distortion transfer function S(z) one obtains by
inserting (5.62) into (5.58)

F1(z) = H1(z)

(5.62)

Thus we have from (5.59) for the aliasing transfer function

G(z) = H0(z) F0(z) + H1(z) F1(z)


= H0(z) H0(z) + H0(z)(H0(z)) = 0
(5.63)
193

S(z) = H0 (z) H0 (z) 2z

(5.64)

is satisfied as good as possible requirement for an ideal


(constant) overall frequency response for the whole analysissynthesis system

Unfortunately, (5.64) can not be satisfied exactly with FIR


filters, but it can be approximated with an arbitrarily small
error
Linear distortions can be kept small
Exception: (5.64) is satisfied exactly by using the prototype
1
1
H0(z) = (1 + z )
2
(Haar filter):

1
1
1
2
1
2
1
(1 + 2z + z ) (1 2z + z ) = 2z
2
2
The magnitude frequency responses of highpass and lowpass
filter have for real-valued filter coefficients the mirror image
property (therefore the name QMF):
|H1(e

j(
2 )

)| = |H0(e

j(
2 +)

)|

(5.65)
194

minimization approach for a given and given prototype


length LF .

1.2
|H0(ej )|

|H1(ej )|

Catalogs with optimized filter coefficients for h0(n) may


for example be found in [Akansu, Haddad: Multirate signal
decomposition, 1992].
Once a good prototype H0(z) has been found, the remaining
filters can be obtained from (5.62).

0.6
0.4
0.2

Example: (LF = 20, = 0.2 )

0
0

0.2

0.4
0.6
/

0.8

Impulse response h0 (n)

Design of QMF banks

Impulse response h1 (n)

0.6
0.5
0.4
h0(n)

Usually the design is carried out by minimization of an error


measure
!
E = Er + Es = min.
(5.66)

0.5

Er refers to the linear distortion error energy

h1(n)

|H(e )|

0.8

0.3
0.2

0.1
0

|H0(e )| + |H0(e

j()

=0

)| 1

0.1
0

d,

20

0.5
0

(5.68)

with the stopband edge s = ( + )/2. denotes the


width of the transition band, which is symmetrically centered
around = /2.

10
n

15

20

0.04
|H (ej )|

Frequency response of the QMF bank

|H (ej )|

0.03

20
40

10

=s

|H0(e )| d,

15

20

20 log |H(ej )| [dB]

Es =

10
n

Frequency responses for H0 , H1

(5.67)

and Es to the energy in the stopband region of the filter

20 log10|S(e j )| [dB]

Er = 2

Z 

0.02
0.01
0

0.01

60

0.02

80
100
0

0.03
0.2

0.4
0.6
/

0.8

0.04
0

0.2

0.4
0.6
/

0.8

Minimization of (5.66) can be carried out via a numerical


195

196

yields

Efficient realization using polyphase components


From (5.62) we know that H1(z) = H0(z) holds for the
analysis highpass filter. Then, the type-1 polyphase components
H0(z) and H1(z), {0, 1}, are related according to

H10(z) = H00(z) and H11(z) = H01(z).

(5.69)

This leads to an efficient realization of the analysis and synthesis


filter bank, where the number of multiplications and additions can
be reduced by factor four:
0

S(z) = H0(z) F0(z) + H1(z) F1(z)


= H0(z) F0(z) + (1)

+1

H0(z)F0(z) (5.71)
!

Condition for a linear distortion free system: S(z) = 2z D


With the abbreviation

T (z) := F0(z) H0(z)

(5.72)

the PR condition in (5.71) becomes

T (z) + (1)

+1

T (z) = 2 z

(5.73)

(From [Mertins: Signal analysis, 1999])

Interpretation:

5.7.3 Two-channel perfect reconstruction filter banks


In order to obtain a perfect reconstruction filter bank the analysis
and synthesis filters are chosen as follows ( {0, 1, 2, . . . }):

F0(z) = z

H1(z),

F1(z) = z

H0(z)

(5.70)
Aliasing transfer function: Inserting (5.70) into (5.59) yields

G(z) = H0(z) F0(z) + H1(z) F1(z)


= H0(z) z
=0




H1(z) + H1(z) z H0(z)

No aliasing components in the reconstructed signal!

Transfer function for the input signal: Inserting (5.70) into (5.58)
197

[T (z) + T (z)] refers to the z-transform of a sequence


whose odd coefficients are zero.
[T (z) T (z)]: All coefficients with an even index are
zero.
The PR condition in (5.71) now states that the corresponding
sequences with z-transforms [T (z) + T (z)] or
[T (z) T (z)] are allowed to have only one non-zero
coefficient. Hence, for t(n) T (z) holds

t(n) =

for

n = D,

0
for n = D + 2,

arbitrary otherwise.

6= 0,
(5.74)
198

Half-band filter (Nyquist(2) filter), see Section 5.1.5.

The zeros are {3.7321, 1.0, 1.0, 0.2679}, {1.0, 1.0},


|
{z
} |
{z
}

A half-band filter has 4 1 coefficients ( IN).

zeros of H0 (z)

zeros of F0 (z)

such that (linear-phase filter).

Example:
(a): linear-phase half-band filter
(b): half-band filter with lower system delay

H0(z) = (1 + 2z
F0(z) = (1 + 2z

+ 6z

+z

+ 2z

),

Orthogonal filter banks

In the above example: Still two filters F0(z) and H0(z) to


design in order to construct the whole PR filter bank.
In an orthogonal two-channel filter bank (Smith, Barnwell,
1984), (Mintzer, 1985) it suffices to design the lowpass
analysis filter H0(z) for a PR system.
For an orthogonal two-channel bank the filter H1(z) is chosen as

(From [Mertins: Signal analysis, 1999])

H1(z) = z

Filter design via spectral factorization


A given half-band filter T (z) can be factorized according to

(LF 1)

H0(z

),

(5.75)

LF denoting the length of h0(n). In the following we will only


consider even lengths LF . Then, using (5.70) with = 0, the
remaining synthesis filter can be obtained as

T (z) = F0(z) H0(z),


i.e. one looks for the zeros of T (z), and distributes them among
the polynomials F0(z) and H0(z).
The missing filters F1(z) and H1(z) can then be obtained from
(5.70).
General approach for the PR design of two-channel banks
Example:
A half-band filter is given as

{t(n)} = {1, 0, 9, 16, 9, 0, 1}.

(L 1)
1
F0(z) = (z) F
H0(z ), F1(z) = H0(z).

Note that (z)(LF 1) = (1)(LF 1) z (LF 1) =


(1) z (LF 1) since (LF 1) odd.
The factor (1) in F0(z), F1(z) can be regarded as a common
factor multiplied to the output of the synthesis bank and can thus
be removed for simplicity reasons:

F0(z) = z
199

(LF 1)

H0(z

), F1(z) = H0(z).

(5.76)
200

Removing the factor (1) does not change anything at the


aliasing cancelation property: Inserting F0(z) and F1(z) into
(5.59) still yields G(z) = 0.
In order to obtain the condition for a analysis-synthesis system
free of linear distortions we now insert (5.75) and (5.76) into
(5.58), leading to

S(z) = z
!

(LF 1)

= 2z

(H0(z) H0(z

) + H0(z) H0(z

)),

It can be easily shown that the power-complementary property


also holds for h1(n), f0(n), and f1(n).
Design of orthogonal filter banks
1. Search a prototype H0(z) which satisfies the powercomplementary property (5.78) or (for the interesting realvalued filters) the corresponding equation (5.77) in the zdomain.
With the abbreviation TZ (z) = H0(z) H0(z 1)

TZ (z) + TZ (z) = 2

Hence, the PR condition is

H0(z) H0(z

) + H0(z) H0(z

) = 2.

is satisfied, where TZ (z) denotes a zero-phase half-band filter.


(5.77)

With z = ej (5.77) can be written for real-valued h0(n)


according to
j

|H0(e )| + |H0(e

j(+)

)| = 2

(5.78)

power-complementary property for H0(ej ).


j 2

j(+) 2

|H (e )|

|H (e

)|

Notation: In the following zero-phase filters and amplitude responses are


denoted with the subscript Z instead of 0 to avoid confusion with the
lowpass analysis filter h0 (n).

Valid half-band filter: TZ (z) is a valid half-band filter if it can


be factorized into H0(z) and H0(z 1).

Design goal: Find a valid half-band filter and factorize it


into H0(z) and H0(z 1).
2. When a suitable filter H0(z) has been found, the remaining
filter can be obtained from

1.5

H1(z) = z

(LF 1)

H0(z

F0(z) = z

(LF 1)

H0(z

),

0.5

F1(z) = z

(LF 1)

H1(z

) = H0(z).

0
0

0.2

0.4
0.6
/

0.8

(5.79)

),
(5.80)

special case of the conditions in (5.70).


201

202

Visualization:

How to design a valid half-band filter?


Spectral factorization may be problematic:
With TZ (z) = H0(z) H0(z 1) and z = ej :
j

) = |H0(e )| 0 for all .


(5.81)
Design approach due to Smith and Barnwell, 1986
Starting point is an arbitrary linear-phase half-band filter (for
example designed with the Remez algorithm from Section 4.4.4):
TZ (e ) = H0(e ) H0(e

A(e ) = AZ

j(LF 1)
()e

(From [Fliege: Multiraten-Signalverarbeitung, 1993])

AZ (): Real-valued amplitude frequency response of the halfband filter a(n), AZ () aZ (n), LF : length of h0(n).

If the value

= min AZ () < 0,

(5.82)

[0,2]

a non-negative amplitude frequency response can be generated


with
AZ+() = AZ () + ||.
(5.83)
In time-domain this corresponds with
(
aZ (n)
AZ+() aZ+(n) =
aZ (n) + ||

for

n 6= 0,

n = 0.
(5.84)
(aZ (n) denotes the zero-phase impulse response with the center
of symmetry located at n = 0).
for

203

Single zeros on the unit-circle are converted to double zeros


factorization into two filters is now possible

A valid zero-phase half-band filter TZ (z) can finally be


obtained by scaling of the resulting transfer function such that
!
TZ (ej/2) = 1 (note that TZ (z) + TZ (z) = 2 has to hold),
leading to the expression

TZ (z) =

1
AZ+(z).
1 + ||

(5.85)

Remark:
In practice for double zeros on the unit circle the separation
process is numerically very sensitive. As a solution, the parameter
|| in (5.82) and (5.83) can be enlarged by a small value
zeros move pairwise off the unit-circle where due to the linearphase property they are mirrored at the unit-circle

204

Example
Parameter for the design of TZ (z): LF = 16, s = 0.6 ,
= 0.2 , = 104

Pole-zero pattern H0 (z)

30

0.5

1
1

0
Re{z}

0
Re{z}

|H0(ej )|

0.6

0.6
5

10

15

0.8
0

10

15

Impulse response f1 (n)

0.8

0.8

0.6

0.6

0.4

0.4

0.2

0.2

0.2

0.2

0.4

0.4

0.6

0.6
5

10

15

0.8
0

10

15

Filter in orthogonal two-channel filter banks have an even


number of coefficients since TZ (z) = H0(z) H0(z 1)
Example:

|H1(ej )|=|H0(ej )|

1.5

TZ ()

0.4

0.8
0

1.5

0.4

Impulse response f0 (n)

Amplitude frequency response TZ () Frequency responses analysis filters

0.2

15

2.5

0.2

0.8
0

0.5

0.4

0.2

0.5

0.6

0.4

f (n)

0.5
Im{z}

Im{z}

0.6

0.2

f0(n)

Pole-zero pattern TZ (z)

Impulse response h1 (n)


0.8

h (n)

h0(n)

Impulse response h0 (n)


0.8

0.5
0.5
0
0

0.2

0.4
0.6
/

0.8

0
0

0.2

0.4
0.6
/

0.8

After h0(n) has been constructed, the remaining impulse


responses h1(n), f0(n), f1(n) are obtained with (5.80).

TZ (z) with 7 coefficients can be factorized into two filters of


length 4.
The next feasible length is 11 coefficients

205

206

(a): Fully iterated tree filter bank, (b): Octave filter bank
If the two band filter bank is of the perfect reconstruction
type, the generated multiband structure also exhibits the perfect
reconstruction property.
which leads to two filters of length 6.

5.9 K -band filter banks

Filter in orthogonal two-channel filter banks can not be made


linear-phase (except two trivial cases) (Vaidyanathan, 1985).
5.8 Tree filter banks
K channel filter banks can be developed by iterating the twochannel systems from above.

In the following we briefly consider K -band systems with equal


subband widths and equal subsampling factors in every subband.
.
x(n)

h0 (n)

h1 (n)

u0 (n)

u1 (n)

y0 (m)

y1 (m)

yK1 (m)

v0 (n)

v1 (n)

f0 (n)

x(n)

f1 (n)

F
F
F
hK1 (n)

uK1 (n)

analysis filter bank

vK1 (n)

fK1 (n)

synthesis filter bank

F
F

If K = M the analysis-synthesis system is called critically


subsampled, for K > M we speak of an oversampled
system.
The case K < M (undersampled system) is infeasible since
the sampling theorem is violated in the subbands also for ideal
(brickwall) filters no reasonable reconstruction is possible.

Subset of general K -band filter banks:

F
F

Modulated filter banks

All K analysis and synthesis filters are obtained from one single
analysis and synthesis prototype, resp.
(From [Mertins: Signal analysis, 1999])

207

208

Advantages:

|Hn (ej )|

More efficient implementation compared to general K -band


systems.
Less design complexity since only the prototype filters have to
be designed.
(Less storage required for the filter coefficients.)
Two important types of modulated filter banks: DFT and cosinemodulated filter banks
In the following only DFT filter banks are briefly considered.
DFT filter banks

Analysis and synthesis filters (k = 0, 1, . . . , K 1):


hk (n) =

p(n)
| {z }

analysis prototype

fk (n) =

q(n)
| {z }

synthesis prototype

e
|

j 2 k(n D
2)
K

{z

(5.86)

modulation and phase shifting

e
|

j 2 k(n D
2)
K

{z

{z

frequency shift by k 2/K


j

Fk (e ) =

j( 2 k)
K )

Q(e
{z
|

frequency shift by k 2/K

(5.88)

j 2 k D

(5.89)

phase factor

e K 2
| {z }

z-transforms:
kD

Hk (z) = P (zWK )WK 2 ,

nD

Fk (z) = Q(zWK )WK 2


(5.90)

Perfect reconstruction in the critical subsampled case is only


possible for filter lengths LF = K not very good
frequency selectivity. Therefore, the DFT filter bank is mainly
used with M < K .
Why the name DFT filter bank?
Type 1 polyphase components of the analysis prototype,

P (z) =

K1
X

P(z ).

(5.91)

=0

j 2 k D
e K 2

| {z }

|HK1 (ej )|

2
K

Inserting (5.91) into (5.90) then yields

Hk (z) =

j( 2 k)
K )
P (e

modulation and phase shifting

Frequency responses:
Hk (e ) =

|H0 (ej )|

(5.87)

D denotes the overall analysis-synthesis system delay, for


linear phase filters we have D = LF 1.
j

K=8

phase factor

kD
WK 2

K1
X

P(z ) WK .

(5.92)

=0

K1
1 X
kn
X(k) WK
Analogy to the IDFT: x(n) =
K k=0

The subband filter of an DFT filter bank can be calculated


with the IDFT (and thus also with the fast IFFT), where the input
209

210

6. Spectral Estimation

signals of the IDFT are obtained by filtering with the delayed


polyphase components

In this chapter we consider the problem of estimating the power


spectral density (power spectrum) of a wide-sense stationary
(WSS) random process.

The n-th output of the IDFT has finally to be multiplied with the
nD

rotation factors WK 2 .
Structure of the analysis filter bank:
x(k)

xk

P0 (zK )

( )

WKD=

y0(m)

xk
(

1)

P1 (zK )

WK

Problems in power spectrum estimation:


y1(m)

WKD=

2(K 1)

xk M
(

+1)

PK 1(zK )

WK K
(

1)

K IDFT

Applications for power spectrum estimation:


Signal detection and tracking, frequency estimation (e.g. for sonar
or radar signals), harmonic analysis and prediction, beamforming
and direction finding,. . .

yK 1(m)

(dual structure for the synthesis)


If K = cM , c IN, then besides the IDFT also the polyphase
filtering can be calculated in the lower sampling rate.

The amount of data is generally limited, for example, a random


process may be stationary only for a short time (e.g. speech
signal). On the other hand, as we have seen in Section 3.1.4 for
the frequency analysis of non-random signals using the DFT,
the longer the input data vector, the higher the frequency
resolution of the spectral analysis.
Often, only one representation of a stochastic process may be
available. Therefore, an ergodic process is often assumed.
Additionally, the input data may be corrupted by noise.
Estimation approaches can be classified into two classes:
1. Classical or nonparametric methods: Estimation of the
autocorrelation sequence, where the power spectrum is then
obtained by Fourier transform of the autocorrelation sequence.
2. Nonclassical or parametric approaches, which use a model for
the random process in order to estimate the power spectrum.
6.1 Periodogram-based nonparametric methods
6.1.1 The periodogram
Power spectrum vv (ej ) of a WSS random process v(n) is the

211

212

With the rectangular window

Fourier transform of the autocorrelation function vv ():


j

vv (e ) =

vv () e

wr (n) =

Spectral estimation is also an autocorrelation estimation


problem
From Signals and Systems we know that for a stationary random
process v(n) which is ergodic in the first and second moments
the autocorrelation sequence can be theoretically obtained from
the time-average
N
X
1

v(k + ) v (k).
vv () = lim
N 2N + 1
k=N

(6.1)

(6.2)

with the values of


vv () for < 0 defined via the symmetry
relation
vv () =
vv (), and with
vv () = 0 for
|| N .

The discrete Fourier transform of


vv () from (6.2) is called
periodogram (Schuster, 1898) and leads to an estimate of the
power spectrum according to

(per)(ej ) =

vv

N
1
X

vv ()e

1 n = 0, . . . , N 1,

0 otherwise,

we can describe the input sequence being analyzed also as

vN (n) = v(n) wr (n).

(6.4)

Then, the estimated autocorrelation sequence may be written as

1 X
1

vN (k+) vN (k) =
vN ()vN ().
N k=
N
(6.5)
Fourier transform of the rightmost equation in (6.5)
finally yields the following expression for the periodogram
(VN (ej ) vN (n)):

vv () =

If v(n) is only measured over a finite interval of N samples,


n = 0, . . . , N 1, the autocorrelation sequence is estimated as
N 1
1 X

vv () =
v(k + ) v (k)
N k=0

(per)(ej ) = 1 VN (ej ) V (ej ) = 1 |VN (ej )|2.

N
vv
N
N
(6.6)
MATLAB-command: periodogram

(per)(ejk2/M ) =
(per)(k) can be
The sampled version
vv
vv
obtained from the M1-point DFT VN (k) of vN (n):
(per)(k) = 1 |VN (k)|2,

vv
N

k = 0, . . . , M1 1.

(6.7)

(6.3)

Thus, the periodogram can be calculated very efficiently using the


FFT.

213

214

=N +1

Example: Periodogram of white noise


If v(n) is white noise with a variance of v2 , then vv () = v2 () with a
constant power spectrum vv (ej ) = v2 .
Sample realization for N = 32

Autocorrelation sequence
vv ()

0.8

v(n)

0.6
0

0.4

0.2
0

0.2
3
0

10

15
n

20

25

40

30

asymptotically unbiased, which means that for N the


expectation value of the estimated power spectrum is equal to
the true power spectrum:
o
n
!
j
(per)(ej ) =
vv (e ).
(6.9)
lim E
vv

20

20

40

j
j
(per)
Periodogram
vv (e ) (solid), power spectrum vv (e ) (dashed)

On the other hand for a biased estimator there would be a


difference between the expectation value and the true result.
Furthermore, the estimation variance should go to zero as the
data length N goes to infinity:
o
n
!
(per)(ej ) =
0.
(6.10)
lim Var
vv
N

If (6.9) and (6.10) are satisfied we say that the periodogram


(per)(ej ) is a consistent estimate of the power spectrum.

10

vv

Note that there are different definitions of consistency in the literature.

Magnitude [dB]

Bias of the periodogram

First step: Calculation of the expected value of the autocorrelation

vv (). From (6.2) we have

10
15
0

0.2

0.4
0.6
/

0.8

N 1
1 X

E{
vv ()} =
E{v(k + ) v (k)}
N k=0

Definition: Bias and consistency


Desirable:

Convergence of the periodogram to the exact power spectrum


in the mean-square sense

 2
!
(per) j
j

= 0.
(6.8)
lim E
vv (e ) vv (e )
N

In order to achieve this it is necessary that the periodogram is


215

N 1
N
1 X
vv () (6.11)
vv () =
N k=0
N

for = 0, . . . , N 1, and for


E{
vv ()} = 0.

N it follows

By using the symmetry relation


vv () =
vv () (6.11) can
be written as E{
vv ()} = wB () vv () with the Bartlett
216

(triangular) window

Spectral resolution

( N ||
N

wB () =

for || N,

(6.12)

for || > N.

The expected value of the periodogram can now be obtained as

(per)(ej )

vv

N
1
X

E{
vv ()}e

wB () vv () e

spectral smoothing,
spectral leaking,
the loss of the ability to resolve two nearby spectral lines.
Similarly, this also holds for the convolution between the power
spectrum and the Bartlett window frequency response in (6.13).
Example: (a) Power spectrum of two sinusoids in white noise,
(b) expected value of the periodogram

=N +1

We know from the discussion in Section 3.1.4 that the convolution


with the frequency response of a window may lead to

which finally yields

(per)(ej )

vv

1
j
j
vv (e )
WB (e )
2

(6.13)

with WB (ej ) denoting the Fourier transform of the Bartlett


window

2
1 sin(N /2)
j
.
WB (e ) =
N
sin(/2)
Periodogram is a biased estimate, since the expected value is
the convolution between the true power spectrum and the Fourier
transform of the Bartlett window.
Since WB (ej ) converges to an impulse for N the
periodogram is asymptotically unbiased:

lim E

(per)(ej )

vv

= vv (e )

(6.14)

217

(from [Hayes, 1996])

Width of the main lobe of WB (ej ) increases as the data


record length decreases.
For a given length N there is a limit on how closely two
sinusoids or narrowband processes may be located before they
no longer can be resolved.
218

One way to define this frequency resolution limit is to set


equal to the width of the main lobe of the Bartlett window at
its 6 dB point:
= 0.89

2
,
N

(6.15)

which is also the frequency resolution of the periodogram.

analog to (6.4). The periodograms of these processes are

(per)(ej ) = 1 |VN (ej )|2,

vv
N

(per)(ej ) = 1 |XN (ej )|2.

xx
N
(6.18)
If N is large compared to the length of h(n), vN (n) can be
described as vN (n) h(n)xN (n), since the transition effects
can be neglected. Thus, the magnitude square frequency response
|VN (ej )|2 of vN (n) can be with (6.17) expressed as
j

Variance of the periodogram


White Gaussian random processes:
It can be shown that for a white Gaussian random process v(n)
the variance of the periodogram is equal to the square of the power
spectrum vv (ej ) (see [Hayes, 1996]):

(per)(ej )
Var
vv

2
j
vv (e ).

(6.16)

Non-white Gaussian random processes:


For non-white Gaussian processes, which are more important
in practice, we derive an approximation for the variance of the
periodogram in the following.
A random process v(n) with power spectrum vv (ej ) may be
generated by filtering white noise x(n) with variance x2 = 1
with a linear filter h(n) H(ej ) and
j

|H(e )| = vv (e ).

(6.17)

The sequences vN (n) and xN (n) are now formed by windowing


219

|VN (e )| |H(e )| |XN (e )| = vv (e ) |XN (e )| .


(6.19)
Inserting (6.18) into (6.19) yields
(per)(ej ) vv (ej )
(per)(ej ).

vv
xx
Applying the variances on both sides results in
n
o
n
o
(per)(ej ) 2 (ej ) Var
(per)(ej ) ,
Var
vv
vv
xx

(per)(ej )} = 1 according to (6.16), the variance


and, since Var{
xx
for large N can be obtained as
o
n
(per)(ej ) 2 (ej ).
Var
vv
vv

(6.20)

Periodogram is not a consistent estimator


Example:

For a white Gaussian noise process v(n) with v2 = 1 and vv (ej ) = 1 it


follows from (6.13) and (6.16), resp., that
o
n
o
n
(per) (ej ) = 1.
(per) (ej ) = 1 and Var
E
vv
vv
220

Thus, although the periodogram for white Gaussian noise is unbiased, the
variance is independent of the data record length N .

N = 64, approximated periodogram variance

10

2.5

10

Variance

Magnitude [dB]

N = 64, overlay of 30 periodoj


(per)
grams
vv (e )

20
30

50
0

0.2

0.4
0.6
/

0.8

10

2.5

10

Variance

Magnitude [dB]

20
30

50
0

0.2

0.4
0.6
/

0.8

0.2

0.4
0.6
/

0.8

0
0

0.2

0.4
0.6
/

0.8

N = 256, periodogram average

10

10

20
30
40
0.4
0.6
/

0.8

= vv (e ),

it obviously suffices to find a consistent estimate of the


(per)(ej )} in order to find a consistent
periodogram E{
vv
estimate for the true power spectrum vv (ej ).

Let vi(n) for i = 0, . . . , K 1 denote K uncorrelated


realizations of a random process v(n) for n = 0, . . . , L 1.
The periodogram of each single realization is obtained from (6.6)
as
2

L1

X
1

jn
(per) (ej ) =
(6.21)
v
(n)e

.
i
vi vi

L
K1
1 X (per) j
j

vv (e ) =
(e ).
K i=0 vivi

20
30

50
0

The average of these periodograms is

10

40
0.2

(per)(ej )

vv

n=0

0
Magnitude [dB]

0
10

Estimation of the power spectrum by periodogram averaging!

2
1.5

0.5

N = 64, periodogram average

50
0

lim E

N = 256, approximated periodogram variance

40

Magnitude [dB]

1.5

0
0

N = 256, overlay of 30 periodoj


(per)
grams
vv (e )

In contrast to the periodogram, Bartletts method (1948) provides


a consistent estimate of the power spectrum.
The motivation for this method comes from the fact that by
averaging a set of uncorrelated measurements for a random
variable v one obtains a consistent estimate of the mean E{v}.
Since the periodogram is asymptotically unbiased

0.5

40

6.1.2 Bartletts method: Periodogram averaging

0.2

0.4
0.6
/

0.8

221

(6.22)

vv (ej ) we have with (6.22) and


For the expected value of
222

(6.13)

Properties

vv (ej )

=E
=

(per) (ej )

v v
i i

From (6.23) the expected value is

1
j
j
vv (e )
WB (e ).
2

(6.23)

vv (ej ) is asymptotically
As with the periodogram, the estimate
unbiased, i.e. for L .
vv (ej )}
For uncorrelated data records vi(n) the variance Var{
can be obtained in the same way from (6.22) and (6.20) as

o
o
n
n
(per) (ej ) 1 2 (ej ).
vv (ej ) = 1 Var
Var
vi vi
K
K vv
(6.24)
We can observe that the variance goes to zero if K goes to infinity
vv (ej ) is a consistent estimate of the power spectrum if

both L and K tend to infinity.


In practice:
Uncorrelated realizations of a random process are generally not
available, instead we have only one single realization of length N .
Alternative: v(n) of length N is divided into K nonoverlapping
sequences of length L with N
= L K , that is
vi(n) = v(n + iL), n = 0, . . . , L1, i = 0, . . . , K 1.
Thus, the Bartlett estimate is

(B)(ej )

vv


2
K1 L1

1 X X
jn
=
v(n + iL) e

.

N i=0 n=0

(6.25)

(B)(ej )

vv

1
j
j
vv (e )
WB (e )
2

(6.26)

As the periodogram the Bartlett estimate is asymptotically


unbiased.
The spectral resolution of the Bartlett estimate can be obtained
from the resolution of the periodogram in (6.15). Since we now
use sequences of length L the resolution becomes

= 0.89

2
2
= 0.89 K
,
L
N

(6.27)

which is K times larger (worse!) than that of the periodogram.


Variance: Assuming that the data sequences vi(n) are
approximately uncorrelated (this is generally not the case!) the
variance of the Bartlett estimate is for large N

o
n
(B)(ej ) 1 2 (ej ).
Var
vv
K vv

(6.28)

j
(B)
vv (e ) is a consistent estimate for K, L .
The Bartlett estimate allows to trade spectral resolution for a
reduction in variance by adjusting the parameters L and K .
Examples:

The power spectrum of a white noise Gaussian process with v2 = 1 of


length N = 256 is estimated with Bartletts method.
223

224

K = 4, L = 64, approximated
variance of Bartlett estimates
0.5

0.4

0.2

0.4
0.6
/

0.8

K = 8, L = 32, overlay of 30
j
(B)
Bartlett estimates
vv (e )
10

0.5

0.4

30

20

20

10

10
0

0.2

0.4
0.6
/

0.8

10

10
0

0.2

0.4
0.6
/

0.8

Periodogram
30

0.2

0.4
0.6
/

0.8

0
0

K = 4, L = 64, Bartlett estimate


average

5
Magnitude [dB]

10

10

0.4
0.6
/

0.8

K = 8, L = 32, Bartlett estimate


average

10

0.2

0.4
0.6
/

0.8

10

0.2

0.4
0.6
/

0.8

6.1.3 Welchs method: Averaging modified periodograms

In 1967, Welch proposed two modifications to Bartletts method:

15
0

20

10
0

1. The data segments vi(n) of length L are allowed to overlap,


where D denotes the offset between successive sequences:

10

0.2

Magnitude [dB]

0.1

10

Magnitude [dB]

0.8

30

0.2

15
0

0.4
0.6
/

0.3

15
0

0.2

K = 8, L = 32, approximated
variance of Bartlett estimates

Variance

Magnitude [dB]

0
0

Magnitude [dB]

0.1

10

(6.29)

with 1 = 0.2 , 2 = 0.25 , and length N = 512 samples.


The following figures show the average power spectrum estimate over
30 realizations, and demonstrate the reduced spectral resolution of the
Bartlett estimate compared to the periodogram.
K = 4, L = 128, Bartlett estimate
K = 8, L = 64, Bartlett estimate

0.2

15
0

v(n) = 3 sin(n1 ) + sin(n2 ) + (n)

0.3

(n) of variance 2 = 1,

Magnitude [dB]

10

Variance

Magnitude [dB]

K = 4, L = 64, overlay of 30
j
(B)
Bartlett estimates
vv (e )

0.2

0.4
0.6
/

0.8

Here, the input signal consists of two sinusoids in white Gaussian noise
225

vi(n) = v(n+iD), n = 0, . . . , L1, i = 0, . . . , K1.


(6.30)
226

The amount of overlap between vi(n) and vi+1(n) is LD


samples, and if K sequences cover the entire N data points
we have N = L + D(K 1). If D = L the segments do
not overlap as in Bartletts method with K = N/L.

By allowing the sequences to overlap it is possible to


increase the number and/or length of the sequences that are
averaged. Reduction of the variance (for larger K ) can thus
be traded in for a reduction in resolution (for smaller L) and
vice versa.
2. The second modification is to window the data segments prior
to computing the periodogram. This leads to a so called
modified periodogram

(mod)(ej )

vi vi

1
=
LU


2
L1
X


jn
v
(n)
w(n)e


i

(6.31)

Properties

It can be shown that the expected value of Welchs estimate is


1
j
j 2
vv (e )
|W (e )| ,
2LU
(6.34)
j
where W (e ) denotes the Fourier transform of the general
L-point window sequence w(n). Thus, Welchs method is an
asymptotically unbiased estimate of the power spectrum.
The spectral resolution of Welchs estimate depends on the
used window sequence and is specified as the 3 dB width
3 dB of the main lobe of the spectral window. 3 dB is
specified for some commonly used windows in the following
table.
E

(W )(ej )

vv

n=0

with a general window w(n) of length L, and U denoting


a normalization factor for the power in the window function
according to
L1
1X
2
U =
|w(n)| .
(6.32)
L n=0
Welchs method may explicitly be written as

2
L1
K1

X
X
1

jn
(W )(ej ) =
v(n
+
iD)
w(n)e


.
vv

KLU i=0 n=0

(6.33)

MATLAB-command: pwelch

227

Sidelobe
level [dB]

3 dB bandwidth
3 dB

Rectangular

-13

0.89 2
L

Bartlett

-27

1.28 2
L

Hanning

-32

1.44 2
L

Hamming

-43

1.30 2
L

Blackman

-58

1.68 2
L

Type of window

Remark: In (6.15) we stated the frequency resolution of the peridogram


as the 6 dB main lobe width of the Bartlett window. Since WB (ej ) =

|WR (ej )|2 this is equivalent to the 3 dB bandwidth of the frequency

response WR (ej ) of the rectangular window.

The variance of Welchs estimate highly depends on the


228

(W )(ej )
Var
vv

9
j
2
vv (e )

8K

(6.35)

( consistent estimate). A comparison with (6.28) shows that


the variance for Welchs method seems to be larger than for
Bartletts method. However, for fixed amount of data N and a
fixed resolution L here twice as many sections are averaged
compared to Bartletts method. With K = 2N/L (50%
overlap) (6.35) becomes

Welch estimate ensemble average

30

30

20

20

Magnitude [dB]

Overlay plot of 30 Welch estimates

Magnitude [dB]

amount of overlapping. For a Bartlett window and a 50%


overlap the variance is approximately

10

10

10
0

0.2

0.4
0.6
/

0.8

10
0

0.2

0.4
0.6
/

0.8

Compared to the Bartlett estimate for the same example above the use of
the Hamming window reduces the spectral leakage in the estimated power
spectrum.
Since the number of sections (7) are about the same to those in the above

(W )(ej )
Var
vv

9L 2 j
(e ).
16N vv

(6.36)

A comparison with (6.28) and K = N/L for the Bartlett


estimate we have

o
o
n
n
(B)(ej ) .
(W )(ej ) 9 Var
Var
vv
vv
16

(6.37)

Increasing the amount of overlap yields higher computational


complexity and also the correlation between the subsequences
vi(n) amount of overlap is typically chosen as 50% or
75%.
Example:
As an input signal we again use (6.29) which contains two sinusoids in white
Gaussian noise (n) of variance 2 = 1, with 1 = 0.2 , 2 = 0.25 ,
and a signal length of N = 512 samples. The section length is chosen as
L = 128, the amount of overlapping is 50%, and for the window we use a
Hamming window.
229

example for the Bartlett estimate with K = 8, L = 64 (8 sections) both


variances are also approximately the same.

6.1.4 Blackman-Tukey method: Periodogram smoothing


Recall that the periodogram is obtained by a Fourier transform
from the estimated autocorrelation sequence. However, for any
finite data record of length N the variance of
vv () will be
large for values of , which are close to N . For example for
lag = N 1 we have from (6.2)

vv (N 1) =

1
v(N 1) v(0).
N

Two approaches for reducing the variance of


vv () and thus also
the variance of the peridogram:
1. Averaging periodograms and modified periodograms, resp., as
utilized in the methods of Bartlett and Welch.
2. Periodogram smoothing Blackman-Tukey method (1958)
230

Blackman-Tukey method: Variance of the autocorrelation


function is reduced by applying a window to
vv () to decrease
the contribution of the undesired estimates to the periodogram.
The Blackman-Tukey estimate is given as

(BT )(ej ) is nonnegative for all .


W (ej ) 0, such that
vv
Note that some of the window functions we have introduced
do not satisfy this condition, for example, the Hamming and
Hanning windows.
Properties

(BT )(ej ) =

vv

M
X

vv () w() e

(6.38)

=M

where w() is a lag window being applied to the autocorrelation


estimate and extending from M to M for M < N 1.
Estimates of vv () having the largest variance are set to zero
by the lag window the power spectrum estimate will have a
smaller variance.
The Blackman-Tukey power spectrum estimate from (6.38) may
also be written as
j
(BT )(ej ) = 1
(per)(ej )

W (e ),
vv
2 vv
Z
1
(per)(eju) W (ej(u)) du

=
vv
2

(6.39)

The expected value of the Blackman-Tukey estimate can be


derived for M N as
1
j
j
vv (e )
W (e )
2
(6.41)
j
where W (e ) is the Fourier transform of the lag window.
The spectral resolution of the Blackman-Tukey estimate
depends on the used window.
It can be shown that the variance can be approximated as
E

(BT )(ej )

vv

(BT )(ej )
Var
vv

2
j
vv (e )

1
N

M
X

w ().

=M

with W (ej ) denoting the Fourier transform of the lag window.


Blackman-Tukey estimate smooths the periodogram by
convolution with W (ej ).

(6.42)
From (6.41) and (6.42) we again see the trade-off between bias
and variance: For a small bias, M should be large in order to
minimize the width of the main lobe of W (ej ), whereas M
should be small to minimize the sum term in (6.42). As a
general rule of thumb, M is often chosen as M = N/5.

Choice of a suitable window:

Examples:

(6.40)

w() should be conjugate symmetric, such that W (ej ) (and


also the power spectrum) is real-valued.

The power spectrum of a white noise Gaussian process with v2 = 1 of


length N = 256 is estimated with the Blackman-Tukey method, where a
Bartlett window with M = 51 is used.

231

232

6.1.5 Performance comparisons


Approximated variance of the
Blackman-Tukey estimates

10

0.5

0.4
Variance

Magnitude [dB]

Overlay of 30 Blackman-Tukey
(BT ) j
vv
(e )
estimates

0
5

1. Variability V of the estimate,

0.2
0.1

0.2

0.4
0.6
/

0.8

0
0

0.2

0.4
0.6
/

0.8

2. Overall figure of merit, which is defined as the product of the


variability and the spectral resolution ,

10

Magnitude [dB]

5
0

M = V .

0.2

0.4
0.6
/

0.8

In a second example we use two sinusoids in white Gaussian noise ((6.29),


2
n
= 1, 1 = 0.2 , 2 = 0.25 ) for N = 512 samples. The
window is a Bartlett window with M = 102.
Blackman-Tukey estimate ensemble average

30

30

20

20

Magnitude [dB]

Magnitude [dB]

Overlay plot of 30 BlackmanTukey estimates

10

0.4
0.6
/

0.8

Variability
V
Periodogram

Bartlett

1
K

Resolution

2
N
2
0.89 K
N
0.89

Figure of merit
M

2
N
2
0.89
N
0.89

Welch (50% overlap,


Bartlett window)

9
8K

1.28

2
L

0.72

2
N

Blackman-Tukey
(Bartlett window of length
2M , 1 M N )

2M
3N

0.64

2
M

0.43

2
N

10

10
0.2

(6.44)

Results for the periodogram-based spectrum estimation techniques:

10
15
0

(6.43)

which can be regarded as a normalized variance.

Blackman-Tukey estimate ensemble average

n
o
vv (ej )
Var
o,
n
V =
vv (ej )
E2

0.3

10
15
0

Performance of the discussed estimators is assessed in terms of


two criteria:

10
0

0.2

0.4
0.6
/

0.8

233

234

Each technique has a figure of merit being approximately the


same, figures of merit are inversely proportional to the length
N of the data sequence.

difference equation is

v(n) =

Overall performance is fundamentally limited by the


amount of data being available!

q
X

i=0

bi w(n i)

p
X

i=1

ai v(n i),

(6.46)

where v(n) denotes the output and w(n) the input sequence
6.2 Parametric methods for power spectrum estimation
Disadvantages
methods:

of

the

periodogram-based

(nonparametric)

Long data records are required for sufficient performance,


windowing of the autocorrelation sequence limits spectral
resolution.
Spectral leakage effects due to windowing.
A-priori information about the generating process is not
exploited.
Disadvantages are removed by using parametric estimation
approaches, where an appropriate model for the input process is
applied.
Parametric methods are based on modeling the data sequence as
the output of a linear system with the transfer function (IIR filter!)

H(z) =

q
P

If w(n) represents a stationary random process, then v(n) is also


stationary and the power spectrum can be given as (Wiener-Lee
relation)
j
j 2
j
vv (e ) = |H(e )| ww (e ).
(6.47)
Parametric power spectrum estimation:

stationary random process

(6.45)

model process
v(n)
!
= received process

w
ai , bi

In order to estimate the power spectrum vv (ej ) we assume in


our model that ww (ej ) comes from a zero-mean white noise
2
2
process with variance w
. By inserting ww (ej ) = w
into
(6.47) the power spectrum of the observed data is
2

vv (e ) = w |H(e )| = w

bi z i

p
P

H(ej )

2
vv (ej ) = w
|H(ej )|2

i=0

w(n)

white noise
source, = 0

|B(ej )|2
.
|A(ej )|2

(6.48)

where the ai and bi are the model parameters. The corresponding

Goal: Make the model process v(n) as similar as possible to


the unknown received process in the mean-square error sense by
adjusting the parameters ai, bi, and w the power spectrum
vv (ej ) can then be obtained via (6.48).

235

236

1+

i=1

ai

z i

In the following we distinguish among three specific cases for


H(z) leading to three different models:

6.2.1 Relationship between the model parameters and the


autocorrelation sequence

Autoregressive (AR) process

In the following it is shown that the model parameters ai, bi can


be obtained from the autocorrelation sequence of the observed
process v(n). These values are then inserted into (6.45) yielding
H(ej ), which is then inserted into (6.48) leading to the power
spectrum vv (ej ) of our observed process.

The linear filter H(z) = 1/A(z) is an all-pole filter, leading to


b0 = 1, bi = 0 for n > 0 in the difference equation (6.46):

v(n) = w(n)
Moving average (MA) process

p
X

i=1

ai v(n i).

(6.49)

In a first step the difference equation (6.46) is multiplied by


v (n ) and the expected value is taken on both sides

Here, H(z) = B(z) is an all-zero (FIR!) filter, and the


difference equation becomes with an = 0 for n 0

v(n) =

q
X

i=0

bi w(n i).

E{v(n) v (n )} =

(6.50)

Autoregressive, moving average (ARMA) process


In this case the filter H(z) = B(z)/A(z) has both finite poles
and zeros in the z-plane and the corresponding difference equation
is given by (6.46).

The AR model is most widely used, since the AR model is


suitable of modeling spectra with narrow peaks (resonances)
by proper placement of the poles close to the unit circle.
MA model requires more coefficients for modeling a narrow
spectrum, therefore it is rarely used as a model for spectrum
estimation.
By combining poles and zeros the ARMA model has a more
efficient spectrum representation as the MA model concerning
the number of model parameters.
237

i=0

p
X

i=1

bi E{w(n i) v (n )}

ai E{v(n i) v (n )},

which leads to

vv () =

Remarks:

q
X

q
X

i=0

bi wv ( i)

p
X

i=1

ai vv ( i). (6.51)

The crosscorrelation sequence wv () depends on the filter


impulse response:

wv () = E{v (n) w(n + )},


)
(
X

2
h(k) w (n k) w(n + ) = w h().
=E
k=0

(6.52)

238

In the last step we have used our prerequisite from above that the
process w(n) is assumed to be a zero-mean white random process
2
with E{w(n k)w(n + )} = ( + k)w
and known
2
variance w . Thus we have from (6.52)

wv () =

0
2
w

for

> 0,

h() for 0.

(6.53)

By combining (6.51) and (6.53) we obtain the desired relationship


for the general ARMA case:

p
P

for > q,
ai vv ( i)

i=1
p
q
P
vv () =
2 P
ai vv ( i) for 0 q
h(i) bi+
w

i=1
i=0


vv ()
for < 0.
(6.54)

nonlinear relationship between the parameters vv () and


ai, bi
In the following we only consider the AR model case, where
(6.54) simplifies to

p
P

ai vv ( i)

for > 0,

i=1
p
P
vv () =
2
ai vv ( i) for = 0
w

i=1


vv ()
for < 0.

(6.55)

may also be expressed in matrix notation according to

vv (0)
(1)
vv

..

.
vv (p 1)

vv (1)
vv (0)
..
.
vv (p 2)

...
...
...
...

vv (p 1)
a1
vv (1)

(2)
vv (p 2)
a2

vv
.. =

..
..
.

.
.
vv (0)
ap
vv (p)
(6.56)

which is in short-hand notation R a = r. Once the ai have been


2
obtained by solving for the coefficient vector a, the variance w
can be calculated from
2
w

= vv (0) +

p
X

aivv (i).

(6.57)

i=1

Since the matrix R has a special structure (Toeplitz structure) there


exist efficient algorithms for solving the system of linear equations
in (6.55) and (6.56), respectively (Levison-Durbin algorithm
(1947, 1959), Schur recursion (1917)).
6.2.2 Yule-Walker method
In the Yule-Walker method (also called autocorrelation method)
we simply estimate the autocorrelation sequence from the
observed data v(n), where the autocorrelation estimate in (6.2)
is used:
N 1
1 X

v(n + ) v (n),

vv () =
N n=0

= 0, . . . , p.

These equations are also called Yule-Walker equations and denote


a system of linear equations for the parameters ai. Equation (6.55)

(6.58)
In the matrix version of the Yule-Walker equations (6.56) we
replace vv () with
vv (). The resulting linear equation
system is solved for the parameter vector a, which now contains
the estimated AR parameters a
i, i = 1, . . . , p. Finally, we

239

240

10

10
0

The input process consists of two sinusoids in white Gaussian noise (n) of
variance 2 = 1 according to (6.29) with 1 = 0.2 , 2 = 0.25 . The
model order of the Yule-Walker method is chosen as p = 50.

Magnitude [dB]

Magnitude [dB]

Yule-Walker ensemble average

20
10
0
10
0

0.4
0.6
/

0.8

0.4
0.6
/

0.8

10
0

0.2

0.4
0.6
/

0.8

Yule-Walker ensemble average

Magnitude [dB]

40

40

30

30

20
10

10
0

20
10
0

0.2

0.4
0.6
/

0.8

overlay of 30 Blackman-Tukey estimates

10
0

0.2

0.4
0.6
/

0.8

Blackman-Tukey ensemble average

40

40

30

30

20
10
0

20
10
0

20
10
0
10
0

0.2

0.2

Magnitude [dB]

Length of observed process N = 512 (Blackman-Tukey: LB = 205):

30

overlay of 30 Yule-Walker estimates

In the following we compute power spectrum estimates obtained


with the Yule-Walker method and for comparison purposes also
with the Blackman-Tukey method (Bartlett window of length
LB ).

30

10

Length of observed process N = 100 (Blackman-Tukey: LB = 41):

6.2.3 Examples and comparisons to nonparametric methods

40

20

MATLAB-command: paryule

40

30

20

(6.59)

k=1

overlay of 30 Yule-Walker estimates

30

Magnitude [dB]

(AR)(ej ) =

2 .
vv
p


P
jk
1 +

a
k e

40

Magnitude [dB]

2
w

Blackman-Tukey ensemble average

40

Magnitude [dB]

The corresponding power spectrum estimate can now be stated


from (6.48) as

overlay of 30 Blackman-Tukey estimates

Magnitude [dB]

2
obtain w
via (6.57) from the a
i and the estimated autocorrelation
sequence
vv ().

10
0

0.2

0.4
0.6
/

0.8

241

0.2

0.4
0.6
/

0.8

10
0

0.2

0.4
0.6
/

0.8

We can see that only for the longer data sequence with N = 512 the
resolution of the estimates are comparable. Clearly, for N = 100 the
estimate based on an AR-model provides much better frequency resolution
for the sinusoidal components than the Blackman-Tukey method.
242

Remark: Use of a certain model generally requires a-priori


knowledge about the process. In case of a model mismatch
(e.g. MA process and AR model) using a nonparametric approach
may lead to a more accurate estimate.
Example:
Consider the MA process (length N = 512)

v(n) = w(n) w(n 2),


2
where w(n) is again a white-noise zero-mean process with variance w
= 1.
The power spectrum of v(n) is

vv (e

) = 2 2 cos(2).

Ensemble average over 30 power spectrum estimates for the Yule-Walker


method (AR model of order p = 4) and the Blackman-Tukey method (Bartlett
window, LB = 205):
10

Magnitude [dB]

5
0
5
10
YuleWalker (AR(4) model)
BlackmanTukey
exact power spectrum

15
20
0

0.2

0.4
0.6
/

0.8

Blackman-Tukey estimate, which makes no assumption about the process,


yields a better estimate of the power spectrum compared to the model-based
Yule-Walker approach.

243

You might also like