On Thu, 11 Jul 2013 06:23:36 -0500, Mimar wrote:>>On Tue, 09 Jul 2013 06:14:09 -0500, "Mimar" <94571@dsprelated> wrote: >> >>>Hello, >>> >>>as Tim Wescott wrote in his last followup it will be better to create > new >>>thread instead to continue in "Sliding Goertzel problem" thread. >>> >>>I need to estimate amplitude and phase of power line voltage. My boss > has >>>said me recently we have to compute these values quickly and >>>accurately. > >>>At the moment we use normal DFT, but this method is too slowly. So I > tried >>>to implement sliding Goertzel, but without good results. More in > previous >>>thread.... >>> >>>Yesterday I asked myself:"What about to use GA with integer K and then >>>correct errors according well-known frequency?" Do you think it can > work? >>> >>>I tried to find information about other method how to estimate ampl. >>>and phase, but there are only several articles on the web. Any tips? >>> >>>Thank you a lot. >>> >>>Miroslav >> >>How are you currently using the DFT? Are you computing all of the bins >>or just the bin(s) of interest? The nice thing about a DFT is you only >>need to compute the bins you want. This can dramatically reduce the >>computational load compared to computing the entire DFT. >> >>Or is the problem that the window length takes too long to collect data? >> >>And what are you measuring the phase against? >> >>Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com >> > Hello Eric, > > we are using single bin DFT (for 50 Hz) at the moment, this algorithm is > very simple, but still slowly and the accuraty is also no great shakes. > We have got 8 channels to measure - thera are 4 for voltage and 4 for > current. > If we can perform meas. process in real time (sample rate is 2400 Hz), > we need faster method to determine first harmonic of signal. The sliding > DFT or sliding Goertzel seems good for our aim, but there is still > leakage effect. But on the other hand error is according my boss > acceptable. > The lenghth of each buffer doesn´t introduce problem, problem is > execution speed. > > And the phase means a delay between voltage and current. I have written > it confusedly. But we are also interested in angle between real and > imag. components of DFT result.If you're being careful, a Goertzel algorithm requires one multiply per cycle, and three additions. A single-bin DFT, with inphase and quadrature outputs, requires two multiplies and two additions per cycle. What are you using for a processor that one more multiply per sample bogs you down so very badly? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com