FIR Low Pass Filter in C

Discussion in 'OT Technology' started by ranthal, Nov 1, 2007.

  1. ranthal

    ranthal i did what?

    Joined:
    Feb 8, 2007
    Messages:
    772
    Likes Received:
    0
    Location:
    Los Angeles
    Does anyone know how to program a FIR Low Pass Filter in C? I can design the filter, just need to get an idea of what code to use.
     
  2. CodeX

    CodeX Guest

    I have a feeling the majority of the difficulty of this has to do with the input and output of the signal you want to filter... the actual code is simple, set a cutoff point, anything above that point does not get output.

    while(input)
    {
    if(signal < cutoff) output(signal)
    }
     
  3. ranthal

    ranthal i did what?

    Joined:
    Feb 8, 2007
    Messages:
    772
    Likes Received:
    0
    Location:
    Los Angeles
    Well the signal is coming from a cane somebody would be walking with. It samples the pressure at the cane tip at 100Hz then sends it to the Nokia PDA we are using that runs on Linux. We want to get the noise out so filter it at about the pace of a step (1Hz). All the data is in a 200 element array. Without noise the graph of it kinda looks like a sharp sine wave that is only positive (think diode with ac signal applied).
     

Share This Page