Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

(Finite Impulse Response)FIR filter math by hand example

  1. Oct 8, 2013 #1
    can someone do a design of a FIR filter using the Window design method by hand as an example and post it? Please do not use mat lab. I would like to learn how to do it myself by hand. I have been have use Google but no luck .

    all the pages I have seen use mat lab in their example.

    So I have been reading up on FIR filters and I have learned they can be in the Time domain or the frequency domain. in the Time domain you take the input signal of discrete samples x[n] and its impulse response b and you use convolving to get the output y[n]. this will Zero out any unwanted frequencies. so you can do a band pass or a low pass or a high pass filter.
    y[n] = Ʃ bi x[N-i]
    i = 0
    Now I do not really know how to solve the impulse response h[n].
    now Wiki says, " h[n] can be calculated if we set x[n] = δ[n] in the above relation, where δ[n] is the Kronecker delta impulse. The impulse response for an FIR filter then becomes the set of coefficients bn, as follows :

    h[n] = Ʃ bi δ[n-i] = bn
    i = 0
    for n =0 to N
    so I am not sure where h[n] come in at in that 1 formula ... I think h[n] is an array of bns.. i guess

    or a set of bn .
    like h[n] = { b1, b2, b3, b4,bi, ..}
    that might be wrong...

    "To design a filter means to select the coefficients such that the system has specific characteristics." wiki

    "In signal processing, a window function (also known as an apodization function or tapering function[1]) is a mathematical function that is zero-valued outside of some chosen interval." wiki

    but from this I still do not know how to get the right coefficients bn.

    I know that
    ω = 2π F/fs
    Δω = 2π TW/Fs
    Tw = transition width with "is a range of frequencies, that allows a transition between a passband and a stopband of a signal processing filter. The transition band is defined by a passband and a stopband cutoff frequency or corner frequency." wiki

    stopband ripple = -20log10 δ

    after this I get really lost...

    I do get how convolve works,
    page 12 has a good example...
    you would use convolving on h[n] and x[n] right?
    but I am not sure how to get h[n]

    so can someone workout an example by hand to help feel in the blanks

    also if I have said something wrong in his post please tell me
  2. jcsd
  3. Oct 11, 2013 #2
    anyone ?
  4. Oct 11, 2013 #3


    User Avatar
    Gold Member

    An FIR filter is a generally implemented as a set of coefficients to be convolved with the signal (in the time domain)

    In the frequency domain it is the multiplication of the frequency response and the signal spectrum.

    No impulses involved at this point.

    The coefficients used in the time domain are the inverse transform of the frequency response of the filter. That happens to be the impulse response of the filter.

    The impulse response of the filter is the set of coeefficients that represents your filter in the time domain, and its FFT of the impulse response is the frequency response of the filter (I've said it twice now).

    Multiplication in the frequency domain is convolution in the time domain, and vice versa.

    So the next question becomes how to determine the impulse response of a filter. First you need its transfer function. That is its impulse response. Now it get tricky and you need s domain or z domain knowledge.

    Or, you could simply sketch the frequency response in the frequency domain and do the inverse FFT.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook