Marechiare wrote: > Imagine the device to be connected to a supply of very distorted sine > (say square waveform of the back-up UPS). No, since one of the assumptions for the peak picking method is that the voltage waveform is not significantly distorted. If the system has to deal with distortion, then doing the full RMS calculation is pretty much required to get the "real" voltage. > - assume you know the amplitude of fundamental component behind the > wave Bad assumption, since that's basically what he's trying to measure. > Total of instantaneous squared values for the cycle IS low pass > filtered by the very process of addition the values, isn't it? No, that is a integral. In the long run the AC components will sum to 0 and you will be left with the integral of the DC component, which is a infinitely increasing value for any non-zero DC offset. > High frequency distortions are unlikely after the transformer, > I think. But wait, your earlier argument was exactly the opposite: "Imagine the device to be connected to a supply of very distorted sine". You can't have it both ways. In the end, only Dario can answer whether the mostly sine approximation is valid in his case. ******************************************************************** 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