0% found this document useful (0 votes)
814 views8 pages

Difference Equations For FIR and IIR Filters: Objectives

This document discusses difference equations for FIR and IIR filters. FIR filters have a finite impulse response, meaning the output depends only on past inputs. IIR filters have an infinite impulse response, so the output depends on both past inputs and past outputs through recursive equations. The key differences between FIR and IIR filters are explained through examples of their difference equations and impulse responses.

Uploaded by

Aldon Jimenez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
814 views8 pages

Difference Equations For FIR and IIR Filters: Objectives

This document discusses difference equations for FIR and IIR filters. FIR filters have a finite impulse response, meaning the output depends only on past inputs. IIR filters have an infinite impulse response, so the output depends on both past inputs and past outputs through recursive equations. The key differences between FIR and IIR filters are explained through examples of their difference equations and impulse responses.

Uploaded by

Aldon Jimenez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

DIGITAL SIGNAL PROCESSING

CHAPTER 3
Difference Equations for
FIR and IIR Filters

Objectives
After completing this chapter, you will be able to:
▪ Learn more about IIR and FIR digital signal.
▪ Know how difference equations are affected the
signal
▪ Differentiate the equation used for IIR and FIR

INTRODUCTION

DSP (Digital Signal Processing) rose to significance in the 70’s and has been
increasingly important ever since. The first enabling breakthrough was the discovery of
the Fast Fourier Transform in the last 1960’s (enabling calculation of spectra on digital
signals) and then the rise of the transistor and the CPU in the 1970’s and 1980’s. Its rapid
rise to significance culminated in the advent of Digital Television/Media and Mobile
Communications toward the end of the 20th century.

The study of DSP now lies somewhere between Electronic Engineering (where it
started) and Statistics, Mathematics, Computer Science and even Statistical Physics. The
computer and computing science is to DSP engineers what the hammer and nail is to a
carpenter.

In the early part of the 1990’s DSP chips for implementation of DSP algorithms
were extremely popular: enabling faster computation times than general purpose CPUs
like the Intel 808x series or Motorola, SUN or Alpha chips. But as clock speeds have
increased and reconfigurable hardware has developed, the lines between DSP chips,
CPUs and IC chips have blurred.

16
DIGITAL SIGNAL PROCESSING

DIFFERENCE EQUATION

One of the most important concepts of DSP (Digital Signal Processing) is to be


able to properly represent the input/output relationship to a given LTI (Linear Time
Invariant Systems)

A linear constant-coefficient difference equation LCCDE (linear constant-


coefficient difference equation) serves as a way to express just this relationship in a
discrete-time system. Writing the sequence of inputs and outputs, which represent the
characteristics of the LTI system, as a difference equation help in understanding and
manipulating a system.

Definition

Difference equation is an equation that shows the relationship between


consecutive values of a sequence and the differences among them. They are often
rearranged as a recursive formula so that a systems output can be computed from the
input signal and past outputs.

General Formula

The general form of a linear, constant-coefficient difference equation (LCCDE) is


shown below:

We can also write the general form to easily express a recursive output, which looks like
this:

17
DIGITAL SIGNAL PROCESSING

From this equation, note that y[n−k] represents the outputs and x[n−k] represents the
inputs. The value of N represents the order of the difference equation and corresponds
to the memory of the system being represented. Because this equation relies on past
values of the output, in order to compute a numerical solution, certain past outputs,
referred to as the initial conditions, must be known.

Example of FIR Equation:

1. What causes a filter to introduce a time delay in the output time history?

Take the equation for a FIR filter and work through the equation, the cause for the time
delay can be observed.

Observation: To be fully realized (i.e., actually work) the filter requires as many data
points (n) as the terms (N) to be passed through the filter.

A number of time data samples from the input signal (x) must pass through the
filter that is proportional to the number of terms (N), before the filter will work. The filtered
output data does not start until the number (n) data points passed through the filter is
greater than N. Because some data must pass through the filter to even create an output,
a delay in the output time history (y) is created when compared to the input time history
(x).

18
DIGITAL SIGNAL PROCESSING

1. Given the input sequence xn = 270.2806, 257.9545, 268.2720, 272.8098, 0, 0,


calculate the output sequence yn, for n = 0 . . . 4 when xn is put through the filter
below (assume zero initial conditions).

Impulse Response

The impulse response, or impulse response function (IRF), of a dynamic system


is its output when presented with a brief input signal, called an impulse. More generally,
an impulse response is the reaction of any dynamic system in response to some
external change.

Example: What is the impulse response of this filter?

xn = δn = 1, 0, 0, 0, 0, . . .

19
DIGITAL SIGNAL PROCESSING

So the impulse response hn = (1/3), (1/3), (1/3), 0,


0, 0, . . ..

Because the impulse response has a finite duration


(the non-zero values do not last forever), this kind of filter
is called a Finite Impulse Response filer (FIR Filter).
Another way to remember this is that the output of the filter
is a function only of past inputs.

IIR Filter Equation

Recursive digital filters can be designed in which the output of the filter depends
both on current and previous inputs as well as previous outputs. For such filters, the
impulse response has infinite duration and they are called Infinite Impulse Response
(IIR) filters.

The general form of a causal IIR filter is as follows.

Consider the following recursive filter

20
DIGITAL SIGNAL PROCESSING

Thus, to calculate the current value yn given the previous value yn−1 and the new input
xn, we need to calculate the previous total, and add in the new input xn, before finding the
new average by dividing by 2.

This is a recursive filter. It is an IIR filter.

Example: Given the input sequence xn = 4, 3, 2, 1, 0, 0, calculate the output sequence yn,
for n = 0 . . . 4 when xn is input to the filter with difference equation as below (assume
zero initial conditions).

21
DIGITAL SIGNAL PROCESSING

Calculate the impulse response for the system defined through the difference equation
below.

Put xn = δn and turn the handle.

• So the impulse response is hn=12,14,18,116,132,164 ...


• Very different from the FIR filter
• The impulse response of an IIR filter obeys some recursive relationship
• This digital IIR filter is also LTI.

Note: It is important to note that not all recursively defined filters will be IIR.

22
DIGITAL SIGNAL PROCESSING

Consider the recursive filter

It has an impulse response as follows

It is an FIR filter. In fact it is equivalent to the 3-tap moving average filter from earlier.

Reference:
▪ http://www.mee.tcd.ie/~corrigad/3c1/DSP1_2012_students.pdf
▪ http://pilot.cnxproject.org/content/collection/col10064/latest/module/m10595/lat
est
▪ https://community.sw.siemens.com/s/article/introduction-to-filters-fir-versus-
iir#:~:text=The%20equations%20for%20both%20an,time%20series%20y(n).&text=T
he%20mathematical%20difference%20between%20the,the%20filter%20output%2
0as%20input.

Video Tutorial Link:


FIR Filter
▪ https://videos.mentor-cdn.com/mgc/videos/5400/f17049fa-996c-48fd-aefc-
50c1f093af66-en-US-video.mp4

IIR Filter
▪ https://www.youtube.com/watch?v=MtHpbGUIGaA

23

You might also like