Development of a multilayer perceptron ( MLP ) based neural network controller for grid connected photovoltaic system

This paper focuses on the development of a controller for grid connected photovoltaic energy conversion system. Control design of a single phase inverter interfacing a photovoltaic generator and an electrical grid is performed, based on Artificial Neural Networks. The developed controller is compared with a Proportional Integral (PI) controller through computer simulation. The obtained results show that the neural controller has faster response and lower total harmonic distortion (THD) without overshoots.


INTRODUCTION
The main difficulties in the control strategy of real dynamic systems are the non-linearity and strong nonlinearity.The lack of right knowledge necessary for the development of the uncertainties.The control of the system requires in general the development of a mathematical model making it possible to establish the transfer function of the system that links the inputs and the outputs.This requires good knowledge of the dynamic and properties of the system.In the non-linear system case, the conventional techniques have often shown their limits mainly when the system to be studied presents mathematical models is somehow the origin of those limits (Mohammed et al., 2007).
Recourse to the control methods based on artificial intelligence has become a necessity.These control methods follow an extraction process of the knowledge of the system to be studied from collected empirical data, so as to be able to react in front of new situations: This strategy is known as intelligent control (Panos et al., 1993).
Artificial neural networks are used in intelligent control due to the fact that they are parsimonious universal approximators (Panos et al., 1993;Rival et al., 1995) and that they have the capacity to adapt to a dynamic evolving through time.Moreover, as multi-input and multioutput systems, they can be used in the frame of the control of the multivariable systems.
A feed forward ANN makes one or more algebraic functions of its inputs, by the composition of the functions made by each one of its neurons (Dreyfus, 2002).These are organized in layers and inter-connected by wellbalanced synaptic connections.The supervised training of a neural network consists in modifying the weights to have a given behavior minimizing a cost function often represented by the quadratic error (Panos et al., 1993;Cybenko, 1989).
Several authors have tried to exploit the advantages of neural networks to control a dynamic system (Mahmoud et al., 2012;Zameer and Singh, 2013) precisely, within the field of robotics (Rival et al., 1995;Yildirim, 1997) and *Corresponding author.E-mail: alphousseynou.ndiaye@ucad.edu.sn.
for the control of asynchronous motors (Mohammed et al., 2007;Panos et al., 1993;Branštetter and Skotnica, 2000).More details on neural network controllers can be found in Panos et al. (1993), Wishart and Harley (1995), Ronco and Gawthrop (1997), Hagan and Demuth (1996), Wishart and Harley (1995), Ahmed et al. (2008), Tai et al., (1990), Hagan and Demuth (1996), Chen et al. (1997), Norgaard (1996) and Vandoorn et al. (2009) in which a comparative study was made between PI controller, PID controller and a fuzzy logic based controller for an inverter control shows that the PI controller has better performances, though the fuzzy logic based controller is an intelligent one.
In the work presented in this article, the capacities of multi-layer perceptron (MLP) to learn the inverse model of non-linear systems are used to work out the control of a single-phase inverter used as an interface between a photovoltaic generator (PVG) and an electrical grid.The objective is to inject into the grid as much photovoltaic energy as available, with low total harmonic distortion (THD) and good reference signal tracking a characteristic.

METHODOLOGY Inverter control by using a PI controller
The PI controller is the most used controller in industrial systems.It is easy to implement and it is costs efficient.The control scheme of a grid connected photovoltaic system used in this work is given in Figure 1.
A loop control is elaborated in order to ensure the injection of the maximum available photovoltaic energy into the grid.This loop enables current control to give a reference current determined by the maximum power point tracking system (Figures 1 and 2).In order to determine the controller parameters, the whole system model has been established.The inverter transfer function links inverter output current to the duty cycle.The PI controller parameters can be determined from this transfer function.The input voltage of the inverter is supposed to be constant (ripple are neglected).From Figure 1, Equation (1) can be established.
Where, L = inductor value of the filter; g i = current injected into the grid;  = duty cycle; dc V = inverter input voltage, and g v = grid voltage; Using small signals models, it is possible to write: Where,  is the average value of the duty cycle and  ~ the duty cycle ripple; g I is the average value of the current and Where, ti v = The magnitude of the carrier, and ti G = gain loop (gain of the current sensor).
Exploiting this transfer function allows the PI coefficients to be determined (Equations 4 and 5).
Where, cL f = Cut-off frequency, and hm p = Phase margin.
The PI controller input consists of the error between the current provided by the inverter and its reference.The objective of this control is to correct the current injected into the grid (ig) so that it follows the reference value (igref).This type of controllers is simple but it gives limited performances if the system integrates strongly nonlinear elements such as static inverters.In fact, the determination of the controller parameters can be done through different methods but generally depends on the knowledge of the system to be controlled, and mathematical model of the system is not always available.Equations 4 and 5 show that the parameters of the PI controller (kp and ki) depend on Vcd which is related to meteorological conditions (solar irradiation and temperature).So it is worth adapting this coefficient any time the meteorological conditions change, which seems to be impossible.Therefore an adaptive control has to be set up.This fact has led to carrying out a comparative study of a PI controller and a neural network controller.

Principles of artificial neural networks
The ANN network is based on models that try to explain human brain functioning.They are adapted to the treatment in parallel of complex problems such as speech and face recognition, or simulation of nonlinear functions.So they offer a new means of information treatment.In Figure 3, the main elements of an artificial neural are depicted: the input, processing unit and an output.
With, i x = State of a neuron j connected to neuron i; The MLP network (Figure 4) is a feed forward network that is composed of several layers, each neuron of a layer being totally connected to the neurons of the next layer.The resulting network is able to approximate any nonlinear function.x , = output of the neuron k for the sample p.As a result, the total error (for all output neurons) is estimated by:


Where m = number of neurons on the output node.
The synaptic weights are then adjusted so as to reduce the output error for the whole samples of the data base:  Where N designates the size of the database.The process of the network parameters estimation is called training.The set of parameters that are to be estimated includes all the weights and biases.An algorithm called back propagation is mainly used for the network training.More details on neural networks is given in Ahmed et al. (2008).

Proposed design method of the neural controller
Within the framework of this study, the system to control is a singlephase inverter serving as an interface between a photovoltaic generator and an electrical grid.The structure of the neural controller for photovoltaic energy injection into the grid is represented in Figure 5.
The inputs of the neural controller are the current injected into the grid, the grid voltage and the error between the actual and the reference values of the inverter output current.Database for the neural controller training is obtainend from the system simulation with several PI controllers, each of witch being determined for a given system operating point, defined by the inverter input DC voltage.

RESULTS AND DISCUSSION
The inverter is designed so that its switches be able to support the maximum current i gmax and the maximum open circuit voltage (Vco) of the photovoltaic generator.Table 1 gives the inverter parameters and those of the photovoltaic generator.The filter inductor value is determined by Equation ( 11).
Where, Vcd. is the inverter input voltage; f s is the switching frequency, and is the maximum value of the output current ripple.
The system is first simulated with the PI controller (Table 2).The injected current and its reference value are presented in Figure 6, whereas Figure 7 shows grid   voltage and injected current for unity power factor.A disturbance consisting of a 33% reduction of reference current magnitude is introduced at t = 36 ms.The PI controller presents a relatively fast reference current tracking but an important overshoot can be noticed.The main drawbacks of this controller is due to the fact that it has to be designed for a given meteorological conditions.The design of the neural network controller consists of designing several PI controllers for various meteorological conditions.The following values are used for the solar irradiation and the temperature: (0.25 kW/m², 25°C), (0.25 kW/m², 40°C), (0.6 kW/m², 25°C), (0.6 kW/m², 40°C), (1 kW/m², 25°C) and (1 kW/m², 40°C).
Control signals from the PI controllers, grid voltage, inverter output current and its reference value are gathered to form a large database used for the neural controller training.
Figure 8 shows inverter output current and its reference value when neural controller is used for the following meteorological conditions: a solar irradiation of 1 kW/m² and a temperature of 25°C.A disturbance consisting of a 33% reduction of reference current magnitude is introduced at t = 36 ms.The obtained results prove fast tracking capability of the neural controller without overshoots.Grid voltage and injected current for unity power factor are shown in Figure 9.
A comparison study of the two controllers is performed throughout simulation of two cases.In the first case, the simulation is made for the following meteorological conditions: Solar irradiation of 1 kW/m 2 and temperature of 50°C.The PI controller parameters for these meteorological conditions has resulted in kp=1.16 and ki=7.07 10 3 rad/s.
The total harmonic distortion (THD) of both controllers have been calculated and compared.The obtained results are presented on Figures 10 and 11.They show that the neuronal controller has a THD slightly weaker than the PI controller.
In the second simulation case, the same meteorological conditions were used but a disturbance consisting in a rapid variation of the reference current has been introduced.The simulation results are represented on Figures 12 and in Table 3.These results show that the relative error between the injected current and its   reference is weaker for the neural controller, be it the half of the one obtained by PI controller.Moreover, the PI controller has a response time twice greater than that of the neural controller.Unlike the PI controller, the neural controller responds to the disturbance without overshoot.These two controllers provide a fundamental magnitude of about 15 A. Yet, considering the nature of both signals, the neural controller gets closer to the reference, giving its weak THD (Figures 10 and 11).

Conclusion
Development of a MLP based neural controller is presented.The training and validation data of the used neural controller were obtained by simulation of the whole system with several PI controllers calculated for various meteorological conditions.The simulation results show that the neural controller gives better results than a PI controller.The advantage of neural network based controller is that it adapts to the changing of meteorological conditions unlike the PI controller whose performance decreases during a strong variation of the temperature and/or irradiation.
Considering that the grid average voltage is null and neglecting its ripples, Equation (2) can be obtained.to Equation (2) and considering the control loop represented in Figure2, we get the open loop transfer function expressed by Equation (3) linking the injected current to the duty cycle. sL

Figure 1 .
Figure 1.Control loop of a grid connected photovoltaic system.


made on the k th output neuron for a sample p is expressed by Equation (8).

Figure 4 .
Figure 4. Architecture of an MLP network.

Figure 5 .
Figure 5. Grid connected photovoltaic system with single phase inverter and neural controller.

Table 1 .
Inverter and photovoltaic generator parameters.ParameterValue DC bus voltage (Vdc = Vopt at 1 kW/m² and 25°C) 800 V Opened circuit voltage of the PV generator 1000 V Short circuit current of the PV generator 6

Figure 6 .Figure 7 .Figure 8 .Figure 9 .
Figure 6.Inverter output current and its reference value when a PI controller is used.

Figure 10 .
Figure 10.THD obtained with a PI controller for a solar irradiation of 1 kW/m 2 and a temperature of 50°C.

Figure 11 .Figure 12 .
Figure 11.THD obtained with the neural controller for a solar irradiation of 1 kW/m 2 and a temperature of 50°C.

Table 3 .
Comparison results of the pi and neural controller.