Timestamping with RPICT: Difference between revisions

From lechacal
Jump to navigation Jump to search
(Created page with " This guide is for those with precise timing requirements. ===Timing with the default firmware=== RPICT computes power using Current/Voltage pair which we call CV pairs. Th...")
 
No edit summary
Line 11: Line 11:


Note there is a difference between a CV pair and a channel. A CV pair can generate several channels. realPower Irms Vrms PowerFactor are all channels produced by one single CV pair. Therefore it does not take more time to output realPower Vrms Irms and PowerFactor rather than just realPower only. In both cases this will take 0.4s.
Note there is a difference between a CV pair and a channel. A CV pair can generate several channels. realPower Irms Vrms PowerFactor are all channels produced by one single CV pair. Therefore it does not take more time to output realPower Vrms Irms and PowerFactor rather than just realPower only. In both cases this will take 0.4s.
If we have 7 cv pairs in the config (as with the RPICT7V1) then the total time to complete a full reading of all sensors will be 7*0.4 = 2.8s. This can be considered the biggest timing error possible between the time when the data was sent on the serial port and the time when it was actually measured and computed by the RPICT board.

Revision as of 13:07, 12 November 2020


This guide is for those with precise timing requirements.

Timing with the default firmware

RPICT computes power using Current/Voltage pair which we call CV pairs. The configuration defines these CV pairs for example (ct1 master, v1 master) or (ct1 slave, v1 master). Therefore the microcontroller has a list of CV pairs to compute and these are run one at a time.

Computing rms value or active Power is not instantaneous. We need to acquire a certain amount of analogue readings of the waveform before being able to compute the rms value with a good accuracy. Most signals being 50 or 60Hz we can determine the time it takes for one CV pair to complete. The parameter Ncycles in the config is the number of cycles used to compute rms or power. It is set to 20 by default. So the computing length for 50Hz is 20/50 = 0.4s. This is for a single CV pair.

Note there is a difference between a CV pair and a channel. A CV pair can generate several channels. realPower Irms Vrms PowerFactor are all channels produced by one single CV pair. Therefore it does not take more time to output realPower Vrms Irms and PowerFactor rather than just realPower only. In both cases this will take 0.4s.

If we have 7 cv pairs in the config (as with the RPICT7V1) then the total time to complete a full reading of all sensors will be 7*0.4 = 2.8s. This can be considered the biggest timing error possible between the time when the data was sent on the serial port and the time when it was actually measured and computed by the RPICT board.