sdg.marinusvz
2013-03-01 05:37
I assume you're talking about calculating power factor from instantaneous values?
  
 Here follows a code snippet to explain our algorithm (explanation of the variable names are given below the snippet):
  
 double p1 = 0;
try{p1=(v1 * i1 * Math.cos( Math.toRadians(i1a-v1a))) / 1000.0;}catch(Exception e){}
double p2 = 0;
try{p2=(v2 * i2 * Math.cos( Math.toRadians(i2a-v2a))) / 1000.0;}catch(Exception e){}
double p3 = 0;
try{p3=(v3 * i3 * Math.cos( Math.toRadians(i3a-v3a))) / 1000.0;}catch(Exception e){}
double q1 = 0;
try{q1=(v1 * i1 * Math.sin( Math.toRadians(i1a-v1a))) / 1000.0;}catch(Exception e){}
double q2 = 0;
try{q2=(v2 * i2 * Math.sin( Math.toRadians(i2a-v2a))) / 1000.0;}catch(Exception e){}
double q3 = 0;
try{q3=(v3 * i3 * Math.sin( Math.toRadians(i3a-v3a))) / 1000.0;}catch(Exception e){}
double s1 = Math.sqrt(p1*p1+q1*q1);
double s2 = Math.sqrt(p2*p2+q2*q2);
double s3 = Math.sqrt(p3*p3+q3*q3);
double pT = p1 + p2 + p3;
double qT = q1 + q2 + q3;
double sT = Math.sqrt(pT*pT+qT*qT);
 double pf1 = p1/s1;
double pf2 = p2/s2;
double pf3 = p3/s3;
double pfT = pT / sT;
    
where:
   v1 = red voltage 
   v2 = white voltage 
   v3 = blue voltage 
   i1 = red current 
   i2 = white current 
   i3 = blue current 
   v1a = red voltage phasor angle
   v2a = white voltage phasor angle
   v3a = blue voltage phasor angle
   i1a = red current phasor angle
   i2a = white current phasor angle
   i3a = blue current phasor angle
    p1 = Red Active Energy
   p2 = white Active Energy
   p3 = blue Active Energy
   q1 = Red Reactive Energy
   q2 = white Reactive Energy
   q3 = blue Reactive Energy
   pT = total Active Energy
   qT = total Reactive Energy
   sT = Demand (kVA)
   pf1 = red power factor
   pf2 = white power factor
   pf2 = blue power factor
   pfT = total power factor
  
  
 On the Profile Graph and for Billing values, we take the values  from the meter's profile log, and therefore we don't use the  instantaneous values to determine the power factor for billing. (it  already gives me the total kWh and kVAh per half hour, so in that case I  just divide the kWh by the kVAh - for a particular half hour).