By convention, generated power is negative. So real power can be negative.
x-axis is the real power. y-axis is the reactive power. Apparent power is the length of the vector, always positive.
I think you are talking about phase angle being positive / negative, not the power factor.
When power factor is equal to 0, the energy flow is entirely reactive and stored energy in the load returns to the source on each cycle. When the power factor is 1, referred to as unity power factor, all the energy supplied by the source is consumed by the load. Power factors are usually stated as âleadingâ or âlaggingâ to show the sign of the phase angle. Capacitive loads are leading (current leads voltage), and inductive loads are lagging (current lags voltage).
A negative power factor (0 to â1) can result from returning active power to the source, such as in the case of a building fitted with solar panels when surplus power is fed back into the supply.
Power factor - Wikipedia
It has been 30 years since I did AC theory!
So which of these is correct?
If generated power is in fact reported as a negative number:
At the time of this measurement, power was being consumed, not generated. Thus Iâd say the positive power factor is correct.
However, for generated power, PF is negative. So unconditionally reporting the absolute value is wrong.
The trouble is that that sensor has nothing to do with my solar export. It is only measuring a single load (my heat pump). It does not care if the energy comes from the solar inverter or the grid.
Whatâs even weirder is that the Shelly web interface is now agreeing with their API (there have been firmware updates):
This is my theory. It is not correct mathematically, but it might make sense from the firmware programmerâs point of view.
- The Shelly programmer deemed the correct mathematical sign of the power factor as redundant, because power consumption / generation can be decided based on the sign of the real power P.
- They wanted to include information about the power factor being leading / lagging. Now that abs(pf) is always positive, it might have seemed like a good idea to them to add this information as the sign of pf.
What G6EJD is seeing in their system could be a coincidence. The sign of the power factor changing with (solar?) power generation might be a result of the load type changing.
Assuming the above is right, Home Assistant should probably do something like sgn(P)*abs(pf) to get the mathematically correct power factor value. (I donât know if thatâs desirable though. After all, the sign is redundant information, and knowing if the PF is leading or lagging is much more useful.)
Itâs 2:30 AM here, so you should probably take this theory with a grain of salt.
The sign of the PF is vital to calculate energy flows, either import or export.
Yes the Shelly firmware has been updated to correct their sign error. Youâll also note they now report Voltage, Current and PF so there is everything needed for the classic VAr calculation and still the PF sign is necessary!
So all thatâs required is to remove the abs(PF) change that was made recently and normal integration service will resume.
BTW it is quite usual for an induction motor to exhibit a large leading PF so the basic CIVIL aide memoir does not work as itâs an inductive load and does not follow the rule. Most industrial users will run an induction motor on light load for PF correction purposes as they get charged for VAr domestic customers are charged for Watts. Any air conditioning unit is highly likely to be using an induction motor (no brushes) and so presents a negative PF to the supply evident no matter where the measurement is made in the house.
For pure sine waves, pf = cos(phi), where phi is the phase angle.
No matter what combination of inductive and capacitive load you have, if you donât generate any real power, you cannot get a phase angle that is not in the range <-pi/2; pi/2>. Thus, pf is in the range <0; 1>.
Pf can only be negative if real power is being generated. However, in that case, P is also negative.
The vector math wouldnât work if PF was negative for an inductive load.
S = P + jQ
P is real power being consumed. Since this is a load and not a generator, P is a positive number.
Q is the reactive power. Either positive or negative, based on load type.
S is complex power.
|S| is apparent power.
P = pf * |S|
|S| is always positive. Thus, PF can only be negative if P is negative (i.e. if real power is being produced, which an inductive load cannot do).
I recommend that you read the wikipedia article. It clearly show the equations, as well as the graphical representation (power triangle).
What I was trying to explain in one of my previous comments was that you used the incorrect equation in your example.
P = 12.88 W
Q = -93.52 var (you thought this to be |S| = -93.52 VA, which cannot be true).
You are calculating PF = P / Q, which is not right. For example, Q = 0 for a purely resistive load. If your equation was correct, PF wouldnât be defined for a purely resistive load (division by zero), yet itâs a well-known fact that itâs 1 (see the Wikipedia article).
I didn't want to start a flame war. I agree that Home Assistant shouldn't be returning the abs() of PF as this is removing a piece of information the device is sending.
What I donât agree with is your explanation of why PF would be negative.
I also donât think the device is returning the true power factor (which would have the same sign as P), but rather a value that also contains information about the PF being leading / lagging, which cannot normally be decided just based on the value of PF (again, see Wikipedia).
In a property when there is no load on the incoming grid the PF will be 1, I think we agree on that.
Then if resistive loads are applied the PF will remain at 1 and the load current increases.
However, loads are never perfectly resistive so R +jX or R-jX will start to apply as X is no longer 0 and in most cases the load is inductive and the current will lag the voltage applied due to back EMF and the PF will move to a positive value but less than 1 typically +0.8 so now the Apparent current flow has increased being the vector sum of the real and imaginary current components.
The equation Real Power/Apparent Power always works because Apparent Power can never be 0 and the result is always the PF.
Donât forget Wiki articles are created by the general public and can be amended by the general public they are not always the definitive answer to topics!
If the house has many leading PF loads like TV power supplies and LED lighting or induction motors, all tend to have a PF of about -0.5 because they use capacitor droppers or by their nature they present a leading load, then the predominant house load will be leading and the -ve sign denotes that, Iâm not sure why this is causing so much confusion.
High leading PF loads have a -ve sign
High lagging PF loads have a +ve sign
Both by convention.
When energy flows out of a property usually from solar generation the PF will be negative, and when there is no solar and when the house loads are predominantly negative the measured PF will be negative or when the house loads are predominantly positive the PF will be positive.
When a solar system is generating the PF will continuously change from + to - as the house load changes usually when the house consumes all of the excess solar energy.
Had the integration changes been challenged by more knowledgeable commentators this thread would never have been started! But of course itâs occurred after the event when it went wrong.
We just need the integration changes to be undone so it no-longer returns abs(PF) and just PF
If this is how you define the power factor, then the equations presented on Wikipedia donât work. And PF != cos(phi). (This might not be entirely relevant, but in Czech, we donât use an extra symbol (PF) for power factor. We just write cos(phi).)
This also isnât true with your definition of PF.
However, this isnât even what you did in your example:
You have divided real power by reactive power Q (negative number in this case), not apparent power |S|.
What if this was a mostly resistive load? Say P = 100 W; Q = -1 var. You would get PF = 100 / (-1 var) = -100 from your formula. I think weâll agree that this cannot be right.
Wiki articles should cite trustworthy sources. If you donât trust the information written there, you can check with the cited materials.
Power Factor sign is subject to standard used, that is either the IEEE or IEC standards.
A comparison of the 2 standards is presented:
https://www.se.com/ww/en/faqs/FA212521/
PF sign convention: IEC
PF sign correlates with the direction of real power (kW) flow.
- Quadrant 1 and 4: Positive real power (+kW), the PF sign is positive (+).
- Quadrant 2 and 3: Negative real power (-kW), the PF sign is negative (-).
PF sign convention: IEEE
PF sign is correlates with the PF lead/lag convention, in other words, the effective load type (inductive or capacitive):
- For a capacitive load (PF leading, quadrant 2 and 4), the PF sign is positive (+).
- For an inductive load (PF lagging, quadrant 1 and 3), the PF sign is negative (-).
PF sign test on Shelly EM:
I test the sign of PF given by the Shelly EM on the 4 quadrant by looking the âpowerâ, âreactive powerâ and âpfâ (publish with mqtt) and obtain:
- For a capacitive load (PF leading, quadrant 2 and 4), the PF sign is negative (-).
- For an inductive load (PF lagging, quadrant 1 and 3), the PF sign is positive (+).
It seems that Shelly EM use (IEEE PF sign convention) multiply by (-1)