Recursive implementation of an FIR Filter

  • Context: Engineering 
  • Thread starter Thread starter Master1022
  • Start date Start date
  • Tags Tags
    Filter
Click For Summary
SUMMARY

The discussion centers on the recursive implementation of a Finite Impulse Response (FIR) filter. The key equation presented is $$ y[k] = \sum_{j=0}^{N} a_j x[k - j] + \sum_{j = 1}^{M} b_j y[k - j] $$, where the coefficients \( b_j \) must be chosen such that \( y[k] \) equals zero after a finite number of iterations, ensuring the FIR characteristic. Participants emphasize that simply keeping \( b_j < 1 \) is insufficient; the output must decay to zero after a finite \( k \). A practical approach involves selecting initial coefficients \( a_0 \) and \( a_1 \) while iteratively determining \( b_j \) values.

PREREQUISITES
  • Understanding of FIR filter concepts and definitions
  • Familiarity with recursive filter structures
  • Knowledge of impulse response and its implications
  • Basic mathematical skills for manipulating summation equations
NEXT STEPS
  • Explore the design of FIR filters using MATLAB or Python's SciPy library
  • Study the stability criteria for recursive filters in digital signal processing
  • Learn about the effects of different \( a_j \) and \( b_j \) coefficients on filter performance
  • Investigate the implementation of FIR filters in real-time audio processing applications
USEFUL FOR

Signal processing engineers, digital filter designers, and students studying digital signal processing who are interested in advanced FIR filter implementations.

Master1022
Messages
590
Reaction score
116
Homework Statement
An FIR filter can also be implemented using a recursive structure. Can you find such an example?
Relevant Equations
FIR Filter
Recursive Structure
Hi,

I have a question related to filter structures. Question: An FIR filter can also be implemented using a recursive structure. Can you find such an example?

I don't really know how to proceed here.

Method:
FIR filter is a 'finite impulse response', which means that the response doesn't last forever and is usually non-recursive. A recursive structure, however, has dependence on the output as follows:
$$ y[k] = \sum_{j=0}^{N} a_j x[k - j] + \sum_{j = 1}^{M} b_j y[k - j] $$

For this to be a representation of an FIR filter, do we just want b_j &lt; 1 for all b_j? Is that correct? This makes sense intuitively to me as this will cause the output signal to decay over time.

Thanks in advance.
 
Physics news on Phys.org
Master1022 said:
Homework Statement:: An FIR filter can also be implemented using a recursive structure. Can you find such an example?
Relevant Equations:: FIR Filter
Recursive Structure

Hi,

I have a question related to filter structures. Question: An FIR filter can also be implemented using a recursive structure. Can you find such an example?

I don't really know how to proceed here.

Method:
FIR filter is a 'finite impulse response', which means that the response doesn't last forever and is usually non-recursive. A recursive structure, however, has dependence on the output as follows:
$$ y[k] = \sum_{j=0}^{N} a_j x[k - j] + \sum_{j = 1}^{M} b_j y[k - j] $$

For this to be a representation of an FIR filter, do we just want b_j &lt; 1 for all b_j? Is that correct? This makes sense intuitively to me as this will cause the output signal to decay over time.

Thanks in advance.
Simply keeping b_j &lt; 1 isn't enough.

As k becomes larger than the larger of M and N, y[k] needs to equal zero, not just approach it. The finite part of "FIR" means that when the input is an impulse, the output must be zero after some finite k, not requiring that k \rightarrow \infty.

Fortunately, you can contrive such a filter.

Of course, you can always pick your b_j = 0, for all j. But I'm guessing you won't get full points for that. That's kind of the trivial case (sort of cheating). So let's contrive a filter such that not all of the b_js are zero.

You know that x[k] is an impulse. You can and should use this to your advantage.

x[k] = 1, 0, 0, 0, \cdots

Now pick something simple for your a_js. This is going to be your choice of a_js, since this filter is your own personal creation. But keep it pretty simple. I suggest making a_0 and a_1 nonzero, and that's it. (That should make a simple example, but not too simple).

Now step through k, one at a time (starting from k = 0), and choose your b_j such that y[k] = 0 after some finite k. If you want to keep things really simple, you can start forcing y[k] = 0 as soon as k = 1. It's up to you.

Do this by choosing your b_js one j at a time; one b_j for each iteration.
For example, suppose you want to start forcing y[k] = 0 as soon as k = 1. In that case, fist assume that the filter's initial output is zero. So you can start with

y[0] = \sum_{j = 0}^N a_j x[0 - j]

(Don't forget that x[k] = 1, 0, 0, 0, \cdots, it will make things a lot simpler.)
Now, in this example (where we're forcing y[k] = 0 as soon as k = 1), you can start forcing your y[k] = 0. Choose your b_1 such that

y[1] = \sum_{j = 0}^N a_j x[1 - j] + b_1 y[0] = 0

Now that you've chosen your b_1 you can move on to b_2.

y[2] = \sum_{j = 0}^N a_j x[2 - j] + b_2 y[0] + b_1 y[1] = 0

Then keep going with b_3, b_4, \cdots and so on.

You can simplify the above equations significantly by realizing that x[k] = 1, 0, 0, 0, \cdots. I'll let you do that.

Whatever the case, since you've forced y[k] = 0 for some finite number of ks, then eventually, all the relevant inputs and outputs will be equal to zero, and the output will remain equal to zero forever after. At that point, you can stop.

[Edit: Corrected some indexing mistakes with the b_j coefficients.]
 
Last edited:
  • Like
Likes   Reactions: Master1022
collinsmark said:
Simply keeping b_j &lt; 1 isn't enough.

As k becomes larger than the larger of M and N, y[k] needs to equal zero, not just approach it. The finite part of "FIR" means that when the input is an impulse, the output must be zero after some finite k, not requiring that k \rightarrow \infty.

Fortunately, you can contrive such a filter.

Of course, you can always pick your b_j = 0, for all j. But I'm guessing you won't get full points for that. That's kind of the trivial case (sort of cheating). So let's contrive a filter such that not all of the b_js are zero.

You know that x[k] is an impulse. You can and should use this to your advantage.

x[k] = 1, 0, 0, 0, \cdots

Now pick something simple for your a_js. This is going to be your choice of a_js, since this filter is your own personal creation. But keep it pretty simple. I suggest making a_0 and a_1 nonzero, and that's it. (That should make a simple example, but not too simple).

Now step through k, one at a time (starting from k = 0), and choose your b_j such that y[k] = 0 after some finite k. If you want to keep things really simple, you can start forcing y[k] = 0 as soon as k = 1. It's up to you.

Do this by choosing your b_js one j at a time; one b_j for each iteration.
For example, suppose you want to start forcing y[k] = 0 as soon as k = 1. In that case, fist assume that the filter's initial output is zero. So you can start with

y[0] = \sum_{j = 0}^N a_j x[0 - j]

(Don't forget that x[k] = 1, 0, 0, 0, \cdots, it will make things a lot simpler.)
Now, in this example (where we're forcing y[k] = 0 as soon as k = 1), you can start forcing your y[k] = 0. Choose your b_1 such that

y[1] = \sum_{j = 0}^N a_j x[1 - j] + b_1 y[0] = 0

Now that you've chosen your b_1 you can move on to b_2.

y[2] = \sum_{j = 0}^N a_j x[2 - j] + b_2 y[0] + b_1 y[1] = 0

Then keep going with b_3, b_4, \cdots and so on.

You can simplify the above equations significantly by realizing that x[k] = 1, 0, 0, 0, \cdots. I'll let you do that.

Whatever the case, since you've forced y[k] = 0 for some finite number of ks, then eventually, all the relevant inputs and outputs will be equal to zero, and the output will remain equal to zero forever after. At that point, you can stop.

[Edit: Corrected some indexing mistakes with the b_j coefficients.]
Thank you very much for the reply - this makes much more sense!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K