Recursive implementation of an FIR Filter

  • Context: Engineering 
  • Thread starter Thread starter Master1022
  • Start date Start date
  • Tags Tags
    Filter
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
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 [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.
 
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 [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   Reactions: Master1022
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!