> ... > If harmonics are the problem, simply don't generate them in the > first place. A three stage shiftregister counter driven by 6x the > fundamental with a bit of logic can generate a signal free of all > harmonics up to the 5th, and free of all even harmonics.We don't always have control over the input waveforms. I don't exactly know what the OP's requirements are. But for my need, I simply fast fourier the initial samples to extract the characteristic frequencies and goertzel it for the duration of the signal. I need approx. 4K of fourier coefficient and 1K of goertzel coefficient tables. Which is not a problem, since I have 64K to work with.
Signal strength at some fixed frequency
Started by ●October 17, 2006
Reply by ●October 22, 20062006-10-22
Reply by ●October 22, 20062006-10-22
<billyman3@gmail.com> wrote in message news:1161387512.916834.255420@b28g2000cwb.googlegroups.com...> 1 multiply, 1 add, 1 subtract? > > on a 14-bit PIC core, (8-bit integer math) the multiply simplifies to > 8bit x 8bit -> 16bit, then take bits 2-9 (shift left) to compensate for > 2*cos, move to w, subtract, add. > > I estimate that line would take ~20 - 45 cycles which, @ 5MIPS (20 > Mhz) comes out to 4-9us. 250000 - 111100 times per second.I don't see 8 bit cutting it. If the frequency of interest is much smaller than the sample freqency the cos will be close to 1. Also the Goertzel algorithm uses differences of adjacent yn, so rounding error can easily get amplified. Peter