Vous êtes sur la page 1sur 23

EENG 5610: Digital Signal Processing

Class 9: Implementation of Discrete-Time Systems


Dr. Xinrong Li
Department of Electrical Engineering
University of North Texas

Outline
Structures for the Realization of Discrete-Time Systems
Structures for FIR Systems
Structures for IIR Systems
Representation of Numbers
Quantization of Filter Coefficients
Round-Off Effects in Digital Filters

Dr. Xinrong Li

EENG 5610, UNT

Structures for the Realization of


Discrete-Time Systems
Linear time-invariant discrete-time systems characterized

by the linear constant-coefficient difference equation:


N

k 1

k 0

y (n) ak y ( n k ) bk x(n k ),

H ( z)

k 1

bk z

k 0

1 ak z k

The focus of this class is on the various methods of

implementing such a system in hardware or software.


The system function can be rearranged in different forms to

derive different structures for realizing the system.


Major design considerations:
Computational complexity
-Refers to number of arithmetic operations required to compute y(n) of the system
- Number of types memory is fetched, number comparisons.

Dr. Xinrong Li

EENG 5610, UNT

Memory requirements
- Number of memory location required to store system parameters, past inputs, past
outputs and any intermediate values

Finite-word-length effects in computation


- Quantization effect
- Different structures which are equivalent for infinite implementation, exhibit
different behavior for finite-precision arithmetic

Other factors: suitability for parallel or pipeline processing.


- Implement for realization/implementation of more complex digital signal
processing

Dr. Xinrong Li

EENG 5610, UNT

Structures for FIR Systems


FIR Systems
Difference equation: y ( n)

M 1

b x(n k )
k 0

System function: H ( z )

M 1

b z
k 0

bn ,
0,

Unit sample response: h(n)

0 n M 1
otherwise

Different structures for implementing FIR systems:


Direct-form realization
Cascade-form realization
Frequency-sampling realization

Dr. Xinrong Li

EENG 5610, UNT

Direct-form Structure
Direct-form structure is directly derived from the non-recursive

difference equation or by the convolution summation:


M 1

M 1

k 0

k 0

y (n) bk x(n k ) h(k ) x(n k )

Such a structure requires M 1 memory locations for storing the previous

inputs, and M multiplications and M 1 additions per output point.


Such a realization is often called a transversal or tapped-delay-line filter.

Dr. Xinrong Li

EENG 5610, UNT

When the FIR system has linear phase, the unit sample response has

either symmetry or asymmetry property: h(n) = h(M 1 n).


Then, such a system can be implemented with M/2 multiplication for M
even and with (M 1)/2 multiplications for M odd.

Dr. Xinrong Li

EENG 5610, UNT

Cascade-Form Structure
The cascade realization follows naturally from the system function

by factoring H(z) into second-order FIR systems:


M 1

H ( z ) bk z
k 0

H k ( z ),

H k ( z ) bk 0 bk 1 z 1 bk 2 z 2

k 1

K is the integer part of (M + 1)/2.


The filter parameter b0 may be

equally distributed among K filter


sections or it may be assigned to a
single filter section.
The zeros of H(z) are grouped in
pairs to produce the second-order
FIR system. It is always desirable
to form pairs of complex
conjugate roots so that the
coefficients {bki} are real valued.
Real-valued roots can be paired in
any arbitrary manner.
EENG 5610, UNT

Cascade-Form Structure
For Linear-phase

FIR filters, the symmetry in h(n) implies that


if zk and zk* are a pair of complex-conjugate zeros, then 1/zk
and 1/zk* are also a pair of complex-conjugate zeros.
Thus, we may combine two 2nd-order section into a 4th-order section:

H k ( z ) ck 0 (1 z k z 1 )(1 z k* z 1 )(1 z 1 / z k )(1 z 1 / z k* )

ck 0 ck 1 z 1 ck 2 z 2 ck1 z 3 ck 0 z 4
By such a method, the number of multiplication can be
reduced from six to three (a factor of 50%).

EENG 5610, UNT

Frequency-Sampling Structures
Filter can be characterized by the frequency response H(w), instead

of the unit sample response h(n):


M 1

H ( w) h(n)e jwn ,
n0

0 k ( M 1) / 2 for M odd
2

sample at wk
(k ), 0 k M / 2 1 for M even
M
0 or 1/2

2
M 1
H (k ) H
(k ) h(n)e j 2 ( k ) n / M , 0 k M 1 if 0, H (k ) DFT{h(n)}
M
n 0
1
h( n)
M

M 1

H ( k )e

j 2 ( k ) n / M

k 0

M 1

H ( z ) h( n) z

n 0

1 z M e j 2

M
1 z M e j 2
H1 ( z )
M

1

n 0 M
M 1

M 1

H ( k )e
k 0

1
H (k )
k 0
M
M 1

M 1

n 0

(e j 2 ( k ) n / M z 1 ) n

H (k )
H1 ( z ) H 2 ( z )

j 2 ( k ) / M 1
1

e
z
k 0

[all - zero comb filter],

H (k )
H 2 ( z)
j 2 ( k ) / M 1
z
k 0 1 e
Dr. Xinrong Li

j 2 ( k ) n / M

M 1

a parallel bank of single pole filters

M 1

10

, 0 n M 1 if 0, h(n) IDFT{H (k )}

j 2 ( k ) / M
with resonant frequencies pk e

EENG 5610, UNT

When the desired frequency response of the FIR filter is narrowband, most of

the gain parameters H(k + ) are zero.


Thus, the corresponding resonant filters can be
eliminated, resulting in fewer computations
(multiplications and additions) than the
direct-form realization, and thus a more
efficient realization.

11

Dr. Xinrong Li

EENG 5610, UNT

Structures for IIR Systems


IIR Systems
N

k 1

k 0

y (n) ak y ( n k ) bk x(n k ),

H ( z)

k 1

bk z

k 0

1 ak z k

Structures for the realization of IIR systems


Direct-form structures
Cascade-form structures
Parallel-form structures

12

Dr. Xinrong Li

EENG 5610, UNT

Direct-Form Structures
Direct Form I Structure:
M
H ( z ) H1 ( z ) H 2 ( z ), H1 ( z ) bk z k ,

H 2 ( z ) 1 1 ak z k
k 0
k 1

This structure requires M + N + 1 multiplications, M + N additions, and


M + N + 1 memory locations.

13

Dr. Xinrong Li

EENG 5610, UNT

Direct Form II Structure:


This structure is derived by simply

placing the all-pole filter H2(z)


before the all-zero filter H1(z) and
merging the delay lines.
This structure requires M + N + 1
multiplications, M + 1 additions,
and max{M, N} memory locations.
Both of the direct form I and II are

extremely sensitive to parameter


quantization. Thus, they are not
used in practice.

14

Dr. Xinrong Li

EENG 5610, UNT

Signal Flow Graphs and Transpose Structures


A signal flow graph provides an alternative, but equivalent graphical
representation to a block diagram structure.
The basic elements
of a signal flow graph
are branches and nodes.
A node can be either
summing node or
branching node.
Branch gain (or branch
transmittance) are indicated
on the graph. If branch
transmittance is 1, its
not shown.
A delay is indicated by the
branch transmittance z-1.

15

Dr. Xinrong Li

EENG 5610, UNT

Transposition (or Flow-Graph Reversal) Theorem


If we reverse the directions of all branch transmittances and interchange the

input and the output in the flow graph, the system function remains
unchanged. The resulting structure is called a transposed structure/form.

16

Dr. Xinrong Li

EENG 5610, UNT

Transposed Direct Form II Structure

y ( n) w1 (n 1) b0 x( n)

wk ( n) wk 1 (n 1) ak y (n) bk x( n),
w ( n ) b x ( n) a y ( n)
N
N
N

17

1 k N 1

k 1

k 0

y (n) ak y (n k ) bk x( n k )

EENG 5610, UNT

Transposed FIR Structure


Transposed FIR structure can be derived from the transposed direct form II

IIR structure by setting the ak = 0, 1 k N.


wM ( n) bM x (n)

wk (n) wk 1 (n 1) bk x( n),
y ( n) w (n 1) b x( n)
1
0

18

Dr. Xinrong Li

k M 1, M 2, ..., 1

EENG 5610, UNT

Cascade-Form Structure
The system function of a high-order IIR system can be factored into

a cascade of second-order subsystems:


N

y (n) ak y (n k ) bk x(n k ),
k 1

k 0

bk 0 bk 1 z 1 bk 2 z 2
H k ( z)
,
1
2
1 ak 1 z a k 2 z

19

H ( z)

b z
k 0

1 ak z H k ( z ),
k 1
k 1

N 1
2

EENG 5610, UNT

Cascade-Form Structure
The coefficients {aki} and {bki} are real, which implies that in the

2nd-order subsystem, the numerator (and denominator) may consist


of either a pair of real roots or a pair of complex-conjugate roots.
If N > M, some of the 2nd-order subsystem have numerator
coefficients that are zero. Also, if N is odd, one of the subsystem
must have ak2 = 0, so that the subsystem is of first order.
Each of the 2nd-order subsystem may be realized in either direct form
I, or direct form II, or transposed direct form II, and there are many
ways to pair the poles and zeros.
Although all cascade realizations are equivalent for infiniteprecision arithmetic, the various realizations may differ significantly
when implemented with finite-precision arithmetic.

20

EENG 5610, UNT

Parallel-Form Structure
A parallel-form realization of IIR system can be obtained by
performing a partial-fraction expansion of the system function H(z):

H ( z)

b z
k 0

Ak
,
1 ak z C
1
k 1
k 1 1 pk z

where {pk} are the poles, {Ak} are the residues, and C = bN/aN.

21

Dr. Xinrong Li

EENG 5610, UNT

Structure of Second-Order Section

To avoid multiplications of complex numbers, we can


combine pairs of complex-conjugate poles, and arbitrarily
pair real-valued poles to form a bank of two-pole
subsystems:
K

H ( z ) C H k ( z ),
k 1

22

Dr. Xinrong Li

K ( N 1) / 2 ;

bk 0 bk 1 z 1
H k ( z)
1 ak 1 z 1 ak 2 z 2

EENG 5610, UNT

Example 9.3.1

10(1 12 z 1 )(1 23 z 1 )(1 2 z 1 )


H ( z)
(1 34 z 1 )(1 18 z 1 )[1 ( 12 j 12 ) z 1 )][1 ( 12 j 12 ) z 1 )]

1 23 z 1
1 32 z 1 z 2
H ( z ) 10 7 1 3 2
1 8 z 32 z 1 z 1 12 z 2

H ( z)

2.93
17.68 12.25 j14.57 12.25 j14.57

1 34 z 1 1 18 z 1 1 ( 12 j 12 ) z 1 1 ( 12 j 12 ) z 1

14.75 12.90 z 1 24.50 26.82 z 1

1 78 z 1 323 z 2
1 z 1 12 z 2
23

Dr. Xinrong Li

EENG 5610, UNT

Vous aimerez peut-être aussi