Marechiare wrote: > 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. Yes, noise can happen, but this is all before the aforementioned math is applied. Since this math is performed digitally in a deterministic processor, it is totally predictable. > The more filtering, the more the result will look like a sine, Yes. > the less useful it could be for our analysis. More waving of dead fish. > 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. I have no real objection to doing RMS, although I would like it better if the whole waveform were available to the processor and I would certainly want some low pass filtering together with the RMS calculations. You seem to be skipping over that part. My objection to your posts is not about RMS as a method, but your unscientific way of dismissing other methods. This includes things like saying something is a "statistics" approach, which is supposed to make it inherently better (or was that worse?) than some other approach, and unfounded statements like a sine makes things less useful for some reason. > You were told many times "impedence" should be impedAnce. Why not the > spelling to get fixed already. Eyell trie too remember. However unless you write perfectly, it's probably not a good idea to get into a food fight about writing correct English. > 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. It's not as simple as that. First, low pass filtering does take into account many samples, with the most recent ones weighted more heavily. In general it is a weighted average. This can be seen two ways. One way is to follow the contribution of a single sample into the filter and as it decays away. Another is to think of the filter realized as a convolution. The filter kernel function is then the weighting function of the weighted average. These are all just different ways of looking at the same thing. Second, both methods have to apply filtering to make use of multiple samples. The instantaneous squared values don't tell you much useful on their own. These have to be low pass filtered to be useful. That's what the M in RMS implies. Whatever filtering you chose can just as well be applied to either method. > 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. I thought Dario wanted a readout of line voltage, so a square root needs to be performed at least every time the display is updated. > 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 root; > - 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. That's a long winded way of saying to calculate the square root iteratively each sample. Yes, that's probably a good approach. Again, I'm not against RMS, only how you were dismissing other methods. ******************************************************************** 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