Artificial neural network based unity power factor corrector for single phase DC-DC converters

Received Sep 14, 2019 Revised Feb 27, 2020 Accepted Mar 8, 2020 Due to the negative effects of the non-linear semiconductor devices and the passive electrical components (inductor and capacitor) in the converter circuits, and that are deteriorating the power factor (PF) and total harmonics distortion (THD) of grid current, this study proposes a novel unity PF correction controller based on a new algorithm of neural network to improve the performance of a single phase boost DC-DC converter with respect to the mentioned concerns. The controller guarantees stable load voltage. The PF corrector, firstly measures the phase shift between grid voltage and grid current waveforms, then through a new artificial neural network (ANN) algorithm, a suitable duty cycle is predicted to guide and control the converter to reduce the phase shift between grid voltage and grid current as possible to have maximum PF which is unity PF, and to improve the THD level of grid current. The proposed system is simulated and evaluated via Simulink of MATLAB, the simulation results are collected at constant duty cycle and at controlled duty cycle through the proposed PF controller using different loads. The presented PF controller guarantees the unity power factor, and enhances the grid alternating current THD.


INTRODUCTION
The passive components, such as inductors and capacitors are playing main roles in electrical systems, this passive component usage increases the reactive power absorption, and consequently increases the electrical losses due to that the power absorbing from grid does not consume in active load but transfer to either electromagnetic field and save in the inductor or save as electrical charge in the capacitor. The mismatch or the phase shift (value and direction) between the grid current waveform and grid voltage waveform provides indication about the level of this losses. In other words, this level can be represented by power factor (PF), which is the rate between the active power (consumed in resistive load) over the apparent power (total power consumed in resistive load and absorbed by the reactive components). So, to reduce or remove the losses in power, PF need to be in higher level which equals to 1. On the other side, the semiconductor devices, such as different types of power transistors, and diodes which have been involved in many power electronics conversion systems, and because of the nonlinear behaviour of these devices, the grid current waveform shape has been distorted. This current distortion effects negatively the total harmonics distortion (THD) of the grid current. Based on that, the researchers have been focused on increasing the PF and enhancing the THD levels through different studies [1][2][3][4][5][6][7][8][9][10][11][12][13].
In study of [1], an automatic PF corrector has designed and proposed via microcontroller to reduce the power losses and the cost as well. In [2,3] power factor correctors have designed and implemented using  [2], the microcontroller worked on generating the pulse width modulation pulses to drive the connected DC-DC converter towards increasing the level of power factor. Whereas in [3], a high performance PF corrector has designed and implemented around the microcontroller ATmega328. An effective power factor corrector for a Cuk DC-DC converter has presented in [4], the study focused on PF correcting and improving the Total Harmonics Distortion level of a grid current which is drawn to deliver power to a light emitting diode (LED) lamp.
In [5], a new PF controller has designed and simulated via PWM pulses generator based on variable switching frequency. The controller worked on improving the power factor, controlling the load voltage, and enhancing the THD of grid current. The behaviour of the PF corrector has analysed in [6] in terms of performance effectiveness and THD enhancement by considering non-linear load.
Other studies proposed an intelligent algorithm for high priority PF corrector [7][8][9][10][11][12][13], Fuzzy logic control (FLC) based algorithm have proposed in [7][8][9], whereas recently, Artificial neural network (ANN) based algorithm have proposed in [10][11][12][13] for PF correcting. A single-phase PF corrector have presented via two controllers in [7], the controllers are represented by a FLC controller and a predictive controller. In [8], the performance of PF corrector for a boost DC-DC converter has analysed, the proposed PF corrector included three individual controllers; FLC controller, hysteresis controller and proportional integral PI controller. An analytical study has presented in [9] based on simulation results of a PF corrector via FLC. The controller controlled the excitation current of the synchronous motor.
A comparative study in terms of power quality of a power factor corrector is reported in [10], an ANN algorithm is designed in the controller which is integrated with a conventional proportional integral controller. A real-time power factor correction controller has proposed in [11] through an ANN algorithm, which received the instantaneous values of the active and reactive power absorbed by the load, the controller turned ON or OFF a set of the capacitors in the system. A developed power factor correction controller has presented in [12] to improve the performance of the power system. The study tested the PF corrector effectiveness using a variable load through a fast response algorithm of clustering neural network to automatically control the power factor. In [13], a novel line power factor corrector has presented using a synchronous motor, the excitation current of the motor has controlled for PF increasing through an intelligent controller based on ANN.
This study reports a new intelligent power factor corrector for a single-phase boost DC-DC converter. This paper proposes a new design of an artificial neural network algorithm to predict the suitable duty cycle to have the desired opposite phase shift which is needed for fully matching between grid current and grid voltage, this matching guarantees unity power factor and reduces the distortion in the grid current and enhances the THD of the grid current. The design aspects of the proposed PF correction controller are shown in Section 2, whereas the presented system explanation and main block diagram are shown in Section 3. The collected simulation results are analysed in Section 4. Concluding the outcomes of the presented study is reported in Section 5.

DESIGN ASPECTS OF THE PROPOSED PF CONTROLLER
Based on the fact of that different loads among resistive, inductive, capacitive, and non-linear might be connected to the grid through the electrical and/or power electronics systems [7]. Resistive loads are consuming an active power from the grid. The inductive and capacitive loads are absorbing a reactive power from the grid and do not consume the power but transfer it to an electromagnetic field through the inductor, or save it in the capacitor as electrical charge. In other words, these reactive components are losing the power by absorbing it from grid without consuming it, in addition, these electrical passive components are shifting the grid current to leg or lead the grid voltage. On the other side, the non-linear semiconductor devices such as MOSFETs transistors, IGBTs transistors, and diodes are distorting the grid current, consequently increasing the Total Harmonics Distortion of the current [14,15]. Power Factor is the indication of the rate between the active power (P) to the apparent power (S) that should be in high range which is more than 0.9, the apparent power S represents vector value includes real value of the active power (Watt) and imaginary value of the reactive power (Volt•Amp) as shown in (1), and explained in Figure 1. To have lower losses system, unity power factor (PF) is necessary as shown in (2).

= +
(1) The grid voltage waveform is representing by (3), and the grid current waveform can be represented by (4) due to the phase shift between the grid voltage and the grid current. The phase shift (value and direction) between the two waveforms is depending on the value and the type of the impedance. In other words, as shown in Figure 1, the phase shift between the grid voltage and grid current represents the same phase shift of the equivalent impedance, and the value of the power factor PF can be calculated by (5). Figure 1. Apparent power S contents active power P and reactive power Q Where V grid , I grid , V m , I m , and Ө represent grid voltage, grid current, peak value of grid voltage, peak value of the grid current, and phase shift between grid voltage and grid current waveforms, whereas w equals to 2πf o , and f o is the grid frequency, t is the time (sec).
Power factor PF can be one when having zero phase shift between the apparent power and active power. In terms of converter, to have PF improvement, the converter drive pulses which are pulse width modulation technique based pulses can be controlled. The width of the PWM pulses can be controlled based on ANN predicting to the duty cycle which is required to compensate the phase shift between the grid voltage and the grid current. Based on the fact of that the artificial neural network ANN can quickly predict the suitable numerical value by considering the instantaneous numerical values of the input variables of the related system's parameters [16][17][18]. So, a new ANN algorithm has designed in this paper to predict the suitable duty cycle to have 100 percent matching between the grid voltage and grid current that consequently lead to have unity PF. Neural network can be designed and implemented by involving one input layer, one hidden layer, and one output layer, whereas there is possibility to involve more than one hidden layer. Neuron is the fundamental unit in the ANN, Figure 2 shows the neuron's contents and processing stages which are representing by input variables receiving stage, variables weighting stage, then adder stage to have Z value as shown in (6). This value is manipulated by one of the three activation functions as shown in (7-9).
The accuracy of the designed ANN algorithm can be evaluated by monitoring the value of the mean square error (MSE) which reflects the result of error level between the target value and the predicted value as explained in (10,11).
Where q is the elements number of the input vector, e(k) is the error value, t(k) is the target value, and a(k) is the output vector value which is predicted by the neural network algorithm [19].

DESIGN OF THE PRESENTED ANNBASED PF CORRECTOR
The paper design mainly focuses on increasing the PF of the converter system to the aim of unity power factor, and at the same time to enhance the THD level of the grid current. Figure 3 shows the main diagram of the presented power factor corrector. The system blocks are divided to two groups, controlling blocks and power electronics blocks. The controlling blocks are starting by a measuring block which receives the instantaneous values of the grid voltage and grid current, calculates the phase shift (Ө) between the grid voltage and current waveforms and calculates the power factor PF value using (3)-(5). The instantaneous value of the phase shift enters the artificial neural network block, and at the same time, the ANN block receives the absolute value of the grid voltage. The function of the designed ANN is to predict the initial value of duty cycle D, the final value of duty cycle is found after considering the error signal between the load current and the reference current and the error signal between the load voltage and the reference voltage. The final value of the duty cycle D enforces the converter to have full matching between the grid voltage and the grid current. The other meaning of full matching is the phase shift is zero and the power factor (cos (Ө)) is one. The designed ANN includes three hidden layers in addition to one input layer and one output layer as shown in Figure 4. Pulse Width Modulation (PWM) pulses generator generates the drive pulses to the involved boost DC-DC converter [20][21][22][23][24][25]. The second group of blocks in the proposed system involves the power electronics device which is the boost DC-DC converter, in addition to the electrical resistive load. The converter is designed in this study through the design steps of [26], in which the converter output load voltage (V O ) is relate to the converter input voltage (V in ) by considering the Duty cycle (D) value (12). The electrical load used in this study is a variable resistive load with three resistances of 160 Ω, 120 Ω, and 80 Ω.

PF CONTROLLER SIMULATION AND SIMULATION RESULTS
The proposed PF corrector is simulated via MATLAB/Simulink, the designed algorithm of the neural network is simulated which includes input layer of two neurons, three hidden layers of ten neurons each, and output layer of one neuron as shown in Figure 5, whereas the ANN accuracy is shown in Figure 6 and evaluated through the mean square error (MSE) of the algorithm. On the other hand, the converter parameters setting is shown in Table 1, in which, the considered switching frequency is 12 kHz. The system performance is evaluated, firstly via constant 60% duty cycle and variable resistive loads (160 Ω, 120 Ω, 80 Ω) during 3 seconds simulation time. The simulation time is divided equally into three times of one second for each load value. Grid voltage of V rms value 110 V / 60 Hz and grid current waveforms are shown in Figure 7, it's clearly noticeable the phase shift between grid voltage and grid current, and also the distortion of the grid current which is increased during the increasing of the load current. The total harmonics distortion (THD% = 44.57%) and the high levels of the low order harmonics of the grid current at 80 Ω load are also clear shown in Figure 8. The system behavior in terms of load voltage is shown in Figure 9, the overshoot of load voltage at beginning of converter response is clearly monitored. At the same time the load voltage level is varying with different values during load variation. The PF levels all are monitored and recorded in Table 2 during the constant duty cycle, and at the controlling function later.
The system performance is evaluated and monitored through the proposed controller for same resistive loads and same simulation time divisions. Grid voltage and grid current are shown in Figure 10, the matching between the grid voltage and current is clearly noticeable and positively affects the PF improving, and enhances the low order harmonics and THD of grid current as well as shown in Figure 11, in which the THD level at load 80 Ω equals to (THD% = 7.68%). The merit of the proposed controller in terms of controlling and stabilizing the load voltage at different loads is shown in Figure 12. Via the presented controller, the overshoot in load voltage is completely removed, and the load voltage is stabilized during the load  Figure 13 shows system performance during 1 second simulation time, in first part of which the system works with constant 60% duty cycle, and after 0.55 sec, the system works under the proposed PF corrector role. It is very clear the positive effect of the proposed controller on the system performance in terms of phase shift reduction between grid voltage and grid current, and in terms of shape of grid current waveform. Table 2 shows all records of PF levels, load voltages, and THD for all loads, with and without inserting the proposed PF corrector.   Figure 7. Grid voltage and grid current waveforms with zoom in for each load 160 Ω, 120 Ω, and 80 Ω respectively at 60% constant duty cycle

CONCLUSION
This paper presented a new power factor correction controller with load voltage controlling ability for single phase boost DC-DC converter systems, the presented controller worked also on enhancing the Total Harmonic Distortion level of the grid current. The controller considered the merits of the artificial neural network algorithms in terms of fast and accurate response for predicting the numerical values of the related parameters. This study designed, MATLAB simulated, and results analysed of a new PF corrector, and the system performance is evaluated in terms of PF level, load voltage regulating, harmonics spectrum, and THD level of grid current. The collected records indicate the effectiveness of the proposed controller which guaranteed the unity power factor, and stabilized the load voltage with clearly noticeable THD enhancing for all direct current loads 80 Ω, 120 Ω, 160 Ω. The high performance of the proposed controller promises the successfulness of the future practical prototype.