Automatic Power Factor Correction Using Mircrocontroller
Automatic Power Factor Correction Using Mircrocontroller
1. Introduction
To get the best economic advantage from electric power, both the utility system and the users
should operate their facilities at high efficiency and reliability. A key to do this is to have a high
power factor (near 1.0) throughout the system.
Currently, alternating current (AC) machines are seen to draw more power than they actually
convert into useful work. This is seen as extra current that the system must carry to supply the
load. All connecting cables and transformers must carry this extra current, which results in
inefficiencies and higher cost of electricity. Most utilities offer rates to industrial consumers that
encourage a higher a higher power factor by reducing the rates for improved power factor. This is
commonly expressed in terms of a penalty for poor power factor that provides sufficient economics
incentives for consumers to improve their power factor.
Any installation or facility contain the following various types of machinery or equipment is seen
to have a low power factor. If a penalty rate is in force, end users may achieve savings on the
monthly power bill by adding power factor correction capacitors:
• Induction motors of all types (the greatest industrial loads in utility systems)
• Power electronic power converters
• Power transformers and voltage regulators
• Welding machines
• Electric and induction furnaces
• Fluorescent and various types of arc lightning
Many utilities begin to assess a power factor penalty when the power factor drops below 0.95
(lagging). The amount of penalty is then proportional to the difference between actual power factor
and the value of 0.95 (lagging). The cost of improving power factor using capacitors could be
recovered quickly simply by eliminating the penalty.
Once an end user decides that capacitors are an economical option, the main issues become the
size, type and location of capacitors. The power factor metered by the utility can be corrected
simply by placing all the capacitors at service entrance. However, this does nothing for losses and
freeing up the capacity farther down into the plant. By dispersing the capacitors throughout the
plant, end users can take optimal advantage of the benefits of power factor correction. Not only is
the power factor penalty eliminated, but energy demand is reduced by reducing the losses and
capacity is releases so that the system may be expanded (new loads added) without increasing the
size of existing cabling.
The expression of power is known as the rate of energy produced or consumed at a time, which is
usually measured in horsepower (HP) in mechanical systems and in electrical systems in watts
(W), the meaning of active power is when you give electrical power to any electric machine, it
gives back useful and notable power i.e. moving power or thermal power. In this case the electric
power is converted directly into any other phase of power.
The definition of power in electric science is the multiply of voltage (V) applied on a load by the
current (I) passing through this load (P = VI), and this also could be expressed as the square of
current passing through a load multiplied by the resistance (R) of the load P = I 2R this is applied
in both direct current systems (DC) or alternating current systems (AC). But, in AC systems when
the voltage is shaped as a sinusoidal waveform, the current passes through the load takes the same
form with different magnitude or level, and the current keeps in phase due to the linear nature of
resistance explained by Ohm’s law (R=V/I), so, we will find that when the voltage is zero, the
current is also at zero value and if the voltage is at maximum value, the current is at zero value.
This means that the phase difference between V and I is equal to zero (Figure 2).
But in AC systems the loads are not always resistance only, two other types of loads are seen to
have effects on the current, these loads are inductive loads and capacitive loads.
Figure 2: Circuit with voltage source and resistor, and Figure 3: Circuit with voltage source and inductor, and the
the corresponding sinusoidal waveforms of voltage corresponding sinusoidal waveforms of voltage and current
and current through the resistor. through the inductor.
The total I2 drawn from the supply will be equal to the vectoral sum of I1 and Ic that is I2 = I1 + Ic,
phasor diagram shows that the power angle ϕ is reduced using capacitance in parallel but how to
calculate the required capacitance for a desired power factor value?
From the figure 4, the power triangle we can calculate the required reactive power Qc which must
be added to improve the angle from ϕ1 to ϕ2 using the following equation.
And using the quantity of required reactive power calculated by equation (1), we can calculate the
required capacitance we need using the equation
𝑄𝑐 (2)
𝐶=
𝜔 × 𝑉2
Another way to determine the value of capacitance required for improving the power factor to
desired value is using power factor correction tables. The use of these tables is about having a
current or initial power factor value and a desired or initial power factor value, you just meet the
value from final cos ϕ column with the value from initial cos ϕ row and you will get a value called
factor K (kVAr/kW), this value represent kVAr per kW, so, all you need to do is to multiply this
value by the kW so that you get the kVAr value and using equation (2), you can get the required
desired capacitance value.
For example if we have the desired power factor as 0.90 and the actual power factor we have
currently is 0.75, the value of K factor is 0.398, this value is multiplied by the active power
consumed by the electric device to obtain the value of required reactive power that must be
supplied to the load and to determine the capacitance value we will use eq. (2).
In real life, the loads are not always kept fixed and it is changed frequently, so the power factor is
also changed according the loads. So, using a fixed capacitor banks is not always the best way to
overcome the low power factor as this sometime may lead to have a rise in voltage of the source,
an Automatic Power Factor Correction (APFC) gives a solution for this problem where we get
some separated groups of capacitors and they are connected and disconnected according to the
load nature using a classic control circuit that controls this connection and disconnection operation
of the capacitors.
We instead use external sensing circuit that enable us to determine the exact value of the sensing
circuit consists of two comparator IC’s and one XOR gate to get the time shift of the two digitalized
waveforms. To get this shift between the two sinusoidal waves, we use two zero-crossing detectors
to digitalize the two sinusoidal waves, then send their outputs as inputs for an XOR gate, the
function of the XOR gate is to detect the time shift by detecting the time when there is only voltage
digital wave and the time when there is only current digital wave (as the zero-crossing detector
already converted the sine wave positive half cycle into +5V DC signal and the negative half cycle
into 0V signal). Note that we used a series resistance to obtain a sinusoidal wave directly
proportional and in phase with the current sinusoidal wave, because the comparator deals only
with voltage signals.
Figure 8: Sensing Circuit to measure the time shift width in order to obtain the power
factor value.
It Reads a pulse (either HIGH or LOW) on a pin. For example, if value is HIGH, pulseIn() waits
for the pin to go from LOW to HIGH, starts timing, then waits for the pin to go LOW and stops
timing. Returns the length of the pulse in microseconds or gives up and returns 0 if no complete
pulse was received within the timeout. The timing of this function has been determined empirically
and will probably show errors in longer pulses. Works on pulses from 10 microseconds to 3
minutes in length.
The microcontroller acquires the time shift amount in microseconds, then we need to calculate the
angle value then calculate the cosine of this angle (the power factor) this is done by the following
equations (note that the microcontroller calculate returns the cosine value in rads only not in
degrees, hence we need to convert it into degrees):
Where:
time shift is the value obtained by the command pulseIn() (if the angle is 45, the value of pulseIn()
will be 2500) and we convert this time value into degrees by multiplying by (2 × 180 × f). The
57.295 represents the conversion from degrees to rads (180/π) as the cos function in Arduino use
the angle in rads unit not degrees.
Figure 10: The block diagram of microcontroller-based automatic power factor correction.
The tests of this project were done on certain and known loads, an incandescent lamp as a resistive
load (PF = 0.98) and single phase induction motor of a table fan as a lag power factor load, i.e. R-
L load (PF = 0.75), we then calculated the required capacitor size to make this lag bad power factor
reaches some good value as 0.88 or 0.9 using equations (1) and (2). Known that the active power
of that motor was approximately 63 watts and the capacitor bank size is 1.5 μF, The flowchart of
the project however could be represented as
The contracts applied are different from country to country and can vary also according to the
typology of costumer: as a consequence, the following remarks are to be considered as a mere
didactic and indicative information aimed at showing the economic saving which can be obtained
thanks to the power factor correction.
Generally speaking, the power supply contractual clauses require the payment of the absor bed
reactive energy when the power factor is included in the range from 0.7 and 0.9, whereas nothing
is due if it is higher than 0.9. For cosϕ < 0.7 power supply authorities can oblige consumers to
carry out power factor correction.
It is to be noted that having a monthly average power factor higher than or equal to 0.9 means
requesting from the network a reactive energy lower than or equal to 50% of the active energy:
𝑄 (5)
tan 𝜑 = ≤ 0.5 𝑓𝑜𝑟 cos 𝜑 ≥ 0.89
𝑃
Therefore, no penalties are applied if the requirements for reactive energy do not exceed 50% of
the active one.
The cost that the consumer bears on a yearly base when drawing a reactive energy exceeding that
corresponding to a power factor equal to 0.9 can be expressed by the following relation:
where:
If the power factor is corrected at 0.9 not to pay the consumption of reactive energy, the cost of
the capacitor bank and of the relevant installation will be:
𝐶𝑄𝑐 = 𝐶𝑄 . 𝐶𝑐 (7)
where:
It is necessary to note that the capacitor bank represents an “installation cost” to be divided suitably
for the years of life of the installation itself applying one or more economic coefficients; in the
practice, the savings obtained by correcting the power factor allow the payback of the installation
cost of the capacitor bank within the first years of use.
As a matter of fact, an accurate analysis of an investment implies the use of some economic
parameters that go beyond the purposes of this Technical Application Paper.
Example:
Let a company absorbs active and reactive energy according to the following table:
Therefore,
Let an automatically-controlled capacitor bank for power factor correction with Qc=30 kVAr,
against a total installation cost per year cc of 25 $/kvar, a total cost of 750$ is obtained. The saving
for the consumer, without keeping into account the payback and the financial charges, shall be:
Note: some of information were obtained from ABB – Power factor correction and harmonic
filtering in electrical plants.