Micro controller based Power Factor Correction

This paper presents the simple and low-cost design of an automatic power factor correction (APFC) system for single-phase domestic loads. The proposed design uses TRIACs to switch the capacitor banks in order to correct the power factor of inductive loads. TRIACs are more effective than electromechanical relays and hit the high-performance benchmarks. An Arduino board controls the switching of TRIACs. The Arduino is programmed to non-stop monitor and calculate the power factor of the connecting load by sensing the signal from CT, PT and Zero Cross Detectors (ZCDs), and keep the power factor of the load above the reference value (0.95) by appropriately energizing the capacitors in parallel to the connecting load through TRIAC switching. The value of power factor before and after improvement is displayed on LCD. The hardware prototype of the proposed APFC design is also developed to validate its operation. The satisfactory and acceptable results of the APFC system testing have confirmed that the suggested design yields a reliable output and can be further used in any single-phase practical application to ensure the power factor close to unity.


Introduction
Most of the domestic loads in the modern electrical distribution systems are inductive in nature.
These include refrigerators, air conditioners, water dispensers, dryers, washing machines, fans, water pumps, fluorescent lamps, uninterruptable power supplies, microwave ovens, kitchen hoods, televisions etc. These loads cause a low or poor power factor that can disrupt the AC voltage and reduce the performance of other equipment connected on the same source or system [1]. Moreover, these loads draw more currents due to their low power factor that in turn increase the cost of their power consumption [2]. The power factor has great importance for electric utilities throughout the world as it determines the efficiency of the power distribution system [3]. It indicates how effectively the consumer's loads draw electrical power from the utility company and for efficient utilization of this power; its value should be high and close to unity [4]. The operation of domestic loads at low power factor for a given voltage and power level draw more current. That results in large copper losses, poor voltage regulation and reduces handling capacity of the system; and hence, lessens the overall efficiency of the power distribution system [5]. Moreover, the low power factor operation of residential loads also require the kVA rating of utility apparatus such as transformers, transmission and distribution lines, generators and protection equipment has to be increased more for its proper functioning [6]. Thus, causing an additional financial burden on utility to make the equipment size larger. Therefore, to avoid or to reduce this financial burden, to minimizethe system losses and to increase the system efficiency and reliability, the electric utilities all over the world generally install static capacitor banks on secondary distribution lines to improve/correct the poor power factor and to reduce the current carried by these domestic loads [7]. However, the exercise of using a bank of static capacitor by utility companies to correct the power factor on the secondary distribution lines is not an effectual approach in the developing countries. This is because of the untrained and non1technical staff to correctly compute and fix the capacitor banks on suitable location of the power distribution lines. In addition, the repair and maintenance service of these installed capacitor banks is very rare, scarce and expensive. Moreover, these static capacitor banks are continuously on1line and canbe damaged to distribution system by drawing large line current at the times of low energy demands by domestic consumers. As a result, this strategy to overcome the problem of power factor in distribution system by utility companies has become inefficient, uneconomical and wasteful. Thus, there is a strong requirement for better systems and exercises to improve the power factor of power distribution systems for single-phase domestic consumers. The installation of automatic single-phase power factor correction systems by each power consumer at his own premises to improve the power factor of his loads is one of the good choices to solve the aforementioned issues as well as an excellent means to reduce the electricity bill of his energy consumption [8]. Further, this is an easy and low-priced solution to improve the overall efficiency of distribution system. Terefore, this paper presents the design and practical implementation of an Automatic Power Factor Correction System (APFC) for single-phase domestic loads. The proposed system uses capacitor banks to compensate the lagging power factor of inductive loads. The capacitor banks are energized through TRIACs whose switching is controlled by an Arduino board. The Arduino is programmed to continuously monitor the power factor of the connecting load and initiate the operation of capacitorbank through TRIAC if the load power factor is below the reference value (0.95).

Literature Survey
The power factor has great importance in the electrical energy sector, as it is the essence of long term, reliable, efficient and economic operation of power system as well as effective utilization of available power [9]. Therefore, its correction to improve the distribution system efficiency and reliability has been remained a hot topic in the fields of research. There are many studies found in literature on this subject Choudhury presented the design of single-phase Power Factor Improvement (PFI) device [10]. The PFI device was practical implemented using ZCD, bridge rectifier and chopper circuit to correct the power factor of small signal low power loads in the adjustable range of 8.8518.E8 by switching the capacitors. The key feature of this device was its simplicity and low cost due to the use of standard logic chips without microcontroller or ASIC. Afridi suggested the scheme of an automatic single-phase power factor improvement controller [11]. The controller in the said scheme was practically implemented using PIC microcontroller which senses the power factor by continuously monitoring the load of the system and performs the control action through a proper algorithm by switching the capacitor banks through different relays and improves the power factor of the load in case of lagging power factor. Rana at al.
[5] also proposed the identical design of automatic power factor improvement by using microcontroller as in [11]. However, in their design, they used resistors instead of potential transformer and a low cost microcontroller IC (ATmega8) because of its programming simplicity that make their system for automatic power factor correction most economical than any other single phase power factor improvement controlling system. Like in [5, 11], Tiwari et al.
[12] also propounded the design of single-phase power factor correction technique thru automatically switching the capacitor banks by means of microcontroller. The proposed technique based on AT8EC51 microcontroller that was brain and the heart of the entire power factor controller system. The ZCD is used before the microcontroller to sense the current and voltage signals. The purpose of this auto adjustable power factor correction system was to ensure the entire power system always preserved unity power factor. In addition, this system also controlled the additive harmonics and transient phenomena of the power system. Raj et al.
[4] also proposed the same approach as in [5, 11, 12] for automatic power factor correction using microcontroller. The emphasis of power factor correction in their design was on domestic loads. Their relay based switching control depended on AT8EC52 microcontroller that ensured the power factor remains above 0.9. Ishak et al. [1] also presented the analogous design as in [4,5,11,12] for automatically correcting the single-phase power factor. However, the switching control circuit of their proposed system was based on Arduino UNO board that energize the capacitor in parallel to the load through relay circuit when the power factor value dropped below8.E. Islam et al.
[13] also worked on the power factor correction for single-phase loads. Their approach for the correction of power factor was active type and based on modified Vienna rectifier switching topology. However, it provides almost ripple free input current, lower input current THD about to 5.6% and improved power factor up to 0.992 but the proposed topology was so complex. Mane et al.
[9] presented the thyristor (SCR) switched capacitor based design of single-phase power factor correction system. An Arduino board controls the switching of the thyristor. The results of their proposed system for various load conditions were satisfactory. Due to the reduction in harmonics because of thyristor based switching of capacitor banks as compared to relay based switching, the system was an economical and best solution for automatic power factor correction in lessening harmonic pollution. The main objective of the current work is to bring improvements in the previous works. The proposed APFC system in this paper is based on the similar low1cost and simple approach of using capacitor banks to correct the power factor of single-phase load as in [1,4,5,9,10,11,12]. Nevertheless, the switching method used in this work for energizing the capacitor banks is different from these previous works andhas constructed using TRIACs rather than the thyristor (SCRs) or electro-mechanical relays. Unlike an SC, a TRIAC can pass current in both directions and more useful for AC applications as compared to SCR [14]. Moreover, TRIAC is more effective than traditional electro1mechanical relays and hit the high1performance benchmarks [15]. The automatic switching of TRIACs in the proposed APFC design is controlled by an Arduino board which is an open source general purpose prototyping platform suitable for low power processing applications, inexpensive and easy to use [9]. The Arduino is programmed in the present design of APFC system to measure, calculate and ensure the required amount of power factor correction.

BlockDiagram
The block diagram of the proposed APFC system is shown in Fig. 1. The Arduino board is the brain of this system that is programmed to measure and correct the power factor of the connecting load. The voltage and current signals from the single-phase line are stepped down at low power level suitable for Arduino processing using Potential Transformer (PT) and Current Transformer (CT) respectively. These signals from PT and CT are fed to Arduino through sensing circuit's and Zero Cross Detectors (ZCDs) for the measuring of the current and voltage, and phase difference respectively to further calculate the power factor and the active power of the connecting load. The Arduino send the control signal to switching circuit in case of low power factor that energize the capacitor bank parallel to load through TRIAC switching. This process is repetitive until the desired correction of the power factor which is above reference i.e. 0.95. The value of power factor after and before correction for the connecting load is displayed on LCD with some pause. [1][2][3].

Circuit Description
The circuit schematic of the proposed APFC system is shown in Fig. 2. The circuit consists of the following major components.
• PT of ratio238:5 The power required for the operation of Arduino board and the other peripherals of the proposed APFC system, is supplied through a 5V DC power supply. The circuit schematic of Fig. 2 demonstrates that the proposed APFC system takes the voltage and current signals of the connected load through PT and CT respectively. These signals are fed to the analog pins of the Arduino board through sensing circuits and ZCDs to measure the power factor of the connected load in the following ways. For voltage measurement, the signal from a PT is fed to Arduino board via a half wave rectifier circuit. While, the current measurement is achieved by feeding the signal from a CT to Arduino board through a half wave rectifier circuit. However, the Arduino microcontroller cannot read the current directly; it can only read voltage, so a burden resistor of appropriate value is used before the rectifier to convert the current signal from CT into voltage signal for Arduino processing. The phase shift measurement between the current and the voltage signal of the connected load to find the power factor is taken through ZCDs. The circuit of Fig.  2 indicates that two op-amps are used between the Arduino board, a PT, and a CT. These opamps convert the sine wave signals come from PT and CT into square waves with different amplitude. The square wave signals are fed to the analog pins of the Arduino. The Arduino microcontroller evaluates both the square waves and measures the difference in pulse width of the both waves that corresponds to phase shift measurement that is thus further used to calculate the power factor, of the connecting load. The microcontroller of the Arduino board stores these initial values before correction into memory and alongside check, that the calculated value of power factors of the connecting load either it is below or above the reference value that is 0.95 for the proposed APFC system. In case of above 0.95 power factor, the Arduino simply displays the computed values on LCD and the results of LCD before and after correction remains the same and the operation of power factor correction is not initiated. However, upon power factor below 0.95, the Arduino microcontroller initiate the process of power factor correction as it sends the signal to turn ON the transistor that activates the optocoupler. The output of the opto-coupler is used to drive the TRIAC gate by introducing gate current. The gate current from the output of the optocoupler switch the TRIAC in ON state, which in turn energize the capacitor bank parallel to load. After energizing the static capacitor parallel to load for the correction of power factor of the connecting load, the Arduino board measures the improved power factor again by sensing the signals from PT and CT through ZCDs. The Arduino microcontroller compares the improved value of power factor with the reference value and initiates the process of power factor correction again if the improved value is below the reference value. This process of power factor correction is repeated until the required correction of power factor. Finally, achieving the correction of required power factor value, the microcontroller of the Arduino board displays the power factor value after and before correction on LCD with the difference of 5 sec time interval.

5.Working Algorithm
The detailed working algorithm of the proposed APFC system is shown in Fig. 3. The algorithm is self-explanatory that starts from the signals inputs from PT and CT and finishes at display of power factor after attaining desired correction. The Arduino is the core of the proposed APFC system for all operations such as measuring and calculating power factor before and after correction, storing the initial values before correction, switching of capacitors for power factor correction, displaying the power factor values that are calculated before and after correction. The complete hardware implementation of the proposed APFC system is shown in Fig. 4. One load of inductive nature (i.e. a choke) and one load of resistive nature (i.e. an LED lamp), of different single phase ratings are also provided on the same board of the APFC hardware prototype for the testing of its operation.

Operation Testing and Results
The operation of the proposed APFC system is experimentally tested against the three types of load (i.e. resistive, inductive and a mixed load) of different ratings to validate its operation. The experimental results of these load cases are discussed as follow.

Case: Resistive Load
In the case of resistive load, the APFC system is tested for an LED lamp of 7W. When this load is turned ON, the LCD of the APFC system, display its power factor and the type of load. As the power factor of the connected load is greater than the reference value (0.95) as Shown in Fig. 5, so there is no need of correction that is why the proposed system has not inserted the capacitor(s) in parallel to load. This is clearly indicating in the second time display of LCD in Fig. 6 that is showing the status of the capacitors.

Case: Inductive Load
For the inductive load case, a choke of 40W is used to test the operation of APFC system. The LCD result of Fig. 7 shows the power factor and type of load before correction. When it is turned ON. The APFC system quickly inserts the capacitor(s) in parallel to this load in order to correct the power factor, as its power factor value is less than the reference value. The status of the capacitors is shown in Fig 8, status of the APFC system is shown in Fig 9 and corrected value of power factor is shown in the LCD display of Fig.  10.

Conclusion
This paper discusses the different aspects of power factor and its indispensable correction for single-phase consumers and suggests a simple and low-cost technique for power factor improvement of domestic loads by single-phase consumers themselves rather than utility. The presented work proposes an APFC system design and its practical validation for single-phase loads. The proposed system continuously monitors the power factor of the connecting load by taking the input of voltage and current signals from PT and CT respectively. The proposed APFC system uses the microcontroller based Arduino platform for the measuring and calculation of power factor. The system employs the TRIAC switching which an Arduino microcontroller for energizing the capacitor banks parallel to connecting load in order to confirm the power factor above reference value controls. The use of TRIACs for switching capacitor banks assures comparatively more reliable operation than the old-style electromechanical relays. Further, the use of optocouplers also known as opto-isolators to drive TRIACs provides isolation that ensures the protection of Arduino board pins from power line. The acceptable results of the proposed APFC system operation indicate that the power factor correction by means of TRIAC switched capacitors is an economical method to overcome the power losses in the distribution lines due to the low power factor associated with common household as well as a good means to reduce the electricity bills of single-phase consumers.