# Switching logic for a power factor correction controller

#### Just Another Sparky

Joined Dec 8, 2019
187
Just a funsie garage project here.

I've got a bunch of machine tools in my garage that frequently run underloaded. A lathe, mill, metal shaper, drill press, etc. I end up paying more than necessary on my electric bill because most of the power they consume is reactive. (cosϴ 0.2-0.4). I realize that I'm talking about a few dollars at most here, but it's the principle of the thing that bugs me.

So I figure I've got a Koyo Click PLC lying around and most of the spendier components needed to build a power factor correction unit. Relays, capacitors, an enclosure, etc. What's got me scratching my head is trying to figure out what the best scheme would be for determining *when* to cut in and out capacitors due to changes in measured power factor. I'd like it to respond to a motor startup within five or ten seconds (i.e. after it has reached full speed), but I don't want it to constantly switch in and out every time I start and finish drilling a hole on my drill press, etc.

So I figured I'd ask here if anyone might have any bright ideas or inspiration as to what sort of logic might work well for this application.

Thanks.

Last edited:

#### AnalogKid

Joined Aug 1, 2013
9,069
First two thoughts ...

1. Monitor current, not PF. A simple AC current monitor could switch the PF circuit in and out based on instantaneous peak current, RMS current, peak current averaged over a certain time frame, etc. This drives the decision-making hardware, software, whatever. The same circuit could have a built-in minimum "PF-on" time to reduce the number of activation cycles.

2. Same current monitor component driving a comparator to extract zero crossings, plus an AC line voltage zero-crossing detector. Now you have two square waves, one for voltage and one for current. Extracting the time between leading edges gives you PF. Once you have that value, you can make any number of decisions.

ak

#### Just Another Sparky

Joined Dec 8, 2019
187
The issue with option 1 is that this is going to be more like an "Autovar" type system with multiple switching stages to accurately correct within a range of ~125-1250 VARs as opposed to a simple single stage solution. Each piece of equipment in my garage has a different motor with unique loaded and unloaded power consumption characteristics. I'd rather not retrofit capacitors onto every single one of my machines.

Acquiring the instantaneous power factor and measuring current flow to calculate Watts, VARs and VA is fairly straightforward like you said. It would entail building a circuit to measure power factor based on timing between two square waves and finding a way to generate a 0-10V output based on that to be read by an analog input module installed in the PLC. (Heck, I might even be able to cheat with a high speed digital input module.) A second channel will ostensibly be used to provide a current reading to facilitate the aforementioned calculations. All decision making will likely be on the basis of calculated VARs rather than power factor or current alone. Figuring out logic to select the correct capacitors (probably with one "half-step" cap involved) will require some thinking but I'm sure is feasible using the right function blocks in the ladder logic. (I just hope this PLC's instruction set is actually competent enough to handle things like comparisons, basic math, arrays, sequencers, etc.)

The stumper for me is just figuring out how to allow the PLC to decide what sorts of VAR fluctuations are transient (ignorable) and which are sustained (worth cutting in/out capacitors for) and then when to actually perform the switch. It won't do to have a bunch of capacitance switched on line at the same time as a bunch of locked rotor current, or relays constantly clicking every few seconds as I'm trying to focus on running a machine. The logic needs to have a certain level of 'intelligence' to it without violating the K.I.S.S. rule.
Just spitballing here for a bit; perhaps an 'inrush monitoring' loop could be triggered by any increase in line current of more than 1-3 average amps within a span of 500ms or so. Or maybe even a simple current threshold of 15-20 amps or so. Then maybe a subsequent 'waiting period' loop could monitor the current until it remains stable for 5-10 seconds or so before triggering the rest of the logic to calculate the correct capacitance necessary and perform the switch. I'm a little bit tired here so I haven't really thought these through yet.

Last edited:

#### Ian0

Joined Aug 7, 2020
1,629
Where are you based? In Britain, all domestic electricity meters are true power meters. Only if you have large industrial premises are you charged extra for the VARs.
Back to solving the problem . . .
As the load is increased, the power factor improves, but does the amount of reactive current vary very much?

Last edited:

#### KeepItSimpleStupid

Joined Mar 4, 2014
4,566
Maybe it doesn;t make sense in your application. For one, you may not be charged for it. At work, we were not charged for the actual water used, so putting in a "cooling loop" doesn't have a payback period. It does, but not a meaningful one. The water would be cleaner for the equipment and it would be the "responsible" thing to do.

So, we added a circulator for the x-ray diffraction machine only. Not the difusion pumps and/or the LN2 replacement systems which used groundwater cooling and some smaller stuff.