Technical discussions related to Audio Signal Processing (digital effects, acoustics, noise reduction, musical signal processing, etc).
I'm working on a project to interface to an EEG device for reading brain-waves. I'm completely new to this type of thing but I've learned alot since I started a couple weeks ago. I first started doing a bandpass by calculating an FFT and zeroing out the signal then doing the IFFT...lol it sorta worked for a while. Anyway now I'm using a windowed sinc routine to calculate FIR coefficients. But I have a few questions if anyone can answer them. 1st of all I'm using 512 taps on a 256 Samples Per Second signal. I know I can eliminate the coefficients that are close to zero and still get pretty much the same response from the filter. Maybe half of them?? What else can I do cause I'm pretty sure I don't need that many taps? Second and really really important question. How can I estimate/ calculate the amplitude of a streaming signal? I found a peak estimation function with exponential decay, but it gives inaccurate results if there is a DC offset. So I applied the routine to a high and low peak variable(the low one is multiplied by the inverse of the factor the high one is) and calculate the amplitude like that...it works ok but it requires you know the maximum frequency that'll be measured for it to decay properly and estimate accurately. There's a better way? Thank you ahead of time anyone that can help...
1st of all I'm using 512 taps on a 256 Samples Per Second signal. I know I can eliminate the coefficients that are close to zero and still get pretty much the same response from the filter. Maybe half of them?? What else can I do cause I'm pretty sure I don't need that many taps? I'd propose that you simulate your filter using Matlab (or Scilab, which comes for free). This will help to get a feeling of the changes which any modification will cause. Maybe an IIR filter is what you want? Second and really really important question. How can I estimate/ calculate the amplitude of a streaming signal? I found a peak estimation function with exponential decay, but it gives inaccurate results if there is a DC offset. ... Which amplitude? Peak values, overall average, or a sliding average? If the DC offset bothers you, remove it. Starting with the basics, a very smart solution is described here: http://www.dspguru.com/comp.dsp/tricks/alg/dc_block.htm Bernhard
Bernhard- > Second and really really important question. How can I estimate/ > calculate the amplitude of a streaming signal? I found a peak > estimation function with exponential decay, but it gives inaccurate > results if there is a DC offset. ... > Which amplitude? Peak values, overall average, or a sliding average? Suggest to try first removing DC offset using a slow moving average filter, then use envelope method to get amplitude estimate. Envelope estimation combines Hilbert transform and exponential decay averaging, so you shouldn't get thrown off by individual peaks. -Jeff