Microcontroller Control of Reactive Power Compensation for Growing Industrial Loads

Abstract

Many industrial installations in developing countries start-up as small factories, without regard for the need of compensation of reactive power, leading to significant financial losses in the long term. By improving the power factor, the customer can reduce its power demand and potentially increase efficiency of their equipment. A PIC microcontroller is used to switch capacitor banks to compensate for the reactive power. In order to determine the size of the capacitor bank needed, the microcontroller calculates the phase difference between the voltage and the current. The results obtained based on the lagging power factor for three test loads show an improvement in the power factor from 0.52 to 0.96 under different test load conditions.

Share and Cite:

Mbinkar, E. , Asoh, D. and Kujabi, S. (2022) Microcontroller Control of Reactive Power Compensation for Growing Industrial Loads. Energy and Power Engineering, 14, 460-476. doi: 10.4236/epe.2022.149024.

1. Introduction

The conventional methods used to switch-in capacitors to compensate for reactive power can generate large transients that are detrimental to other sensitive electrical loads in the network. Coupled with the inability of these conventional systems to accurately determine and respond to load changes, make the conventional approaches inadequate for applications involving reactive power fluctuations. As small industries continue to increase on their number of inductive motor drives in their quest to increase productivity, reactive power management becomes increasingly more important, due to economic concerns. Electricity utility companies are increasingly establishing pricing policies such that customers with poor power factors will have to pay for their reactive power as well as their active power consumption. The price of electricity relating to transmission charges has to cover apparent power (in kVA) as well as transmission losses and not just kW. The disadvantages of operating the factory at lagging power factors are readily apparent. These include penalties paid to the electricity supplier, increase in the power that must be supplied by the generators, heat losses in the conductor leading to voltage drops oversizing of conductors and cables, and the tripping of circuit breakers.

The transportation of reactive power through power lines causes significant losses, decrease in the stability of the network and voltage drops at the consumption points. In order to avoid this, reactive power compensation, reactive power compensation devices can be installed closer to the loads. A previous study [1] presented an implementation of a solution for power factor correction in the distribution networks of consumers using modern technology based on real time data acquisition, signal processing and numerical controls using high-level languages and microcontrollers. This, and other studies fail to clarify how the required capacitor banks used in the compensation are determined and switched accordingly.

In this paper, a microcontroller based controller continuously takes measurements of the phase voltages and line or load currents, and updates a capacitor switching sequence at each period of the waveform as required [2]. By measuring the peak amplitude of the inductive component of the current, the controller determines the capacitive compensation that must be connected to each phase in order to maintain the desired power factor. The controller filters out any harmonics present in the voltage or current reference waveforms so that the compensation is set to only the fundamental or 50 Hz components. An adequate level of reactive power is then supplied to the system during the next period, resulting in a maximum response time of one period for a 50 Hz system. Reactive power compensation is performed on the basis of phase-to-neutral values, making control and operation independent of angular offset and ideally suited to meet the dynamic requirements of unbalanced systems. Furthermore, the load currents flow at the compensator node only when load currents are detected. In this way, overvoltage or self-excitation is avoided [3].

2. AC Power Flow

The frequency of the alternations between a positive maximum value VM and a negative minimum value –VM of AC signal is denoted f. The amplitude (maximum or peak value) of the voltage is denoted VM (in volts), but the quantity generally specified is the effective value denoted simply by V (or Veff or Vrms). For a sinusoidal waveform, the relationship between the amplitude (maximum value) VM and the rms value V is: V M = 2 V , which means that the amplitude of the voltage corresponding to 230 V is 325 V. Figure 1 shows the waveform of a nominal 230 V, 50 Hz domestic network voltage. The period T = 20 ms.

A very important notion in AC power flow is the phase shift, ϕ between the voltage and the current waveforms, called the power factor. Depending on the type of electrical device (resistive, inductive, capacitive), the phase shifts are different. For a purely resistive AC. circuit, the average power dissipated, P, is given by:

P = I V = I 2 R watts (1)

Figure 2 shows the voltage (v), current (i) and power (p) waveforms for a purely resistive load. The current sinusoid is in phase with that of voltage; while Figure 3 shows the inductive or capacitive loads, the current sinusoid is out of phase (with a phase shift angle) behind or ahead of the voltage.

2.1. Apparent Power

Apparent power, S, is an important quantity since AC systems, such as generators, motors, transformers and cables. The allowable output of such systems is usually limited not by mechanical stress but by temperature rise, and hence by the power losses. The losses are determined by the voltage and current and are

Figure 1. Waveform of a 230 V, 50 Hz domestic network voltage.

Figure 2. Power in pure resistance.

very closely associated with the power factor. Thus, the amount of electrical power required to supply a certain load on an industrial site is essentially determined by the volt-ampere ratings of the load rather than by the power (in watts) alone. The rating of a machine is defined as the maximum apparent power that it is designed to carry continuously without overheating.

S = P ± j Q (2)

where, P is the true power in watts and Q is the reactive power in volt-ampere-reactive (VAR). The absolute value of S can be determined by:

S = P 2 + Q 2 (3)

2.2. Reactive Power

The reactive power, Q contributes nothing to the net energy transfer and yet it causes just as much loading of the equipment as if it did so. Reactive power is a term much used in power generation, distribution and utilization of electrical energy. Inductive reactive power, by convention, is defined as positive reactive power; capacitive reactive power, by convention, is defined as negative reactive power. Figure 4 shows the power vector diagram, defining the angle ϕ, the real power(P) and the reactive power(Q).

Figure 3. Power in a circuit containing resistance and inductive reactance.

Figure 4. Power vector diagram.

Q = V I sin ϕ (4)

And,

P = V I cos ϕ (5)

2.3. Power Factor

The power factor (PF) is defined as the ratio of the real power flowing to the load, to the apparent power. Real power is the capacity to do work in a particular time. Apparent power is the product of the current and voltage of the circuit. Due to energy stored in the load and returned to the source, or due to a non-linear load that distorts the wave shape of the current drawn from the source, the apparent power will be greater than the real power [4]. From the power vector diagram shown in Figure 4, the power factor can be defined as:

PF = realpower ( P ) reactivepower ( S ) (6)

Equation (6) takes the form of Equation (7) [4].

PF = cos ϕ (7)

3. Power Factor Correction

Power factor correction (PFC) is a technique of counteracting the undesirable effects of electric loads that create a power factor (PF) that is less than 1. Power factor correction may be applied either by an electrical power transmission utility to improve the stability and efficiency of the transmission network or, correction may be installed by individual electrical customers to reduce the costs charged to them by their electricity supplier. In either case, capacitive Power Factor correction is applied to circuits which include induction motors as a source of reactive power, thereby reducing the inductive component of the current and consequently reducing the losses in the supply. When capacitors are connected at each starter and controlled by that starter, the configuration is known as Static Power Factor Correction.

In distribution systems, the voltage is normally controlled only at the entry point (substation), and then it sags down the distribution lines, mainly because of consumption of reactive power by consumers and the impedance of the distribution lines. A number of technologies are employed in the modern power systems to compensate for the flux of reactive power and thus to improve the power factor. These technologies compensate for the drop of voltage using controlled injections of reactive power at a few locations. Some of these existing technologies are briefly described below.

3.1. Synchronous Generators

Large synchronous generators typically control their output voltage within the prescribed bounds by manipulating (usually injecting) reactive power. Control is realized via an excitation system that consists of exciter, controller and voltage measurement components [5] [6], and this system provides an efficient means to stabilize the high-voltage part of the power grid. However, the application of this system is limited geographically to the entry point to the power distribution system. Reactive power supplied by these generators has thus limited effect on the voltage and reactive power control in the distribution system. For these reasons additional compensating technologies are required to ensure the power quality in the remote parts of the distribution networks.

3.2. Synchronous Condensers

When a synchronous motor operates at under excited and at over excited conditions, it is called a synchronous condenser. It can generate and absorb reactive power. When synchronous motor is over excited it draws leading current and works like a capacitor. When synchronous condenser provides leading current, it eliminates reactive component of power and improves power factor [7]. In this case the 3 phase load is connected through the line and synchronous motor is connected in parallel with line which acts as compensator in overloading and under loading condition [8] as shown in Figure 5. However, there are considerable losses in the motor, maintenance cost is high and it produces noise.

3.3. Static Compensation

When the power factor is low due to inductive lagging current, static capacitors are connected in parallel with the devices, such capacitors provide leading current which neutralizes lagging currents and improves power factor. For three phase loads, capacitors are connected in star or delta. Static capacitor is invariably used in power factor improvement in industries [8]. Figure 6: shows the

Figure 5. Synchronous condenser [8].

Figure 6. Static compensation [8].

static compensation technique in which a 3 phase load is connected with a 3 phase line. Static capacitors are connected in parallel to provide leading currents which neutralizes lagging currents and improves power factor.

The limitation in this case is that they have short service life ranging from 8 to 10 years, they are easily damaged if the voltages exceed the rated value, and once the capacitor is damaged, the repair is uneconomical [8].

There are no general rules applicable to every type of installation and, in theory, capacitors can be installed at any point, but it is necessary to evaluate the relevant practical and economic feasibility. Distributed power factor compensation is achieved by connecting a properly sized capacitor bank directly to the terminals of the load which requires reactive power. The installation is simple and inexpensive; capacitor and load can use the same protective devices against overcurrent and are connected and disconnected simultaneously [8]. Figure 7 shows the type of power factor compensation that is advisable in the case of large electrical equipment with constant load and long connection times and it is generally used for motors and fluorescent lamps.

Group power factor compensation is used locally in improving the power factor of groups of loads having similar functioning characteristics, as in Figure 7. This is done by installing a dedicated capacitor bank. This method offers a compromise between the inexpensive solution and the proper management of the installation since the benefits derived from reactive power compensation are felt only by the line upstream the point where the capacitor bank is located.

4. Design of Microcontroller System for Reactive Power Compensation

The system shown in Figure 8 was designed to control the reactive power supply to the electrical power system by automatically connecting a capacitor bank to improve the power factor of the system. The principal element in the circuit is PIC Microcontroller (16F877A) that operates with 20 MHz crystal in this scheme. The signals of voltage and current are input from the main AC line using voltage and current transformers. These signals are then passed to the zero

Figure 7. Connection diagrams for the power factor compensation of motors [7].

Figure 8. Reactive power compensation system.

crossing detectors which converts it to a square wave signal. These pulses are fed to the two interrupt pins (RB0 and RB4) of the microcontroller. The microcontroller has an internal timer which calculates the time difference and converts it into phase angle and then using the cosine of the angle to obtain the power factor which is displayed on the LCD. If the power factor is low, the microcontroller activates a relay using its relay drivers by connecting the capacitor bank to the circuit which improves the power factor.

The block diagram of Figure 8 consists of DC power supply unit, zero crossing detector for current and voltage (PT & CT), microcontroller unit (PIC16F877A), LCD display, relays, capacitors and load circuits. The required DC power supply for the microcontroller and other peripherals is supplied by the DC power supply.

4.1. Zero Crossing Detector

In Figure 8, two LM358 Op-Amp are used as zero crossing detectors. One is used as zero crossing detector for current (CT) and the other for zero crossing detector for voltage (PT). When an AC signal is applied to LM358, its output is high, that is “1”, when the sinusoid signal is positive and in case of negative value of sinusoid waveform the output is low, that is “0”. Finally, the zero crossing detector circuits shown in Figure 9, convert both the voltage and current sinusoid waveforms into square signal or pulse width modulation (PWM).

4.2. Controller

The output from the zero crossing detectors is fed to the pins of PIC of microcontroller separately. The PIC uses its internal timers to measure the time duration

Figure 9. Zero crossing detector.

of signals in which their value is high or “1”. The timer is a register which counts from 0 to 255 and then start from 0 again. Timers are available in all PIC microcontrollers and when the timer overflows it generates interrupt. The timer can use internal clock or external clock to calculate the time, but this depends upon programmer.

The time difference between two waves can be easily measured using external interrupts. Whenever an interrupt signal is received on an input pin of the microcontroller, the timer starts counting and as soon as another external interrupt is received, the timer stops counting. One interrupt is generated with the help of the current signal and other interrupt with the help of the voltage signal. The timer value is stored for further use. This variable value is basically a time difference between two waves. For good results 20 to 30 values are used and their average is calculated [9].

4.2.1. Calculation of Power Factor

Microcontroller then uses its abilities and program to calculate the phase angle and phase difference between two waveforms. When voltage crosses the zero we start the timer and stop the timer when current crosses the zero. In between both zero crossing we find out the value of count. This count gives the time gap. Figure 10 shows the time gap between current and voltage waveform. ΔT can be calculated with the help of count 1 (here count is chosen as 1 for the time gap) and count for 1 second as:

Δ T = count1 countfor1 s (8)

For example, using Table 1 at a pre-scale of 1:16 count 1 is 2 and count for 1 second is 800 so the time gap will be ΔT = 2/800 which is 2.5 ms.

In Table 1, the value of count and the value of count 1 then take the ratio of count 1 to count. This gives the ratio between the time gap and the period. The

Figure 10. Voltage and current with time gap.

Table 1. Comparing count with pre-scale [9].

Table 2. Power factor of the circuit at different pre-scale values [10].

power factor of the tested circuit at different pre-scale values is shown in Table 2. Now the angle is calculated as in the Equation (9).

Angle = count1 count × 360 (9)

And then, the power factor is given by the cosine of the angle obtained from Equation (9).

Ease of

It can be seen from Table 2 that at lower pre-scale values, the value of count 1 is not correct. This is due to the very low count. This problem is solved by taking the count 1 value at higher pre-scale so that a higher degree of precision can be obtained.

4.2.2. Flow Chart of the Control System

Figure 11 shows the algorithm of how the system functions. In this study the chosen reference power factor is 0.95. If the power factor calculated is greater than or equal to the reference value i.e. 0.95, then the system does not require any compensation and hence the microcontroller does not switch on the relays. When the power factor is less than the reference value, the microcontroller switches on the first relay to connect the minimum available capacitors. If the power factor is still less than the reference value, the microcontroller will send a command signal to the second relay and hence more capacitance is introduced in the circuit and so on until the desired power factor is displayed.

4.3. Capacitor Bank and Load

The capacitor banks are automatically connected to or disconnected from the circuit using respective relays. Two capacitor banks were used in this case, each

Figure 11. Flow chart of the control system.

of rating C/2 implying that they are connected in parallel. This is simply because the size of the capacitor bank has to be finite and the cost of design consideration. The relays with the best combination of capacitors provide an improved power factor. The loads used in this experiment were incandescent lamps (for resistive load), and fluorescent tubes with chokes (for inductive load).

5. Results and Discussion

The automatic control system for power factor improvement was first tested on Proteus software. The Proteus software is a proprietary software used mainly for electronic design testing. It is used to create schematics and electronic prints for manufacturing printed circuit boards. In this work, the simulation result is based on lagging power factor of the load. These results are for the three design loads (Pure R, Series R-L and Parallel R-L).

5.1. Simulation Results

The simulation results are based design loads mentioned earlier. These can be extended to other load configurations.

1) Case 1:When resistive a load of 60watts is connected.

When a resistive load of 60 watts is connected, it is observed that both the current and voltage are in phase as shown Figure 12. In this case the power factor displayed on the LCD is 0.99 greater than the reference power factor of 0.95, so there is no insertion of capacitors.

2) Case 2:When a series R-L load is connected.

When the series R-L load is connected, there is a phase difference between the voltage and current signals as shown in Figure 13. The microcontroller detects the phase difference produced by the load and triggers the relay to switch on the required capacitor bank to improve the power factor to the desired value. When the desired value of the capacitors connected, the required reactive power is

Figure 12. Simulation results with resistive load.

Figure 13. Simulation results for series R-L without compensation.

Figure 14. Simulation results of series R-L with compensation.

supplied to the system, and the current and voltage waveforms are in phase. After the connection of the required value of capacitor, the V and I zero crossing detector signals are also in phase in accordance with the set reference value of the power factor (0.95).

Figure 14 shows the power factor improvement for the series R-L load after the connection of the capacitor bank. The current and voltage are now in phase due to the improvement of the power factor from 0.52 to 0.99 almost to unity power factor.

3) Case 3:When a parallel R-L load is connected.

When the parallel R-L load is connected, there is a phase difference between the voltage and current signals as shown in Figure 15. The microcontroller detects the phase difference produced by the load, and triggers the relay to switch in the required capacitor bank to improve the power factor to the desired value.

Figure 16 shows the power factor improvement of the parallel R-L load after the connection of the capacitor bank. The current and voltage are in phase due to the improvement in the power factor from 0.78 to 0.96 so that the desired power factor is achieved.

5.2. Power Loss Reduction

Table 3 shows the hourly reduction of power losses with the application of power factor correction. Figure 17 shows the hourly power loss reduction when the power factor compensation is used.

5.3. Discussion

The power factor is a measure of the efficiency of an electrical device to consume

Figure 15. Simulation results of parallel R-L without compensation.

Figure 16. Simulation results of parallel R-L with compensation.

Table 3. Hourly power loss reduction.

Figure 17. Hourly power loss reduction.

power correctly when current flows through it. Electricity distribution companies usually charge for the apparent power (in kVA) consumed based on the measurement made with the energy meter. If the power factor of an installation is low, the current consumed will be high, resulting in a higher electricity bill [11]. For this reason, electricity distribution companies charge for reactive power for large consumers, the billing takes into account all the powers: active, reactive and apparent consumed [12]. Improving the power factor therefore makes it possible to reduce the total absorbed current and thus reduce the apparent subscribed power (kVA).

The installation of capacitor banks minimises the penalties from the electricity distribution company and also reduces the apparent power (VA) consumption. There are different types of power factor compensation capacitor banks – the fixed compensation, where the whole battery is switched (On/Off), and the automatic compensation, also known as stepped compensation, where the capacitor bank is divided into several steps that are automatically switched on according to the reactive power to be compensated [13] [14]. This is the method used in the paper.

6. Conclusions

A reactive power compensation system has been designed. In the designed system, compensation is performed by monitoring continuously the lagging power factor due to the load and triggering the control action through a proper algorithm by switching in capacitor banks through different relays thereby improving the power factor of the load. The simulation results based on the lagging power factor for three test loads showed an improvement in the power factor from 0.52 to 0.96 under the test load conditions. The reduction in current drawn relives the system and allows more loads to be connected without overloading the system. When the reactive power compensation device is used, the total apparent power demand is reduced due to improved power factor. The use of the PIC microcontroller is to reduce the cost and increase accuracy.

In the perspectives, it will be possible to look at the elimination of harmonics from the distribution networks. The modernisation of industrial processes and the sophistication of electrical machines and equipment have led to significant development of power electronics in recent years. For electrical networks, these systems represent so-called “non-linear” loads. These non-linear loads inject non-sinusoidal currents into the network. These currents are formed by a fundamental frequency component of the network, plus a series of superimposed currents, with frequencies that are multiples of the fundamental, called harmonics. The immediate effects of these harmonics include degradation of the power factor, reduction in motor power, and overloading of cables, transformers and motors; leading to reduction in the life span of motors and transformers, and the deterioration of capacitor banks.

Acknowledgements

The authors thank the authorities of the University of Bamenda, ENSPY, University of Yaoundé I, Cameroon, and GTTI, The Gambia, for their institutional support.

Funding Statement

The authors received no specific funding for this study.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Gligor, A., Dumitru, C.-D., Ronay, K. and Muntean, R. (2017) Microcontroller Based Prototype for Reactive Power Compensation in Local Distribution Networks. Procedia Engineering, 181, 746-753.
https://doi.org/10.1016/j.proeng.2017.02.461
[2] Muhammad, F. (2018) Reactive Power Compensation by Power Capacitor Method. Engineering Technology Open Access Journal, 1, Article ID: 555565.
https://doi.org/10.19080/ETOAJ.2018.01.555565
[3] Jefferson, A. and Ltee, T. (1999) La compensation active de puissance réactive—Une solution efficace aux problèmes associés à la puissance réactive. IEEE Canadian Review, Summer/été 1999.
https://canrev.ieee.ca/en/cr33/jefferson_fr.pdf
[4] Roos, F. and Bansal, R. (2019) Reactive Power and Harmonic Compensation: A Case Study for the Coal-Mining Industry. Journal of Energy in Southern Africa, 30, 34-48.
https://doi.org/10.17159/2413-3051/2019/v30i1a2473
[5] Kundur, P. (1994) Power System Stability and Control. McGraw-Hill, New York.
[6] Exposito, A., Conejo, A. and Canizares, C. (2008) Electric Energy Systems: Analysis and Operation. CRC Press, Boca Raton, FL.
[7] Larsson, M. (2000) Coordinated Voltage Control in Electric Power Systems. Doctoral Dissertation, Lund University, Lund.
[8] ABB (2010) Power Factor Correction and Harmonic Filtering in Electrical Plants. Technical Application Papers (Vol. 8), Bergamo.
[9] Manali A.H., Mali A.S. and Salokhe B.T. (2017) Automatic Power Factor Correction And Monitoring By Using PIC Microcontroller. International Journal of Advanced Research, 5, 290-296.
[10] Nagarajan, M. and Kandasamy, K.V. (2012) Optimal Power Factor Correction for Inductive Load Using PIC. Procedia Engineering, 38, 737-744.
https://doi.org/10.1016/j.proeng.2012.06.093
[11] Antunes, C.H., Pires, D.F., Barrico, C., Gomes, A. and Martins, A. (2008) A Multi-Objective Evolutionary Algorithm for Reactive Power Compensation in Distribution Networks. Applied Energy, 86, 977-984.
https://doi.org/10.1016/j.apenergy.2008.09.008
[12] Gil, J.B., San Roman, T.G., Rios, J.J. and Martin, P.S. (2000) Reactive Power Pricing: a Conceptual Framework for Remuneration and Charging Procedures. IEEE Transactions on Power Systems, 15, 483-389.
https://doi.org/10.1109/59.867129
[13] Al-Naseem O.A. and Adi, A.K. (2010) Impact of Power Factor Correction on the Electrical Distribution Network of Kuwait—A Case Study. Power and Energy Engineering, 2, 173-176.
[14] Gupta, N., Singh, S.P. and Bansal, R.C. (2012) A Digital Signal Processor-Based Performance Evaluation of Three-Phase Four-Wire Shunt Active Filter for Harmonic Elimination, Reactive Power Compensation, and Balancing of Non-Linear Loads under Non-Ideal Mains Voltages. Electric Power Components and Systems, 40, 1119-1148.
https://doi.org/10.1080/15325008.2012.682248

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.