Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!anasaz!qip!john From: john@qip.UUCP (John Moore) Newsgroups: comp.dsp Subject: Re: Practical DSP problem Message-ID: <4910@qip.UUCP> Date: 7 Oct 90 18:05:15 GMT References: <3575@syma.sussex.ac.uk> Organization: Anasazi, Inc. Phoenix, Az Lines: 43 In article <3575@syma.sussex.ac.uk> paulr@syma.sussex.ac.uk (Paul T Russell) writes: ]I would appreciate any suggestions on practical methods ]for extracting spectral information from a noisy signal. ]In particular I need to measure the amplitude of ]one sinusoidal component (whose frequency is known in ]advance) where the amplitude of the component is ]close to the noise level. My first thought was to use ]an FFT to estimate the power spectrum and then try to ]identify the peak, but I feel sure that there must be ]a better way. Maybe digital filtering or some other ]means of power spectrum estimation (such as the Maximum ]Entropy Method) ? Or perhaps I should be doing something ]in the time domain, such as autocorrelation + averaging ? I have an application where I need phase, rather than amplitude, but the problem is similar. In that case, I compute: for i = 0 through a bunch I = sum(sinwt*sample[i]) Q = sum(coswt*sample[i]) A = sqrt(I*I + Q*Q) P = arctan(I/Q) This is equivalent to computing just one line of the PSD from the DFT. I do this in real time with an 8 bit uP running at .25 itty-bitty-Mips. I suspect autocorrelation would work even better, if you really know the frequency, and you don't care about the phase. Given that you know the frequency, I don't think you require anything fancier than this. The algorithm shown above is simple enough that it can be done in real time (on audio) with most microprocessor chips. No need for a DSP or even a real fast micro (unless you are sampling real fast and going for high precision/dynamic range). -- John Moore HAM:NJ7E/CAP:T-Bird 381 {ames!ncar!noao!asuvax,mcdphx}!anasaz!john USnail: 7525 Clearwater Pkwy, Scottsdale,AZ 85253 anasaz!john@asuvax.eas.asu.edu Voice: (602) 951-9326 Wishful Thinking: Long palladium, Short Petroleum Opinion: Support ALL of the bill of rights, INCLUDING the 2nd amendment! Disclaimer: The opinions expressed here are all my fault, and no one elses.