Society of Robots - Robot Forum

Software => Software => Topic started by: bulkhead on December 29, 2007, 01:43:07 PM

Title: how to make a high pass filter in software?
Post by: bulkhead on December 29, 2007, 01:43:07 PM
I've searched but couldn't find any real information on this.  Anyone know how it works or have any good references I can check out?
Title: Re: how to make a high pass filter in software?
Post by: Admin on December 30, 2007, 12:54:36 PM
Can't you just do an IF statement on your signal value?

example
if (signal is less than 150)
  signal=0;


or do something algorithmic, like:
signal=signal^3/1000; //3 is a multiplier, and 1000 keeps the value from exploding too high
Title: Re: how to make a high pass filter in software?
Post by: Steel_monkey on December 31, 2007, 09:50:27 AM
You need to find a book about digital signal processing, digital filters are explained in almost any. I personally downloaded 600 books about electronics. It is useful reading, and there is a lot about DSP there. If You are limited in traffic, download only books about DSP. If You need more info, PM me.
Title: Re: how to make a high pass filter in software?
Post by: paulobrasko on December 31, 2007, 02:53:49 PM
Can't you just do an IF statement on your signal value?

example
if (signal is less than 150)
  signal=0;


or do something algorithmic, like:
signal=signal^3/1000; //3 is a multiplier, and 1000 keeps the value from exploding too high

If what he is talking about filtering a signal in frequency domain, your solution would not work, example: filtering out signals with 1000 or more Hz. So going for DSP is the way to solve this problem.

Paulo Brasko
Title: Re: how to make a high pass filter in software?
Post by: Admin on December 31, 2007, 03:47:50 PM
what about using hardware interrupts and a timer? just throw out data that isn't in your defined time range.

i guess that kinda sounds ugly though . . . a hardware filter would be more elegant . . .