Electronics > Projects, Designs, and Technical Stuff

how to measure the direction of a.c. power flow

<< < (5/7) > >>

soldar:
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.

NorthGuy:

--- Quote from: richard.cs on May 16, 2019, 11:56:23 am ---direct analogue multiplication

--- End quote ---

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.

richard.cs:
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.


--- Quote from: NorthGuy on May 16, 2019, 01:08:19 pm ---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.

--- End quote ---

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.

richard.cs:

--- Quote from: 3roomlab on May 16, 2019, 01:15:00 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?

--- End quote ---
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.

David Hess:

--- Quote from: soldar on May 16, 2019, 08:57:32 am ---
--- Quote from: David Hess on May 16, 2019, 02:47:22 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.
--- End quote ---

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?
--- End quote ---

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.
--- End quote ---

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.
--- End quote ---

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.


--- Quote from: NorthGuy on May 16, 2019, 01:08:19 pm ---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.
--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod