You are on page 1of 51

DIGITAL

SIGNAL
PROCESSING
Part 2
Digital Signal Processing

A.S.Kayhan

Frequency Analysis of LTI Systems:


the Input/Output (I/O) relation of a LTI system is given
by convolution:

y[ n ] x[ n ] * h[ n ]

h[ k ] x[n k ]

In z-domain

Y (z) X (z)H (z)

On the unit circle


Y (e

where H ( e
system.

) X (e

) H (e

ze

is the frequency response of the

Digital Signal Processing

A.S.Kayhan

Magnitude is
Y (e

where H ( e
system.

) X (e

) H (e

is the magnitude response of the

Phase is Y ( e
where H ( e
system.

) X (e

) H (e

) is the phase response of the

Digital Signal Processing

A.S.Kayhan

Discrete-time ideal filters: LPF, HPF, BPF:

These are not realizable. Why?


Digital Signal Processing

A.S.Kayhan

Phase distortion and delay:


Assume that h id [ n ] [ n n d ]
then
or

H
H

id

id

(e

(e

j n d

) e

) 1,

id

(e

) nd

Linear phase distortion causes simple delay.


Group delay:
It measures linearity of the phase response.
Consider
x [ n ] s [ n ] cos o n
where s [ n ] is a narrowband (slowly varying) signal.

Digital Signal Processing

Assume around
H (e

H (e

) 1,

A.S.Kayhan

) o n d

Then
y [ n ] s [ n n d ] cos o n o o n d

Thus, group delay of a system is


grd [ H ( e

where arg H ( e

)]

d
d

arg H

(e

is the continuous phase.

Digital Signal Processing

A.S.Kayhan

Digital Signal Processing

A.S.Kayhan

Example: Consider the following filter

Digital Signal Processing

A.S.Kayhan

Input is the following signal

Digital Signal Processing

Pulses are at

0 . 25 ,

0 .5 ,

Digital Signal Processing

A.S.Kayhan

0 . 85

A.S.Kayhan

Systems with Difference Equation Models:


Assume that the Input/Output (I/O) relation of a system
is given by a constant coefficient difference equation:
N

k 0

a k y[n k ] bk x[n k ]
k 0

Applying z-transform, using linearity and shifting


properties, we obtain
N

k 0

k 0

ak z

Y ( z ) bk z k X ( z )
k 0
M

a k z k Y ( z )

k 0

bk z k X ( z )

Digital Signal Processing

A.S.Kayhan

Then, the transfer function (or system function) is


M
bk z k
Y (z)
H (z)
k N 0
X (z)

a k z k
k 0

We can write the transfer function in terms of its


poles, dk, and zeros, ck, as M
H (z)

bo
ao

(1 c k z 1 )

(1 d k z 1 )

k 1
N

k 1

Digital Signal Processing

A.S.Kayhan

Example: Consider system function


(1 z 1 ) 2

H (z)

1 1
3 1
z )( 1
z )
2
4
1 2 z 1 z 2
Y (z)
H (z)

1 1
3 2
X (z)
1
z
z
4
8
(1

then

( 1 2 z 1 z 2 ) X ( z ) (1

1 1
3 2
z
z )Y ( z )
4
8

x[ n ] 2 x[ n 1] x[ n 2 ]
1
3
y[n ]
y [ n 1]
y[n 2]
4
8
Digital Signal Processing

A.S.Kayhan

Stability and Causality:


A system is causal if ROC for the transfer function H(z) is
outward.
A sytem is stable if ROC for the transfer function H(z)
includes the unit circle.

Digital Signal Processing

A.S.Kayhan

Inverse Systems :
Let H i ( z ) be the inverse system of H ( z ), then
G (z) H i(z)H (z) 1

Eq.(1)

g n h i n * h n n

then

H i(z)

1
,
H (z)

H i (e

1
H (e

Not all systems have an inverse. Ideal LPF does not have
an inverse, we can not recover high frequency components.
M
Now, consider
1
b
H (z) o
ao

(1 c k z

(1 d k z 1 )

k 1
N

k 1

Digital Signal Processing

A.S.Kayhan

Then the inverse system has


N

H i(z)

ao
bo

(1 d k z 1 )

(1 c k z 1 )

k 1
M

k 1

Poles become zeros of the inverse system, zeros become


poles.
For Eq.(1) to hold, ROC of H i ( z ) and H ( z ) must
overlap. If H ( z ) is causal, ROC is
z max

dk

Some part of ROC of H i ( z ) must overlap with this.


Digital Signal Processing

A.S.Kayhan

Example: Suppose
z 1 0 .5
H (z)
,
1 0 .9 z 1

z 0 .9

The inverse system is


1 0 .9 z 1
2 1 .8 z 1
H i(z)

z 1 0 .5
1 2 z 1

Two possible ROC:


z 2

h i1 n 2 n 1 u n 1 1 . 8 2 n 1 u n

which is stable but noncausal.


z 2

h i 2 n 2 n 1 u n 1 . 8 2 n 1 u n 1

unstable but causal.


Digital Signal Processing

A.S.Kayhan

Example: Suppose
1 0 .5 z 1
,
1 0 . 9 z 1

H (z)

z 0 .9

The inverse system is


H i(z)

1 0 .9 z 1
1 0 .5 z 1

The only choice for ROC is overlaps with z 0 . 9 is


z 0 .5

then
h i n 0 . 5 u n 0 . 9
n

0 . 5 n 1 u n

which is both stable and causal.


Digital Signal Processing

A.S.Kayhan

Impulse Response for Rational System:


Assume that a stable LTI Msystem has a rational transfer
function.
(1 c k z 1 )
bo
ao

H (z)

k 1
N

(1 d k z 1 )

k 1

M N

B r z r

H (z)

r0
0 if M N

then

h n

M N

k 1

B r n r

r0

Ak
1 d k z 1
A k d kn u n 1

k 1

Impulse response is of infinite length, called Infinite


Impulse Response (IIR) system.
Digital Signal Processing

A.S.Kayhan

If the system has no poles, then


M

H (z)

bk z k

k 0

h n

b k n k

k 1

Impulse response is of finite length, called Finite Impulse


Response (FIR) system.
Example: Consider a causal system with
y [ n ] ay [ n 1 ] x [ n ]
If a 1 then stable and the impulse

response is

h n a n u n .
Digital Signal Processing

A.S.Kayhan

10

Example: Consider

a n , 0 n M
h n
.
0
,
otherwise

Then
M
1 a M 1 z M 1
H ( z ) a n z n
1 az 1
n0

Zeros at

z k ae

2k
M 1

k 0 ,1 , , M .

Difference equation is
y n

a k x n k

k 1

However, we can also write


y [ n ] ay [ n 1 ] x [ n ] a

M 1

x n M 1

Digital Signal Processing

A.S.Kayhan

Frequency Response for Rational System Functions:


Assume that a stable LTI system has a rational transfer
function. Then frequency response is obtained by
evaluating it on the unit circle:
H (e

M
b k e j k
) k N 0

a k e j k
k 0

H (e

b
) o
ao

(1 c k e

(1 d k e

k 1
N

k 1

Digital Signal Processing

A.S.Kayhan

11

The magnitude response of the system is


M

H (e

bo
ao

1 cke

1 d ke

k 1
N

k 1

The magnitude-squared response of the system is


H (e

H (e

)H

(e

H (e

b
o
ao

1 c

1 c

*
k

d ke

1 d

*
k

k 1
N

e
e

k 1

Digital Signal Processing

A.S.Kayhan

Log magnitude or Gain in decibels(dB) :


20 log

10

H (e

) 20 log

10

bo

ao

20 log

10

1 cke

k 1

20 log

10

1 dke

k 1

Note that :

20 log

10

Y (e

) 20 log
20 log

10
10

H (e
X (e

j
j

Attenuation in dB = - Gain in dB
Digital Signal Processing

A.S.Kayhan

12

Phase response for rational system function:


H (e

b
) o
ao

1 cke

k 1
N

1 d ke

k 1

Group delay for rational system function:

grd H ( e

k 1

d
d
N

k 1

arg[
d
d

1 cke

arg[

1 d ke

Digital Signal Processing

A.S.Kayhan

Frequency Response of A single Zero:


Consider transfer function of a system as
1

H ( z ) 1 az

then with a re
H (e

) H (e

)e

j H ( e

1 re

then magnitude is
H (e

1 r

2 r cos( )

and magnitude in dB is
20 Log

10

H (e

) 20 Log

10

[1 r

Digital Signal Processing

2 r cos( )]

A.S.Kayhan

13

then phase is
H (e

) tan

r sin( )

1 r cos( )

group delay is derivative of the (unwrapped) phase


function
grd [ H ( e

d ( H (e
)]
d

))

Example: Consider two cases : r=0.9, =0 and r=0.9, =:

Digital Signal Processing

A.S.Kayhan

Digital Signal Processing

A.S.Kayhan

14

magnitudes of
vectors give the
magnitude response
H (z)

z a
z

H (e

ze

re
e j

v3
v1

Digital Signal Processing

v3

A.S.Kayhan

phases of vectors give the phase response


H (e

e j re j

)
e j

v 3 v1 3 1 3

Digital Signal Processing

A.S.Kayhan

15

Example: Consider a second order system with


H (z)

1 re

1
j

e j z 1
z 1 1 re j z 1

H (e

v3
v1 v 2

Digital Signal Processing

H (e

A.S.Kayhan

) H (z)

ze

Digital Signal Processing

A.S.Kayhan

16

Example: Consider a third order system with

0 . 05634 1 z 1 1 1 . 0166 z 1 z 2
H (z)
1 0 . 683 z 1 1 1 . 4461 z 1 0 . 7957 z 2

Digital Signal Processing

A.S.Kayhan

Relation Between Magnitude and Phase:


In general, knowledge about magnitude does not provide
information about phase, and vice versa.
But, for rational system functions, with some additional
information such as number of poles and zeros, magnitude
and phase responses provide information about each other.
2
Consider
j
j
*
j
H (e

H (e

)H

H (z)H

with

(e

(1 / z * ) | z e j

H (z)

bo
ao

(1 c k z 1 )

(1 d k z 1 )

k 1
N

k 1

Digital Signal Processing

A.S.Kayhan

17

(1 / z * )

bo
ao

(1 c k* z )

(1 d k* z )

k 1
N

k 1

Then

b
C ( z ) H ( z ) H * (1 / z * ) o
ao

(1 c k z 1 )( 1 c k* z )

(1 d k z 1 )( 1 d k* z )

k 1
N

k 1

Notice that poles and zeros of C(z) occur in conjugate


reciprocal pairs. If one pole/zero is inside the unit circle
there is another outside.
Digital Signal Processing

A.S.Kayhan

If H(z) is causal and stable, then all poles must be inside the
unit circle, with this we can identify the poles. But zeros of
H(z) can not be uniquely identified from zeros of C(z) with
this constraint alone.
Example: Consider two stable systems with
H 1(z)

2 1 z 1 1 0 .5 z 1
1 0 . 8 e j / 4 z 1 1 0 . 8 e j

/4

z 1

j / 4

z 1

and
H 2(z)

1 0 . 8 e

z 1 1 2 z 1
/4
z 1 1 0 . 8 e

Digital Signal Processing

A.S.Kayhan

18

Pole/zero plots are

Digital Signal Processing

A.S.Kayhan

C 1 ( z ) H 1 ( z ) H 1* (1 / z * )

2 1 z 1 1 0 . 5 z 1 2 1 z 1 0 . 5 z

1 0 .8 e j / 4 z 1 1 0 . 8 e j / 4 z 1 1 0 . 8 e j / 4 z 1 0 . 8 e j / 4 z

C 2 ( z ) H 2 ( z ) H 2* (1 / z * )

1 z 1 2 z 1 z 1 2 z
1 0 . 8 e z 1 0 . 8 e z 1 0 . 8 e
1

1 0 .8 e

j / 4

z 1

j / 4

j / 4

j / 4

Observe that (with 4 2 z 2 z 1 )

4 1 0 . 5 z 1 1 0 . 5 z 1 2 z 1 1 2 z

then
C1(z) C 2 (z)
Digital Signal Processing

A.S.Kayhan

19

Example: Consider pole/zero plot of C(z) for a system,


determine H(z).
For a causal
and stable
system, poles
of H(z) are: p1,
p2,p3.
For real ak, bk,
zeros/poles
occur in
complex
conjugate pairs.
Digital Signal Processing

A.S.Kayhan

All-Pass Systems:
Consider following stable system function

ap

then

(e

ap

z 1 a *
H ap ( z )
1 az 1
j *
e j a *
)
j ( 1 ae
)
e
j
j
1 ae
1 ae

(e

) 1

, but H

ap

(e

) constant

This is called an all-pass system .


A general all-pass system has the following form
M

ap

(z) A

k 1

z 1 d k
1 d k z 1

k 1

( z 1 e k* )( z 1 e k )
(1 e k z 1 )( 1 e k* z 1 )

Digital Signal Processing

A.S.Kayhan

20

Example: Consider pole/zero plot of a typical all-pass


system

Digital Signal Processing

A.S.Kayhan

Example: First order all-pass system with a real pole:


z=0.9 (z=-0.9)

Digital Signal Processing

A.S.Kayhan

21

Example: Second order all-pass system with poles:


z 0 .9 e

Digital Signal Processing

j / 4

A.S.Kayhan

Notice that group delay for causal all-pass systems are


positive (unwrapped/continuous phase is nonpositive).
All-pass systems may be used as phase compensators.
They are also useful in transforming lowpass filters into
other frequency-selective forms.

Digital Signal Processing

A.S.Kayhan

22

Block-Diagram Representation:
LTI systems with difference equation represetation
(rational system function) may be imlemented by
converting to an algorithm or structure that can be realized
in desired technology. These structures consists of basic
operations of addition, multiplication by a constant and
delay.In block diagram representation:

Digital Signal Processing

A.S.Kayhan

Example: Consider the second order system :


y [ n ] a 1 y [ n 1] a 2 y [ n 2 ] b o x [ n ]

with
H (z)

bo
1 a1 z a 2 z 2
1

Block diagram representation is

Digital Signal Processing

A.S.Kayhan

23

For a system with higher order difference equation


N

y[n ]

a k y[n k ] bk x[n k ]

k 1

k 0
M

with system function

H (z)

k 0
N

k 1

ak z k

k 1

Rewriting the equation


as
N
y[n ]

bk z k

a k y[ n k ] bk x[ n k ]
k0

a k y[n k ] v[ n ]

k 1
M

where

v[ n ]

bk x[n k ]

k 0

Digital Signal Processing

A.S.Kayhan

Digital Signal Processing

A.S.Kayhan

Direct Form I:

N+M
Delay
element

24

Previous diagram is implementation of

H (z) H 1(z)H 2(z)

1
N
k 1

or

V (z) H 1(z)X (z)

ak z k

k 0

Y ( z ) H 2 ( z )V ( z )

k 0

bk z k

bk z k X ( z )

1
N

ak z k

k 1

V ( z )

Digital Signal Processing

A.S.Kayhan

We can rearrange the system function

W (z) H 2(z)X (z)

Y ( z ) H 1 ( z )W ( z )

In the time domain

k 0

1
N

ak z k

k 1

X (z)

b k z k W ( z )

w[n ]

a k w [n k ] x[ n ]

bk w[n k ]

k 1
M

y[n ]

k0

Digital Signal Processing

A.S.Kayhan

25

M=N

Digital Signal Processing

A.S.Kayhan

Digital Signal Processing

A.S.Kayhan

Direct Form II:

Max(N,M)
Delay elements

26

Example:Consider the system with


1 2 z 1
H (z)
1 1 .5 z 1 0 .9 z 2

Digital Signal Processing

A.S.Kayhan

Flow Graph Representation:


Similar to the block diagram representation:

Digital Signal Processing

A.S.Kayhan

27

Example:Consider the system with

W1(z) W 4 (z) X (z)

W 2 (z) W1(z)

W 3(z) W 2(z) X (z)

W 4 ( z ) z 1W 3 ( z )

Y (z) W 2(z) W 4(z)

Digital Signal Processing

z 1
Y ( z )
1
1z

A.S.Kayhan

X ( z )

z 1
H ( z )
1
1z

Digital Signal Processing

A.S.Kayhan

28

Structures for IIR Systems:


Some considerations:
Computaional complexity(no. of multiplication, delay )
Finite precision, Ease of implementation, etc.

Direct Forms:
We have already seen direct forms.

Cascade Form:
We factor numerator and denominator polynomials of H(z)
M

H (z) A

(1 f k z 1 ) (1 g k z 1 )( 1 g k* z 1 )

(1 c k z 1 ) (1 d k z 1 )( 1 d k* z 1 )

k 1
N1
k 1

k 1
N2

k 1

Digital Signal Processing

A.S.Kayhan

We have cascade of first or second order subsystems


N

H (z)

H k (z)

k 1

k 1

bo
k 1

b ok b 1 k z 1 b 2 k z 2
1 a 1 k z 1 a 2 k z 2
~

1 b 1 k z 1 b 2 k z 2
1 a 1k z 1 a 2 k z 2

Digital Signal Processing

A.S.Kayhan

29

Example:Consider the system with


1 2 z 1 z 2
1 0 . 75 z 1 0 . 125 z 2
1 z 1 1 z 1

1 0 . 5 z 1 1 0 . 25 z 1

H (z)

Digital Signal Processing

A.S.Kayhan

Parallel Form:
H(z) may be written as sum of subsystems
N

H (z)

Ckz

k0

k 0
N

H (z)

Nc
Ak
B k (1 e k z 1 )

1 c k z k k 0 (1 d k z 1 )( 1 d k* z 1 )
N

k0

Ckz

k 0

e ok e 1 k z 1
1 a1 k z 1 a 2 k z 2

Digital Signal Processing

A.S.Kayhan

30

Digital Signal Processing

A.S.Kayhan

Example:Consider the system with

1 2 z 1 z 2
18
25
H (z)
8

1
2
1
1 0.75 z 0.125 z
1 0 .5 z
1 0.25 z 1

Digital Signal Processing

A.S.Kayhan

31

Transposed Forms :
Reverse the directions of all branches while keeping the
values as they were and reverse roles of input and output.
Transposed forms may be useful in finite precision
implementation.
Example:Consider the second order system with

Digital Signal Processing

A.S.Kayhan

Structures for FIR Systems:


Consider an FIR system with following input-output
M
relation
y[n ]

bk x[ n k ]

k0

Observe that the impulse response of this system is


b , 0 n M
h[ n ] n
0 , otherwise

Direct form (or tapped delay line or transversal filter) :

Digital Signal Processing

A.S.Kayhan

32

Transposed direct form structure:

Digital Signal Processing

A.S.Kayhan

Cascade form:
N

H (z)

k 1

H k (z)

( b ok b 1 k z 1 b 2 k z 2 )

k 1

Digital Signal Processing

A.S.Kayhan

33

Linear-Phase FIR Systems:


Finite impulse response (FIR) systems with linear-phase
have symmetry properties such as
h [ n ] h [ M n ], 0 n M

or
h [ n ] h [ M n ], 0 n M

For M even and odd.


Thus there are four types of linear phase FIR filters.

Digital Signal Processing

A.S.Kayhan

Example: Consider
1, 0 n 4
h[ n ]
0 , otherwise
sin( 5 / 2 )
H ( e j ) e j 2
sin( / 2 )

Digital Signal Processing

A.S.Kayhan

34

Example: Consider
h [ n ] [ n ] 2 [ n 1] [ n 2 ]

H (e

) 1 2e

j 1

j 1

j 1

j 1

2 e

e
j 1

j 2

2 [1 cos( )].

Digital Signal Processing

A.S.Kayhan

Assume M is even
M

y[n ]

h [ k ]x [ n k ]

k 0

M / 2 1

h[ k ] x[ n k ] h[ M / 2 ] x[ n M / 2 ]

k0
M

h[k ] x[n k ]

k M / 2 1

With, in the last term, k=M-l, l=0M/2-1


M / 2 1

y[n ]

h[ k ] x[ n k ] h[ M / 2 ] x[ n M / 2 ]

k 0
M / 2 1

h[ M l ] x[ n M l ]

l0

Digital Signal Processing

A.S.Kayhan

35

If

h[ n ] h[ M n ]
M / 2 1

y[n ]

h [ k ]( x [ n k ] x [ n M k ])

k 0

h[ M / 2 ]x[ n M / 2 ]

If

h[ n ] h[ M n ]
M / 2 1

y[n ]

h [ k ]( x [ n k ] x [ n M k ])

k 0

Digital Signal Processing

A.S.Kayhan

Finite-Precision Numerical Effects:


Input Quantization:
We have seen earlier that continuous-time signals are
sampled, quantized and coded first

Digital Signal Processing

A.S.Kayhan

36

Example:

Digital Signal Processing

A.S.Kayhan

In twos complement binary system leftmost bit is the sign


bit. If we have (B+1)-bit twos complement fraction of the
following form
a 0 a1a 2 a B

Value is

a 0 2 0 a1 2 1 a 2 2 2 a B 2 B

Example:

Binary Code

Numeric value

0 11

3/4

1 10

1/2

1 01

1/4

Digital Signal Processing

A.S.Kayhan

37

Quantizer step size is


With
where

2X m
2 B 1

x[ n ] X

x B [n ]

1 x B[n] 1

(two' s complement

Analysis of Quantization Errors:


We observe that the quantized samples are in general
different from the true values. The difference is the
quantization error
^
e [ n ] x [ n ] x [ n ].

and

/ 2 e[ n ] / 2
Digital Signal Processing

A.S.Kayhan

A simplified model of quantizer is

Assumptions about e[n]:


e[n] is stationary
e[n] is uncorrelated with x[n]
e[n] is white noise
e[n] is uniformly distributed
Digital Signal Processing

A.S.Kayhan

38

Example:
Sinusoidal
signal
3bit
quantizer
Error for
3bit

Error for
8bit
Digital Signal Processing

A.S.Kayhan

Mean value of e[n] is zero


/2

1
de 0

/2

Variance (or power) of e[n] is


/2

2
e

/2

1
2
de

12

For (B+1)-bit quantizer with full-scale value Xm

2
e

2 2 B X

2
m

12

Digital Signal Processing

A.S.Kayhan

39

Signal-to-Noise Ratio (SNR) is defined as the ratio of


signal variance (power) to noise variance. Expressed in dB
x2
12 2 2 B x2

SNR 10 log 10 2 10 log 10


X m2
e

6 . 02 B 10 . 8 20 log

10

m
x

If
B B 1,
x x / 2,

SNR SNR 6 dB
SNR SNR - 6dB

Digital Signal Processing

A.S.Kayhan

Coefficient Quantization in IIR Systems:


M

Consider

bk z k

H (z)

k 0
N

ak z k

k 1

If the coefficients are quantized,


we get
M
^

b k z k

H (z)

k 0
N

a k z k

k 1

where

b k bk bk , a

ak ak

Digital Signal Processing

A.S.Kayhan

40

Each pole or zero will be affected by all the errors in the


coefficient quantization.
If the poles (or zeros) are close to each other (clustered),
then quantization of coefficients may cause large shifts
of poles (or zeros).
Direct form structures are more sensitive to coefficient
quantization than the other forms (parallel, cascade,...)

Digital Signal Processing

A.S.Kayhan

Example: Consider a bandpass IIR elliptic filter of order 12


implemented in cascade form of 2nd order subsystems and
direct form.

Digital Signal Processing

A.S.Kayhan

41

Passband
cascade
unquantized

Passband
cascade
16-bit

Digital Signal Processing

A.S.Kayhan

Digital Signal Processing

A.S.Kayhan

Passband
parallel
16-bit

Direct form
16-bit

42

Poles of Quantized 2nd order subsystems :


Because of robustness, parallel and cascade forms are used
more than direct forms.
We can further improve the robustness, by improving
implementation of the 2nd order subsystems.
Consider the following implementation in direct form:

Digital Signal Processing

A.S.Kayhan

When coefficients are quantized, a finite number of pole


possitions possible.

7bits

4bits
Circles correspond to r2,
vertical lines to 2rcos
Digital Signal Processing

A.S.Kayhan

43

Consider the following coupled form

Digital Signal Processing

4bits

A.S.Kayhan

7bits

Digital Signal Processing

A.S.Kayhan

44

Coefficient Quantization in FIR Systems:


Consider FIR system with transfer function
M

H (z)

h[n ]z n

n0

If

h[ n ] h[ n ] h[n ]

then

H (z)

h[n ]z n H ( z ) H ( z )

n0

where
and

H (z)

h[n ]z n

n0
^

H (e

) H (e

) H (e

Digital Signal Processing

)
A.S.Kayhan

Example: Consider FIR filter of order 27

Digital Signal Processing

A.S.Kayhan

45

Digital Signal Processing

A.S.Kayhan

Effects of Round-off Noise:


Analysis of Direct Form IIR Structures:
Consider Nth-order difference equation for Direct Form I
N

y[n ]

k 1

a k y[ n k ] bk x[ n k ]
k0

Assume that all signal values and coefficients are


represented by (B+1)-bit fixed point binary numbers.
Therefore, each multiplication is followed by a quantizer,
then
^

y[n ]

k 1

M
^

Q a k y [ n k ] Q b k x [ n k ]

k 0

Digital Signal Processing

A.S.Kayhan

46

Digital Signal Processing

A.S.Kayhan

An alternative representation is as following

Digital Signal Processing

A.S.Kayhan

47

Rounding or truncation of a product bx[n] is represented by


a noise source of the form
e [ n ] Q bx [ n ] bx [ n ]

Assumptions about e[n]s:


Each e[n] is stationary
Each e[n] is uncorrelated with x[n] and other e[n]s
Each e[n] is uniformly distributed
For (B+1)-bit rounding
2 B / 2 e[ n ] 2 B / 2

Digital Signal Processing

A.S.Kayhan

For (B+1)-bit truncation


2 B e[ n ] 0

Mean and variance for rounding are

e 0

2 2 B

12

2
e

Mean and variance for truncation are


e

2B
2

2
e

2 2 B
12

Digital Signal Processing

A.S.Kayhan

48

Now, lets try to determine effect of quantization noise on


the output of the system. We can redraw the system as

e[ n ] e 0 [ n ] e1[ n ] e 2 [ n ] e 3 [ n ] e 4 [ n ]
Digital Signal Processing

A.S.Kayhan

Since all the noise sources are


2
e

2
e0

2
e1

2
e2

2
e3

2
e4

5
For the general Direct Form I case
2 2 B
2
e M 1 N
12
Now, we observe that

2
e0

2 2 B
5
12

f [n ]

a k f [ n k ] e[ n ]

k 1

For rounding mean of the output noise is zero.


The variance for rounding or truncation is

2
f

2 2 B
M 1 N
12

h ef [ n ] is impulse response for

h ef [ n ]

ef

(z) 1 / A(z)

Digital Signal Processing

A.S.Kayhan

49

Example: Consider the following system


H (z)

b
1 az

a 1.

h ef [ n ] a n u [ n ]

Then the noise variance(power) at


the output is

2
f

2 2 B
2
12

2n

2 2 B
2
12

1 a

Digital Signal Processing

A.S.Kayhan

Analysis of Direct Form FIR systems:


Consider

y[n ]

h[ k ]x[ n k ]

k 0

f [ n ] e[ n ]

k 0

e k [ n ],

2
f

2 2 B
M 1
12

Digital Signal Processing

A.S.Kayhan

50

End of Part 2

Digital Signal Processing

A.S.Kayhan

51

You might also like