Marechiare wrote: > Random noise probably would be attenuated indeed, There is nothing probablistic about it. The math shows quite clearly that random noise will be attenuated, and by how much. > but what if, for > instance, some power SCR/TRIAC-regulated load were present on the > line? Tops of the sine would be heavily suppressed, the filter won't > restore the shape. Actually it will to some extent. Low pass filtering reduces the harmonics compared to the fundamental. Therefore the more filtering, the more the result will look like a sine. In the limit, you are left with only the fundamental component of the distored waveform, which will be a pure sine. Take a look at the plot I posted a few days ago. The input to the filter was a sine with the whole bottom cut off. The output of the two pole filter looked a lot more sinusoidal. Dario is looking at the line voltage, which has very low impedence. That means that even with significant harmonics in the current drawn from this line, the voltage will have little harmonic content. The approximation that most of the power is in the fundamental is quite reasonable for many line voltage measuring purposes. Remember that Dario only needs 5% accuracy. >> True RMS requires much more computation. > > Looks like the statement is not true. RMS approach being a "statistic" > approach does not require that many measurements per sine period as > the peak-detect polling does to achieve the same precision. Put down the dead fish and do the math instead. This statement is just silly superstition, unless of course you can define what a "statistic" approach is, how RMS is one and low pass filtering with peak picking isn't, then then show that such statistic approaches require less computation for the same accuracy. My recollection from past experience is that RMS requires more samples for the same accuracy. However, I don't feel like doing the math or writing a simulation right now, so I can't substantiate that claim. > Considering the fact that PIC24FJxxx got high-speed 17-bit x 17-bit > hardware multiplier, we may conclude that the total of required > operations per second would be much less. Yes, the multiplies are the same cost as adds, but you conveniently left out the square root at the end. RMS would require one multiply and one add per sample. The two poles of low pass filtering I showed used 4 adds and 2 multiplies per sample. A good chunk of the 80 extra operations per line cycle will be offset by the square root operation of RMS. However, both methods will take only a tiny fraction of processor cycles, and Dario made it clear that there were plenty of cycles available, so there is no real distinction here. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist