??? 12/08/04 12:06 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#82754 - Calculating RMS Responding to: ???'s previous message |
To what depth do you want to know how to do this? What language are you using? In order to calculate RMS it is a matter of squaring each sample, adding these values together for one cycle then dividing by the number of samples in one cycle, then doing the square root of this. At 1000 samples/s you get 20 samples per cycle at 50Hz. To calculate the square root, Newton told us something about this - Xnew = (Val/Xold + Xold)/2; Xold = Xnew; repeat this until Xnew stops changing. Xold is the current approximation. This calculation is an iteration - you keep doing it until you zero in on the result. Start of with Xold being half of Val. (you can start with it being 0, but priming it with a value makes it converge faster. This info was got from an Intel app brief AB-34 "Integer Square Root Routine for 8096". Where you would find this on the web, I'm not sure - i have it in an old Intel databook from 1988. The other easier technique is to have a table of solutions - much easier to do in assembler. |
Topic | Author | Date |
rms value of thyristorised sine wave | 01/01/70 00:00 | |
thyristorised | 01/01/70 00:00 | |
rms value of thyristorised sine wave | 01/01/70 00:00 | |
Calculating RMS | 01/01/70 00:00 | |
Calculating RMS | 01/01/70 00:00 | |
Calculating RMS | 01/01/70 00:00 | |
possible in assembly | 01/01/70 00:00 | |
re: possible in assembly | 01/01/70 00:00 | |
Mistake in logic | 01/01/70 00:00 | |
Mistake in logic | 01/01/70 00:00 | |
? | 01/01/70 00:00 | |
????????????? | 01/01/70 00:00 | |
Fixed Point | 01/01/70 00:00 | |
Answer is wrong | 01/01/70 00:00 | |
Answer is wrong | 01/01/70 00:00 | |
Difficult; Laborious - not impossible | 01/01/70 00:00 | |
Calculating RMS | 01/01/70 00:00 | |
Russell can you send the file please | 01/01/70 00:00 | |
Calculating Square Roots | 01/01/70 00:00 | |
The book was paper! | 01/01/70 00:00 | |
Russell can you send the file please | 01/01/70 00:00 | |
It is supposed to | 01/01/70 00:00 | |
Good Reply | 01/01/70 00:00 | |
Thank you![]() | 01/01/70 00:00 | |
RMS Calculations | 01/01/70 00:00 |