Re: Slow varying inputs

On Thu, Mar 03, 2005 at 12:04:18AM -0500, Sandy Pond wrote:
> On Wed, 2005-03-02 at 22:25 -0500, Daniel Nilsson wrote:
> > If not, does anyone have any filter code that you can share the is
> > designed to filter out any noise that might be present on the inputs ?
> > The issues that I'm having right now is that the inputs don't vary
> > much but I'm getting a measurement values that move back and forth
> > around the actual value. I assume some of this is digital noise and
> > some is analog noise (60Hz noise from the mains for example). I would
> > think someone had already written some code to filter out such noise ?
> > 
> First a little DSP info: If there's noise on your input you'll need to
> sample at twice the maximum frequency of the noise in order to digitally
> filter the noise.  Otherwise you'll end up with alias errors in your
> recorded input.  If this isn't possible then you need to alter your
> setup to reduce stray noise or install a hardware filter before the
> input to eliminate the higher frequency noise.  

Agreed, I think in my case it should be fine though. I can't see any
high frequency noise in the signal.

> Once you collect the samples it is easy to digitally filter the signal
> by either using a commercial program like matlab, open source tools like
> python, of writing a small C program.  If you google around on "digital
> filtering" you will find programs.  For instance:
> 
> http://ccrma.stanford.edu/software/stk/

Thanks for the pointer. Yes I assume there is a ton of information
written on this topic. I even remember some of it from the DSP courses
at school !

For my application I assume a low-pass filter should work just
fine. For example averaging the last 100 samples thus creating a
windowing average function might be enough ? Or is there more to it
then that ?

Thanks
-- 
Daniel Nilsson

Received on 2005-03-04Z01:38:01