How is summated MD calculated in terms of the value sent back to SAP?

Avatar

sdg.marinusvz
2024-06-25 12:29
Last Edited 2024-06-25 12:31

This post was transcribed from a support call


Summated meter accounts should be vectorially summated (total active energies of all the meters, total reactive energies of all the meters, find the length of the diagonal with theory of Pythagoras). However, SAP just count up the scalars of the MD readings for all the meters in the Meter Account. Therefore, to get the correct MD on the bill, we spoof the kVA reading we send back to SAP. We divide the MD proportionally between the meters and send the MD per meter back accordingly, so that the sum of all the meter MDs would be equal to the vectorially summated MD.

The spoofed MD per meter for summated meter accounts are indeed with a positive proportion per meter (abs value), so it correctly counts up to the MD of the summated account across all meters, whether the energies are positive or negative. (The proportion is actually the sum of the absolute of all mentioned registers, not just P1 and P2 but also Q1-4)

where value is the summated MD, and e.g. P1 is the forward active energy of the meter the MD is returned for, and P1_sum is the sum of the energes of all the forward active energies of all the meters:

double prop1 =  Math.abs(P1*p1f*toud) + Math.abs(P2*p2f*toud) + Math.abs(Q1*q1f*toud) + Math.abs(Q2*q2f*toud) + Math.abs(Q3*q3f*toud) + Math.abs(Q4*q4f*toud) + Math.abs(S * sf*toud);

double propSum = Math.abs(P1_sum*p1f*toud) + Math.abs(P2_sum*p2f*toud) + Math.abs(Q1_sum*q1f*toud) + Math.abs(Q2_sum*q2f*toud) + Math.abs(Q3_sum*q3f*toud) + Math.abs(Q4_sum*q4f*toud) + Math.abs(S_sum * sf*toud);

if(propSum > 0)

{

  double multip = prop1 / propSum;

  value *= multip;

}


(p1f is whether the tick box for that register is checked, in this case p1, and toud is whether the tou period applies)


Please log in to post a comment