Sie sind auf Seite 1von 13

Structures for Implementation of

DT Systems
Signals, Spectra, and
Signal Processing Consider the system described by
the LCCDE
N M
y (n) ak y (n k ) bk x( n k )
Implementation of DT Systems k 1 k 0

And its system function given by


the z-transform
M

b z k
k

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

Structures for Implementation of


DT Systems Addressing the Need for Structures
Time-domain Frequency-domain
Factors that affect implementation
DESIGN

response characteristics
Computational complexity
LCCDE
Memory requirements
Finite-wordlength effects
IMPLEMENTATION
(REALIZATION)

Algorithm Block diagram


-Computational -Delays
procedure -Adders
-Multipliers

SOFTWARE HARDWARE

1
Addressing the Need for Structures Addressing the Need for Structures

Computational Complexity Memory Requirements


Refers to the number of times a certain Refers to the amount of memory
operation is done to compute for the required to store system parameters,
output value. past input and/or output samples, and
The more times an operation is done, intermediate results.
the longer it takes for the result to
come out.
In real-time applications, speed is of
the essence.
Practical limitations on computational
speed include processor speed, and
memory read/write speed.

Addressing the Need for Structures Structures for FIR Systems

Finite-wordlength Effects Recall the form of the LCCDE for an FIR system
M 1
Refers to the quantization effects in y (n) bk x( n k )
any digital system. k 0

System values must be capable of with the system function as


being represented with finite precision. M 1
H ( z ) bk z k
Truncation or rounding-off introduces k 0
errors in the calculations. Furthermore, the impulse response of the system
The choice of structure for h(n) is identical to the coefficients bk, such that
implementation must not be that
sensitive to finite-wordlength effects. b , 0 n M 1
h(n) n
0, otherwise

2
Structures for FIR Systems Structures for FIR Systems
Direct-Form Structure Direct-Form Structure
The direct form realization comes from the When the FIR system has a linear phase, the
convolution summation unit sample response of the system satisfies
M 1 either the symmetry or asymmetry condition
y (n) h(k ) x (n k )
k 0 hn hM 1 n
x(n) z-1 z-1 z-1 z-1

h(0) h(1) h(2) h(M2) h(M1)

+ + + + y(n)

Direct-Form Realization (Tapped delay line)

Structures for FIR Systems Structures for FIR Systems


Direct-Form Structure Cascade Structure
Taking the product form of the system
z-1 z-1 z-1 z-1
x(n) function, we can group the terms in pairs to
form second-order FIR sections.
M 1
M 1
+ + + + 2
H ( z ) (1 bk z )
k 0
1
(1 b
k 0
k0 z 1 )(1 bk1 z 1 )

K
(1 bk1 z 1 bk2 z 2 )
z-1 z-1 z-1 z-1
M 2 M 1
h(0) h(1) h(2) h
h
k 0
2 2
M 1
y(n) + + + + where: K (integer part)
2

Direct-Form Realization of a Linear-phase FIR system

3
Structures for FIR Systems Structures for FIR Systems
The product terms are grouped such that x(n)
x1(n)
H1(z)
x2(n)
H2(z)
x3(n) xK(n)
HK(z) y(n)
complex-conjugate zeros form the second- y1(n) y2(n) yK-1(n) yK(n)

order sections.
This is done so as to produce real-valued Cascaded second-order FIR sections
coefficients for the terms in the second-order
sections.
Real-valued zeros can be grouped arbitrarily. xk(n) z-1 z-1

Let H k ( z ) 1 bk1 z 1 bk2 z 2 (second-order sections) 1 bk1 bk2

K
+ +
H ( z) H k ( z)
yk(n)=xk+1(n)
Therefore
k 0 Each second-order section

Structures for FIR Systems Structures for FIR Systems


Frequency-Sampling Structure The frequency response is therefore
Originally, structures are based on the LCCDE, M 1

which is a method to obtain the time-domain H ( ) h( n)e jn


impulse response h(n). n 0

Alternatively, one can design a filter from the If H (k ) H 2M k (DFT (frequency sampling))
desired frequency response.
To derive a frequency-sampling structure, we Then H (k ) H 2M (k )
specify the desired frequency response at a set
of equally-spaced frequencies: M 1
j 2M ( k ) n
k 0, 1, 2, , M 1 H ( k ) h( n)e k 0, 1, , M 1
2 2 M is odd
k (k ) n 0

M k 0, 1, 2, , M
2 1 M is even

0 or 1
2

4
Structures for FIR Systems Structures for FIR Systems
Applying the IDFT we have Interchanging the summations we have

e
M 1
1 M 1
j 2M ( k ) 1 n
H ( z ) H (k )
M 1
1 j 2M ( k ) n
h ( n)
M
H ( k )e
k 0
n 0, 1, , M 1 k 0 M n0
z

and applying the summation over n
We substitute this into the definition of the
z-transform of the impulse response M 1 1 1 e j 2 z M
H ( z ) H (k )
M 1
H ( z ) h ( n) z n k 0 M 1 e M
j 2 ( k ) 1
z


n 0
M 1
1 M 1
j 2M ( k ) n n 1 e j 2 z M M 1
H (k )
H ( k )e 1 e
n 0 M k 0
z

H ( z)
M k 0
j 2
M
( k ) 1
z

H()
Structures for FIR Systems + +

Frequency-sampling z-1
We view this structure as a cascade of two realization of an FIR filter e j2/M
systems
H(1+)
H ( z ) H1 ( z ) H 2 ( z ) + +

1 e j 2 z M
1/
An all-zero filter with zeros equally M z-1
H1 ( z ) spaced along the unit circle at x(n) + e j2(1+)/M
M z k e j 2 k / M k 0,1, , M 1
z-1


e j2
M 1
H (k ) A parallel bank of single pole filters
H 2 ( z)

with poles located at
j 2M ( k ) 1 = 0 or H(M1+)
k 0 1 e z pk e j 2 k / M k 0,1, , M 1 + + y(n)

The gains of the filter banks are the z-1


complex valued components of H(k+). e j2(M1+)/M

5
Structures for FIR Systems Structures for FIR Systems
Exploiting the symmetry property where Where, by definition

H (k ) H * ( M k ) A(k ) H (k ) H ( M k )
We can group complex-conjugate poles into B(k ) H (k )e j 2k / M H ( M k )e j 2k / M
second-order sections to give us real-valued
coefficients
M 1
H (0) A(k ) B(k ) z 1

2

H 2 ( z) M is odd
1 z 1 k 1 1 2 cos2k / M z 1 z 2

H (0) H ( M / 2) 2 1 A(k ) B(k ) z 1


M

H 2 ( z) M is even
k 1 1 2 cos2k / M z
1 1 1
1 z 1 z z 2

Structures for FIR Systems Structures for FIR Systems


Lattice Structure x(n) z-1 z-1 z-1 z-1

Consider the filter with the system function as 1 m(1) m(2) m(m1) m(m)

m + + + + y(n)
H m ( z ) 1 m (k ) z k m 1
k 1 Direct-form Implementation
where m is the order of the polynomial. If
the input to this filter is x(n), the output is x(n) z-1 z-1 z-1 z-1
therefore m(1) m(2) m(m1) m(m)
m
y ( n) x ( n ) m ( k ) x ( n k ) + + + +
k 1 + y(n)
m
y (n) m (k ) x(n k ) x(n)
k 1

Alternative direct-form Implementation

6
Structures for FIR Systems Structures for FIR Systems
Suppose m = 1. and K1 = 1(1). The output of Suppose m = 1. and K1 = 1(1). The output of
this filter is this filter is
y (n) x(n) K1 x(n 1) y (n) x(n) K1 x(n 1)

g0(n) g0(n1)
x(n) z-1 x(n) z-1 + g1(n)
K1 K1
K1

+ y(n) f0(n)
+ y(n) = f1(n)

A lattice stage

f1 (n) x(n) K1 x(n 1)


g1 (n) K1 x(n) x(n 1)

Structures for FIR Systems Structures for FIR Systems


For a second order filter where m = 2, the Therefore
output of this filter is 2 (1) K1 (1 K 2 ) and 2 (2) K 2
y (n) x( n) 2 (1) x(n 1) 2 (2) x(n 2)
or equivalently
g0(n) g0(n1) g1(n) 2 (1)
K1
g1(n1) g2(n)
x(n) z-1 + z-1 + K 2 2 (2) and
1 2 (1)
K1 K2
K1 K2 Km are called the reflection coefficients
(see Schr-Cohn Stability Test)
f0(n)
+ f1(n) + f2(n) = y(n)
If we consider the other output of the filter
f 2 (n) f1 (n) K 2 g1 ( n 1) g2(n), we have
x(n) K1 x(n 1) K 2 K1 x(n 1) x( n 2) g 2 (n) K 2 f1 ( n) g1 (n 1)
x(n) K1 1 K 2 x(n 1) K 2 x(n 2) K 2 x(n) K1 x(n 1) K1 x(n 1) x(n 2)
K 2 x( n) K1 K 2 1x(n 1) x(n 2)

7
Structures for FIR Systems Structures for FIR Systems
Comparing the two Taking the z-transform of fm(n) we have
f 2 (n) x(n) K1 (1 K 2 )x(n 1) K 2 x( n 2) m
m
Fm ( z ) m ( k ) X ( z ) z k m (k ) z k X ( z )
g 2 (n) K 2 x(n) K1 ( K 2 1)x(n 1) x( n 2) k 0 k 0
Fm ( z ) Am ( z ) X ( z )
We see that g2(n) has the same coefficients
Solving for Am(z)
as f2(n) but in reverse order. Therefore g2(n)
Fm ( z ) Fm ( z )
is the reverse polynomial of f2(n). Am ( z )
X ( z ) F0 ( z )
In general
m The z-transform of gm(n) is therefore
f m ( n) m ( k ) x ( n k ) m (0) 1 m k
m
k 0 Gm ( z ) m (k ) X ( z ) z k m (k ) z X ( z )
m k 0 k 0
g m ( n) m ( k ) x ( n k ) m (k ) m (m k )
k 0 Gm ( z ) Bm ( z ) X ( z )

Structures for FIR Systems Structures for FIR Systems


m m Returning to our lattice filter equations
Bm ( z ) m (k ) z k but m (k ) m (m k )
k 0 k 0
f 2 (n) f1 (n) K 2 g1 ( n 1)
m g 2 (n) K 2 f1 ( n) g1 (n 1)
Bm ( z ) m (m k ) z k
Let l = m k
k 0
Generalizing
m
m (l ) z l m
f m (n) f m1 (n) K m g m 1 (n 1)
l 0
m g m (n) K m f m 1 ( n) g m 1 (n 1)
z m m (l ) z l
l 0
m
Fm ( z ) Fm 1 ( z ) K mGm 1 z 1
z m
A
l 0
m z 1
Gm ( z ) K m Fm 1 ( z ) Gm1 z 1

m
Gm ( z )
Therefore Bm ( z ) z m Am z 1
l 0 X ( z)

8
Structures for FIR Systems Structures for FIR Systems
Dividing the equations by X(z) we get
Am ( z ) Am1 ( z ) K m Bm 1 z 1 Examples:
Bm ( z ) K m Am 1 ( z ) Bm 1 z 1 1. Design a 3-stage lattice filter given
the LCCDE
Thus the lattice stage is described in the
z-domain by the matrix equation y (n) x(n) 13
24
x(n 1) 58 x(n 2) 13 x(n 3)

Am ( z ) 1 K m Am 1 ( z )
Bm ( z ) K m 1 Bm 1 ( z ) z 1 2. Determine the system function of the
3-stage lattice filter with the reflection
coefficients given as
1 1 1
K1 , K2 , K3
4 2 3

Structures for IIR Systems Structures for IIR Systems


Direct-Form Structure x(n)
b0
+ + y(n)
The system function H(z) can be viewed as a
cascade of two systems. z-1 z-1
b1 -a1
H ( z ) H1 ( z ) H 2 ( z ) + +

Where H1(z) is an FIR system given by z-1 z-1


b2 a2
M + +
H1 ( z ) bk z k
k 0 z-1 z-1

and H2(z) is an IIR system given by bM -aN


+ +
1
H 2 ( z) N H1(z) H2(z)
1 ak z k Direct-form I Structure
k 0

9
Structures for IIR Systems Structures for IIR Systems
b0 b0
x(n) + + y(n) x(n) + + y(n)

z-1 z-1 z-1


-a1 b1 -a1 b1
+ + + +

z-1 z-1 z-1


a2 b2 -a2 b2
+ + + +

z-1 z-1 z-1


-aN bM -aN bM
+ + + +

H2(z) H1(z) H2(z) H1(z)

Direct-form II Structure Direct-form II Structure

Structures for IIR Systems Structures for IIR Systems


Transposed Direct-Form Structure Transposed Direct-Form Structure
Consider the second-order system below. Consider the second-order system below.
We take the signal flow diagram to be We take the signal flow diagram to be

b0 b0
x(n) + + y(n) x(n) y(n)

z-1 z-1

-a1 b1 -a1 b1
+ +

z-1 z-1
-a2 b2 -a2 b2

10
Structures for IIR Systems Structures for IIR Systems
If we reverse the directions of the signal flow, If we reverse the directions of the signal flow,
we get our transposed structure. we get our transposed structure.

b0 b0
y(n) x(n) y(n) + x(n)

z-1 z-1
-a1 b1 -a1 b1
+

z-1 z-1
-a2 b2 -a2 b2
+

Structures for IIR Systems Structures for IIR Systems


b0
If we reverse the directions of the signal flow, x(n) + y(n)

we get our transposed structure. Without loss of generality, this


z-1
b1 -a1
structure is equivalent to the
+ difference equation
N M
y (n) ak y (n k ) bk x(n k )
b0 z-1
x(n) + y(n)
b2 -a2 k 1 k 0
+
z-1
z-1
and contains the same number
b1 -a1
+ of additions, multiplications, and
bM
+
-aN
memory locations as the original
z-1 direct-form II structure.
b2 -a2
+ Transposed Direct-form Structure

11
Structures for IIR Systems Structures for IIR Systems
Cascade-Form Structure Complex-conjugate poles and zeros are
Taking the product form of the system grouped together to form the second-order
function, we can group the terms in the subsections.
numerator and denominator in pairs to form In the case of N > M, some of the subsystems
second-order IIR subsytems. will have numerator coefficients of zero (bk1 = 0,
or bk2 = 0, or both).
K Furthermore, if M is odd, Hk(z) must be a first
H ( z) H k ( z) where: K
N 1
(integer part) order system (ak2 = 0) to preserve modularity of
k 0 2
the cascade structure.
Where Hk(z) has the general form

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

Structures for IIR Systems Structures for IIR Systems


Each subsystem in the cascade structure can Parallel-Form Structure
be implemented either by direct-form I, direct- The parallel form realization of an IIR system
form II, or transposed direct-form II. can be obtained by performing partial-fraction
expansion on the system function.
We assume that N M and that all poles are
x(n)
x1(n)
H1(z)
x2(n)
H2(z)
x3(n) xK(n)
HK(z) y(n)
distinct.
y1(n) y2(n) yK-1(n) yK(n)
N
Ak
H ( z) C 1
k 1 1 pk z
Cascaded second-order IIR sections

where: pk - system poles


Ak coefficients of the expansion
C bN a N

12
Structures for IIR Systems Structures for IIR Systems
Real-valued poles can be paired arbitrarily to
y1(n)
H1(z)
form two-pole subsystems with the form
y2(n)
H2(z)
x(n) + y(n) bk 0 bk 1 z 1
H k ( z)


1 ak 1 z 1 ak 2 z 2
yK(n)
HK(z)
If N is odd, one of the subsystems in parallel
Parallel structure of an IIR system will be a first order.

Some of the poles of H(z) can be complex- Example: Determine the cascade and parallel
valued, in which case it produces complex form of the system function:
coefficients in the expansion.
To avoid multiplication with complex numbers, 10(1 12 z 1 )(1 23 z 1 )(1 2 z 1 )
we pair complex-conjugate poles to form two-
H ( z) j j 4
pole subsystems. (1 34 z 1 )(1 18 z 1 )(1 1
2
e 4 z 1 )(1 1
2
e z 1 )

Summary

Although cascade realizations are


equivalent for infinite-precision
arithmetic, the various realizations
may differ significantly when
implemented in finite-precision
arithmetic.

13

Das könnte Ihnen auch gefallen