Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-pcd!hplsla!bobc From: bobc@hplsla.HP.COM (Bob Cutler) Newsgroups: comp.dsp Subject: Re: Practical DSP problem Message-ID: <9360012@hplsla.HP.COM> Date: 8 Oct 90 14:52:31 GMT References: <3575@syma.sussex.ac.uk> Organization: HP Lake Stevens, WA Lines: 24 > >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. > This will work even better if the time interval from 0 to 'a bunch' covers an integral number of cycles of sin(wt). --- Bob Cutler KE7ZJ Lake Stevens Instrument Division Hewlett-Packard Everett, WA