Está en la página 1de 6

# Dierence Equations and Implementation

## Dierence Equations and Implementation

Professor Deepa Kundur
University of Toronto

Reference: Section 2.4 and 2.5 of John G. Proakis and Dimitris G. Manolakis, Digital Signal Processing: Principles, Algorithms, and Applications, 4th edition, 2007.

1 / 23

2 / 23

## Finite vs. Innite Impulse Response

For causal LTI systems, h(n) = 0 for n < 0. Finite impulse response (FIR):
M 1

## Finite vs. Innite Impulse Response

Implementation: Two classes Finite impulse response (FIR):

y (n) =
k =0

h(k )x (n k ) y (n) =

M 1

h(k )x (n k )
k =0

nonrecursive systems

## Innite impulse response (IIR): h(k )x (n k )

y (n) =
k =0

y (n ) =
k =0

h(k )x (n k )

recursive systems

## How would one realize these systems?

Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 3 / 23 Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 4 / 23

## 2.4 Dierence Equations

System Realization
There is a practical and computationally ecient means of implementing all FIR and a family of IIR systems that makes use of ... . . . dierence equations.
All systems All LTI systems

System Realization
There is a practical and computationally ecient means of implementing all FIR and a family of IIR systems that makes use of ... . . . dierence equations.
All systems All LTI systems

5 / 23

6 / 23

## 2.4 Dierence Equations

System Realization
There is a practical and computationally ecient means of implementing all FIR and a family of IIR systems that makes use of ... . . . dierence equations.
All systems All LTI systems

System Realization
General expression for N th-order LCCDE:
N M

ak y (nk ) =
k =0 k =0

bk x (nk )

a0

## Initial conditions: y (1), y (2), y (3), . . . , y (N ).

Systems Described by LCCDEs

## Need: (1) constant scale, (2) addition, (3) delay elements.

All LTI FIR systems All LTI IIR systems

7 / 23

8 / 23

Unit delay:

## Finite Impulse Response Systems and Nonrecursive Implementation

Constant multiplier: Unit advance: Signal multiplier:

9 / 23

10 / 23

## FIR System Realization: Example

Consider a 5-point local averager: 1 y (n) = x (k ) n = 0, 1, 2, . . . 5 k =n 4 The impulse response is given by: 1 h (n ) = (k ) 5 k =n4 = 1 1 1 (n 4) + (n 3) + (n 2) + 5 5 5 1 1 (n 1) + (n) 5 5
11 / 23

## FIR System Realization: Example

Consider a 5-point local averager: 1 y (n) = x (k ) n = 0, 1, 2, . . . 5 k =n 4
n

h[n]
1/5
0 1 2 3 4

n
Indeed FIR!

12 / 23

## FIR System Realization: Example

Consider a 5-point local averager: 1 y (n) = x (k ) n = 0, 1, 2, . . . 5 k =n 4
n

## FIR System Realization: Example

y (n) = 1 5
n n

x (k ) =
k =n4 k =n4

1 x (k ) 5

y (n) =

1 1 1 x (n 4) + x (n 3) + x (n 2) + 5 5 5 1 1 x (n 1) + x (n) 5 5

Memory requirements stay constant; only need to store 5 values (4 last + present). xed number of adders required
1/5
+
Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 13 / 23

1/5
+

1/5

1/5
+ +

1/5

14 / 23

M 1

y (n) =
k =0

bk x (n k )
+

...
+ + +

+ +

...

15 / 23

## Requires: M multiplications M 1 additions M 1 memory elements

Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation

16 / 23

## IIR System Realization: Example

Consider an accumulator:
n

## IIR System Realization: Example

Consider an accumulator:
n

y (n ) =
k =0

x (k ) n = 0, 1, 2, . . .

for y (1) = 0.

y (n ) =
k =0

x (k ) n = 0, 1, 2, . . .

for y (1) = 0.

n

## IIR memory requirements seem to grow with increasing n!

h (n ) =
k =0

(k ) = (n) + (n 1) + (n 2) + 1 n0 0 n<0

h[n]
1
0 1 2 3 4

... n
17 / 23 Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 18 / 23

N M

y (n) = x (k )
k =1

ak y (n k ) +
k =0

bk x (n k )

y (n) =
k =0 n1

M

=
k =0

bk x (n k )
k =0 N

nonrecursive

=
k =1

input 2

19 / 23

20 / 23

+

+ +

v(n)

...

...

...

...

...

...

...

## Requires: M + N + 1 multiplications, M + N additions, M + N memory locations

Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 21 / 23

## Requires: M + N + 1 multiplications, M + N additions, M + N memory locations

Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 22 / 23

+
+ + +

Unit delay:
+

## Unit delay: Constant multiplier: Unit advance: Signal multiplier:

Constant multiplier: +
+

+

...

Signal multiplier:

...

For N>M

## Requires: M + N + 1 multiplications, M + N additions, max(M , N ) memory locations

Professor Deepa Kundur (University of Toronto) Dierence Equations and Implementation 23 / 23

...

...

...
+