Recursive implementation of an FIR Filter

  • Engineering
  • Thread starter Master1022
  • Start date
  • Tags
    Filter
In summary, an FIR filter can also be implemented using a recursive structure. To do so, the recursive structure needs to have dependence on the output, and the coefficients b_j should be less than 1 for the output signal to decay over time. However, simply keeping b_j < 1 is not enough, as the output needs to be zero after some finite k . To contrive such a filter, one can use the fact that x[k] is an impulse and choose simple coefficients for the a_j s and b_j s to force the output to be zero after a finite number of ks. This can be done by choosing each b_j one at a time and simplifying
  • #1
Master1022
611
117
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 [itex] b_j < 1 [/itex] for all [itex] b_j [/itex]? 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
  • #2
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 [itex] b_j < 1 [/itex] for all [itex] b_j [/itex]? 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 [itex] b_j < 1 [/itex] isn't enough.

As [itex] k [/itex] becomes larger than the larger of [itex] M [/itex] and [itex] N [/itex], [itex] y[k] [/itex] 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 [itex] k [/itex], not requiring that [itex] k \rightarrow \infty [/itex].

Fortunately, you can contrive such a filter.

Of course, you can always pick your [itex] b_j = 0 [/itex], for all [itex] j [/itex]. 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 [itex] b_j [/itex]s are zero.

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

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

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

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

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

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

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

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

Now that you've chosen your [itex] b_1 [/itex] you can move on to [itex] b_2 [/itex].

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

Then keep going with [itex] b_3, b_4, \cdots [/itex] and so on.

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

Whatever the case, since you've forced [itex] y[k] = 0 [/itex] for some finite number of [itex] k[/itex]s, 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 [itex] b_j [/itex] coefficients.]
 
Last edited:
  • Like
Likes Master1022
  • #3
collinsmark said:
Simply keeping [itex] b_j < 1 [/itex] isn't enough.

As [itex] k [/itex] becomes larger than the larger of [itex] M [/itex] and [itex] N [/itex], [itex] y[k] [/itex] 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 [itex] k [/itex], not requiring that [itex] k \rightarrow \infty [/itex].

Fortunately, you can contrive such a filter.

Of course, you can always pick your [itex] b_j = 0 [/itex], for all [itex] j [/itex]. 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 [itex] b_j [/itex]s are zero.

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

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

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

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

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

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

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

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

Now that you've chosen your [itex] b_1 [/itex] you can move on to [itex] b_2 [/itex].

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

Then keep going with [itex] b_3, b_4, \cdots [/itex] and so on.

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

Whatever the case, since you've forced [itex] y[k] = 0 [/itex] for some finite number of [itex] k[/itex]s, 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 [itex] b_j [/itex] coefficients.]
Thank you very much for the reply - this makes much more sense!
 

1. What is a recursive implementation of an FIR filter?

A recursive implementation of an FIR filter is a type of digital filter used to process digital signals. It uses a recursive algorithm to calculate the output signal based on previous input and output values, rather than using a convolution operation like a traditional FIR filter.

2. How does a recursive implementation of an FIR filter differ from a traditional FIR filter?

The main difference between a recursive implementation of an FIR filter and a traditional FIR filter is the algorithm used to calculate the output signal. A recursive implementation uses a recursive algorithm, while a traditional FIR filter uses a convolution operation. This makes the recursive implementation more efficient for certain types of signals, such as those with long impulse responses.

3. What are the advantages of using a recursive implementation of an FIR filter?

One advantage of using a recursive implementation of an FIR filter is its efficiency. Since it does not require a convolution operation, it can process signals with long impulse responses more quickly. Additionally, it can be easier to implement in hardware due to its recursive nature.

4. Are there any limitations to using a recursive implementation of an FIR filter?

Yes, there are some limitations to using a recursive implementation of an FIR filter. It may not be suitable for all types of signals, as it can introduce instability or distortion if not designed properly. It also requires more memory to store previous input and output values, which may be a limitation in certain applications.

5. How is the stability of a recursive implementation of an FIR filter determined?

The stability of a recursive implementation of an FIR filter is determined by its filter coefficients. If the filter coefficients are carefully chosen, the filter will be stable and produce an accurate output. However, if the filter coefficients are not designed properly, it can lead to instability and inaccurate results.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
947
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
873
  • Engineering and Comp Sci Homework Help
Replies
12
Views
10K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
991
  • Engineering and Comp Sci Homework Help
Replies
11
Views
2K
Back
Top