I've got one question regarding the gain calibration of xWATTHR, xVAHR, xVARHR and would really appreciate if you could help me out.
First thing I have to mention is that I will not use the pulse outputs - I will directly read the values of the energy registers in my application using SPI. So if I'm getting anything right, the only cause to calibrate the gains of the energy registers would be to achieve constant Wh/LSB, VAh/LSB and VARh/LSB constants for the three phases, right? Am I missing accuracy if I don't perform any gain adjustment (leave xWG, xVAG and xVARG as default) but use specific constants for each phase (i.e. Wh/LSB(A), Wh/LSB(B), Wh/LSB(C)...) in my calculation instead?
I'm looking forward to your advice...
You are correct! If you are okay with setting different calibration constants per phase and are not concerned about what the exact register value must be at certain input conditions, you can skip setting the gain registers. By doing so, you wouldn't be sacrificing accuracy.
thank you very much for your advice and I would appreciate if you would help me out with another question... After finishing all steps of calibration I performed some measurements and I recognized that I see quite a lot of reactive energy while the load is nearly full resistive (PF ~0.9999). Compared to the meter I use as reference the error for reactive energy is above 200 % and so I'm wondering if I did some fundamental mistake while performing phase compensation. I used line accumulation for phase calibration at PF=1 und PF=0.75 and adjusted equation 69 to this. What I never really thought about was equation 70, but after a more intensive look consider it as a possible source of my problem.
Can you tell me if SQRT(3) in this equation is related to PF=0.5? I could not figure out how this formula is derivated so far but I guess SQRT(3) could be the tangent of 60° (PF=0.5) and should be adjusted to tan(-40°) as this is the actual phase angle my case.
Can you please tell me if this might be the root of the problem or what else could cause a massive error as the one I recognize?
I'm beginning to feel a little bit desperate about this topic...
As I said I use a power factor of 0.75 for phase calibration - in fact it's capacitive and not inductive as in the example mentioned in the datasheet. After I stumbled over figure 6 in application note AN-639 (http://www.analog.com/media/en/technical-documentation/application-notes/AN-639.pdf) I think I might already have done a mistake in equation 69 of the ADE7758's datasheet.
I interpreted equation 69 as follows: (xWATTHR@PF<1 - PF<1 * xWATTHR@PF1) / (PF<1 * xWATTHR@PF1) with a power factor that's the cosine of PHI and so it's positive no matter if PHI is positive or negative. But when I see figure 7 in AN-639 the PF is interpreted negative if the current leads the voltage which is the case with a capacitative load as the one that I'm using for calibration. Does this mean, with a PF of 0.5 capacitive equation 69 should look as follows: (xWATTHR@PF0.5 - (-0.5) * xWATTHR@PF1) / ((-0.5) * xWATTHR@PF1) ?
I would really appreciate if someone could help me with this question and the question above...
Whether the angle/PF is positive or negative, the active energy result would always be positive, when you are in quadrants I and IV of figure 6 in AN639 app note. So, that is not a problem. With respect to sqrt(3) term, that refers to tan(60degrees). For your case, if angle is 41.4, then replace sqrt(3) by tan(41.4degrees). If -41.4, then use tan(-41.4).
Let me give you an example to help you here:
Let us say I have applied 5A and 10V with an angle of 0 degrees (PF=1) and I got 5678d as my WATTHR register value. Then I applied 5A and 10V with an angle of 41.4 degrees and I got 4200d. Now, when I compute error, I do: (4200-5678*cos(41.4))/(5678*cos(41.4))= -0.01388. Angle error can be found out to be - asin (-0.01388/tan(41.4)) = 0.9023degrees.
Does this make sense? If it still doesn't make sense, please send me the register data that you get and I can use that to find error.
How are you confirming that the phase cal is the source of the error? Without phase cal, do you read good active energy values at normal case? Do you have the integrator enabled?
so I should have done everything right during calibration, but I still get enormous errors in active energy at PF close to 0 and reactive energy at PF close to 1 after calibration. Let me show you how I performed calibration with the register values I read. The gain register (0x23) is left as default, so the integrator should have been disabled.
1) VRMS / IRMS offset calibration (no problems)
2) Phase calibration (with register values of step 1)
2a) For PF1 reading at 1.7193 A | 230.10 V | PHI -0,136° I get AWATTHR 23247dec (500 halfcycles)
2b) For PF0.75 reading at 1.7180 A | 234.02 V | PHI -40.278° I get AWATTHR 17923dec (500 halfcycles)
2c) As I'm not able to match current and voltage of the both readings I modified equation 69 as follows:
Error% = [(17923 - (1.7180 A * 234.02 V * COS -40.278° / 1.7193 A * 230.10 V * COS -0.136°) * 23247)] / [(1.7180 A * 234.02 V * COS -40.278° / 1.7193 A * 230.10 V * COS -0.136°) * 23247] = -0.5608 %
2d) Error° = -ARCSIN[-0.005608 / TAN(-40.278°)] = -0.3792°
2e) APHCAL = -0.3792° * (9.6 / 1.2) * (2085 / 360°) = -18 = 0xEE
3) Power offset calibration (with register values of step 1 / 2)
3a) Active power offset
3aa) For 230.45 V | 0.0494 A | PF 1 | 23500 halfcycles I get AWATTHR 31588dec
3ab) For 230.32 V | 1.7215 A | PF 1 | 500 halfcycles I get AWATTHR 23309dec
3ac) Offset = [(31588 * 1.7215 A) - (23500 / 500 * 23309 * 0.0494 A)] / [0.0494 A - 1.7215 A] = -155
3ad) AWATTOS = [(-155 * 4) / (235.08 * 10 * 10^6)] * 2^29 = -142 = 0xFF72
3b) Reactive power offset (with register values of step 1, 2 and 3ad)
3ba) For 230.19 V | 0.0499 A | PF 0 | 23500 halfcycles I get AVARHR -31952dec
3bb) For 230.09 V | 1.7592 A | PF 0 | 500 halfcycles I get AVARHR -23700dec
3bc) Offset = [(-31952 * 1.7592 A) - (23500 / 500 * -23700 * 0.0499 A)] / [0.0499 A - 1.7592 A] = 366
3bd) AVAROS = [((366 * 4) / (235,19 * 10 * 10^6)) * (2085 / 202)] * 2^26 = 432 = 0x01B0
4) Wh/LSB, VAh/LSB, varh/LSB constants
4a) For 230.17 V | 0.1794 A | PF 1 (PHI = -0,122°) | accumulation time 5.004 (500 halfcycles, 49,96 Hz) I get AVAHR 23400dec and AWATTHR 23259dec so Wh/LSB is 2.365096*10^-5 and VAh/LSB is 2.350850*10^-5
4b) For 229.79 V | 1.7567 A | PF 0 (PHI = -89.922) | accumulation time 5.004 (500 halfcycles, 49,96 Hz) I get AVARHR -23625dec so varh/LSB is 2.375044*10^-5
After that process I performed an test measurement at PF 1 / PF 0 / PF 0.5 (error% is compared to reference meter)
a) ~230 V | ~1.70 A | PF 1: AVAHR 23450dec (error% 0.04) / AWATTHR 23305dec (error% 0.03) / AVARHR -180dec (error% 275)
b) ~230 V | ~1.70 A | PF 0: AVAHR 24019dec (error% 0.09) / AWATTHR 217dec (error% 541) / AVARHR -23715dec (error% -0.16)
c) ~230 V | ~1.00 A | PF 0.5: AVAHR 15454dec (error% 0.03) / AWATTHR 7873dec (error% 1,19) / AVARHR -13211dec (error% 0.21)
For I = 0.05 at PF 1 and PF 0 the errors are nearly the same.
I thought the source of the error must be PHCAL as I went through the other steps a few times, checked all my spreadsheets for typos within the equations but couldn't find one. I actually don't understand why this enormous errors occur. My next step - if there's no idea from your side - would be changing the current transformers I am using.
Thank you very much for your help...