Hi, I'm somewhat new to DSPs and I am feel a little confused about what I am seeing with an FIR filter I am using. I saw a post about how to find the frequency response but I think this is a little different so I thought I would start a new discussion, sorry if this bothers anybody. I just got out of college and I took a few signal processing classes so I knew that when I was presented with a filter that I should send an impulse response through to find the frequency response (i know if works with convolutions and I think that is how FIR filters work). The problem I am having is that the FFT of the filter isn't even close to a flat top with a slope, giving me a clear rolloff, 3dB point, etc, what I get are spikes at certain frequencies with no large values in between. I am using a 63 point FIR filter and these spikes occur every 125Hz, with a sampling rate of 8kHz I end up with 32 spikes. I'm sure I am boring you at this point... I am using code composer studio to develop and it uses a 10 point fft magnitude (i always assumed this meant ABS) to veiw the data (though I tried 16 and it just made the data denser, didn't change the shape). I did a little reading around the net and it sounded like the delta function just gives you the poles and that is what I'm seeing, but reading a post on here made it sound like I should have gotten the true impulse response. I'm a little confused on who I should believe (maybe both). I didn't design the filter, it was provided to us by TI/code composer so I'm assuming it does exactly what it should (the assembly sure looks like a plain jane FIR). I was expecting to see a flat surface (ripples are to be expected), not a collection of peaks and valleys. the shape of the peaks sure looks like a filter but I was hoping for something more continuous. If you have no idea what I'm talking about I could send you a picture of what I have. I guess what my question is: Is this what I should be seeing? if yes, then besides frequency sweeping is there any way to get a continuous graph out of this filter? Thanks for any help you can give.
Is this a strange Freq response for an FIR filter?
Started by ●January 29, 2008
Reply by ●January 29, 20082008-01-29
<DeusDingo@gmail.com> wrote in message news:36263646-0d14-4145-b164-dcbed3a7a912@j78g2000hsd.googlegroups.com...> Hi, > > I'm somewhat new to DSPs and I am feel a little confused about what I > am seeing with an FIR filter I am using. > > I saw a post about how to find the frequency response but I think this > is a little different so I thought I would start a new discussion, > sorry if this bothers anybody. > > I just got out of college and I took a few signal processing classes > so I knew that when I was presented with a filter that I should send > an impulse response through to find the frequency response (i know if > works with convolutions and I think that is how FIR filters work). > The problem I am having is that the FFT of the filter isn't even close > to a flat top with a slope, giving me a clear rolloff, 3dB point, etc, > what I get are spikes at certain frequencies with no large values in > between. I am using a 63 point FIR filter and these spikes occur > every 125Hz, with a sampling rate of 8kHz I end up with 32 spikes. > I'm sure I am boring you at this point... > I am using code composer studio to develop and it uses a 10 point fft > magnitude (i always assumed this meant ABS) to veiw the data (though I > tried 16 and it just made the data denser, didn't change the shape). I > did a little reading around the net and it sounded like the delta > function just gives you the poles and that is what I'm seeing, but > reading a post on here made it sound like I should have gotten the > true impulse response. I'm a little confused on who I should believe > (maybe both). > > I didn't design the filter, it was provided to us by TI/code composer > so I'm assuming it does exactly what it should (the assembly sure > looks like a plain jane FIR). > > I was expecting to see a flat surface (ripples are to be expected), > not a collection of peaks and valleys. the shape of the peaks sure > looks like a filter but I was hoping for something more continuous. > If you have no idea what I'm talking about I could send you a picture > of what I have. I guess what my question is: Is this what I should be > seeing? if yes, then besides frequency sweeping is there any way to > get a continuous graph out of this filter? Thanks for any help you can > give.Wow. You have a lot to learn. So, it depends on what your objectives are here. Maybe you should just get some local help. Where to start? A FIR filter is characterized by its impulse or really "unit sample" response since we're talking about a sampled data system, right? The unit sample response is what you get out of the filter if you input a single sample of value 1.0 and all the other samples are zero. As the sample "moves" through the filter (as in a series of delay elements). It looks like this: /---\ /---\ x(k) --------| + |----->-------+------>-----| + |----------> y[k] \---/ | b0 \---/ | | V | | | +--+--+ | | | | |z^-1 | ^ +--+--+ | | | V | | | /---\ | | + |---->-------+ \---/ b1 | | | V | | | +--+--+ | | | | |z^-1 | ^ +--+--+ | | | V | | | /---\ | | + |---->-------+ \---/ b2 | | | V ^ V | | ^ +--+--+ | | | | |z^-1 | | +--+--+ | | | V | | | /---\ | | + |---->-------+ \---/ bn Direct Form II Transposed FIR Filter Time: h[k]=b0*x[k] + b1*x[k-1] + ... Frequency: H(z) =[b0 + b1*z^-1 +b2*z^-2...] Generally we construct a time sequence: h=[b0 b1 b2 .... b(N-1)] Then we append a bunch of zeros (maybe ~10X N like this: h=[b0 b1 b2 .... b(N-1) 0 0 0 0 0 0 0 0.......bM] where bM also = 0. Then we compute the FFT: H=[f0 f1 f2 f3 ......] which is a sequence of complex numbers. Then one might compute the absolute value of the complex numbers and plot them in sequence to see the "frequency response". Whatever design program you're using should output the "b" coefficients as in h[k] above ... and off you go. If the frequency resonse obtained looks wierd after doing these simple steps properly then the coefficients are "bad" and you should be looking at whether you specified your objectives properly to the design program - or, if your objectives are at all reasonable / unreasonable. Very sharp filters that are very short are unreasonable. Well ... what *are* the coefficients you're getting? Fred
Reply by ●January 29, 20082008-01-29
On Jan 29, 11:30�am, "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote:> <DeusDi...@gmail.com> wrote in message > > news:36263646-0d14-4145-b164-dcbed3a7a912@j78g2000hsd.googlegroups.com... > > > > > > > Hi, > > > I'm somewhat new to DSPs and I am feel a little confused about what I > > am seeing with an FIR filter I am using. > > > I saw a post about how to find the frequency response but I think this > > is a little different so I thought I would start a new discussion, > > sorry if this bothers anybody. > > > I just got out of college and I took a few signal processing classes > > so I knew that when I was presented with a filter that I should send > > an impulse response through to find the frequency response (i know if > > works with convolutions and I think that is how FIR filters work). > > The problem I am having is that the FFT of the filter isn't even close > > to a flat top with a slope, giving me a clear rolloff, 3dB point, etc, > > what I get are spikes at certain frequencies with no large values in > > between. �I am using a 63 point FIR filter and these spikes occur > > every 125Hz, with a sampling rate of 8kHz I end up with 32 spikes. > > I'm sure I am boring you at this point... > > I am using code composer studio to develop and it uses a 10 point fft > > magnitude (i always assumed this meant ABS) to veiw the data (though I > > tried 16 and it just made the data denser, didn't change the shape). I > > did a little reading around the net and it sounded like the delta > > function just gives you the poles and that is what I'm seeing, but > > reading a post on here made it sound like I should have gotten the > > true impulse response. �I'm a little confused on who I should believe > > (maybe both). > > > I didn't design the filter, it was provided to us by TI/code composer > > so I'm assuming it does exactly what it should (the assembly sure > > looks like a plain jane FIR). > > > I was expecting to see a flat surface (ripples are to be expected), > > not a collection of peaks and valleys. �the shape of the peaks sure > > looks like a filter but I was hoping for something more continuous. > > If you have no idea what I'm talking about I could send you a picture > > of what I have. �I guess what my question is: Is this what I should be > > seeing? �if yes, then besides frequency sweeping is there any way to > > get a continuous graph out of this filter? Thanks for any help you can > > give. > > Wow. �You have a lot to learn. �So, it depends on what your objectives are > here. > Maybe you should just get some local help. > > Where to start? > > A FIR filter is characterized by its impulse or really "unit sample" > response since we're talking about a sampled data system, right? > > The unit sample response is what you get out of the filter if you input a > single sample of value 1.0 and all the other samples are zero. �As the > sample "moves" through the filter (as in a series of delay elements). �It > looks like this: > > � � � � � � � �/---\ � � � � � � � � � � � � �/---\ > � x(k) --------| + |----->-------+------>-----| + |----------> y[k] > � � � � � � � �\---/ � � � � � � | � � �b0 � �\---/ > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � � �V � � � � � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � +--+--+ � � � � � | > � � � � � � � � � � � � � � � | � � | � � � � � | > � � � � � � � � � � � � � � � |z^-1 | � � � � � ^ > � � � � � � � � � � � � � � � +--+--+ � � � � � | > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � � �V � � � � � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � �/---\ � � � � � �| > � � � � � � � � � � � � � � � �| + |---->-------+ > � � � � � � � � � � � � � � � �\---/ � �b1 � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � � �V � � � � � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � +--+--+ � � � � � | > � � � � � � � � � � � � � � � | � � | � � � � � | > � � � � � � � � � � � � � � � |z^-1 | � � � � � ^ > � � � � � � � � � � � � � � � +--+--+ � � � � � | > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � � �V � � � � � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � �/---\ � � � � � �| > � � � � � � � � � � � � � � � �| + |---->-------+ > � � � � � � � � � � � � � � � �\---/ � �b2 � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � � �V � � � � � � �^ > > � � � � � � � � � � � � � � � � �V > � � � � � � � � � � � � � � � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �^ > � � � � � � � � � � � � � � � +--+--+ � � � � � | > � � � � � � � � � � � � � � � | � � | � � � � � | > � � � � � � � � � � � � � � � |z^-1 | � � � � � | > � � � � � � � � � � � � � � � +--+--+ � � � � � | > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � � �V � � � � � � �| > � � � � � � � � � � � � � � � � �| � � � � � � �| > � � � � � � � � � � � � � � � �/---\ � � � � � �| > � � � � � � � � � � � � � � � �| + |---->-------+ > � � � � � � � � � � � � � � � �\---/ � �bn > > � � � �Direct Form II Transposed FIR Filter > > � � � �Time: > � � � �h[k]=b0*x[k] + b1*x[k-1] + ... > > � � � �Frequency: > � � � �H(z) =[b0 + b1*z^-1 +b2*z^-2...] > > Generally we construct a time sequence: > h=[b0 b1 b2 .... b(N-1)] > > Then we append a bunch of zeros (maybe ~10X N like this: > h=[b0 b1 b2 .... b(N-1) 0 0 0 0 0 0 0 0.......bM] where bM also = 0. > > Then we compute the FFT: > H=[f0 f1 f2 f3 ......] > which is a sequence of complex numbers. > > Then one might compute the absolute value of the complex numbers and plot > them in sequence to see the "frequency response". > > Whatever design program you're using should output the "b" coefficients as > in h[k] above ... and off you go. �If the frequency resonse obtained looks > wierd after doing these simple steps properly then the coefficients are > "bad" and you should be looking at whether you specified your objectives > properly to the design program - or, if your objectives are at all > reasonable / unreasonable. �Very sharp filters that are very short are > unreasonable. > > Well ... what *are* the coefficients you're getting? > > Fred- Hide quoted text - > > - Show quoted text -well, fred, I don't think you read my whole post(or any of it, i think you just saw a question mark, FIR, impulse, and FFT) because if you did you would know i'm not designing the filter or trying to get the coeffients -but thanks for the knock right off the bat. teh filter is already completed, as i stated in my post that I did not design it and that I am merely trying to find the frequency response. why might i do this? So i know its specs in case we want to replace it with something better so we know if it really is better. maybe you were replying to someone else's post and got mine by mistake? I know what happens when a delta is convolved with a system, how an FIR filter works, how an fft works...(so i said a 10 point fft instead of an order of 10 so sue me). I'm just a little rusty when it comes to the impulse response of filters. my question was: is normal for the impulse response of the filter to display only the poles or does it show the whole frequency response of the filter (and if it does just show the poles is there a better way to find the frequency response than a spectrum sweep)?
Reply by ●January 29, 20082008-01-29
<DeusDingo@gmail.com> wrote in message news:92666e52-7165-4730-8d3f-d1eb26af4725@e25g2000prg.googlegroups.com... well, fred, I don't think you read my whole post(or any of it, i think you just saw a question mark, FIR, impulse, and FFT) because if you did you would know i'm not designing the filter or trying to get the coeffients -but thanks for the knock right off the bat. teh filter is already completed, as i stated in my post that I did not design it and that I am merely trying to find the frequency response. why might i do this? So i know its specs in case we want to replace it with something better so we know if it really is better. maybe you were replying to someone else's post and got mine by mistake? I know what happens when a delta is convolved with a system, how an FIR filter works, how an fft works...(so i said a 10 point fft instead of an order of 10 so sue me). I'm just a little rusty when it comes to the impulse response of filters. my question was: is normal for the impulse response of the filter to display only the poles or does it show the whole frequency response of the filter (and if it does just show the poles is there a better way to find the frequency response than a spectrum sweep)? Pardon moi! Let me try again: You ask: "is normal for the impulse response of the filter to display only the poles or does it show the whole frequency response of the filter (and if it does just show the poles is there a better way to find the frequency response than a spectrum sweep)?" I hesitated to point out: The impulse response is a temporal function. It doesn't have poles and it doesn't show the frequency response. But, I'm sure that one could express a continuous impulse response analytically using a polynomial approximation and then it could have poles - but not the ones we normally talk about. FIR filters don't have poles unless you want to consider a multiple pole at the orgin. It's all about the location of the zeros. A frequency sweep is generally an empirical approach. Is that what you intend to do? When one applies an impulse to get the frequency response I suppose conceptually you could look at the output of the filter using a spectrum analyzer but this isn't generally the way one would do it. e.g. where do you get the "impulse"? So, a frequency sweep would be better if that's what you intend to do. But, that approach doesn't much help find an analytical version of the filter response. There are approximation approaches for simple RLC filters that suggest the location of maybe one important complex pole pair but that's about it. Jerry can tell you about using a Spirule. The normal way to look at the frequency response is as I described. I'm sorry if I was too pendantic for you. But, it's still the way it's done. FIR filters particularly lend themselves to this approach. You'll surely forgive me if I was confused by your two comments: "I am using code composer studio" and "I didn't design the filter, it was provided to us by TI/code composer" So, I'm unclear as to the actual starting point and I don't use TI Code Composer so I can't tell what you're giving it and what it's giving you back. It appears you could "go in" at a number of levels. Send us the coefficients and we'll see what it looks like.. How long is the filter? Fred
Reply by ●January 29, 20082008-01-29
DeusDingo@gmail.com wrote:> Hi, > > I'm somewhat new to DSPs and I am feel a little confused about what I > am seeing with an FIR filter I am using. > > I saw a post about how to find the frequency response but I think this > is a little different so I thought I would start a new discussion, > sorry if this bothers anybody. > > I just got out of college and I took a few signal processing classes > so I knew that when I was presented with a filter that I should send > an impulse response through to find the frequency response (i know if > works with convolutions and I think that is how FIR filters work). > The problem I am having is that the FFT of the filter isn't even close > to a flat top with a slope, giving me a clear rolloff, 3dB point, etc, > what I get are spikes at certain frequencies with no large values in > between. I am using a 63 point FIR filter and these spikes occur > every 125Hz, with a sampling rate of 8kHz I end up with 32 spikes. > I'm sure I am boring you at this point... > I am using code composer studio to develop and it uses a 10 point fft > magnitude (i always assumed this meant ABS) to veiw the data (though I > tried 16 and it just made the data denser, didn't change the shape). I > did a little reading around the net and it sounded like the delta > function just gives you the poles and that is what I'm seeing, but > reading a post on here made it sound like I should have gotten the > true impulse response. I'm a little confused on who I should believe > (maybe both). > > I didn't design the filter, it was provided to us by TI/code composer > so I'm assuming it does exactly what it should (the assembly sure > looks like a plain jane FIR). > > I was expecting to see a flat surface (ripples are to be expected), > not a collection of peaks and valleys. the shape of the peaks sure > looks like a filter but I was hoping for something more continuous. > If you have no idea what I'm talking about I could send you a picture > of what I have. I guess what my question is: Is this what I should be > seeing? if yes, then besides frequency sweeping is there any way to > get a continuous graph out of this filter? Thanks for any help you can > give.What a muddle! I think you're mixing up "frequency response" and "impulse response". For a transversal (the usual kind) FIR filter, the coefficients *are* the impulse response. To get the frequency response from them, FFT the impulse response, convert the result from real and imaginary to magnitude and phase, and there you are. To get the usual display, show magnitude vs. frequency on a log-log plot and phase vs. frequency on a log-linear plot. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 29, 20082008-01-29
On Jan 29, 5:49�pm, Jerry Avins <j...@ieee.org> wrote:> DeusDi...@gmail.com wrote: > > Hi, > > > I'm somewhat new to DSPs and I am feel a little confused about what I > > am seeing with an FIR filter I am using. > > > I saw a post about how to find the frequency response but I think this > > is a little different so I thought I would start a new discussion, > > sorry if this bothers anybody. > > > I just got out of college and I took a few signal processing classes > > so I knew that when I was presented with a filter that I should send > > an impulse response through to find the frequency response (i know if > > works with convolutions and I think that is how FIR filters work). > > The problem I am having is that the FFT of the filter isn't even close > > to a flat top with a slope, giving me a clear rolloff, 3dB point, etc, > > what I get are spikes at certain frequencies with no large values in > > between. �I am using a 63 point FIR filter and these spikes occur > > every 125Hz, with a sampling rate of 8kHz I end up with 32 spikes. > > I'm sure I am boring you at this point... > > I am using code composer studio to develop and it uses a 10 point fft > > magnitude (i always assumed this meant ABS) to veiw the data (though I > > tried 16 and it just made the data denser, didn't change the shape). I > > did a little reading around the net and it sounded like the delta > > function just gives you the poles and that is what I'm seeing, but > > reading a post on here made it sound like I should have gotten the > > true impulse response. �I'm a little confused on who I should believe > > (maybe both). > > > I didn't design the filter, it was provided to us by TI/code composer > > so I'm assuming it does exactly what it should (the assembly sure > > looks like a plain jane FIR). > > > I was expecting to see a flat surface (ripples are to be expected), > > not a collection of peaks and valleys. �the shape of the peaks sure > > looks like a filter but I was hoping for something more continuous. > > If you have no idea what I'm talking about I could send you a picture > > of what I have. �I guess what my question is: Is this what I should be > > seeing? �if yes, then besides frequency sweeping is there any way to > > get a continuous graph out of this filter? Thanks for any help you can > > give. > > What a muddle! I think you're mixing up "frequency response" and > "impulse response". For a transversal (the usual kind) FIR filter, the > coefficients *are* the impulse response. To get the frequency response > from them, FFT the impulse response, convert the result from real and > imaginary to magnitude and phase, and there you are. To get the usual > display, show magnitude vs. frequency on a log-log plot and phase vs. > frequency on a log-linear plot. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > �����������������������������������������������������������������������- Hide quoted text - > > - Show quoted text -Jerry, The "usual" display for analog frequency response is magnitude vs. frequency on a log-log plot and phase vs. frequency on a log-linear plot. That choice usually makes a mess of DSP frequency responses, hiding (compressing) too many details. For a general DSP frequency response showing magnitude vs. frequency and phase vs. frequency the usual displays are log-linear and linear-linear respectively. I don't think I'm telling you anything, but the OP should probably be told. Dirk
Reply by ●January 29, 20082008-01-29
On Jan 29, 7:45�pm, dbell <bellda2...@cox.net> wrote:> On Jan 29, 5:49�pm, Jerry Avins <j...@ieee.org> wrote: > > > > > > > DeusDi...@gmail.com wrote: > > > Hi, > > > > I'm somewhat new to DSPs and I am feel a little confused about what I > > > am seeing with an FIR filter I am using. > > > > I saw a post about how to find the frequency response but I think this > > > is a little different so I thought I would start a new discussion, > > > sorry if this bothers anybody. > > > > I just got out of college and I took a few signal processing classes > > > so I knew that when I was presented with a filter that I should send > > > an impulse response through to find the frequency response (i know if > > > works with convolutions and I think that is how FIR filters work). > > > The problem I am having is that the FFT of the filter isn't even close > > > to a flat top with a slope, giving me a clear rolloff, 3dB point, etc, > > > what I get are spikes at certain frequencies with no large values in > > > between. �I am using a 63 point FIR filter and these spikes occur > > > every 125Hz, with a sampling rate of 8kHz I end up with 32 spikes. > > > I'm sure I am boring you at this point... > > > I am using code composer studio to develop and it uses a 10 point fft > > > magnitude (i always assumed this meant ABS) to veiw the data (though I > > > tried 16 and it just made the data denser, didn't change the shape). I > > > did a little reading around the net and it sounded like the delta > > > function just gives you the poles and that is what I'm seeing, but > > > reading a post on here made it sound like I should have gotten the > > > true impulse response. �I'm a little confused on who I should believe > > > (maybe both). > > > > I didn't design the filter, it was provided to us by TI/code composer > > > so I'm assuming it does exactly what it should (the assembly sure > > > looks like a plain jane FIR). > > > > I was expecting to see a flat surface (ripples are to be expected), > > > not a collection of peaks and valleys. �the shape of the peaks sure > > > looks like a filter but I was hoping for something more continuous. > > > If you have no idea what I'm talking about I could send you a picture > > > of what I have. �I guess what my question is: Is this what I should be > > > seeing? �if yes, then besides frequency sweeping is there any way to > > > get a continuous graph out of this filter? Thanks for any help you can > > > give. > > > What a muddle! I think you're mixing up "frequency response" and > > "impulse response". For a transversal (the usual kind) FIR filter, the > > coefficients *are* the impulse response. To get the frequency response > > from them, FFT the impulse response, convert the result from real and > > imaginary to magnitude and phase, and there you are. To get the usual > > display, show magnitude vs. frequency on a log-log plot and phase vs. > > frequency on a log-linear plot. > > > Jerry > > -- > > Engineering is the art of making what you want from things you can get. > > �����������������������������������������������������������������������- Hide quoted text - > > > - Show quoted text - > > Jerry, > > The "usual" display for analog frequency response is magnitude vs. > frequency on a log-log plot and phase vs. frequency on a log-linear > plot. �That choice usually makes a mess of DSP frequency responses, > hiding (compressing) too many details. For a general DSP frequency > response showing magnitude vs. frequency and phase vs. frequency the > usual displays are log-linear and linear-linear respectively. �I don't > think I'm telling you anything, but the OP should probably be told. > > Dirk- Hide quoted text - > > - Show quoted text -I guess I could have been clearer. Put frequency on linear axis. Dirk
Reply by ●January 29, 20082008-01-29
dbell wrote: ...> Jerry, > > The "usual" display for analog frequency response is magnitude vs. > frequency on a log-log plot and phase vs. frequency on a log-linear > plot. That choice usually makes a mess of DSP frequency responses, > hiding (compressing) too many details. For a general DSP frequency > response showing magnitude vs. frequency and phase vs. frequency the > usual displays are log-linear and linear-linear respectively. I don't > think I'm telling you anything, but the OP should probably be told.I'm glad you told him. I put it as I did so he could start on familiar ground. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 29, 20082008-01-29
You have two simple problems here: too short of an FFT, and not controlling your graphing program. Since you start with a 63 point impulse response, your program is taking an N=64 point FFT. This produces a frequency domain with 33 samples between DC and one-half of the sampling rate. This makes the frequency domain samples 125 Hz apart, as you found. Also, it appears that your graphing program is incorrectly showing a value of zero between these samples, giving the impression of peaks. To correct this, pad the 63 points in the impulse response with a bunch of zeros, and take a longer FFT. Say, add 1985 samples and use an FFT length of 2048. Your problem will go away. You are very close and on exactly the right track. Here is a reference: http://www.dspguide.com/ch9/2.htm Regards, Steve
Reply by ●January 30, 20082008-01-30
Deus wrote:> I'm somewhat new to DSPs and I am feel a little confused about what I > am seeing with an FIR filter I am using. > > I saw a post about how to find the frequency response but I think this > is a little different so I thought I would start a new discussion, > sorry if this bothers anybody. > > I just got out of college and I took a few signal processing classes > so I knew that when I was presented with a filter that I should send > an impulse response through to find the frequency response (i know if > works with convolutions and I think that is how FIR filters work).What a lot of confusion for something so simple. As Jerry wrote, for transversal FIR filters, the impulse response are the filter coefficients. The frequency response is the Fourier transform (DTFT) of the impulse response. So if your 63 FIR coefficients are b_0, ..., b_62, then the frequency response is F(w) = sum_{k=0}^62 b_k exp(-i w k). That's it. You ought to be able to plot the magnitude and phase of a complex function with your favourite math program if you just got out of college with a few signal processing classes behind you. Regards, Andor PS: If you have Matlab, try freqz(b), where b is your coefficient vector.






