how is individual phase voltage derived as +-120 deg phase angle from single volt source ?

just built my emonTxShield and loaded emonTxShield_CT1234_Voltage.ino.

Connected voltage and ct1,ct2,ct3 YHDC SCT-013-030 to power lines L1, L2, L3,

Calculates reasonable voltage Vrms and real-power for ct1. Irms for all sensors are as expected.

However powerfactors and thus real-power for ct2 (0.04) and ct3 (0.6) are weird. Even with 1.5kW resisitve load, far away from real-power and powerfactor 1.00 seen on ct1 measurement.

Maybe I have not fully understood, how the voltages for ct2 and ct3 with 120 degree / 240 degree phase angle in respect to ct0 are derived in software from the single voltage samplings of L1. My understanding was, that the phase shift calibration factors used in "ct1.voltage(0, 228.268, 1.7)" cover only the small angle mismatch caused by sequential sampling and non-ideal current transducers, but not the nominal +-120 degree of the voltages needed to reconstruct for ct2 and ct3.

Appreciating very much insights on how this is accomplished in sw and suggestions how to correct my measurements or a pointer, where to read on.

joe 

Robert Wall's picture

Re: how is individual phase voltage derived as +-120 deg phase angle from single volt source ?

You need to store the Line 1 voltages for 120° and 240°  in an array. MartinR's phase locked loop sketch will do it - Petrik has published a version for the emonTx Shield (published at http://openenergymonitor.org/emon/node/2339#comment-13967,
the updated sketch can be found at http://openenergymonitor.org/emon/sites/default/files/emonTx_Solar_Contr... ) and that's the most accurate algorithm, otherwise there's my 3-phase in Github. Bear in mind that using one voltage and hoping it is a good representation of the other two is never as accurate as actually measuring the other two lines.

You are right, you can't do it with PHASECAL on its own - read the Building Blocks article on the Phasecal algorithm to see why.

murcielago's picture

Re: how is individual phase voltage derived as +-120 deg phase angle from single volt source ?

thank you very much for your help Robert !

Yesterday I flashed emonTx_Solar_Controller_Temperature_PLL_LCD_3Phase.ino and had a long night session investigating its outcome.

After adjusting the constants for VCAL and IxCAL I got reasonable values for real- and apparent power of L1, using a heater blower.

However values for L2 and L3 were initially negative. While investiaging I tried to swap pin assignment for CT2PIN CT3PIN. Surprisingly I now get reasonable (positive) rPwr and aPwr values when plugging the heater to L2 or L3, with about same levels as on L1.

But there are still some issues to solve:

1. Output for the power values were also swapped. Measurements for L3 appear as L2 and vice versa. The CTs for L1,L2,L3 were all installed in the same orientation as indicated on a little label  "Load => SOURCE" on them. Apparently, there goes something wrong with the phase assignment.

2. RFM12B:  I was not able to receive anything with my emon_GLCD. This worked perfectly with emonTxShield_CT1234_Voltage.ino. Sure, I adapted the extended PayloadTx structure to HomeEnergyMonitor.ino used in the emon_GLCD. In a step further I tried to integrate the RFM12 scheme as used in the working sketch. But this caused the PLL to report permanently "unlocked". The changes required to include JeeLib and comment out all previous rfm stuff. A conflict, caused by LiquidCrystal beeing now defined twice, was temporarily solved by commenting out all lcd statements.

It came to me as a little surprise, that emonTx Shield, which is specially designed to work with 4 phases and only one voltage reference apparently has no working sketch for exactly that scenario. Would it be feasable to extend / rework its hardware to use 3x voltage xformers on further ADC pins ? This would result in sampling six ADCs instead of five. Maybe this makes the whole phase measurements a lot easier and more accurate.

Is there a doku, which points out the exact differences between emonTx and emonTx-Shield ? This may help when trying to port sketches to the shield ?

Robert Wall's picture

Re: how is individual phase voltage derived as +-120 deg phase angle from single volt source ?

I have not checked Petrik's code in detail, but of course the phase rotation must be correct, or you will get wrong values. This is an age-old problem with 3-phase systems. (The old joke is: if a 3-phase motor turns in the correct direction the first time it is powered, buy a lottery ticket because it's your lucky day!)

The emonTx Shield is NOT designed to work on a polyphase system. All the OEM equipment is designed for single phase. It can be used on a 3-phase system with modifications as you suggest.

I don't think Petrik's sketch uses the RFM12B at all. The best way for you to add the RFM12B is to go back to MartinR's original PLL sketch and use the RFM12B parts from there. It is possible that JeeLib was causing the loop to lose lock. You don't need it with MartinR's code. MartinR's code is here.

I don't know of a single document comparing the port mappings of the two. Both are available but in different places.

Comment viewing options

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