FPGA-Based Controller for a Hybrid Grid-Connected PV/Wind/Battery Power System with AC Load

: The development and optimization of a hybrid system composed of photovoltaic panels, wind turbines, converters, and batteries connected to the grid, is ﬁrst presented. To generate the maximum power, two maximum power point tracker controllers based on fuzzy logic are required and a battery controller is used for the regulation of the DC voltage. When the power source varies, a high-voltage supply is incorporated (high gain DC-DC converter controlled by fuzzy logic) to boost the 24 V provided by the DC bus to the inverter voltage of about 400 V and to reduce energy losses to maximize the system performance. The inverter and the LCL ﬁlter allow for the integration of this hybrid system with AC loads and the grid. Moreover, a hardware solution for the ﬁeld programmable gate arrays-based implementation of the controllers is proposed. The combination of these controllers was synthesized using the Integrated Synthesis Environment Design Suite software (Version: 14.7, City: Tunis, Country: Tunisia) and was successfully implemented on Field Programmable Gate Arrays Spartan 3E. The innovative design provides a suitable architecture based on power converters and control strategies that are dedicated to the proposed hybrid system to ensure system reliability. This implementation can provide a high level of ﬂexibility that can facilitate the upgrade of a control system by simply updating or modifying the proposed algorithm running on the ﬁeld programmable gate arrays board. The simulation results, using Matlab/Simulink (Version: 2016b, City: Tunis, Country: Tunisia, verify the efﬁciency of the proposed solution when the environmental conditions change. This study focused on the development and optimization of an electrical system control strategy to manage the produced energy and to coordinate the performance of the hybrid energy system. The paper proposes a combined photovoltaic and wind energy system, supported by a battery acting as an energy storage system. In addition, a bi-directional converter charges/discharges the battery, while a high-voltage gain converter connects them to the DC bus. The use of a battery is useful to compensate for the mismatch between the power demanded by the load and the power generated by the hybrid energy systems. The proposed ﬁeld programmable gate arrays (FPGA)-based controllers ensure a fast time response by making control executable in real time.


Introduction
Today, a significant amount of the energy is produced by fossil sources, which generate greenhouse gas emissions and pollution. Renewable energy sources (RES) are essential to reduce this dependence. This study focused on distributed RES. A hybrid energy system constituted by wind turbine generators (WTG), photovoltaic generators (PVG), and batteries has been applied for grid-connected operation [1] and in various autonomous applications [2]. An autonomous system based on photovoltaic and wind energy with a PI regulator is described in [3]. Energy efficiency and sizing of wind/photovoltaic hybrid systems for electrification of marine oil well heads are being studied [4]. As a result, a pilot project allowing a grid-connected high-gain photovoltaic system is proposed in [5]. The design of an inverter for a hybrid power system is discussed in [6]. A hybrid system coupled to the grid and a new inverter topology was designed in [7]. Power converters and control units are essential for energy and its management, as well as for the maximum power supplied by PVG and WTG. For this reason, there are different approaches to pursuing maximum power points (MPPs) in the relevant published literature, such as incremental conductance [8], the parasitic capacity method [9], or the perturbation and observation method [10]. They depend also on the environmental parameters. Nevertheless, the uncertainties related to these conditions have reduced the performance of these techniques, particularly under the effect of variations in solar radiation, wind speed, and temperature. Fuzzy logic is usually used to achieve the maximum power delivered by PVG [8,10,11] and WTG [12][13][14] because it facilitates the application of energy management rules. In addition, it does not require a perfectly known mathematical model. Moreover, fuzzy logic's robustness and adaptability in the presence of parameter changes or unbalances in the system are well known.
In addition, conventional boost or buck/boost power converters are used to provide higher output voltage than input voltage [15] for the grid connection. These converters require a higher duty cycle to achieve higher voltage, but this implies higher input current and, consequently, a reduction of the converter performance. An alternative choice could be the conventional isolated converters [16][17][18], for example forward converters, fly-back, halfbridge, integral bridge, and push-pull. The voltage gain of these converters is dependent on the transformer ratio or on the coupled inductances. As a result, these converters can achieve high-voltage gain by using a higher transformer ratio. However, these converters absorb a discontinuous input current, making them unsuitable for renewable energy applications such as photovoltaic panels and wind turbines. They would need large input filter capacitors to operate with RES. In addition, the leakage inductance of these converters leads to an increase in voltage peaks on their switches. As a result, the clamping circuits to protect the switches make the system design complex. The conventional converters reported above have been the subject of several studies [19,20]. A new high-voltage gain DC-DC converter was developed in [20] and it is used in this paper with a fuzzy logic controller to ensure a robust performance in variable environmental conditions (temperature, solar radiation, and wind speed).
Different current regulation techniques have been proposed to control the power transfer to the single-phase distribution line and to reduce the harmonic distortions in the alternating current: hysteresis current regulation [21,22], voltage orientation regulation [23,24], and resonance proportional regulation (PR) [25,26]. Active reactive power control was used in this paper to command the single-phase inverter.
The generation of different pulse width modulation (PWM) pulses for different power converters was conceived in this article by using a Spartan 3E field programmable gate arrays (FPGA) board. FPGA very large-scale integration (VLSI) technology offers a fast and flexible system with more benefits than other traditional technologies. The ISE design suite software can easily optimize and control system parameters, such as frequency, current amplitude, voltage amplitude, number of PWM impulses in a half cycle, etc., without modifying the hardware circuit.
FPGA circuits have been successful in minimizing execution time by implementing parallel processing and rapid design prototyping; moreover, they improve the quality of hybrid power system control, thanks to new technologies of digital systems [11,27,28]. In fact, response time is improved, exceedances and oscillations are minimized, and power losses are reduced. All these advantages of real-time implementation are useful for hybrid control systems.
Recently, different structures of the hybrid system based on RES have been developed in the literature [10,15,[29][30][31] and different methods have been developed to extract the maximum available power [9][10][11][12][13][32][33][34][35]. Fuzzy logic control (FLC) is one of the best Energies 2021, 14, 2108 3 of 17 recognized techniques in maximum power point tracking (MPPT) [13,[36][37][38]. In addition, the principal advantage of the fuzzy logic method is the possibility of determining the maximum power from both voltage and current sensors. This paper is structured as follows: the hybrid power generation system modeling is introduced in Section 2. Section 3 describes different control strategies to ensure power transfer with minimum losses. Some simulation results using Matlab/Simulink are presented in Section 4 to validate and simulate the proposed hybrid architecture. The register transfer level (RTL) architectures, simulations, and implementation steps of the various commands are illustrated and discussed in Section 5. Conclusions are then included at the end of this work.

Modelling of the Proposed Hybrid Power System
If the main power sources of the hybrid system generate a mixture of alternating and direct current, a mixed coupling integration scheme is preferable. The proposed hybrid power system is composed of a solar panel (Kaneka GSA060), a wind power generator (Air X 400 W), a lithium-ion battery (24 V), and different power converters (an uncontrolled rectifier, a single-phase inverter, a filter, two buck converters, a high gain boost converter, and a bidirectional buck-boost converter). Figure 1 is the scheme of the hybrid system. In the following, the main components are modelled. the maximum available power [9][10][11][12][13], [32][33][34][35]. Fuzzy logic control (FLC) is one of the best recognized techniques in maximum power point tracking (MPPT) [13,[36][37][38]. In addition, the principal advantage of the fuzzy logic method is the possibility of determining the maximum power from both voltage and current sensors. This paper is structured as follows: the hybrid power generation system modeling is introduced in Section 2. Section 3 describes different control strategies to ensure power transfer with minimum losses. Some simulation results using Matlab/Simulink are presented in Section 4 to validate and simulate the proposed hybrid architecture. The register transfer level (RTL) architectures, simulations, and implementation steps of the various commands are illustrated and discussed in Section 5. Conclusions are then included at the end of this work.

Modelling of the Proposed Hybrid Power System
If the main power sources of the hybrid system generate a mixture of alternating and direct current, a mixed coupling integration scheme is preferable. The proposed hybrid power system is composed of a solar panel (Kaneka GSA060), a wind power generator (Air X 400 W), a lithium-ion battery (24 V), and different power converters (an uncontrolled rectifier, a single-phase inverter, a filter, two buck converters, a high gain boost converter, and a bidirectional buck-boost converter). Figure 1 is the scheme of the hybrid system. In the following, the main components are modelled.

PVG Model
A photovoltaic (PV) module is composed of several PV cells connected in series to increase the value of the total voltage, and several PV modules can be connected in parallel to increase the value of the total current. The PV parameters used in this paper are shown in Table 1.

PVG Model
A photovoltaic (PV) module is composed of several PV cells connected in series to increase the value of the total voltage, and several PV modules can be connected in parallel to increase the value of the total current. The PV parameters used in this paper are shown in Table 1.
The electric model of the PV cell is reported in the Figure 2.     The photovoltaic cell ( Figure 2) can be described as a set of Equations (1)-(6) that are modelled on the static behavior [15,32,33].
The Iph can be extracted from the short-circuit (SC) condition. In fact, the I SC current is the maximum current generated by the module. It is produced when V = 0. From (6), and remembering that Rs Rp, it results in Iph ≈ I SC . Equation (5) becomes:

WTG Model
The WTG is composed by a permanent magnet synchronous generator (PMSG) and a turbine connected with an uncontrolled rectifier. This rectifier is built with six diodes that convert a three-phase alternating signal into a DC signal. The specific parameters of the WTG are displayed in Table 2. The energy delivered by the wind turbine can be calculated as follows: where R is the radius of the wind turbine, β is the pitch angle, Cp is the power coefficient, Vw the wind speed, and λ symbolizes the tip speed ratio defined by: where ω turb describes the angular velocity of the wind turbine rotor. The PMSG is usually used for small and medium power wind turbines. The PMSG is modelled by the following equations [15]: The electromagnetic torque T em is modulated by: The electrical angular ω e velocity depends on the number of pole pairs (P), therefore, the mechanical angular velocity is expressed as [15]: The conversion of an alternating signal into a continuous one is carried out by an uncontrolled rectifier (violet block in Figure 1). The Equations (13)-(15) are the voltages generated by the PMSG, V, the DC output voltage V DC , and the rectifier output current I DC IDC: The DC-DC buck converter is used to decrease the voltage and track the maximum power point supplied by the PVG and WTG. The following equations show the output voltage and current: where 0 < α buck < 1.

Lithium Battery Model
The battery energy storage system (BESS) consists of a bank of lithium-ion type batteries used to reduce the power fluctuations from renewable energy sources and to support stability in the electrical system.
The operation of the battery system is presented by the following equations [39]: where E L is the load demand (W), E HES is the power delivered from the energy system (W), η Batt is the battery efficiency (%), and Echarge and Edischarge are the battery power in the charging and discharging periods, respectively. The battery bank capacity can be calculated according to the equation [40]: where DA is the daily autonomy, η inv is the inverter efficiency (%), and DOD is the depth of discharge of the battery (%).

High-Voltage Gain DC-DC Converter
The coupling of RES and the storage system requires a DC voltage of 400 V for the integration to the grid. To avoid known issues of classical converters (pulsed or discontinuous current, reverse recovery in diode, and so on) a high-voltage DC-DC converter is used ( Figure 3) The switches T1 and T2 have the same duty cycle and are shifted by 180 degrees each other. teries used to reduce the power fluctuations from renewable energy sources and to support stability in the electrical system.
The operation of the battery system is presented by the following equations [39]: (18) where EL is the load demand (W), EHES is the power delivered from the energy system (W), η is the battery efficiency (%), and Echarge and Edischarge are the battery power in the charging and discharging periods, respectively.
The battery bank capacity can be calculated according to the equation [40]: (19) where DA is the daily autonomy, η is the inverter efficiency (%), and DOD is the depth of discharge of the battery (%).

High-Voltage Gain DC-DC Converter
The coupling of RES and the storage system requires a DC voltage of 400 V for the integration to the grid. To avoid known issues of classical converters (pulsed or discontinuous current, reverse recovery in diode, and so on) a high-voltage DC-DC converter is used ( Figure 3) The switches T1 and T2 have the same duty cycle and are shifted by 180 degrees each other. The capacitor voltages and the output voltage applied are defined as The capacitor voltages and the output voltage applied are defined as Equation (23) represents the output voltage:

Control Strategies of the Proposed System
This section discusses the design of the following control strategies, reported in the blue box of Figure 1: • MPPT fuzzy logic, to produce the maximum power; • controller for voltage and current regulation of the battery; • fuzzy logic regulator for the high gain DC-DC converter to rise the voltage value from 24 V to 400 V; and • active-reactive inverter controller.

MPPT Based on Fuzzy Logic Control
The inputs of the fuzzy controller are derived from Equations (24) and (25). The output of the incremental conductance (IC) technique is given by Equation (24).

Control Strategies of the Proposed System
This section discusses the design of the following control strategies, reported in the blue box of Figure 1: • MPPT fuzzy logic, to produce the maximum power; • controller for voltage and current regulation of the battery; • fuzzy logic regulator for the high gain DC-DC converter to rise the voltage value from 24 V to 400 V; and • active-reactive inverter controller.

MPPT Based on Fuzzy Logic Control
The inputs of the fuzzy controller are derived from Equations (24) and (25). The output of the incremental conductance (IC) technique is given by Equation (24).  Regarding the choice made for the fuzzification of inputs and the defuzzification of output, there are twenty-five inference rules in the fuzzy controller database. We used the Mamdani technique with min-max for fuzzy results. They are summarized in Table 3.   Regarding the choice made for the fuzzification of inputs and the defuzzification of output, there are twenty-five inference rules in the fuzzy controller database. We used the Mamdani technique with min-max for fuzzy results. They are summarized in Table 3. Table 3. Fuzzy controller inference rules. Regarding the choice made for the fuzzification of inputs and the defuzzification of output, there are twenty-five inference rules in the fuzzy controller database. We used the Mamdani technique with min-max for fuzzy results. They are summarized in Table 3. Table 3. Fuzzy controller inference rules.

High-Voltage DC-DC Converter Controller
The control of this converter is usually based on the PI regulator [20], instead, this study proposes a fuzzy logic-based controller. Figure 6

AC-DC Inverter Controller
A grid-connected inverter control system consists of two cascading loops, the first is dedicated to stably maintaining the voltage of the DC-link capacitor at the desired value. Thus, the second loop is responsible for power quality and harmonic current compensation. Therefore, it must have a robust behavior to follow the sinusoidal reference with maximum rejection of disturbances. In addition, a phase locked loop (PLL) is developed to ensure the synchronization of the generated reference current with the current control loop. Therefore, this control has two main functions: the first one allows for active power injection into the electrical network and the second one compensates for the reactive power depending on the required energy and the energy produced. However, Ps indicates the apparent power depending on both active and reactive power that is defined by the same equations as below [24]: where

AC-DC Inverter Controller
A grid-connected inverter control system consists of two cascading loops, the first is dedicated to stably maintaining the voltage of the DC-link capacitor at the desired value. Thus, the second loop is responsible for power quality and harmonic current compensation. Therefore, it must have a robust behavior to follow the sinusoidal reference with maximum rejection of disturbances. In addition, a phase locked loop (PLL) is developed to ensure the synchronization of the generated reference current with the current control loop. Therefore, this control has two main functions: the first one allows for active power injection into the electrical network and the second one compensates for the reactive power depending on the required energy and the energy produced. However, Ps indicates the apparent power depending on both active and reactive power that is defined by the same equations as below [24]: This command requires two PI regulators: one to control the DC voltage in the DC bus to maintain a voltage constant and the other one to control the current injected into this bus. This block is used to explain and model the RTL architecture of the PQ control for the implementation on the FPGA board.

PI Controller for the Battery System
The method used for the optimal control of the battery is based on two PI regulators. The first one ensures the charge/discharge current control and the second one is intended for the voltage control. The model of the battery controller is shown in Figure 7.

Architecture of the Fuzzy Logic Controller on FPGA
This section explains how the previous controllers were implemented on an FPGA. Figure 8 shows a method to modify the values for the FPGA board consisting of two parts: the first shows the decimal part and the second shows the fractional part. In addition, we must calculate the number of bits (m) that denotes the integer part and the other forms of the fractional part (n). A number written in the fixed point is mentioned. The Mamdani's method is the most popular technique dedicated to FLC. The fuzzy rule is proven in the following equation: where μ (y) c is the compute output values and k = 1, 2, …, 25.
In Figure 9, the steps of the proposed control are explained in detail.

Architecture of the Fuzzy Logic Controller on FPGA
This section explains how the previous controllers were implemented on an FPGA. Figure 8 shows a method to modify the values for the FPGA board consisting of two parts: the first shows the decimal part and the second shows the fractional part. In addition, we must calculate the number of bits (m) that denotes the integer part and the other forms of the fractional part (n). A number written in the fixed point is mentioned.

Architecture of the Fuzzy Logic Controller on FPGA
This section explains how the previous controllers were implemented on an FPGA. Figure 8 shows a method to modify the values for the FPGA board consisting of two parts: the first shows the decimal part and the second shows the fractional part. In addition, we must calculate the number of bits (m) that denotes the integer part and the other forms of the fractional part (n). A number written in the fixed point is mentioned. The Mamdani's method is the most popular technique dedicated to FLC. The fuzzy rule is proven in the following equation: where μ (y) c is the compute output values and k = 1, 2, …, 25.
In Figure 9, the steps of the proposed control are explained in detail. The Mamdani's method is the most popular technique dedicated to FLC. The fuzzy rule is proven in the following equation: where µ c (y) is the compute output values and k = 1, 2, . . . , 25.
In Figure 9, the steps of the proposed control are explained in detail. The Mamdani technique simplifies the processing of materials thanks to its simple min-max structure. A summary of the internal structure of the controller can be found in Figure 4. However, the fuzzification of the two input parameters generates the appropriate linguistic values and membership functions (B1…B5) and (B11…B15). In addition, the association of antecedent pairs in the rule structure is essentially based on an operator AND logic. Then, all rules are combined in a max operation via the max block of the diagram. Therefore, the weighted average approach is recognized as one of the defuzzification processes that is suitable for implementation on hardware. Since the output membership functions are usually symmetrical, the fuzzy average can be applied as a weighting for the defuzzification process. Simultaneously, this method is composed of two arithmetic operations: multiplication operations with a constant process and a single division process.
The inputs/outputs signal of the ADC and the DAC converters situated on the Spartan 3E FPGA board are represented by 12 bits. As a result, the length of the integer and decimal part of each input/output signal is chosen according to the value of the signal to be displayed. For example, the input signals may be a 12-bit vector (m = 7, n = 5). As a result, the value of the open circuit voltage should not be greater than the open circuit voltage, such as 92 V. In addition, a 0 to 1 output value of the duty cycle was obtained, so the duty cycle was defined as 12 bits, and we decided to use a 10-bit representation for the decimal part.
The high-voltage gain DC-DC converter was also controlled by fuzzy logic. With respect to inputs and output, seven membership functions were defined for the fuzzification and defuzzification processes depending on the following linguistic variables: grand negative (GN), negative (N), negative small (NS), zero (Z), positive small (PS), positive (P) and grand positive (GP). The same methodology of the FLC structure shown in the functional diagram in Figure 9 was implemented to represent the fuzzy controller architecture designed for the proposed converter.

Simulation and Results
This section explains the simulation results of different components of the hybrid system under the strategies control and the architecture of the fuzzy logic controller to be implemented on FPGA. The experimental validation of the combined PV-wind power system is available in [15]. The Mamdani technique simplifies the processing of materials thanks to its simple min-max structure. A summary of the internal structure of the controller can be found in Figure 4. However, the fuzzification of the two input parameters generates the appropriate linguistic values and membership functions (B1 . . . B5) and (B11 . . . B15). In addition, the association of antecedent pairs in the rule structure is essentially based on an operator AND logic. Then, all rules are combined in a max operation via the max block of the diagram. Therefore, the weighted average approach is recognized as one of the defuzzification processes that is suitable for implementation on hardware. Since the output membership functions are usually symmetrical, the fuzzy average can be applied as a weighting for the defuzzification process. Simultaneously, this method is composed of two arithmetic operations: multiplication operations with a constant process and a single division process.
The inputs/outputs signal of the ADC and the DAC converters situated on the Spartan 3E FPGA board are represented by 12 bits. As a result, the length of the integer and decimal part of each input/output signal is chosen according to the value of the signal to be displayed. For example, the input signals may be a 12-bit vector (m = 7, n = 5). As a result, the value of the open circuit voltage should not be greater than the open circuit voltage, such as 92 V. In addition, a 0 to 1 output value of the duty cycle was obtained, so the duty cycle was defined as 12 bits, and we decided to use a 10-bit representation for the decimal part.
The high-voltage gain DC-DC converter was also controlled by fuzzy logic. With respect to inputs and output, seven membership functions were defined for the fuzzification and defuzzification processes depending on the following linguistic variables: grand negative (GN), negative (N), negative small (NS), zero (Z), positive small (PS), positive (P) and grand positive (GP). The same methodology of the FLC structure shown in the functional diagram in Figure 9 was implemented to represent the fuzzy controller architecture designed for the proposed converter.

Simulation and Results
This section explains the simulation results of different components of the hybrid system under the strategies control and the architecture of the fuzzy logic controller to be implemented on FPGA. The experimental validation of the combined PV-wind power system is available in [15].

Simulation Results in Matlab Simulink
To evaluate the proposed strategies and their efficacy, we implemented the whole hybrid system in the MATLAB/SIMULINK environment. The global system (Figure 1) contains the PVG composed of four parallel-connected PV modules and a WTG (400 W). Each source is associated with a buck converter. In addition, the battery is associated to the bidirectional converter. This hybrid system is coupled with the converter, filter, and the grid.

Simulation Results of the PVG
The PV array is coupled to the buck converter, which is controlled by MPPT using a FLC. During the time of simulation, the solar radiation varied between 700 W and 1000 W. A temperature value of 25 • C was assigned. The purpose of the buck converter is to lower the voltage to 24 V and to recover the maximum power supplied by the PVG during the change of solar radiation. FLC based on IC works very well and tracks MPP while environmental conditions change. It also shows good precision and speed. Figure 10 shows the profile of the radiation, the duty cycle, and the power referred to the PVG.

Simulation Results in Matlab Simulink
To evaluate the proposed strategies and their efficacy, we implemented the whole hybrid system in the MATLAB/SIMULINK environment. The global system (Figure 1) contains the PVG composed of four parallel-connected PV modules and a WTG (400 W). Each source is associated with a buck converter. In addition, the battery is associated to the bidirectional converter. This hybrid system is coupled with the converter, filter, and the grid.

Simulation Results of the PVG
The PV array is coupled to the buck converter, which is controlled by MPPT using a FLC. During the time of simulation, the solar radiation varied between 700 W and 1000 W. A temperature value of 25 °C was assigned. The purpose of the buck converter is to lower the voltage to 24 V and to recover the maximum power supplied by the PVG during the change of solar radiation. FLC based on IC works very well and tracks MPP while environmental conditions change. It also shows good precision and speed. Figure 10 shows the profile of the radiation, the duty cycle, and the power referred to the PVG.

Simulation Results of the WTG
The WTG is constituted by the wind turbine (WT) and the PMSG coupled to the uncontrolled rectifier, linked with the buck converter and controlled by the FLC. Figure 11 displays the proportional variation between the wind speed, the duty cycle required by the converter, and the WTG output power. Therefore, the MPPT can be exploited to obtain the maximum power without large power variations, despite the significant differences in wind speed.

Simulation Results of the WTG
The WTG is constituted by the wind turbine (WT) and the PMSG coupled to the uncontrolled rectifier, linked with the buck converter and controlled by the FLC. Figure 11 displays the proportional variation between the wind speed, the duty cycle required by the converter, and the WTG output power. Therefore, the MPPT can be exploited to obtain the maximum power without large power variations, despite the significant differences in wind speed.  Figure 11. Waveforms of wind speed, duty cycle, and output power of the WTG.

Various Simulation Results of the Proposed System
The output simulated power generated by the PVG, WTG, and battery is displayed in Figure 12. It can be observed that the battery charge and discharge are estimated as the difference between the total power provided by the renewable sources and the power transferred to the load (power load).

Various Simulation Results of the Proposed System
The output simulated power generated by the PVG, WTG, and battery is displayed in Figure 12. It can be observed that the battery charge and discharge are estimated as the difference between the total power provided by the renewable sources and the power transferred to the load (power load).  Figure 11. Waveforms of wind speed, duty cycle, and output power of the WTG.

Various Simulation Results of the Proposed System
The output simulated power generated by the PVG, WTG, and battery is displayed in Figure 12. It can be observed that the battery charge and discharge are estimated as the difference between the total power provided by the renewable sources and the power transferred to the load (power load).   are correctly regulated, using the difference between the power supplied by the renewable sources and the power injected into the DC bus.
For the battery control, the DC bus voltage must be kept constant. It can be observed that the voltage is tuned between 22 V and 24 V, regardless of the variations in wind speed. The combined output power, current, and voltage results of the DC bus are displayed in Figure 13.
Energies 2021, 14, x FOR PEER REVIEW 14 of 19 Figure 12 presents the simulation results of the power provided by the PVG, the WTG, and the battery, and the power injected into the DC bus. The battery charge and discharge are correctly regulated, using the difference between the power supplied by the renewable sources and the power injected into the DC bus.
For the battery control, the DC bus voltage must be kept constant. It can be observed that the voltage is tuned between 22 V and 24 V, regardless of the variations in wind speed. The combined output power, current, and voltage results of the DC bus are displayed in Figure 13. To connect the hybrid system to the power grid, a 400 V voltage should be supplied at the input of the inverter at a frequency of 50 HZ. This is carried out by using the proposed converter that increases the voltage from 24 V to 400 V. Therefore, the output voltage, current, and power are described in Figure 14, while Figure 15 presents the waveforms of the voltage and current injected into the grid and required by the alternating load (300 W). To connect the hybrid system to the power grid, a 400 V voltage should be supplied at the input of the inverter at a frequency of 50 HZ. This is carried out by using the proposed converter that increases the voltage from 24 V to 400 V. Therefore, the output voltage, current, and power are described in Figure 14, while Figure 15 presents the waveforms of the voltage and current injected into the grid and required by the alternating load (300 W).    The results show that the sum of the absorbed current by the AC load and the current injected into the grid is effectively equal to the current provided by the hybrid power system. The synchronization of the voltage and current injected to the grid is detailed in Figure 16. The results show that the sum of the absorbed current by the AC load and the current injected into the grid is effectively equal to the current provided by the hybrid power system. The synchronization of the voltage and current injected to the grid is detailed in Figure 16.

Synthesis of Commands Proposed on the FPGA Card
After development in very high speed integrated circuits hardware description anguage (VHDL) of the different control strategies, we needed to synthesize the VHDL codes and check that the FPGA board was able to support these commands. Table 4 shows the hardware resources we used for each command. The summary report shows the percentage of hardware resources usage required by various commands compared to the existing resources in the FPGA board. Therefore, the reserved hardware resources in the FPGA board are considered acceptable and not encumbered, with a utilization rate of the slice LUTs of 13% and 68% of the number of inputs and outputs of the existing set in the FPGA board.

Conclusions
This paper presents the modeling and simulation of a control system composed by

Synthesis of Commands Proposed on the FPGA Card
After development in very high speed integrated circuits hardware description anguage (VHDL) of the different control strategies, we needed to synthesize the VHDL codes and check that the FPGA board was able to support these commands. Table 4 shows the hardware resources we used for each command. The summary report shows the percentage of hardware resources usage required by various commands compared to the existing resources in the FPGA board. Therefore, the reserved hardware resources in the FPGA board are considered acceptable and not encumbered, with a utilization rate of the slice LUTs of 13% and 68% of the number of inputs and outputs of the existing set in the FPGA board.

Conclusions
This paper presents the modeling and simulation of a control system composed by five controllers for a grid-connected PV/wind/battery hybrid with AC load. The proposed system was validated in MATLAB/SIMULINK and ISE Design for implementation of the code in the FPGA card.
More precisely, a control strategy based on MPPT FLC using the algorithm of the incremental conductance was created to capture the maximum power extracted from the PVG and WTG generators. Additionally, a FLC that maintains a fixed DC link voltage at the output of the proposed converter was included. While the PQ control was implemented to control the inverter, the battery controller employed two PI controls: the first was designed to regulate the DC bus voltage and the second was created to manage the current controller.
The integration of a high-voltage gain DC-DC converter allowed us to increase the 24 V voltage generated by the DC bus to a voltage appropriate for the inverter of about 400 V and to minimize power losses to ensure maximum efficiency of the proposed system.
The challenges and non-linearity of PV and wind turbine (WT) systems are influenced by solar radiation, temperature, and wind speed, resulting in power losses and reduced efficiency. To obtain a fast response time and to take into account time constraints, we developed and simulated different architectures to facilitate VHDL programming and make control executable in real time. Thus, different controllers were developed and simulated in VHDL. The innovative design presented in this work requires a small unit of energy sources and presents an appropriate solution for domestic applications.
Future work should aim to experimentally verify the feasibility of the new control scheme for real-time applications of hybrid power systems.

I
The output current of the PVG Iph The photocurrent of the solar panel ID The diode current of the solar panel a The ideality factor k The Botzman constant K1 The temperature coefficient in current T The temperature Tref The reference temperature q The elementary charge in Coulombs G The irradiance G ref The reference irradiance E g The gap energy V The voltage P The power T The switch DC Direct current AC Alternating current