Re: Slow varying inputs

The reason for using a notch filter is that I don't want to throw away 
all the frequencies above 50Hz. In my case it was ECG. You can use a low 
pass at around 40Hz to filter an ECG but then the peaks of the ECG 
become much smaller. Bad for the patient. ;-) The full spectrum reaches 
up to 100Hz. When I sample with 1kHz I don't need an anti alias filter, 
thus no soldering, etc.

The notch filter takes the raw data from comedi and filters it. 
Afteraging comes after the notch filter. I think the only thing to 
change is the frequency to 60Hz. Or you could just add a text field so 
that everybody can change it. It also works pretty good as an DC filter 
with f is set to zero.

/Bernd

www:    http://www.berndporr.me.uk/
         http://www.linux-usb-daq.co.uk/
Mobile: +44 (0)7840 340069
Work:   +44 (0)141 330 5237
         University of Glasgow
         Department of Electronics & Electrical Engineering
         Room 519, Rankine Building, Oakfield Avenue,
         Glasgow, G12 8LT


Daniel Nilsson wrote:
> On Thu, Mar 03, 2005 at 09:36:42AM +0000, Bernd Porr wrote:
> 
>>You can use the program 
>>http://www.linux-usb-daq.co.uk/software2/comedi-record/
>>to sample quite slowly. It internally always samples at 1kHz and then 
>>averages on the fly to get a lower rate. It also has a 50Hz notch filter 
>>(sorry, American colleagues). However, the filter frequency can be 
>>changed in the program. I used it also with thermocouple sensors.
> 
> 
> Bernd,
> 
> Thanks for the pointer, this is very close to exactly what I was
> looking for. From looking closer at your filter characteristics in the
> code I see that you are creating a pretty sharp notch filter. From the
> description above I take it that the purpose of this notch filter was
> to only take care of the 50Hz noise ? Is there a specific reason why
> you decide to do a notch filter instead of a low-pass filter in your
> application ? Is the notch filter applied before the averaging
> function ?
> 
> Thanks

Received on 2005-03-04Z09:22:20