why use phase calibration and just for voltage?

In the function EnergyMonitor:: PHASECAL : 0.9 :

const float PHASECAL = 0.9;

// Phase calibration
calibratedV = lastFilteredV + PHASECAL * (filteredV - lastFilteredV);

I dont understand why we using this? why 0.9? and why we just using for voltage? how about the current?

--> calibratedI= lastFilteredI + PHASECAL * (filteredI - lastFilteredI); ??? why we dont use this??

Can anyone explain it to me in simple terms?


Robert Wall's picture

Re: why use phase calibration and just for voltage?

Read the reports on the voltage and current transformers, and the article about the algorithm, in Building Blocks, and you'll see that there are two phase shifts (that aren't constant) and a timing shift because the inputs are read sequentially. Your emonTx has no knowledge of absolute phase (or time), it is only concerned about the difference between the two inputs. You can shift either the voltage wave or the current wave, there is no need to shift both. The voltage wave is likely to be less distorted than the current wave, so it will suffer less additional distortion going through the phase shift algorithm.

The number isn't necessarily 0.9 - that is a starting value. You set the correct value for your particular hardware when you calibrate your system.

shaulagara's picture

Re: why use phase calibration and just for voltage?

now i understand

thank you for sharing me...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.