109
C H A P T E R 7
Adaptive Filtering
In this chapter, an adaptive FIR filter is used to model the behavior of an Infinite Impulse
Response (IIR) filter. Let us first examine IIR filtering.
7.1 INFINITE IMPULSE RESPONSE FILTERS
An IIR filter has a unit sample response that is infinite in time because of its recursive depen-
dence on previous output values. IIR filters are described according to the following difference
equation:
yŒn D
N
X
kD1
a
k
yŒn k C
N
X
kD0
b
k
xŒn k; (7.1)
where a
k
s and b
k
s denote the coefficients. e recursive behavior of the filter is caused by the
feedback provided from the a
k
coefficients acting on the previous output terms yŒn k. is
is called Direct Form I and the following C code implements it:
static float infiniteIR(float inSample) {
int i;
float aSum, bSum;
for( i = 0; i < N; i++ ) {
x[i] = x[i+1];
}
x[N-1] = inSample;
bSum = 0;
for( i = 0; i <= N; i++) {
bSum += x[N-i]*b[i];
}
aSum = 0;
for( i = 1; i <= N; i++ ) {
aSum += y[i-1]*a[i];
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.10.137