# Sizing Control and Hardware Implementation of a Hybrid Wind-Solar Power System, Based on an ANN Approach, for Pumping Water

Authors: Ons Zarrad; Mohamed Ali Hajjaji; Aymen Jemaa; Mohamed Nejib Mansouri
Journal: International Journal of Photoenergy
 (2019)

---

## Abstract

In our day, solar energy and wind energy are becoming more and more used as renewable sources by various countries for different uses such as in an isolated home. These energies admit a unique limitation related to the characteristic of energy instability. For this, the objective of this manuscript is to command and synchronize the power flow of a hybrid system using two sources of energy (solar and wind). The first contribution of our work is the utilization of an artificial neural network controller to command, at fixed atmospheric conditions, the maximum power point. The second contribution is the optimization of the system respecting real-time constraints to increase a generating system performance. As a matter of fact, the proposed system and the controller are modeled using MATLAB/Simulink and a Xilinx System Generator is utilized for hardware implementation. The simulation results, compared with other works in the literature, present high performance, efficiency, and precision. The suggested system and its control strategy give the opportunity of optimizing the hybrid power system performance, which is utilized in rural pumping or other smart house applications.


---

## Body

## 1. Introduction

As we all know, water is absolutely necessary for life and the need of water increases more and more with the rise in world population [1, 2]. Pumping water is very important to clean the water for drinking and irrigate agricultural fields. The expensive installation of the grid to pump the water in rural villages is also considered a big problem in many developing countries [2]. Furthermore, transporting fuel, needed for water pumping [3–5], in rural villages can be difficult, unsafe, and with limited quantity.Between the most attractive energy used in rural areas to pump water is renewable energy, such as photovoltaic (PV) and wind machines. Thanks to the importance of these renewable energies, combining these two intermittent sources can guarantee the stability and continuity of energy production. Regardless of day or night, a wind energy resource is always there [6–8]. The solar energy resource is only in daytime, but because solar energy is continuous and stable, it can make up for the intermittent characteristics and the discontinuity of wind energy in daytime. Current research and development effort is required to ameliorate the efficiency and performance of PV panels as well as wind turbines, which are one of the most studied subjects of modern modular technologies.According to the irregular character of solar and wind energies, Maximum Power Point Tracking (MPPT) algorithms are utilized for the extraction of the maximum power to get an optimum performance of a hybrid system. The MPPT algorithms are classified into two principal categories. One category utilizes classic methods, like hill climbing, incremental conductance, and Perturbation and Observation (P&O). Another category uses intelligent methods, like Artificial Neural Networks (ANNs), fuzzy logic, or a combination of both methods. Recently, ANNs have been used to solve very complex problems in many application fields [9–12]. The specific solution for various nonlinear and complex systems can be determined using the function and results of ANNs [12–15].The main contribution of this manuscript is to implement the controller, on a Field-Programmable Gate Array (FPGA), an ANN MPPT. The power management controller is used to command, supervise, and synchronize, in real time, the power output of a system consisting of two energy sources (wind and solar).The first objective of the present work is to develop intelligent ANN controllers for the proposed hybrid system and to control the proportional-integral of the wind turbine. For the wind system, to extract the Maximum Power Point (MPP), the boost converter is controlled to check, for every wind speed, the optimum rotor speed. Indeed, the boost converter is adjusted to determine the optimum Pulse-Width Modulation (PWM) in accordance with the current-voltage characteristics. The solar and wind energy systems are designed using MATLAB/Simulink [8].The second objective studied in this manuscript is to implement, on a FPGA, the ANN MPPT controller proposed in the hybrid wind-solar conversion system using a Xilinx System Generator (XSG) which is the plug-in to Simulink which actually allows designing and simulating a system through the use of MATLAB/Simulink and Xilinx library. XSG handles most routing and placement timing. Furthermore, FPGA offers many advantages compared with a sequential machine microcontroller. It does the current operation where the instructions are executed continuously and simultaneously. FPGA is suitable as a rapid implementation controller and can be programmed to do several types of digital functions.This paper begins with an introduction which presents the contribution of our work as well as the background of a hybrid wind-solar system. The next section is dedicated to the related works. Section3 is the global model description of hybrid system components. Section 4 describes the XSG tools used for ANN controllers and presents the conception and the hardware architecture of the different hybrid system blocks prepared for the implementation on FPGA.Section5 details the simulation results and discussions. Section 6 presents and discusses the implementation of an ANN controller on FPGA before the conclusions, which are given in the last section of this paper.


## 2. Related Works

To track MPP, various MPPT algorithms useful for the fixation and extraction of maximum power exist in the literature. These methods are addressed in different ways.In [16], to command the MPP of a hybrid system, Izadbakhsh et al. proposed an ANN genetic controller with three layers for various PV irradiation, as well as a fuzzy logic controller with three trapezoidal memberships, a min-max method, and a centroid mechanism for a wind turbine.In [17], Prakash and Sankar evaluated and improved the quality of power generated by the hybrid system. They used an Elman neural network algorithm to track and improve MPPT. The rated power for the used wind turbine was 5 kW with a fixed atmospheric wind speed 12 m/s.In [18], a stand-alone PV-wind energy conversion system was sized and optimized. P&O and fuzzy logic algorithm controllers were used to get the optimal mechanical speed of the turbine and to define the DC-DC converter duty cycle.In [19], a hybrid ANN-fuzzy logic controller was developed to adjust the root mean square error for MPPT. The optimization algorithm used was ANFIS-FLOWER pollination for brushless DC motor-driven PV pumping systems. The structure of the ANN-fuzzy controller was composed of 25 fuzzy rules and five ANN layers.In [20], Cheng et al. proposed two methodology algorithms for MPPT. The first one would define the input membership function setting values using the solar cell power-voltage curve. The second one would use another method based on the Particle Swarm Optimization (PSO) algorithm with the purpose of optimizing the input membership function. The results show that the second asymmetrical fuzzy logic controller which is based on the MPPT algorithm had the maximum fitness value.In [21], Roumila et al. proposed a system which used two renewable (PV and wind) energy sources with the use of one backup generator and a storage system. For the satisfaction of the load demand at varied atmospheric conditions as well as managing the power flow, the authors use an intelligent power management control based on the fuzzy logic controllers.


## 3. Proposed Pumping System

The global scheme of the wind-solar system, presented in this manuscript, is shown and detailed in Figure1. Its principal blocks are one Permanent Magnet Synchronous Generator (PMSG), a continuous DC-DC bus, one wind turbine, a PV generator, boost converters, and ANN controllers.Figure 1
Global scheme of a hybrid pumping system.


### 3.1. Solar Energy

Figure2 describes the scheme of one solar energy conversion system studied in this paper. Its principal blocks are a PV generator, a boost converter, and a battery.Figure 2
Solar energy conversion system.In the beginning, a simplified equivalent circuit of one PV cell is illustrated in Figure3. The main elements of this circuit are an ideal diode, a parallel resistor (RP), a series resistor (RS), and one ideal current source (IPV) [12]. In addition to that, PV cells are characterized by their open-circuit voltage and their short-circuit current.Figure 3
Equivalent circuit of a PV cell [22].The equation of the current-voltage (IPV-VPV) is derived from Kirchhoff’s law [23–25]. It is given as follows:
(1)IPV=Iph−Id−Ish,with
(2)Id=I0eV+RSI/VT−1.Thus,(3)Id=I0eqV+RSI/nKTc−1,where Id is the current shunted through the intrinsic diode, Iph is the photocurrent, VT=nKTc/q is the thermal voltage of the array, I0 is the reverse saturation current of the diode, q is the electron charge, n is the diode ideality factor, K is Boltzman’s constant, and Tc is the junction temperature of panels.Such a reverse saturation currentI0 can be determined by setting IPV=0. It is given as follows:
(4)I0=I0rTCTref3eqEg/nK1/Tref−1/Tc,where I0r is the reverse saturation current at a reference temperature Tref, and Eg represents the gap energy.The last term of the expression of the current is given as follows:(5)Ish=V+IRSRP.After developing the termsId and Ish, the current-voltage characteristic is developed and expressed as follows:
(6)I=Iph−I0rTcTref3eqEg/nK1/Tref−1/Tceqv+IRS/nKTc−1−V+IRSRP.The PV module includes many series or parallel connected solar cells, and the current-voltage characteristic of a PV cell is given as follows:(7)IPV=NpIph−npI0rTcTref3eqEg/nK1/Tref−1/Tcexpv+RsIVTa−1−V+RSIRP.where Np is the number of cells in parallel and Ns is the number of cells in series.Table1 presents the electric specifications of the photovoltaic generator.Table 1
PV generator specifications.
Cell number in series
72
Cell number in parallel
1
Short-circuit voltage
43.2 V
Short-circuit current
7.12 A
Voltage (maximum point)
33.6 V
Current (maximum point)
6.50 A
Power
120 W


### 3.2. Wind Energy

Figure4 describes the schematic model of the wind system studied in this work. Its principal blocks are a battery, a boost converter, a rectifier, PMSG, and a wind turbine.Figure 4
Schematic of a wind energy system.The power expression is as follows:(8)P=12∏ρCPλ,βR2Vv3,where Vv is the wind speed, CP is the power coefficient, ρ is the air density, R is the radius of turbine, and β and λ are, respectively, the pitch angle of the turbine and the tip speed ratio. CP varies with λ, and it is maximal at the particular λopt [26]. It is expressed by equation (9) and is shown in Figure 1.
(9)CPλ=−0.2121λ3+0.0856λ2+0.2539λ.Letβ be equal to zero and λ be expressed by
(10)λ=ΩRVv.In this equation,Ω is the angular speed of the turbine.To maximize that power extracted from the wind turbine system,CP, which is the power coefficient, should be maximal for λ. As a consequence, one optimal rotor speed value is required for each wind speed value, where MPP is extracted [27–29]. For that reason, CP will depend upon the wind turbine rotor speed if the wind speed remains constant. Therefore, in order to control the power output of the turbine, the rotor speed should be controlled.Figure5 shows the variation in power for various wind speed values.Figure 5
Curve characteristic of TSR-based power coefficient.Figure6 depicts the appearance of mechanical power as regards the rotor speed in proportion to various wind speeds.Figure 6
Aspect of rotor speed-based mechanical power in proportion to different wind speeds.The mechanical system is as follows:(11)J=dΩdt=Tm−Te−fΩ.In the latter equation,f is a viscous friction coefficient, Te is the electromagnetic torque, Tm is the turbine-developed mechanical torque, and J is the total inertia.The analyzed wind turbine electric specifications are given in Table2.Table 2
Wind turbine specifications [30].
Air density (ρ)
1.2 kg/m3
Turbine radius (R)
0.5 m
Turbine height (H)
2 m
Inertia constant (J)
16 kg/m2
Friction factor (f)
0.01 kg·m/rad
Maximum coefficient of power (CPmax)
0.15
Optimal tip speed ration (λopt)
0.78


### 3.3. Mathematical Model of PMSG

The electromagnetic and voltage torque equations within a synchronous rotational (d-q)-axis reference frame are as follows:
(12)Vd=RSid+dφddt−ωφq,Vq=RSiq+dφqdt−ωφd,φd=Ldid+φf,φq=Lqiq,Cem=piqLd−Lqid+φf,where the (d-q)-axis voltages are, respectively, represented by Vd and Vq, the (d-q)-axis inductances are, respectively, represented by Ld and Lq, the (d-q)-axis currents, respectively, represented by id and iq, the rotor electrical velocity is shown by ω, the per-phase stator resistance is depicted by RS, the electromagnetic torque is represented by Cem, the permanent magnetic flux is illustrated by φf, and the machine pair-pole number is defined by p. It is worth mentioning that the rotor magnets produce the flux which depends on the material used for the realization of these magnets.Table3 provides the PMSG characteristics with two pole pairs.Table 3
PMSG utilized [30].
Stator phase resistance (RS)
0.137 Ω
Stator phase inductance
0.0027 H
Inertia constant
0.1 kg·m2
Friction factor
0.06 kg·m/rad


### 3.4. Boost Converter Model

Figure7 illustrates the basic circuit of the boost converter.Figure 7
The boost converter circuit.This boost converter is utilized for both PV and wind generation systems. It is a power electronic device that has a capacity of providing a voltage which is higher than the input voltage. Its duty cycle is controlled by a selected controller.The boost converter equations are given as follows:(13)iL=i−c1dVidti0=1−diL−c2dV0dtVi=1−dV0+LdiLdt.The relationship between input and output voltages is given as follows:(14)V0Vi=11−d,where V0 is the voltage of the boost converter, Vi is the output voltage, and d is, in view of fact, the duty cycle.


### 3.5. Pulse-Width Modulation

Figure8 presents the states of the PWM rectifier switches.Figure 8
States of PWM rectifier switches.The input voltages of PWM are expressed as follows:(15)vn=VdcSn−13∑n=acSn,where Sn=0 or 1 are the states of the switches presented in Figure 8.The equation of the DC bus current is given as follows:(16)C⋅dVdcdt=ic,with ic=ich−idc.Thus, the expression of the coupling between alternating and continuous sides as a function of the state of the switches is as follows:(17)C⋅dVdcdt=Saia+Sbib+Scic−idc.


### 3.6. Neural Network Controller

To get an ANN, it is important to combine two or more artificial neurons which can be structured in several layers and connected in different ways. The network architecture is determined by the way that neurons are connected to solve complex problems in different domains. These interconnections can be done with different possible topologies divided into two classes: feedforward and feedback networks. Multilayer Perceptron (MLP) ANNs are very known and utilized feedforward neural networks which have only one condition: direction of the transmitted information must be from inputs to outputs without backloops [31, 32].The architecture of a neural network with two hidden layers of the wind system consists of using MLP networks which include input, hidden and output layers with respected weight, and transfer functions (Figure9). In this case, the neuron network knows that the desired output as well as weight coefficients are adjusted and calculated by a controller to reach the specific output. In every hidden node, the products of weights and inputs should be summed to compare them with a fixed threshold. If the value is above, the neuron takes an activated value. Otherwise, the neuron takes the deactivated one [10].Figure 9
Neural network architecture.Added to that, the algorithm utilized to train this neural network is backpropagation [10]. It needs only inputs as well as a desired output to adapt the weight. In order to train the neural network, MATLAB software is used.


## 3.1. Solar Energy

Figure2 describes the scheme of one solar energy conversion system studied in this paper. Its principal blocks are a PV generator, a boost converter, and a battery.Figure 2
Solar energy conversion system.In the beginning, a simplified equivalent circuit of one PV cell is illustrated in Figure3. The main elements of this circuit are an ideal diode, a parallel resistor (RP), a series resistor (RS), and one ideal current source (IPV) [12]. In addition to that, PV cells are characterized by their open-circuit voltage and their short-circuit current.Figure 3
Equivalent circuit of a PV cell [22].The equation of the current-voltage (IPV-VPV) is derived from Kirchhoff’s law [23–25]. It is given as follows:
(1)IPV=Iph−Id−Ish,with
(2)Id=I0eV+RSI/VT−1.Thus,(3)Id=I0eqV+RSI/nKTc−1,where Id is the current shunted through the intrinsic diode, Iph is the photocurrent, VT=nKTc/q is the thermal voltage of the array, I0 is the reverse saturation current of the diode, q is the electron charge, n is the diode ideality factor, K is Boltzman’s constant, and Tc is the junction temperature of panels.Such a reverse saturation currentI0 can be determined by setting IPV=0. It is given as follows:
(4)I0=I0rTCTref3eqEg/nK1/Tref−1/Tc,where I0r is the reverse saturation current at a reference temperature Tref, and Eg represents the gap energy.The last term of the expression of the current is given as follows:(5)Ish=V+IRSRP.After developing the termsId and Ish, the current-voltage characteristic is developed and expressed as follows:
(6)I=Iph−I0rTcTref3eqEg/nK1/Tref−1/Tceqv+IRS/nKTc−1−V+IRSRP.The PV module includes many series or parallel connected solar cells, and the current-voltage characteristic of a PV cell is given as follows:(7)IPV=NpIph−npI0rTcTref3eqEg/nK1/Tref−1/Tcexpv+RsIVTa−1−V+RSIRP.where Np is the number of cells in parallel and Ns is the number of cells in series.Table1 presents the electric specifications of the photovoltaic generator.Table 1
PV generator specifications.
Cell number in series
72
Cell number in parallel
1
Short-circuit voltage
43.2 V
Short-circuit current
7.12 A
Voltage (maximum point)
33.6 V
Current (maximum point)
6.50 A
Power
120 W


## 3.2. Wind Energy

Figure4 describes the schematic model of the wind system studied in this work. Its principal blocks are a battery, a boost converter, a rectifier, PMSG, and a wind turbine.Figure 4
Schematic of a wind energy system.The power expression is as follows:(8)P=12∏ρCPλ,βR2Vv3,where Vv is the wind speed, CP is the power coefficient, ρ is the air density, R is the radius of turbine, and β and λ are, respectively, the pitch angle of the turbine and the tip speed ratio. CP varies with λ, and it is maximal at the particular λopt [26]. It is expressed by equation (9) and is shown in Figure 1.
(9)CPλ=−0.2121λ3+0.0856λ2+0.2539λ.Letβ be equal to zero and λ be expressed by
(10)λ=ΩRVv.In this equation,Ω is the angular speed of the turbine.To maximize that power extracted from the wind turbine system,CP, which is the power coefficient, should be maximal for λ. As a consequence, one optimal rotor speed value is required for each wind speed value, where MPP is extracted [27–29]. For that reason, CP will depend upon the wind turbine rotor speed if the wind speed remains constant. Therefore, in order to control the power output of the turbine, the rotor speed should be controlled.Figure5 shows the variation in power for various wind speed values.Figure 5
Curve characteristic of TSR-based power coefficient.Figure6 depicts the appearance of mechanical power as regards the rotor speed in proportion to various wind speeds.Figure 6
Aspect of rotor speed-based mechanical power in proportion to different wind speeds.The mechanical system is as follows:(11)J=dΩdt=Tm−Te−fΩ.In the latter equation,f is a viscous friction coefficient, Te is the electromagnetic torque, Tm is the turbine-developed mechanical torque, and J is the total inertia.The analyzed wind turbine electric specifications are given in Table2.Table 2
Wind turbine specifications [30].
Air density (ρ)
1.2 kg/m3
Turbine radius (R)
0.5 m
Turbine height (H)
2 m
Inertia constant (J)
16 kg/m2
Friction factor (f)
0.01 kg·m/rad
Maximum coefficient of power (CPmax)
0.15
Optimal tip speed ration (λopt)
0.78


## 3.3. Mathematical Model of PMSG

The electromagnetic and voltage torque equations within a synchronous rotational (d-q)-axis reference frame are as follows:
(12)Vd=RSid+dφddt−ωφq,Vq=RSiq+dφqdt−ωφd,φd=Ldid+φf,φq=Lqiq,Cem=piqLd−Lqid+φf,where the (d-q)-axis voltages are, respectively, represented by Vd and Vq, the (d-q)-axis inductances are, respectively, represented by Ld and Lq, the (d-q)-axis currents, respectively, represented by id and iq, the rotor electrical velocity is shown by ω, the per-phase stator resistance is depicted by RS, the electromagnetic torque is represented by Cem, the permanent magnetic flux is illustrated by φf, and the machine pair-pole number is defined by p. It is worth mentioning that the rotor magnets produce the flux which depends on the material used for the realization of these magnets.Table3 provides the PMSG characteristics with two pole pairs.Table 3
PMSG utilized [30].
Stator phase resistance (RS)
0.137 Ω
Stator phase inductance
0.0027 H
Inertia constant
0.1 kg·m2
Friction factor
0.06 kg·m/rad


## 3.4. Boost Converter Model

Figure7 illustrates the basic circuit of the boost converter.Figure 7
The boost converter circuit.This boost converter is utilized for both PV and wind generation systems. It is a power electronic device that has a capacity of providing a voltage which is higher than the input voltage. Its duty cycle is controlled by a selected controller.The boost converter equations are given as follows:(13)iL=i−c1dVidti0=1−diL−c2dV0dtVi=1−dV0+LdiLdt.The relationship between input and output voltages is given as follows:(14)V0Vi=11−d,where V0 is the voltage of the boost converter, Vi is the output voltage, and d is, in view of fact, the duty cycle.


## 3.5. Pulse-Width Modulation

Figure8 presents the states of the PWM rectifier switches.Figure 8
States of PWM rectifier switches.The input voltages of PWM are expressed as follows:(15)vn=VdcSn−13∑n=acSn,where Sn=0 or 1 are the states of the switches presented in Figure 8.The equation of the DC bus current is given as follows:(16)C⋅dVdcdt=ic,with ic=ich−idc.Thus, the expression of the coupling between alternating and continuous sides as a function of the state of the switches is as follows:(17)C⋅dVdcdt=Saia+Sbib+Scic−idc.


## 3.6. Neural Network Controller

To get an ANN, it is important to combine two or more artificial neurons which can be structured in several layers and connected in different ways. The network architecture is determined by the way that neurons are connected to solve complex problems in different domains. These interconnections can be done with different possible topologies divided into two classes: feedforward and feedback networks. Multilayer Perceptron (MLP) ANNs are very known and utilized feedforward neural networks which have only one condition: direction of the transmitted information must be from inputs to outputs without backloops [31, 32].The architecture of a neural network with two hidden layers of the wind system consists of using MLP networks which include input, hidden and output layers with respected weight, and transfer functions (Figure9). In this case, the neuron network knows that the desired output as well as weight coefficients are adjusted and calculated by a controller to reach the specific output. In every hidden node, the products of weights and inputs should be summed to compare them with a fixed threshold. If the value is above, the neuron takes an activated value. Otherwise, the neuron takes the deactivated one [10].Figure 9
Neural network architecture.Added to that, the algorithm utilized to train this neural network is backpropagation [10]. It needs only inputs as well as a desired output to adapt the weight. In order to train the neural network, MATLAB software is used.


## 4. Proposed XSG Architecture for the ANN Wind Controller

### 4.1. Introduction

System Generator is an element of Integrated Software Environment (ISE) Design Suite. Furthermore, this generation gives a set of Xilinx DSP blocks, e.g., multipliers, memories, registers, and as well as the filters for a specific controller design. A XILINX library from MATLAB/Simulink is used to generate one FPGA programming file. It is worth mentioning that the FPGA implementation steps are automatically completed. These steps are synthesis, place, and route. The principal advantage of using XSG for FPGA implementation is that Xilinx components provide in practice close integration with MATLAB/Simulink. The System Generator setting window defines the FPGA board type that will be used in our system and provides some additional options for analysis, compilation, and clock speed. In addition to that, System Generator permits for faster prototyping and designing in terms of high-level programming, through the use of more than 90 DSP building blocks. There are several components from the MATLAB/Simulink library that enable direct programming: C code, M code, and VHDL.Figure10 illustrates the flow conception of the System Generator tool which allows for a generation and cosimulation process from a hardware architecture design [33].Figure 10
Flow conception of the System Generator tool.In this paper, the architecture is designed by using XSG components added in the MATLAB/Simulink library. In what follows, the system using hardware module components will be described.


### 4.2. Neural Network Controller of Wind Energy Using XSG

Figure11 depicts the designed model of the wind energy conversion system with an ANN controller in the MATLAB/Simulink environment. Using the MATLAB (.m) program and the “newff” function, the different network weights and biases can be indicated. This ANN controller in MATLAB/Simulink can be designed using arithmetic blocks. The proposed architecture of the neural network controller designed on XSG is presented in Figure 12.Figure 11
MATLAB/Simulink diagram of the wind energy conversion system.Figure 12
Neural network controller for the wind system on XSG.


## 4.1. Introduction

System Generator is an element of Integrated Software Environment (ISE) Design Suite. Furthermore, this generation gives a set of Xilinx DSP blocks, e.g., multipliers, memories, registers, and as well as the filters for a specific controller design. A XILINX library from MATLAB/Simulink is used to generate one FPGA programming file. It is worth mentioning that the FPGA implementation steps are automatically completed. These steps are synthesis, place, and route. The principal advantage of using XSG for FPGA implementation is that Xilinx components provide in practice close integration with MATLAB/Simulink. The System Generator setting window defines the FPGA board type that will be used in our system and provides some additional options for analysis, compilation, and clock speed. In addition to that, System Generator permits for faster prototyping and designing in terms of high-level programming, through the use of more than 90 DSP building blocks. There are several components from the MATLAB/Simulink library that enable direct programming: C code, M code, and VHDL.Figure10 illustrates the flow conception of the System Generator tool which allows for a generation and cosimulation process from a hardware architecture design [33].Figure 10
Flow conception of the System Generator tool.In this paper, the architecture is designed by using XSG components added in the MATLAB/Simulink library. In what follows, the system using hardware module components will be described.


## 4.2. Neural Network Controller of Wind Energy Using XSG

Figure11 depicts the designed model of the wind energy conversion system with an ANN controller in the MATLAB/Simulink environment. Using the MATLAB (.m) program and the “newff” function, the different network weights and biases can be indicated. This ANN controller in MATLAB/Simulink can be designed using arithmetic blocks. The proposed architecture of the neural network controller designed on XSG is presented in Figure 12.Figure 11
MATLAB/Simulink diagram of the wind energy conversion system.Figure 12
Neural network controller for the wind system on XSG.


## 5. Hardware Cosimulation Results

Figure13 shows the designed model, in a MATLAB/Simulink environment, of the hybrid system with an ANN wind controller.Figure 13
Model of a hybrid energy conversion system in MATLAB/Simulink.To compare and analyze the results of the ANN MPPT controllers designed on MATLAB/Simulink and XSG, several ANNs are analyzed with a fixed number of hidden layers, where multiple activation functions and neuron numbers are used [10]. Analysis is made for different atmospheric conditions for the PV system, given in Table 4.Table 4
Values of temperature and solar irradiation used for the PV system.
1
2
3
4
5
6
7
8
G (W/m2)
1,000
980
900
850
800
750
700
600
T (K)
280
278
290
295
288
285
292
298The variable-speed wind form studied in this work is expressed in equation (18) and presented in Figure 14.
(18)Vvt=7.5+0.2sin0.1047t+2sin0.2665t+sin1.2930t+0.2sin3.6645t.Figure 14
Allure of variable-speed wind [30].The ANN structures proposed in this manuscript are given in Table5.Table 5
Structures of the proposed ANN controllers.
System
1st layer
2nd layer
3rd layer
Number of neurons
Activation function
Number of neurons
Activation function
Number of neurons
Activation function
1
Wind
1
Sigmoidal
1
Linear
—
—
Solar
1
Sigmoidal
1
Linear
—
—
2
Wind
20
Sigmoidal
1
Linear
—
—
Solar
20
Sigmoidal
1
Linear
—
—
3
Wind
1
Sigmoidal
1
Sigmoidal
1
Linear
Solar
1
Sigmoidal
1
Sigmoidal
1
Linear
4
Wind
30
Sigmoidal
1
Sigmoidal
1
Linear
Solar
30
Sigmoidal
1
Sigmoidal
1
Linear
5
Wind
10
Sigmoidal
1
Sigmoidal
1
Linear
Solar
10
Sigmoidal
1
Sigmoidal
1
LinearFor both wind and solar systems, the first ANN structure includes just one neuron and one sigmoid activation function in the first hidden layer, as well as one single neuron and one linear activation function in the second hidden layer.In the second analyzed ANN structure, the number of neurons of the first layers is increased and linear activation functions are used in the second layers for both wind and solar systems.The third ANN structure contains three hidden layers and one neuron for both wind and solar systems. In addition, sigmoid activation functions are used in both first layers and linear activation functions are used in the third one in both wind and solar systems.The architecture in the fourth and fifth analyzed ANN structures is the same as used in the third one, and the number of neurons of the first layers is raised.All the ANN controller structures are modeled using MATLAB/Simulink. The obtained power curves of the simulated hybrid system are shown in Figure15.Figure 15
Power curves obtained with five neuronal structures.These ANN structures give good power values that can satisfy the continuous supply of the hybrid system (Figure16). The five curves reach their MPP at different values of time. The most quick ones are considered. In Figure 17, the power output of controllers will be compared by focusing on the MPPT achieving time.Figure 16
Comparison between maximum power of five obtained curves.
(a)
(b)
(c)
(d)Figure 17
The generated RTL schematic.The curves of different structures show that the second structure reaches the first MPP value.Table6 provides the structure of an ANN controller that will be used on the hybrid system designed with XSG.Table 6
Structure of an ANN controller with XSG.
System type
ANN structure
1st layer
2nd layer
Wind
Number of neurons
20
1
Activation function
Sigmoid
Linear
Solar
Number of neurons
20
1
Activation function
Sigmoid
LinearThe hybrid system designed with XSG blocks is simulated with the goal of comparing the obtained results by Simulink and those achieved using a designed hardware module.Figure18 shows the power curves obtained with a proposed ANN controller and that designed on XSG. The system stabilization with XSG is quicker due to parallel processing.Figure 18
Power curves obtained with an ANN controller in Simulink and an ANN controller designed on XSG.A comparison with other studies is required to be satisfied with the high efficiency of our model.Examples of some FPGA implementation of ANN and fuzzy logic algorithms as well as their main characteristics are presented in Table7.Table 7
Performance comparison.
References
Algorithms
Tracking efficiencyηMPPT (%)
Frequency max (Hz)
Proposed algorithm
ANN structures for the wind turbine
20 neurons and sigmoid transfer function for the first layer1 neuron as well as linear transfer function for the second layer
99.61
62.8
Izadbakhsh et al. [16]
Fuzzy logic for the wind turbine
5 membership trapezoidal transfer function for each input or output
97.10
96.2
Prakash and Sankar [17]
ANN for the wind turbine
Modified Elman neural network algorithm
95.39
80
Priyadarshi et al. [19]
ANN-fuzzy logic for the PV system
5 Gaussian membership functions for the fuzzy controller and 5 layers for the ANN controller
90.2
94.3
Cheng et al. [20]
Fuzzy logic for the PV system
2 trapezoidal and 3 triangular membership functions using PSO technique to optimize input membership function
96.65%
76The references chosen for comparison use different topologies (ANN and fuzzy logic). The values of tracking the efficiency and response time of references compared with the proposed algorithm satisfy and validate the model designed.After ensuring that the system progress is validated and evaluated, the implementation of the controllers on FPGA circuits is in the following.


## 6. FPGA Implementation

After the validation of the adopted algorithm by software simulation, we proceed to the implementation on a Xilinx platform. The configuration file is obtained automatically by following the necessary steps to convert the design into an FPGA synthesizable module. The target device selected for this work is Virtex-6 FPGA.In this work, FPGAs are a good choice because of their characteristics such as the high performance and reconfigurability and the low energy dissipation [28]. In order to implement the design of the hybrid energy conversion system in an FPGA board, the entire module is required to be converted to an FPGA synthesizable module. At first, at the system level, using floating-point Simulink blocksets, an algorithm is modeled and simulated. A design necessary to implement the system on FPGA is presented with XSG blocks. By clicking on the System Generator token, a window appears. After opening a token dialog box of the System Generator, there should be a selection of the compilation type. The second step is to define the FPGA part (Virtex-6). The characteristics of the used FPGA are presented in Table 8.Table 8
Characteristics of FPGA Virtex-6-XC6VLX315T [30].
Logic cells
314.880
Configurable logic blocks
Slices
49.200
Max distributed RAM (kb)
5.090
DSP48E1 slices
1.344
Interface blocks for PCI Express
2
Max user I/O
720
Total I/O banks
18
Total number of configuration bits
104,465,888
Price
667.29$
Max frequency: 200 MHzAfter that, the tool of synthesizing the design and the HDL language to be used for compilation (VHDL) are specified. System Generator creates an HDL test bench. Added to that, the design is synthesized and implemented. At this time, the period (ns) of the system clock and the hardware clock pin location can be identified. Using the token dialog box of the System Generator, the code generator is called when clicking on “generate.”During the Register-Transfer Level (RTL) step (Figure17), the synthesizer observes syntax and programming errors. Next, it transforms the VHDL program into basic electronic elements like logic gates and flip-flops. It also permits imposing technological constraints (user constraints), for example, to set the speed of operation (create timing constraints), to delimit the zone of the FPGA circuit in which the routing must be done (create area constraints), or to assign the pin inputs/outputs (assign package pins). The view RTL schematic tool allows viewing the equivalent patterns generated by the synthesizer for each block of the program as well as the relationship between the different blocks in the main program.“Device utilization summary,” presented in Table9, depicts the information that is in close relation with the device utilization analysis. The total power dissipation is 4,605 W, and the maximum frequency is 62.8 Hz.Table 9
Summary of device uses.
Logic use
ANN controller
Utilized
Use (%)
Number of STARTUPs
1
100%
Number of DSP48E1s
51
3%
Number of BUFG/BUFGCTRLs
1
3%
Bonded IOB number
425
70%
Occupied slice number
835
1%
Number utilized as memory
116
1%
Number of slice LUTs
2,782
1%
Number of slice registers
457
1%
Obtained frequency: 62.8


## 7. Conclusion

A hybrid wind-solar energy system based on ANN controllers has been presented and implemented on FPGA in this paper. The MATLAB/Simulink system design is used to model the different blocks of the system with five ANN controller structures. The chosen structure is composed of two hidden layers. The first layer contains 20 neurons with a sigmoid transfer function. The second one contains one neuron with a linear transfer function. Then, the two solar and wind controllers with XSG are designed. The XSG simplifies the complicated programming and makes it easy for designers to accelerate simulation and at the same time test the design in hardware. In fact, due to the advantage of the parallel XSG structure, the stabilization of the system is quicker.The MPP achieving time and tracking efficiency are, respectively, about 4 ms and 99.61%. The experimental simulation results show good performances compared to other existing systems in terms of used strategy as a function of achieved tracking time and efficiency.At the end of this manuscript, the implementation on FPGA Virtex-6-XC6VLX315T hardware of our system was given by using the Xilinx ISE design. Finally, using MATLAB/Simulink and XSG provides simplicity for hardware implementation.As perspectives, this work can be extended by utilizing this system in the power supply of a complete farm.



---

*Source: 5672032-2019-05-30.xml*