Author Topic: how to measure the direction of a.c. power flow  (Read 21851 times)

0 Members and 1 Guest are viewing this topic.

Offline CodeDogTopic starter

  • Contributor
  • Posts: 22
  • Country: au
  • cave canem
how to measure the direction of a.c. power flow
« on: January 18, 2017, 03:54:44 am »
Here's the idea: unobtrusively measure the direction and intensity of power flowing along an a.c. line, and by unobtrusively I mean without a physical connection (e.g. clamp meter, Rogowski coils, ...), and the amount of power is not so important, just a relative value would be sufficient.

Why? ... Like a lot of others, I have solar panels on the roof. I also have a few high energy users such as a pool pump, and an airconditioner. Wouldn't it be great if I could immediately detect when I'm exporting power and flip on the pool pump? Or the aircon? And if it gets cloudy and I'm no longer exporting power, to turn off the pump?

If I could determine whether energy is flowing into my house or out of my house (on the mains active line) that would be fantastic. And if I knew how much (or even relatively how much) that would be even better. A centre-zero analog meter for a display would be sufficient.

But how to measure the direction in which energy is moving in an a.c. line? Phase angle doesn't do it. Some sort of directional coupler maybe?

One alternative would be to measure the power output of the solar array and the power consumption of the house, and calculate the difference - which would be either the power I am importing or the power being exported - depending on which is the larger of the 2 measured values. But this is not simple as I don't have easy access to the circuits feeding the house.

Another alternative would be to watch the meters in the meterbox and work out manually whether I'm importing or exporting - but this is time-consuming and doesn't provide an instantaneous indication of the situation.

Is anyone aware of a simple means to measure the direction in which energy is travelling on the a.c. feed to the house?

I sense a market opportunity here for a clever solution, if there isn't already something out there.

cheers,
Mark
 

Offline viperidae

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: nz
Re: how to measure the direction of a.c. power flow
« Reply #1 on: January 18, 2017, 05:32:15 am »
I'm pretty sure it works if you measure the current direction compared to the voltage.
Emoncms is an open source product that can do it
 

Offline CodeDogTopic starter

  • Contributor
  • Posts: 22
  • Country: au
  • cave canem
Re: how to measure the direction of a.c. power flow
« Reply #2 on: January 18, 2017, 06:08:39 am »
huh?

with ac there is no such thing as current direction is there? ... the current flows back and forth, 50 or 60 times a second
depending on your location  ... hence "alternating" current ... all day long the electrons just oscillate and barely move
much at all as far as I understand ... so there is no current direction.

But there is a current. (a movement of electrons). Just not in one direction only.
And although the current is not in one direction, energy DOES get transferred in one direction ... from the source to the load.

A.C. is weird.

the old-fashioned spinning disk meters could do this job ... if power was exported, the disk ran backwards

is there an electronic equivalent that does not require connection to the feed cable?

I totally don't understand what you mean by "measuring current direction compared to voltage". Sorry.


cheers,
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: how to measure the direction of a.c. power flow
« Reply #3 on: January 18, 2017, 06:17:11 am »
I totally don't understand what you mean by "measuring current direction compared to voltage". Sorry.

Seems there is a voltage/current relationship exploited in those old electromechanical meters....

 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: how to measure the direction of a.c. power flow
« Reply #4 on: January 18, 2017, 07:52:09 am »
The concept of scheduling and prioritizing loads is the future of energy, grid or solar.  With smart meters they will in the future start charging more for peak demand periods. The utility grid prefers to have your panels facing west to get that extra in late afternoon when they need it.  Since a meter can only look at volts and amps, it has to be looking at phase angle. That would imply that at some phase condition the meter would just stop.  Too much to think about at 3am.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: how to measure the direction of a.c. power flow
« Reply #5 on: January 18, 2017, 08:12:33 am »
You do this with the phase angle. And to know this you both need to know the current and the voltage.
Theoretically, you could use a capacative voltage meter, and a split core transformer core. But it would be very inaccurate since mains isn't a nice sine wave anymore. Thanks pfc.

Here are some fancy images.
Basically, the polarity (or pi phase angle) of the current determines the direction of the power. This is why you must always have your split core put on the right way. Otherwise the power is wrong.

https://openenergymonitor.org/emon/buildingblocks/ac-power-introduction
« Last Edit: January 18, 2017, 08:15:13 am by Jeroen3 »
 

Online Alex Nikitin

  • Super Contributor
  • ***
  • Posts: 1177
  • Country: gb
  • Femtoampnut and Tapehead.
    • A.N.T. Audio
Re: how to measure the direction of a.c. power flow
« Reply #6 on: January 18, 2017, 09:16:31 am »
A clamp current sensor and a synchronous demodulator clocked by the AC line frequency. The output polarity would depend on the phase of the current in reference to the voltage and will show the direction of the energy flow.

Cheers

Alex
 

Offline VK5RC

  • Supporter
  • ****
  • Posts: 2672
  • Country: au
Re: how to measure the direction of a.c. power flow
« Reply #7 on: January 18, 2017, 10:29:29 am »
I don't know much about mains but the classic RF solution is a directional coupler, it relies on the phase difference between the capacitively coupled and inductively coupled signal in the coupled line, some guys in the solder smoke podcast found a copy of one of the early Navy tech papers and retyped it (I have noted a few typos)
FYI.  http://soldersmoke.com/SWR%20N8ERF.pdf
Whoah! Watch where that landed we might need it later.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: how to measure the direction of a.c. power flow
« Reply #8 on: January 18, 2017, 12:18:39 pm »
Which is actually fairly easy, a clamp on current transformer with a suitable burden resistor and a voltage sampler, multiply the ac voltage and current samples together, lowpass and drive a centre zero meter.
 
You could probably do this with a diode ring mixer made with small mains transformers with the 'LO' port driven by the mains voltage and the 'RF' port being the current transformer, the IF port would then drive a centre zero meter scaled in kW.

I make it one small mains transformer, 4 diodes, one current transformer, four resistors and a centre zero meter movement, maybe a cap to avoid the needle shaking (And you can probably do away with the mains transformer but I would be cautious about that).

There are actually devices available that pretty much do this, the usual target being the hot water system (Switch on the heater such that net  power is zero), our hard of thinking government set things up so that solar is paid a subsidy even if YOU use all the power!

73 Dan.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3180
  • Country: au
Re: how to measure the direction of a.c. power flow
« Reply #9 on: January 18, 2017, 12:21:59 pm »
What about monitoring the winky LED on the smart meter? If you are exporting power it stops flashing.
 

Offline QuantumLogic

  • Contributor
  • Posts: 45
  • Country: us
Re: how to measure the direction of a.c. power flow
« Reply #10 on: January 19, 2017, 09:48:11 pm »
You will also need to put in some sort of delay circuitry to prevent switching loads on and off with each passing cloud.  Otherwise you'll burn up some stuff doing that too much (AC compressor, especially).
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: how to measure the direction of a.c. power flow
« Reply #11 on: January 19, 2017, 11:49:59 pm »
Aren't you just billed at the end of the month by the utility?  Does it even matter when you export?  It may matter if you are on a time-of-use schedule but, if that's the case, you would never run heavy loads during that time of day.  Presumably, the utility also pays more for your exports during on-peak periods but that isn't universally true.

When I had solar, Pacific Gas and Electric would run an annual account and we 'settled up' at the end of the year.   I made no monthly payment for kWh.  Whatever I generated they didn't sell so the only kWh they saw as demand was what they actually delivered.  I wasn't billed for time-of-use but there was a tier scheme.  My 8 kW array was so large that at the end of the year we were within about $50 of paying nothing to PG&E other than the monthly meter charge.

But there's a gotcha in the scheme.  Customers are not allowed to be net generators.  I paid the solar company $0.15/kWh (Power Purchase Agreement) but if I over-generated when settle-up came along I would be reimbursed only $0.04/kWh by PG&E.  It didn't pay to over-generate.

In any event, the new Smart Meters run in both directions and it is based on phase angle.  To sell power to the grid, you have to try and lead the voltage.  You are a buyer if your generator can't lead.  This phase angle lead is very small.

http://www.gosolarcalifornia.ca.gov/solar_basics/net_metering.php
 

Offline CodeDogTopic starter

  • Contributor
  • Posts: 22
  • Country: au
  • cave canem
Re: how to measure the direction of a.c. power flow
« Reply #12 on: January 20, 2017, 12:11:43 am »
here in Qld, I only get 8c per kWh exported, so there's not much benefit in exporting at all
cost to import is 28c, making it beneficial to use the  power I generate rather than export it

early adopters still get high export rates (44c i think) and I know several people who
actually get a cheque each quarter because the value of their exports exceeds the value
of their imports

yes, there'd need to be some sort of hysteresis in the algorithm to flip the loads on or off,
so as to avoid turning things on and off as each cloud passes by
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: au
    • send complaints here
Re: how to measure the direction of a.c. power flow
« Reply #13 on: January 20, 2017, 01:01:01 am »
Here's the idea: unobtrusively measure the direction and intensity of power flowing along an a.c. line, and by unobtrusively I mean without a physical connection (e.g. clamp meter, Rogowski coils, ...), and the amount of power is not so important, just a relative value would be sufficient.

Why? ... Like a lot of others, I have solar panels on the roof. I also have a few high energy users such as a pool pump, and an airconditioner. Wouldn't it be great if I could immediately detect when I'm exporting power and flip on the pool pump? Or the aircon? And if it gets cloudy and I'm no longer exporting power, to turn off the pump?
Good thinking to make the best investment from your solar system, sadly the networks are making it hard to get this capability as they won't get any profit from it. If you have a smart meter you can get "in home displays" that have computer interfaces to extract the information with a usable latency, otherwise you'll probably need to add some current clamps to the meter box unless we can get some very clever solution from the crowd here.
I sense a market opportunity here for a clever solution, if there isn't already something out there.

cheers,
Mark
Yes :)
 

Offline reubenT

  • Newbie
  • Posts: 2
  • Country: us
Re: how to measure the direction of a.c. power flow
« Reply #14 on: May 15, 2019, 08:02:26 pm »
Which is actually fairly easy, a clamp on current transformer with a suitable burden resistor and a voltage sampler, multiply the ac voltage and current samples together, lowpass and drive a centre zero meter.  73 Dan.

This is what I need right now. Been hunting for a practical circuit with component values designated,  to make one for use in metering in/out  for motor/generator experiments.   The theory is all good, but I'm not an electronics engineer,  just an old do it myself experimenter with all kinds of junk around to play with.  Anyone have a lead on a circuit diagram?
N4ISF
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3158
  • Country: es
Re: how to measure the direction of a.c. power flow
« Reply #15 on: May 15, 2019, 09:26:05 pm »
But how to measure the direction in which energy is moving in an a.c. line? Phase angle doesn't do it.

Huh? Phase angle is exactly what counts. If the current is exactly in phase with the voltage then power is flowing in the direction of the current and there is only real power. If there is some phase difference then you have reactive power flowing back and forth.

Measuring instant voltage and current is trivial and it should not be difficult to design a simple circuit (maybe with op amps) which would continuously multiply both magnitudes and it would read positive when power goes in one direction and negative when it goes in the other.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: how to measure the direction of a.c. power flow
« Reply #16 on: May 16, 2019, 02:47:22 am »
To do it non-intrusively, I would use a current transformer and electrostatically couple to the lines to measure the voltage.  Between the two, the phase can be found to determine direction.  I suspect the simple way would be to only detect the polarity electrostatically and use that to multiply the current by 1 or -1 so a positive or negative current is returned indicating direction and magnitude.

Why not get a Kill-O-Watt or whatever and permanently wire it into the circuit?
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3180
  • Country: au
Re: how to measure the direction of a.c. power flow
« Reply #17 on: May 16, 2019, 05:34:40 am »
Assuming a unity PF load, if at any moment your house is pulling the instantaneous supply voltage down (incoming power) then we would say the current is in phase with the voltage. If things change and then your house is pulling the instantaneous voltage up (outgoing power) then the current would appear to be 180 deg out of phase with the voltage. The current trace would invert on your scope and the voltage trace would stay the same. Think in terms of DC and it becomes clear. That's how I see it.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3158
  • Country: es
Re: how to measure the direction of a.c. power flow
« Reply #18 on: May 16, 2019, 08:57:32 am »
I suspect the simple way would be to only detect the polarity electrostatically and use that to multiply the current by 1 or -1 so a positive or negative current is returned indicating direction and magnitude.
I cannot imagine any good reason to sense voltage electrostatically. I mean, you have a hundred devices connected in your home and you do not want to connect a volt meter? Why?

Another issue is that you cannot assume current and voltage will be in phase. Not at all. Homes have a lot of reactive loads.

Will a kill-o-watt indicate negative power? I have never tested that. It would be interesting to connect the load to the prongs and connect the power input to the receptacle and see what happens.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline richard.cs

  • Super Contributor
  • ***
  • Posts: 1191
  • Country: gb
  • Electronics engineer from Southampton, UK.
    • Random stuff I've built (mostly non-electronic and fairly dated).
Re: how to measure the direction of a.c. power flow
« Reply #19 on: May 16, 2019, 11:56:23 am »
I have built a device which measures net power at the mains input and if there is solar power exported servos it to zero by switching in and out loads. I have in fact been meaning to put a write-up in this forum for the last year or more but it's just not happened yet.

In my case the power measurement is current via a small current transformer, voltage via a resistive divider and a direct analogue multiplication to get a voltage corresponding to power. This is low-pass filtered (as it has a strong 100 Hz component) to get a real time power measurement for logging. To control the loads this signal is integrated to get energy and the controller switches loads in and out based on priority to keep the energy centred in a 3600 Joule window which corresponds to the (intentional) dead band in the electricity meter. The loads pulse on and off at a frequency set by their size the the solar generation with a few hundred Joules being shunted into and out of the grid and zero new usage.

This is not the cheapest measurement approach, but it is simple and works well. It has a bandwidth of a few kHz until after the multiplication so odd current and voltage waveforms don't affect it at all. The multiplier output always reflects the instantaneous power and the integrator the total energy used.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3158
  • Country: es
Re: how to measure the direction of a.c. power flow
« Reply #20 on: May 16, 2019, 01:05:15 pm »
That sounds very interesting and I would be interested if you can tell us more.

I have often thought about load management but it seems complicated because each home has very different loads and because of the complication of switching remote loads from a central location.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: how to measure the direction of a.c. power flow
« Reply #21 on: May 16, 2019, 01:08:19 pm »
direct analogue multiplication

I don't think the analog multiplication is a good idea. All current transformers produce a small phase shift. I tried to use very best current transformers, but yet there was considerable phase shift (if I remember correctly around 40 us). Typically, the phase shift doesn't produce big errors, but if the load PF is around 0.6, the error becomes dramatic. Therefore, an MCU which can calibrate the phase shift and account for it, will produce much more accurate results.
 

Offline richard.cs

  • Super Contributor
  • ***
  • Posts: 1191
  • Country: gb
  • Electronics engineer from Southampton, UK.
    • Random stuff I've built (mostly non-electronic and fairly dated).
Re: how to measure the direction of a.c. power flow
« Reply #22 on: May 16, 2019, 01:31:23 pm »
Well this is what I wrote a while back:

I built this a while ago now (about a year ago, and installed it about 3 months ago) [now more like 2 years ago] but have only just gotten around to writing it up. Essentially it is a 4-channel load controller for optimising the use of domestic grid-tied solar. The four loads can be assigned different priorities and are modulated to servo the net exported energy to zero so all generated electricity is used internally. It takes advantage of the 1 Watt-hour (3600 Joule) "dead spot" that electricity meters (in the UK at least) have by design by tracking a "window" of 3600 Joules and modulating the loads on and off when they reach the edges of the window. In fact there are four priorities to which the loads can be assigned and each has 1/4 of the window so any one load actually oscillates around 900 Joules. On a mechanical meter this rocks the disc back and forth by less than one turn, on an electronic meter it does the equivalent with an internal buffer, in both cases a few hundred joules is repeatedly "borrowed" from the grid (as the loads are generally greater than the generation) and then returned a short while later.

I suspect most people would probably do this in software, but I thought it interesting to do it all analogue. A voltage signal from a simple resistive divider is buffered and used to feed one input of an analogue multiplier, a current transformer generates a voltage across a burden resistor which is then amplified and fed to the other input. The multiplier outputs a signed voltage proportional to power, pretty much independent of how ugly the current waveform is, and this is fed to an integrator with a low-leakage capacitor. This integrator tracks the window and a bank of four comparators switches switches the loads. Each comparator has a little less than 1/4 of the window in hysteresis, and one of four thresholds set by selecting load priority. The loads are switched by large triacs which are triggered by smaller opto-triacs.

There are a few extra features to the circuit, it has an overheat detection which shuts down all of the loads, and a remote override which allows a load to be forced on even if it would result in net power import. This is actually the main reason for the overheat detection as it becomes possible to turn on all loads (a total of up to 60 A) simultaneously - something that wouldn't happen normally as max solar generation is only 16 A per phase. The override circuit has its own isolated power supply so that it can use external switch contacts, but a powered source is possible by moving some jumper around. LEDs are driven to indicate the status of the loads and also to indicate if the integrator has run into the rails implying net import/export.

Power supplies are kept pretty simple and transformer based, with long-life, high temperature electrolytics and low ripple currents to give maximum service life. Four supplies are generated, an isolated 5 V for the remote override and a +12 V, -12 V and +5 V for the main circuit which is neutral-referenced. There are a couple of expansion connectors with the power supplies and the various voltage, current, power and energy signal on to allow a future digital board that does monitoring and/or augments/replaces some of the control functionality. The main power channel measures net import/export, there is an auxiliary channel that measures solar generation - it's not needed at all for the controller but provides some extra signals to the expansion connectors.

As this went straight to PCB without prototyping there are a few bugs which have resulted in hand-modifications but nothing major. Mainly this relates to a mistake regarding comparator common-mode input range, which was corrected by adding a low-power zener-regulated supply at ~16 V. The whole thing has been built into a metal box with four 16 A MCBs for the loads and front-panel switching for the priorities. So far only two of the load channels have been used but more will be added.

In operation the highest priority load is turned on first, and then if solar output is more than that load additional loads are switched in, with the lowest priority load being switched on and off to maintain the zero average input power. In practise most of the time the generation is smaller than the loads so the highest priority load is switched on and off until it stops drawing power (e.g. cutoff by its internal thermostat) and then that is left on and the next load switched in. If some uncontrolled load is added then the controller acts in the same way as a reduction in generation, shedding the controlled loads to try and maintain zero import.


Schematics attached, not including the hand mods. Also a photo of the complete assembly.

I don't think the analog multiplication is a good idea. All current transformers produce a small phase shift. I tried to use very best current transformers, but yet there was considerable phase shift (if I remember correctly around 40 us). Typically, the phase shift doesn't produce big errors, but if the load PF is around 0.6, the error becomes dramatic. Therefore, an MCU which can calibrate the phase shift and account for it, will produce much more accurate results.

I make no claim that this is the best solution, I'm just describing what I used. I didn't see significant errors from my current transformers but nor did I look especially hard, accuracy was plenty good enough for the application. I am familiar with the digital approach to this, but at the time I fancied doing something different, if done for work it would likely have been a totally different design. Digital also has its own pitfalls (non-simultaneous ADC sampling on most common micro controllers being one). The design also throws all the signals including before multiplication onto an expansion header with the thinking that some future board digital board could either take over control allowing more sophisticated features, or just provide monitoring. That has now been designed but I've not built it nor written any software.

Overall design aim was for simple and robust, which seems to have been achieved. It's been in continuous use for about 2 years, though still on only two of the four channels. I have a few spare boards knocking around too.
 

Offline richard.cs

  • Super Contributor
  • ***
  • Posts: 1191
  • Country: gb
  • Electronics engineer from Southampton, UK.
    • Random stuff I've built (mostly non-electronic and fairly dated).
Re: how to measure the direction of a.c. power flow
« Reply #23 on: May 16, 2019, 02:03:43 pm »
I wasnt quite sure how the phase direction is.
but it looked like this in LTspice
V1 is the fixed AC, V2 changes to simulate pushing power to V1 or pulling.
I am guessing if R1 is some remote current monitor, it is also how the phase flip would look like?
I don't find your schematic very clear but yes that is what I would expect to see. In one direction the current and the voltage are in phase and in the other they are 180 degrees out of phase. With real loads they could also have other phase differences (which correspond to reactive power). In LTSPICE you can multiply waveforms by right-clicking on the name in the waveform viewer and editing - if you multiply your voltage and current quantity there it will give you power.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: how to measure the direction of a.c. power flow
« Reply #24 on: May 16, 2019, 03:05:50 pm »
I suspect the simple way would be to only detect the polarity electrostatically and use that to multiply the current by 1 or -1 so a positive or negative current is returned indicating direction and magnitude.

I cannot imagine any good reason to sense voltage electrostatically. I mean, you have a hundred devices connected in your home and you do not want to connect a volt meter? Why?

CodeDog asked for a unobtrusively measurement.  I took that to mean galvanically isolated and without connecting to any wires.

Quote
Another issue is that you cannot assume current and voltage will be in phase. Not at all. Homes have a lot of reactive loads.

So what?  The reactive power component will cancel out in the measurement leaving the real power component.  The accuracy will be poor without an RMS measurement but it will be close enough for most purposes.

Quote
Will a kill-o-watt indicate negative power? I have never tested that. It would be interesting to connect the load to the prongs and connect the power input to the receptacle and see what happens.

I am not sure either.  Next time I visit Home Depot, I will get the parts to make a set of cords to hook one up backwards.

I don't think the analog multiplication is a good idea. All current transformers produce a small phase shift. I tried to use very best current transformers, but yet there was considerable phase shift (if I remember correctly around 40 us). Typically, the phase shift doesn't produce big errors, but if the load PF is around 0.6, the error becomes dramatic. Therefore, an MCU which can calibrate the phase shift and account for it, will produce much more accurate results.

If this is a problem, then creating the same phase shift in the voltage measurement before multiplication would not be difficult even in the analog domain.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf