>> Random noise probably would be attenuated indeed, > > There is nothing probablistic about it. =A0The math shows quite > clearly that random noise will be attenuated, and by how much. Since "math" word mentioned, the pathetic statement would look much better if "theoretically" word were used: "The math shows quite clearly that random noise will THEORETICALLY be attenuated, and by how much." In real life (OP mentioned pumps) everything could happen, say, a drunken technician would solder something wrong or stupid non-relevant math model would have been chosen. That's why I've used "probably" word. >> 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. =A0Low pass filtering reduces the > harmonics compared to the fundamental. =A0Therefore the more > filtering, the more the result will look like a sine. =A0In the limit, > you are left with only the fundamental component of the distored > waveform, which will be a pure sine. The more filtering, the more the result will look like a sine, the less useful it could be for our analysis. We need to protect the pump. Among other main factors that kill the device is "how much" real waveform differs from that fundamental component, and not only on top of the wave but also throughout the whole wave period. The mentioned RMS approach could easily be extended to calculate the deviation from the fundamental component since the amplitude of the fundamental component could be predicted based on its previous values. . > Take a look at the plot I posted a few days ago. =A0The input to > the filter was a sine with the whole bottom cut off. =A0The output > of the two pole filter looked a lot more sinusoidal. > > Dario is looking at the line voltage, which has very low impedence. You were told many times "impedence" should be impedAnce. Why not the spelling to get fixed already. Besides as you might have known everything is trade-off including the mentioned line impedance. It may not be very low. A 2 kWatt motor on 2 Ohm 220 V line would cause 20 V drop that not necessarily be of a sine waveform due to its SCR/TRIAC regulator. Copper cable is expensive, so 2 Ohm could be quite realistic. > 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. No, it often could not be reasonable to suggest the waveform is sine pure enough. > Remember that Dario only needs 5% accuracy. I do. >>> 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. =A0This statement > is just silly superstition, Your style casts serious doubts on your ability to stay concentrated on EE-related problems. > 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. Basically, as far as I understand, your low pass filtering takes into the filtering only a subset of all the measurements. RMS takes them all. That's why, since the number of points is considerably greater, then at the same quantization period it yields greater accuracy. That's a long story to prove it strictly. You may wish to do it on your own. >> 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. A bit of creativity might tell one that we may compare the result to square of upper and bottom values thus eliminating the need to take the square root at the end. > RMS would require one multiply and one add per > sample. =A0The two poles of low pass filtering I showed > used 4 adds and 2 multiplies per sample. Let it be so. > A good chunk of the 80 extra operations per line > cycle will be offset by the square root operation of RMS. I am not getting what you are talking about, first we don't have to calculate square root at all. And if we had to figure out square root, it would take much less operations: - Keep last average of individual square values and corresponding square ro= ot; - Calculate the difference between new average and that last average of individual square values. - Divide the difference by 2 (do you remember what's the derivative of square function?) - Increment last square root by the result; - Square the incremented value and compare it to that new average of individual square values. - If equal then it is sought-for square root, if not repeat with the last pair of values as last average and its square. In two, I believe, loops you'll get the square root. Regards. -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist