Community
OpenEnergyMonitor

# Power P or Volt-ampere VA?

Hello

I’m using a SDM120 modbus kWh meter to measure voltage V, current I and power P (and more). My portable speaker is plugged in. The P is measured as 0 W. If I calculate Volt-ampere = 230 V * 0,0418 A = 9,614 VA.

I know the basics and that de power factor is involved. But what is best to log? The measured P or the calculated VA? I guess the ‘what is billed’ is important, but maybe there are other reasons to log one or another? A plot:

It depends on what you want to know!

Obviously, you will be billed for power while you are an ordinary household, but if you are a large consumer, because a poor power factor costs your electricity supplier more - both in losses but also because bigger cables and larger transformers are needed - it is likely that you will also be penalised if your power factor falls too far.

Generally, the power supply system is inductive, so if you have a large load with a low and capacitive power factor, it will tend to cause the voltage to rise, which could reduce the life of your appliances if it rises too far. In that case, voltage is quite interesting.

If your concern is cable ratings and circuit breaker or fuse ratings, then current is most important.

I don’t know if it applies where you are, but in the UK, I can log voltage and frequency, and watch how generating capacity is added and removed as the system load changes during the day.

I have done another log when I was charging my smartphone. The SDM120 kWh meter can read:

``````print ("Voltage in Volts: ", V)
print ("Current in Amps:", I)
print ("Active Power in Watts:", P)
print ("Apparent power in VA:", VA)
#24 --> Reactive power in VAr
print ("Power factor:", PF)
print ("Frequency in Hz:", FR)
print ("Import active energy in kWh:", EI)
print ("Export active energy in kWh:", EE)
print ("Export reactive energy in kWh:", RI)
``````

The export from emoncms shows:

``````"Seconds since start", "I", "V", "P", "VA", "PF", "FR", "RI"
0, 0.000, 238.6, 0.000, 0.000, 1.000, 49.950, 2.9
10, 0.034, 238.8, 0.000, 0.000, 1.000, 50.000, 2.9
20, 0.034, 238.7, 0.000, 0.000, 1.000, 50.000, 2.9
30, 0.034, 238.6, 0.000, 0.000, 1.000, 50.000, 2.9
40, 0.034, 238.5, 0.000, 0.000, 1.000, 50.000, 2.9
50, 0.034, 238.2, 0.000, 0.000, 1.000, 50.000, 2.9
60, 0.034, 238.4, 0.000, 0.000, 1.000, 50.000, 2.9
70, 0.034, 237.6, 0.000, 0.000, 1.000, 50.000, 2.9
80, 0.034, 238.1, 0.000, 0.000, 1.000, 50.000, 2.9
90, 0.034, 236.2, 0.000, 0.000, 1.000, 50.000, 2.9
``````

I don’t understand eg. at 10 seconds I have 0.034 A and 238.8 V. I would expect the voltampere to be VA = 0.034 A * 238.8 V = 8.1124 VA, but it shows 0.000? Also the power should be a lot higher, I think.

If I do a logging with my desk lamp connected (I think it has LED), I have P and VA, but still VA = V * A gives another calculation (13,07 VA) compared to the logging (5,9 VA).

``````"Seconds since start", "I", "V", "P", "VA", "PF", "FR", "RI"
0, 0.000, 237.6, 0.000, 0.000, 1.000, 50.000, 2.9
10, 0.055, 237.7, 5.800, 5.900, 1.000, 49.950, 2.9
20, 0.055, 237.6, 5.700, 5.700, 1.000, 50.000, 2.9
30, 0.054, 237.7, 5.800, 5.800, 1.000, 50.000, 2.9``````

Are you reading the correct registers? Just looking at those 3 lines, I think you might have Import and Export mixed up for the reactive power.

The other explanation: What is the value of “Creep” or “Starting Current” for your meter? Check the data sheet or the manual. It is the value below which it assumes that any current recorded is an error and should be ignored, and for most meters it appears to be about 10 - 20 W (it varies by make and model).

The print-code is from my own script. My emonhub.conf has:

``````    registers = 0,6,12,18,30,70,72,74,76
names =     V,I, P,VA,PF,FR,EI,EE,RI
precision = 2,3, 1, 1, 3, 3, 3, 3, 3
``````

I don’t think I mixed up Import and Export for the reactive power. Or am I overlooking something in the manual of SDM120?

I also checked for “Creep” or “Starting Current”, but I couldn’t find anything in that link. But this document writes about Accuracy for Current, namely 0.5% of nominal. But I don’t understand what this means in practice.

OK, but I was just going by the names: EI: Energy Import; EE: Energy Export; RI: Reactive which - Import or Export? (Register 76 (0x4C) is Import - I think I was right.

From the data sheet

That says the operational current starts at 20 mA, approx. 4.6 - 4.8 W. The bottom limit is effectively the anti-creep or starting current. You should be above that limit, but it was the best thought I’d got at the time.

You were right indeed: I mixed up the letters blush. Concerning the operational current that start at 20 mA: that might have been the case for my smartphone. But I’m still not sure if my meter “meters” okay for appliances above 20 mA. Two examples:

LED Desk lamp

Value Info
239,5 V
0,050000000745058 A
5,59999990463257 P for Active Power in watt
5,69704151153564 S for Apparent power in volt-ampere (measured)
11,9750001784414 S for Apparent power in volt-ampere (calculated as V*A)
0,0 Q for Reactive power in volt-ampere reactive var
1 PF for Power Factor
49,9500007629395 f for Frequency in hertz

Toaster

Value Info
235,100006103516 V
4,53299999237061 A
1068,30004882813 P for Active Power in watt
1068,36254882813 S for Apparent power in volt-ampere (measured)
1065,70832587357 S for Apparent power in volt-ampere (calculated as V*A)
0,0 Q for Reactive power in volt-ampere reactive var
0,999998271465302 PF for Power Factor
50,0 f for Frequency in hertz

BTW: I live in Belgium and I’m just a regular consumer. So I guess V, A, P en kWh are the most important. But out of curiosity I have extended my script to read them all. I tried to use official names and units where I found them.

``````#!/usr/bin/env python3
import minimalmodbus

instrument = minimalmodbus.Instrument('/dev/ttyUSB0', 2)  # port name, slave address (in decimal)

instrument.serial.baudrate = 9600         # Baud
instrument.serial.bytesize = 8
instrument.serial.parity   = minimalmodbus.serial.PARITY_NONE
instrument.serial.stopbits = 1
instrument.serial.timeout  = 1          # seconds
instrument.mode = minimalmodbus.MODE_RTU   # rtu or ascii mode

print (instrument)

registers = [ 0,  6, 12, 18,    24,  30, 70,   72,   74,     76,     78,   84,   86,  88,    90,   92,   94, 258,  264,  342, 344]
names =     ["V","I","P","S",   "Q","PF","f","IAE","EAE",  "IRE",  "ERE","TSP","MSP","ISP","MIP","ESP","MEP","ID","MID","TAE","TRE"]
units =     ["V","A","W","VA","var", "","Hz","kWh","kWh","kvarh","kvarh",  "W",  "W",  "W",  "W",  "W",  "W", "A",  "A","kWh","kvarh"]
#precision = [ 2,  3,  1,   1,    3,   3,  3,    3,    3,      3,      3,    3,    3, 3]
info = [
"(V for Voltage in volt)",
"(I for Current in ampere)",
"(P for Active Power in watt)",
"(S for Apparent power in volt-ampere)",
"(Q for Reactive power in volt-ampere reactive)",
"(PF for Power Factor)",
"(f for Frequency in hertz)",
"(IAE for Import active energy in kilowatt-hour)",
"(EAE for Export active energy in kilowatt-hour)",
"(IRE for Import reactive energy in kilovolt-ampere reactive hours)",
"(ERE for Export reactive energy in kilovolt-ampere reactive hours)",
"(TSP for Total system power demand in watt)",
"(MSP for Maximum total system power demand in watt)",
"(ISP for Import system power demand in watt)",
"(MIP for Maximum import system power demand in watt)",
"(ESP for Export system power demand in watt)",
"(MEP for MaximumExport system power demand in watt)",
"(ID for current demand in ampere)",
"(MID for Maximum current demand in ampere)",
"(TAE for Total active energy in kilowatt-hour)",
"(TRE for Total reactive energy in kilovolt-ampere reactive hours)",
]

for i in range(len(registers)):
value = instrument.read_float(registers[i], 4, 2)
#value = round(value,precision[i]) #BUG: see https://stackoverflow.com/questions/455612/limiting-floats-to-two-decimal-points
print (str(registers[i]).rjust(3), str(value).rjust(20), units[i].ljust(5), info[i])
``````

An example output:

``````python3 sdm120-basic.py
minimalmodbus.Instrument<id=0x7f406e8f2370, address=2, mode=rtu, close_port_after_each_call=False, precalculate_read_size=True, clear_buffers_before_each_transaction=True, handle_local_echo=False, debug=False, serial=Serial<id=0x7f406e8f2070, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=1, xonxoff=False, rtscts=False, dsrdtr=False)>
0                239.5 V     (V for Voltage in volt)
6  0.05000000074505806 A     (I for Current in ampere)
12    5.599999904632568 W     (P for Active Power in watt)
18   5.6970415115356445 VA    (S for Apparent power in volt-ampere)
24                  0.0 var   (Q for Reactive power in volt-ampere reactive)
30                  1.0       (PF for Power Factor)
70    49.95000076293945 Hz    (f for Frequency in hertz)
72 0.004999999888241291 kWh   (IAE for Import active energy in kilowatt-hour)
74                  0.0 kWh   (EAE for Export active energy in kilowatt-hour)
76   0.2240000069141388 kvarh (IRE for Import reactive energy in kilovolt-ampere reactive hours)
78                  0.0 kvarh (ERE for Export reactive energy in kilovolt-ampere reactive hours)
84   1.6767228841781616 W     (TSP for Total system power demand in watt)
86   2.8643624782562256 W     (MSP for Maximum total system power demand in watt)
88    1.662111759185791 W     (ISP for Import system power demand in watt)
90   2.8643624782562256 W     (MIP for Maximum import system power demand in watt)
92 0.014611110091209412 W     (ESP for Export system power demand in watt)
94 0.025749990716576576 W     (MEP for MaximumExport system power demand in watt)
258  0.02715194970369339 A     (ID for current demand in ampere)
264  0.02715194970369339 A     (MID for Maximum current demand in ampere)
342 0.004999999888241291 kWh   (TAE for Total active energy in kilowatt-hour)
344   0.2240000069141388 kvarh (TRE for Total reactive energy in kilovolt-ampere reactive hours)
``````

OK, it’s wrong. What accuracy do you expect? Your meter is a Class 1 / Class B, which means it must be within ±1% at maximum current. According to my maths, the power you are reading is 5 W in 10 kW approximately, which is about 0.05% of maximum power.

At the moment: as long as it’s not way of and within the specs of the meter, I’m okay with it. I might build or use a power diverter in the future and then it might more important? And even then 5 watt of isn’t that big of a deal, I guess?

Robin Emley’s experience (https://www.mk2pvrouter.co.uk) suggests that a current transformer making direct measurements is the best way to control power diversion - assuming of course that the load can accept being switched on and off repeatedly, which of course is the case for water heating, but a problem with (say) battery charging.

The term ‘future’ is fairly flexible in my mind: could take weeks, months, years or even never. But thanks for your explanation about the current transformer!

At the moment I have my power feed in emoncms and as a process list I have a ‘Log to feed’ and ‘a Power to kWh’. But I guess instead of “Power to kWh” I better use the registers ‘Import active energy’ (heat pump) or ‘Export active energy’ (PV) or a combination of those (3 phase household on SDM630) and use ‘Log to feed’ on them? If something is wrong with emoncms, the SDM meters will still continue to log. If emoncms is up and running again after its downtime , it will contain the correct value in kWh.

Yes - that’s roughly the logic for accumulating the energy values in the emonTx - if the link goes down, the front end carries on. If the emonTx reboots (say after a power failure) and starts counting again from zero, then (if you’ve done emonCMS correctly) it permanently adds the last value it had before the fail - so in effect it carries on regardless. I’d expect your SDM120 to do likewise (but it would be wise to check).

Thank you! I will check.