# An Intelligent Model Predictive Control Strategy for Stable Solar-Wind Renewable Power Dispatch Coupled with Hydrogen Electrolyzer and Battery Energy Storage

Authors: Miswar Akhtar Syed; Muhammad Khalid
Journal: International Journal of Energy Research
 (2023)

---

## Abstract

Renewable energy sources such as photovoltaic (PV) and wind power are widely used; however, their intermittent nature impairs power supply quality by creating frequency distortions and irregularities in voltage. Battery energy storage systems (BESS) are utilized to flatten out and relieve fluctuation issues. To prevent the need for larger storage systems and to prolong their operational life through controlled charging and discharging, a method of control for BESS charging level regulation is necessary. This study presents a solar-wind power and battery state of charge (SoC) control technique using a hydrogen electrolyzer (HE) fuel cell unit. An Intelligent Model Predictive Controller (IMPC) has been developed that utilizes a neural network (NN) plant model for predictive minimization instead of using a mathematical plant model for dynamic management of the HE output, which allows for flattened PV-wind power supply with regulated BESS charging and discharging. The IMPC accepts as inputs the intermittent renewable power and different battery attributes and intelligently manages the HE production while staying within the imposed restrictions. The NN, as opposed to a mathematical plant model, captures the dynamics of the plant with exceptionally high accuracy. Moreover, the NN plant model performance increases as the data gathered from the actual system increases. The neural network model resolves concerns with the MPC model’s mathematical intricacy that occurs as the plant becomes more complicated. According to simulation results, the IMPC greatly reduces PV-wind power fluctuations, for solar power, the IMPC reduces the peak battery SoC by 26.7% and compared to FLC, the peak SoC is reduced by 11.2%. Similarly, for wind power, the peak SoC is reduced by 7.3% and is decreased 3.2% more than the FLC. To demonstrate the power smoothing effectiveness of the IMPC, the peak solar power ramp rate is reduced by 30.3% and the peak wind power ramp rate is reduced by 91.3%. The presented method encourages green hydrogen usage in the electrical sector for supplying firmed solar and wind power.


---

## Body

## 1. Introduction

Use of renewable energy resources to meet the electricity demand has received amplified attention as a result of growing global energy consumption and climate change. Wind and solar are clean, inexhaustible power sources that produce no carbon dioxide and is cost competitive with nonrenewable energy sources such as coal [1, 2]. Because renewable resources have variability, the subsequent power output will fluctuate, causing stable operation and reliability issues [3]. Furthermore, it can cause issues with system frequency, power quality, voltage variations, and undesired peak loads [4]. Different alternatives for reducing wind-solar power variations and smoothing output power have been presented [5]. Energy storage systems (ESS) are significant for smoothing out power oscillations; and in recent years, the sector of energy storage has advanced rapidly [6]. Because of ESS’s technological innovations, it can now be utilized to smooth out fluctuations in power production [7]. Among the numerous ESS are Superconducting Magnetic Energy Storage, Flywheel Energy Storage [8], Compressed Air, and Battery Energy Storage System (BESS) [9]. However, because of their cost or capacity [10], many of these devices are not appropriate for wind-solar generation [11, 12]. Some of the issues connected with deploying ESS in wind and solar energy systems include ramp rates [13], transmission losses, and limiting the power output of wind-solar farms [4]. The Battery Energy Storage System [11, 12] is the energy storage system that works best with wind-solar power generation as it has many advantages, particularly its ease of implementation and modest needed installation space, the BESS is currently the most frequently utilized ESS to alleviate power fluctuation [14]. Nonetheless, because the BESS should have a large capacity to sustain the instability, the adoption of BESS in wind-solar power systems has certain obstacles. Because larger batteries are costly, incorporating BESS into the framework will lead to an increase in capital costs as well as maintenance overhead [8, 15]. As a result, a control strategy is essential for power smoothing, optimizing BESS use, and eventually reducing BESS capacity and investment [11, 12, 16]. Because of its ease of implementation and suitability for real-time operation, output power firming is a popular approach of managing BESS [17].


### 1.1. Literature Review

The low pass filter (LPF) is the most commonly used control filtering method to smooth down the fluctuating components of the power supplied into the grid, a first-order low pass filter was used in [18]. The time constant of the filter has a direct impact on its performance; higher values reduce power fluctuation and result in a stable output power [19]. Nonetheless, it raises the BESS capacity [20, 21], thereby increasing system costs [22]. Thus, the time constant must be adjusted appropriately, and numerous ways have previously been established [19]. To maintain the battery state of charge (SoC) in the optimal range, [23] changed the time constant of a low pass filter depending on its relation with the voltage fluctuation and SoC variation. In contrast, Sun et al. used a fuzzy controller to compute the LPF time constant [24]. Furthermore, [25] suggested an enhanced LPF technique by computing the time constant using the Hilbert Huang Transform. In [26], a control strategy is presented that increases system and power stability by reducing wind power variations and implementing energy management. A two-layered control technique to reduce wind power fluctuations and extend life of the battery by regulating internal power distribution among different battery components is developed [27]. In [20, 21], a high pass filter (HPF) is utilized to capture power fluctuations and make it as a reference for the associated BESS where the HPF’s cut-off frequency was determined by the SoC level. The study [28] used a double moving average filter to lower the BESS charge/discharge over time. To deliver steady output power, [29, 30] suggest fuzzy logic controller (FLC) to control the LPF output. A dynamic Kalman power flattening filtering technique using a FLC was used to reduce the necessary BESS capacity [31]. Similarly, [32] employed the Kalman filter with FLC for output power firming and used the battery’s SoC as feedback.The scheme approach of charging and discharging BESS is another frequently utilized way for power smoothing with BESS [33] that necessitates frequent switching between charging and draining of the BESS. Failure to maintain recurrent shifting between BESS discharging and charging will have an impact on wind fluctuation management and could lead to overcharge and deep discharge of the battery [34, 35]. As a response, it is essential to control the battery charging levels and to supply the necessary power to stabilize the fluctuating renewable power production [36]. The most popular control techniques are PI and PID, research has been done to inspect the BESS charge and discharge with PI while staying within SoC limitations [37]. A battery charging/discharging control utilizing Proportional Integral (PI) control that is dependent on rotor MPPT and battery SoC is suggested in [38]. The PI control scheme produces the requirement of the battery if the SoC is less than the constant current limit, else, the voltage of the battery remains stable [38]. Researchers in [39] took the battery SoC into account when developing their BESS control technique, managing the battery charging levels utilizing PI regulators. The study in [40] compared Proportional Derivative (PD) and fuzzy logic control systems for battery charging/discharging; the FLCs produced better power smoothing than the standard proportional derivative controllers. A FLC approach is developed in [41] to control BESS charging/discharging and to keep the BESS’s SoC within the optimal range of 10% to 90%. Fuzzy logic and artificial neural network (ANN) control methodologies are proposed in [42] for a BESS, it was discovered that the ANN controller outperformed the fuzzy controller.Due to its adaptability, Model Predictive Control (MPC) is also utilized to regulate the BESS charging levels, authors in [11, 12] created a control system that uses MPC in conjunction with a battery energy storage system to stabilize the solar power output and assure optimum battery performance. Closely, [43] presented an MPC technique to smooth and distribute wind power with BESS. A monotonic battery charging and discharging technique with constraints is used in [44] to regulate more batteries. An intelligent MPC is employed in [45] to manage the battery charging/discharging over a dispatch horizon. A control technique with battery coupled with MPC and hierarchy optimization to reduce oscillations through suitable BESS operation is presented in [46]. An online SoC control is devised in [47] to manage BESS charging/discharging, where the state of charge is forecasted depending on the wind power in the next dispatching period. A smoothing control technique based on the SoC is proposed to reduce the fluctuations and manage the battery SoC via feedback and updated firmed targets for real-time adjustments in the SoC is developed in [48]. Variations of MPC have been the primary control approach utilized in optimization with prediction; correspondingly in [19], a neural network MPC strategy paired with solar forecasting to govern the BESS with practical constraints is created. Because of accurate NN prediction, the system can get the solar power output in advance, and the BESS can use the regular mean solar power as its set point, compensating for the discrepancy among the real and anticipated production [19]. Based on the wind forecasting data, [49] presented an effective battery regulation for the following duration in order to level out frequency oscillations with BESS while considering power constraints and battery capacity. Authors in [50], suggested the Saviztky-Golay filter smoothing technique for minimizing solar power variability.


### 1.2. Research Gap and Motivation

Recently, hydrogen produced from electrolysis using solar-wind power, known as “green hydrogen,” has gained a lot of attraction, mainly because green hydrogen can decarbonise a range of sectors and the declining costs of renewable energy sources makes the use of green hydrogen more economically feasible [51]. The diagram in Figure 1 demonstrates the incorporation of green hydrogen in the integrated microgrid, a Hydrogen Electrolyze (HE) is employed to translate the electricity produced from renewable resources into hydrogen which can be stored in tanks, in order to dispatch the energy stored in the tanks as hydrogen, fuel cells are used to transform the stored hydrogen into electricity [52]. The HE system offers flexible controllability functions which can be used to offset the system’s real power disparities by altering the HE tubing system pressure [53, 54] through the monitoring and control system. Thus, [53, 54] devised a control strategy and proposed the incorporation of a fuzzy logic controller with the HE and fuel cell hybrid system to address power concerns caused by frequency changes. Although FLC has extensively been used for industrial applications, it does have certain limitations, it requires prior knowledge of the plant, for higher accuracy the fuzzy membership rules increase exponentially which results in lower speed and longer run time of the system [55], FLC is not capable of “learning” as it does not receive feedback, and the input variables have restricted usage [56]. Hence, there is a need for a more robust HE output control strategy that is capable of learning through feedback and captures the entire dynamics of the plant with ease without compromising the system speed and run time.Figure 1
A typical microgrid system with green hydrogen incorporation.


### 1.3. Contribution

Therefore, the objectives of this work can be stated as to introduce, design, and implement an Intelligent Model Predictive Controller (IMPC) that intelligently controls the production of green hydrogen electricity based on the battery feedback to provide a stable output power supply with optimum battery performance. To test the controller on real world solar and wind power data. To analyze its performance in terms of solar-wind power control followed by its battery State of Charge (SoC) and battery charging/discharging regulation. To compare the proposed controller with the popularly used Fuzzy Logic Controller (FLC). The designed controller employs an artificial neural network to generate a plant model for the predictive optimization step such that a signal is provided to modulate HE output to supply reliable solar-wind power while managing the SoC of the incorporated battery. Through the regulated creation of green hydrogen via the HE fuel cell system, the controller is developed to flatten the solar-wind power variations and significantly lower the ramp rate. The results of the simulations show that the designed IMPC, in conjunction with the HE-FC and battery, effectively handles solar-wind power variations and the battery state of charge. An evaluation of the presented control methodology against the fuzzy based control for battery SoC and charging level management is performed. The results show that the IMPC has higher SoC control capabilities because the SoC is kept well within the prescribed parameters. The IMPC also reduces the ramp rate and power required to charge and discharge the battery. The simulations are conducted in MATLAB-Simulink, using the solar power profile for August 2020 that was obtained from the University of Queensland’s (UQ) solar repository. Wind power dataset with a 5-minute frequency was gathered from Roaring 40 s wind farm (Woolnorth, Australia, 2010). The proposed controller in this study is compatible with both solar and wind energy.


### 1.4. Paper Organization

The body of the paper is structured as: the problem statement is presented in Section2. Section 3 contains a description of the proposed controller model. Subsections 3.1, 3.2, and 3.3 look at the HE-fuel cell and grid model, the control strategy architecture, and the FLC, respectively. Section 4 presents the simulation results, and Section 5 contains the conclusion.


## 1.1. Literature Review

The low pass filter (LPF) is the most commonly used control filtering method to smooth down the fluctuating components of the power supplied into the grid, a first-order low pass filter was used in [18]. The time constant of the filter has a direct impact on its performance; higher values reduce power fluctuation and result in a stable output power [19]. Nonetheless, it raises the BESS capacity [20, 21], thereby increasing system costs [22]. Thus, the time constant must be adjusted appropriately, and numerous ways have previously been established [19]. To maintain the battery state of charge (SoC) in the optimal range, [23] changed the time constant of a low pass filter depending on its relation with the voltage fluctuation and SoC variation. In contrast, Sun et al. used a fuzzy controller to compute the LPF time constant [24]. Furthermore, [25] suggested an enhanced LPF technique by computing the time constant using the Hilbert Huang Transform. In [26], a control strategy is presented that increases system and power stability by reducing wind power variations and implementing energy management. A two-layered control technique to reduce wind power fluctuations and extend life of the battery by regulating internal power distribution among different battery components is developed [27]. In [20, 21], a high pass filter (HPF) is utilized to capture power fluctuations and make it as a reference for the associated BESS where the HPF’s cut-off frequency was determined by the SoC level. The study [28] used a double moving average filter to lower the BESS charge/discharge over time. To deliver steady output power, [29, 30] suggest fuzzy logic controller (FLC) to control the LPF output. A dynamic Kalman power flattening filtering technique using a FLC was used to reduce the necessary BESS capacity [31]. Similarly, [32] employed the Kalman filter with FLC for output power firming and used the battery’s SoC as feedback.The scheme approach of charging and discharging BESS is another frequently utilized way for power smoothing with BESS [33] that necessitates frequent switching between charging and draining of the BESS. Failure to maintain recurrent shifting between BESS discharging and charging will have an impact on wind fluctuation management and could lead to overcharge and deep discharge of the battery [34, 35]. As a response, it is essential to control the battery charging levels and to supply the necessary power to stabilize the fluctuating renewable power production [36]. The most popular control techniques are PI and PID, research has been done to inspect the BESS charge and discharge with PI while staying within SoC limitations [37]. A battery charging/discharging control utilizing Proportional Integral (PI) control that is dependent on rotor MPPT and battery SoC is suggested in [38]. The PI control scheme produces the requirement of the battery if the SoC is less than the constant current limit, else, the voltage of the battery remains stable [38]. Researchers in [39] took the battery SoC into account when developing their BESS control technique, managing the battery charging levels utilizing PI regulators. The study in [40] compared Proportional Derivative (PD) and fuzzy logic control systems for battery charging/discharging; the FLCs produced better power smoothing than the standard proportional derivative controllers. A FLC approach is developed in [41] to control BESS charging/discharging and to keep the BESS’s SoC within the optimal range of 10% to 90%. Fuzzy logic and artificial neural network (ANN) control methodologies are proposed in [42] for a BESS, it was discovered that the ANN controller outperformed the fuzzy controller.Due to its adaptability, Model Predictive Control (MPC) is also utilized to regulate the BESS charging levels, authors in [11, 12] created a control system that uses MPC in conjunction with a battery energy storage system to stabilize the solar power output and assure optimum battery performance. Closely, [43] presented an MPC technique to smooth and distribute wind power with BESS. A monotonic battery charging and discharging technique with constraints is used in [44] to regulate more batteries. An intelligent MPC is employed in [45] to manage the battery charging/discharging over a dispatch horizon. A control technique with battery coupled with MPC and hierarchy optimization to reduce oscillations through suitable BESS operation is presented in [46]. An online SoC control is devised in [47] to manage BESS charging/discharging, where the state of charge is forecasted depending on the wind power in the next dispatching period. A smoothing control technique based on the SoC is proposed to reduce the fluctuations and manage the battery SoC via feedback and updated firmed targets for real-time adjustments in the SoC is developed in [48]. Variations of MPC have been the primary control approach utilized in optimization with prediction; correspondingly in [19], a neural network MPC strategy paired with solar forecasting to govern the BESS with practical constraints is created. Because of accurate NN prediction, the system can get the solar power output in advance, and the BESS can use the regular mean solar power as its set point, compensating for the discrepancy among the real and anticipated production [19]. Based on the wind forecasting data, [49] presented an effective battery regulation for the following duration in order to level out frequency oscillations with BESS while considering power constraints and battery capacity. Authors in [50], suggested the Saviztky-Golay filter smoothing technique for minimizing solar power variability.


## 1.2. Research Gap and Motivation

Recently, hydrogen produced from electrolysis using solar-wind power, known as “green hydrogen,” has gained a lot of attraction, mainly because green hydrogen can decarbonise a range of sectors and the declining costs of renewable energy sources makes the use of green hydrogen more economically feasible [51]. The diagram in Figure 1 demonstrates the incorporation of green hydrogen in the integrated microgrid, a Hydrogen Electrolyze (HE) is employed to translate the electricity produced from renewable resources into hydrogen which can be stored in tanks, in order to dispatch the energy stored in the tanks as hydrogen, fuel cells are used to transform the stored hydrogen into electricity [52]. The HE system offers flexible controllability functions which can be used to offset the system’s real power disparities by altering the HE tubing system pressure [53, 54] through the monitoring and control system. Thus, [53, 54] devised a control strategy and proposed the incorporation of a fuzzy logic controller with the HE and fuel cell hybrid system to address power concerns caused by frequency changes. Although FLC has extensively been used for industrial applications, it does have certain limitations, it requires prior knowledge of the plant, for higher accuracy the fuzzy membership rules increase exponentially which results in lower speed and longer run time of the system [55], FLC is not capable of “learning” as it does not receive feedback, and the input variables have restricted usage [56]. Hence, there is a need for a more robust HE output control strategy that is capable of learning through feedback and captures the entire dynamics of the plant with ease without compromising the system speed and run time.Figure 1
A typical microgrid system with green hydrogen incorporation.


## 1.3. Contribution

Therefore, the objectives of this work can be stated as to introduce, design, and implement an Intelligent Model Predictive Controller (IMPC) that intelligently controls the production of green hydrogen electricity based on the battery feedback to provide a stable output power supply with optimum battery performance. To test the controller on real world solar and wind power data. To analyze its performance in terms of solar-wind power control followed by its battery State of Charge (SoC) and battery charging/discharging regulation. To compare the proposed controller with the popularly used Fuzzy Logic Controller (FLC). The designed controller employs an artificial neural network to generate a plant model for the predictive optimization step such that a signal is provided to modulate HE output to supply reliable solar-wind power while managing the SoC of the incorporated battery. Through the regulated creation of green hydrogen via the HE fuel cell system, the controller is developed to flatten the solar-wind power variations and significantly lower the ramp rate. The results of the simulations show that the designed IMPC, in conjunction with the HE-FC and battery, effectively handles solar-wind power variations and the battery state of charge. An evaluation of the presented control methodology against the fuzzy based control for battery SoC and charging level management is performed. The results show that the IMPC has higher SoC control capabilities because the SoC is kept well within the prescribed parameters. The IMPC also reduces the ramp rate and power required to charge and discharge the battery. The simulations are conducted in MATLAB-Simulink, using the solar power profile for August 2020 that was obtained from the University of Queensland’s (UQ) solar repository. Wind power dataset with a 5-minute frequency was gathered from Roaring 40 s wind farm (Woolnorth, Australia, 2010). The proposed controller in this study is compatible with both solar and wind energy.


## 1.4. Paper Organization

The body of the paper is structured as: the problem statement is presented in Section2. Section 3 contains a description of the proposed controller model. Subsections 3.1, 3.2, and 3.3 look at the HE-fuel cell and grid model, the control strategy architecture, and the FLC, respectively. Section 4 presents the simulation results, and Section 5 contains the conclusion.


## 2. Statement of the Problem

Variations in solar and wind power threaten the stability of microgrids by resulting in frequency fluctuations, increased ramp rates, and voltage oscillations, which ultimately lead to system outages. As a result, the fluctuating generated power must be flattened before being injected into the main grid network in order to maximize the penetration of solar-wind power. BESS is an alternative, however because of insufficient control, it degrades from deep draining and overcharging cycles, resulting in lower battery life and higher battery sizes, increasing the overall cost of the running system. The research goal in brief is to reduce the solar-wind power cause fluctuations in order to prevent voltage and frequency variations in the grid. A solar-wind oscillating power firming controller is formed on the basis of MPC and NN to substantially diminish wind-PV fluctuations, optimize battery SoC, and lower the fluctuation rate within realistic limits.This work establishes the use of neural networks in conjunction with HE-FC and BESS to efficiently manage HE output depending on battery response in order to deliver a steady solar and wind power supply with appropriate battery operation. The designed controller consists of a plant NN model that is employed for the forecasting optimisation process of an MPC while being restricted by realistic constraints. The suggested controller’s main goal is to stabilize the wind and solar power, which minimizes the fluctuation rate, and to improve the BESS life via SoC management. Optimizing the battery with the proposed HE-FC output control strategy extends the battery’s life and reduces the linked costs.


## 3. Microgrid Modelling and Proposed Methodology

A neural network plant mode, HE-FC, and BESS are all included in the devised method for solar-wind power and battery state of charge control shown in Figure2. The variable wind and PV production is used in a moving average (MA) smoothing method to create a firmed reference power for the suggested IMPC. The MA filter output power, battery charging/discharging power, SoC, and ramp rate are all inputs to the proposed controller. The IMPC then carries out the predictive optimization to lessen the discrepancies between the output produced by the NN plant model and the reference output provided by the moving average filter. The hydrogen electolyzer fuel cell system is then given the computed and limited control signal to guarantee a reliable solar-wind power source and ideal battery performance.Figure 2
A microgrid system comprising of a HEFC and BESS.


### 3.1. Microgrid with Hydrogen Elctrolyzer Fuel Cell System Model

The control method employed in [29, 45] served as the basis for the proposed plant model for smoothing wind and solar output in Figure 2. Between PSW and the HE-FC system output PHE, there is a difference called the BESS charging and discharging power PR. The BESS output is denoted by the symbol PB. The BESS charges when PB is positive and discharges when PB is negative. The sum of the PB and the wind-PV power, PSW, is the amount of power that is sent to the grid. The power output characteristics of the electrolyzer and fuel cell system could be approximated using the first order transfer functions [11, 12]. Thus, the HE and FC can be stated numerically as follows:
(1)PHE=1s·THE+1·PHECMD,(2)PFC=1s·TFC+1·PFCCMD.In whichTHE and TFC are the hydrogen electrolyzer and fuel cell time constants, [53, 54], respectively. As a result, the HE supply could be regulated by varying the value of THE. Moreover, just like in [57], the FC output is maintained constant. The battery capacity EB is associated with the state of charge and the battery output PB as follows:
(3)SoCs=−PBss·EB.The thermal constraints of a battery are determined by its capacity. Large capacity indicates that wind and PV power could be managed without exceeding the upper and lower thermal limits of the battery. Equation (4) links battery capacity to SoC and PHE. The maximum and minimum battery thermal limitations, denoted by EB, are connected to the SoC and PHE as follows:
(4)EB=THE·PHEsSoCs.The battery capacity is calculated by multiplying the HE time constantTHE with the mean solar-wind power P¯SW [22]. When the product THE∗P¯SW exceeds the storage capacity EB, i.e., THE∗P¯SW≥EB, the battery would overcharge since the SoC surpasses the threshold 100% upper limit. To address battery overcharging, a parameter D (as in (5)) is implemented. The value D is chosen such that 0≤D≤1 limits the battery capacity. P¯SW denotes the averaged varying PV-wind power.
(5)D·THE·P¯SW≤EB.The parameterD is calculated and adjusted in relation to the maximum and minimum battery SoC limitations, represented by SoCh and SoCl, respectively (6). As EB−D·THE∗PSW, the margin volume is subtracted from the utilized battery.
(6)SoCh+SoCl·EB=EB−D·THE·P¯SW.As indicated in (7), battery SoC control is used to govern the battery storage capacity. Thus, output of the battery is the sum of storage capacity margins, charging/discharging power, and the flattened wind-PV power [34, 35].
(7)PB′·THE=SoCs·EB−D·THEs·THE+1·PSWs−EB−D·THE·P¯SWsThe power to be dispatched into the grid (8) is the combination of PB and wind-PV power PSW.
(8)Pgrids=PB+PSWs.


### 3.2. Proposed Intelligent Model Predictive Methodology

The two essential components of the suggested IMPC are the optimizer and the neural network model (as shown in Figure3). NNs create a structure by recognizing relationships between input and output data. The created NN (Figure 3) is a two-layered system that takes the MA filtered output from the solar and wind system, the battery SoC, charging and discharging power, and ramp rate as inputs. The output v, the HE control signal, is then provided by the IMPC in accordance with the constraints set above for proper SoC management of the PV-wind power. The actual plant system provides input Ip and output Op for the NN model. Moreover, a neural network can represent the characteristics of convoluted plants because of its inherent property, and effectiveness of NN architecture improves with increasing input and output training dataset. Also, the NN’s efficiency is enhanced by altering the NN hidden nodes number. After exploratory trials, the developed NN model contains 10 hidden layers for improved prediction performance. Henceforth, the sigmoid function (9) is used for activation and output creation from each specific neuron in the hidden layers. In (9), d denotes the weighted and biased input to the neuron. Linear transfer activation equation is employed by output neurons (10).
(9)ϕd=11+e−d,(10)fz=z.Figure 3
Proposed intelligent model predictive controller for hydrogen electrolyzer output regulation.The Bayesian Regularization Maximum A Posteriori (BRMAP) (11) approach was used to train the NN model to alter the network’s weight and bias values for enhanced power prediction performance.
(11)BRMAP=12σw2Σiwi2+12σD2Σcdc−xc2,where wi symbolizes the weight vector, σw2 represents the weight variance, σK2 denotes the training dataset K, xc expresses the output at a training interval, and dc describes the objective value. The Mean Squared Error (MSE) (12) is used to compute the NN model’s power estimation error. The real NN projected power is x^i, and the needed target power is xi.
(12)MSE=1n∑i=1nxi−x∧i2.For the collected data, 70% was supplied for NN training, 15% to test network generality, the rest 15% to test the network performance. To minimize the functionJ (18), the difference between a MA filter’s firmed reference solar-wind power yr and the neural network’s output power ym, Quasi-Newton (QN) optimization (13) is used. Thus, the control signal v, value of hydrogen electrolyzer time constant THE, is generated by the coupled action of the QN algorithm, NN model, and the constraints to effectively regulate the HE-FC production for stable wind-solar power supply plus BESS operation enhancement.
(13)gk+1=gk−H−1·gradgk,(14)H=∂2f∂x12∂2f∂x1∂x2⋯∂2f∂x1∂xn∂2f∂x2∂x1∂2f∂x22⋯∂2f∂x2∂xn⋮⋮⋱⋮∂2f∂xn∂x1∂2f∂xn∂x2⋯∂2f∂xn2.In (13), gk is the initial value of ym, gk+1 is the subsequent value, gradgk is the convergence criteria, and H−1 is the Hessian matrix inverse (14). The cost function J is as follows:
(15)J=∑i=NcNdyrt+i−ymt+i2+λ∑i=1NvIm′t+i−1−Im′t+i−22.The first term of (15) is the difference between the needed yr and the estimated ym smoothed wind-solar power. The squared sum of the control increment Im′ is the second term. The signal Im minimizes J over the horizon Nv and is computed via the QN method. Moreover, the control increment and tracking error is assessed over the horizons Nc, Nd, and Nv. The variable λ measures the performance consequence for the increase in control signal value. Appropriately, the IMPC is subjected to realistic constraints as
(16)50%≤SoC≤100%,(17)0<THE≤120sec,(18)0≤hm≤d1;m=0,1,⋯,Nv−1.The constraint (16) keeps the state of charge inside the definite bounds to prevent battery overcharging and deep draining. The control signal THE is kept between 0 and 120 seconds by constraint (17). Lastly, (18) maintains stable solar-wind power within 0 and d1, the solar panel and wind turbine rated value, respectively.


### 3.3. Fuzzy Logic Controller Design

With regards to battery state of charge optimization and charging/discharging power minimization, a Mamdani-type FLC is developed to evaluate the performance of the proposed IMPC with respect to the FLC. The FLC (like the IMPC) will dynamically adjust the HE output to control the battery charging/discharging and is designed with battery’s SoC as the input and the signalTHE which will control the HE-FC system yield PHE is the output of the FLC. As a result, the following are the rules for the FLC. The PHE for a small SoC should be large, the PHE for a large SoC is small, and the PHE for medium SoC is medium. The battery SoC membership function for the solar power profile is in Figure 4, the corresponding HE function is as in Figure 5. Equivalently, the battery SoC and the HE membership function for the wind power data is shown in Figures 6 and 7, accordingly.Figure 4
Fuzzy membership functions for battery SoC, solar power (August 2020).Figure 5
Fuzzy membership functions for hydrogen electrolyzer time constant, solar power (August 2020).Figure 6
Fuzzy membership functions for battery SoC, wind power (Year 2010).Figure 7
Fuzzy membership functions for hydrogen electrolyzer time constant, wind power (Year 2010).


## 3.1. Microgrid with Hydrogen Elctrolyzer Fuel Cell System Model

The control method employed in [29, 45] served as the basis for the proposed plant model for smoothing wind and solar output in Figure 2. Between PSW and the HE-FC system output PHE, there is a difference called the BESS charging and discharging power PR. The BESS output is denoted by the symbol PB. The BESS charges when PB is positive and discharges when PB is negative. The sum of the PB and the wind-PV power, PSW, is the amount of power that is sent to the grid. The power output characteristics of the electrolyzer and fuel cell system could be approximated using the first order transfer functions [11, 12]. Thus, the HE and FC can be stated numerically as follows:
(1)PHE=1s·THE+1·PHECMD,(2)PFC=1s·TFC+1·PFCCMD.In whichTHE and TFC are the hydrogen electrolyzer and fuel cell time constants, [53, 54], respectively. As a result, the HE supply could be regulated by varying the value of THE. Moreover, just like in [57], the FC output is maintained constant. The battery capacity EB is associated with the state of charge and the battery output PB as follows:
(3)SoCs=−PBss·EB.The thermal constraints of a battery are determined by its capacity. Large capacity indicates that wind and PV power could be managed without exceeding the upper and lower thermal limits of the battery. Equation (4) links battery capacity to SoC and PHE. The maximum and minimum battery thermal limitations, denoted by EB, are connected to the SoC and PHE as follows:
(4)EB=THE·PHEsSoCs.The battery capacity is calculated by multiplying the HE time constantTHE with the mean solar-wind power P¯SW [22]. When the product THE∗P¯SW exceeds the storage capacity EB, i.e., THE∗P¯SW≥EB, the battery would overcharge since the SoC surpasses the threshold 100% upper limit. To address battery overcharging, a parameter D (as in (5)) is implemented. The value D is chosen such that 0≤D≤1 limits the battery capacity. P¯SW denotes the averaged varying PV-wind power.
(5)D·THE·P¯SW≤EB.The parameterD is calculated and adjusted in relation to the maximum and minimum battery SoC limitations, represented by SoCh and SoCl, respectively (6). As EB−D·THE∗PSW, the margin volume is subtracted from the utilized battery.
(6)SoCh+SoCl·EB=EB−D·THE·P¯SW.As indicated in (7), battery SoC control is used to govern the battery storage capacity. Thus, output of the battery is the sum of storage capacity margins, charging/discharging power, and the flattened wind-PV power [34, 35].
(7)PB′·THE=SoCs·EB−D·THEs·THE+1·PSWs−EB−D·THE·P¯SWsThe power to be dispatched into the grid (8) is the combination of PB and wind-PV power PSW.
(8)Pgrids=PB+PSWs.


## 3.2. Proposed Intelligent Model Predictive Methodology

The two essential components of the suggested IMPC are the optimizer and the neural network model (as shown in Figure3). NNs create a structure by recognizing relationships between input and output data. The created NN (Figure 3) is a two-layered system that takes the MA filtered output from the solar and wind system, the battery SoC, charging and discharging power, and ramp rate as inputs. The output v, the HE control signal, is then provided by the IMPC in accordance with the constraints set above for proper SoC management of the PV-wind power. The actual plant system provides input Ip and output Op for the NN model. Moreover, a neural network can represent the characteristics of convoluted plants because of its inherent property, and effectiveness of NN architecture improves with increasing input and output training dataset. Also, the NN’s efficiency is enhanced by altering the NN hidden nodes number. After exploratory trials, the developed NN model contains 10 hidden layers for improved prediction performance. Henceforth, the sigmoid function (9) is used for activation and output creation from each specific neuron in the hidden layers. In (9), d denotes the weighted and biased input to the neuron. Linear transfer activation equation is employed by output neurons (10).
(9)ϕd=11+e−d,(10)fz=z.Figure 3
Proposed intelligent model predictive controller for hydrogen electrolyzer output regulation.The Bayesian Regularization Maximum A Posteriori (BRMAP) (11) approach was used to train the NN model to alter the network’s weight and bias values for enhanced power prediction performance.
(11)BRMAP=12σw2Σiwi2+12σD2Σcdc−xc2,where wi symbolizes the weight vector, σw2 represents the weight variance, σK2 denotes the training dataset K, xc expresses the output at a training interval, and dc describes the objective value. The Mean Squared Error (MSE) (12) is used to compute the NN model’s power estimation error. The real NN projected power is x^i, and the needed target power is xi.
(12)MSE=1n∑i=1nxi−x∧i2.For the collected data, 70% was supplied for NN training, 15% to test network generality, the rest 15% to test the network performance. To minimize the functionJ (18), the difference between a MA filter’s firmed reference solar-wind power yr and the neural network’s output power ym, Quasi-Newton (QN) optimization (13) is used. Thus, the control signal v, value of hydrogen electrolyzer time constant THE, is generated by the coupled action of the QN algorithm, NN model, and the constraints to effectively regulate the HE-FC production for stable wind-solar power supply plus BESS operation enhancement.
(13)gk+1=gk−H−1·gradgk,(14)H=∂2f∂x12∂2f∂x1∂x2⋯∂2f∂x1∂xn∂2f∂x2∂x1∂2f∂x22⋯∂2f∂x2∂xn⋮⋮⋱⋮∂2f∂xn∂x1∂2f∂xn∂x2⋯∂2f∂xn2.In (13), gk is the initial value of ym, gk+1 is the subsequent value, gradgk is the convergence criteria, and H−1 is the Hessian matrix inverse (14). The cost function J is as follows:
(15)J=∑i=NcNdyrt+i−ymt+i2+λ∑i=1NvIm′t+i−1−Im′t+i−22.The first term of (15) is the difference between the needed yr and the estimated ym smoothed wind-solar power. The squared sum of the control increment Im′ is the second term. The signal Im minimizes J over the horizon Nv and is computed via the QN method. Moreover, the control increment and tracking error is assessed over the horizons Nc, Nd, and Nv. The variable λ measures the performance consequence for the increase in control signal value. Appropriately, the IMPC is subjected to realistic constraints as
(16)50%≤SoC≤100%,(17)0<THE≤120sec,(18)0≤hm≤d1;m=0,1,⋯,Nv−1.The constraint (16) keeps the state of charge inside the definite bounds to prevent battery overcharging and deep draining. The control signal THE is kept between 0 and 120 seconds by constraint (17). Lastly, (18) maintains stable solar-wind power within 0 and d1, the solar panel and wind turbine rated value, respectively.


## 3.3. Fuzzy Logic Controller Design

With regards to battery state of charge optimization and charging/discharging power minimization, a Mamdani-type FLC is developed to evaluate the performance of the proposed IMPC with respect to the FLC. The FLC (like the IMPC) will dynamically adjust the HE output to control the battery charging/discharging and is designed with battery’s SoC as the input and the signalTHE which will control the HE-FC system yield PHE is the output of the FLC. As a result, the following are the rules for the FLC. The PHE for a small SoC should be large, the PHE for a large SoC is small, and the PHE for medium SoC is medium. The battery SoC membership function for the solar power profile is in Figure 4, the corresponding HE function is as in Figure 5. Equivalently, the battery SoC and the HE membership function for the wind power data is shown in Figures 6 and 7, accordingly.Figure 4
Fuzzy membership functions for battery SoC, solar power (August 2020).Figure 5
Fuzzy membership functions for hydrogen electrolyzer time constant, solar power (August 2020).Figure 6
Fuzzy membership functions for battery SoC, wind power (Year 2010).Figure 7
Fuzzy membership functions for hydrogen electrolyzer time constant, wind power (Year 2010).


## 4. Results and Discussion

To test the developed control system’s performance, real solar and wind power data was imported into MATLAB and the necessary simulations were performed. The solar power profile depicted in Figure8 was collected from the solar live stream archive at the University of Queensland (UQ) Saint Lucia campus in Australia for August 2020. The fluctuating wind power plot shown in Figure 9 with a 5-minute frequency, power in megawatts (MW), time in minutes, was acquired for 2010, roaring 40 s wind park, Tasmania, Australia. Table 1 shows the modeled lithium-ion (Li-ion) battery parameters, such as nominal voltage of 10 V, battery rated capacity of 2 Ah, battery response time of 1 second (s), and initial battery SoC of 50%. The control system that was developed appropriately to adjusts the time constant THE value in order to decrease PV-wind power efficiently. The constraints (16), (17), and (18) were selected to ensure that the controller functions in real-world scenarios. The controller’s NN mimics the real system in forecasting firmed renewable power which is trained with BRMAP (11), while the cost function J minimizing is done using the Quasi-Newton method (15), as discussed in section 3.2. To test the model’s accuracy, various experiments were carried out by adjusting the cost horizons N1, N2, control horizon Nu, size of NN model hidden layers H, and the control weighing factor ρ. Nd=4, H=10, Nv=2, Nc=1, and ρ=0.05 provided the best results.Figure 8
Fluctuating PV power profile, (August 2020).Figure 9
Fluctuating wind power profile, (Year 2010).Table 1
Battery system parameters [50].
ParametersValueBattery rated capacity (ah)2Nominal voltage (V)10Initial battery SoC (%)50Battery response time (s)1The IMPC is able to significantly reduce the PV irregularities and provide stabilized power to the integrated grid, as demonstrated in Figure10. Constraint (18) is also observed in Figure 10, where the firmed power is greater than zero. In addition, Figure 11 shows a comparison of battery SoC between the IMPC, FLC, and without any control. By maintaining the SoC well within the constraints indicated in (16), the IMPC clearly surpasses the FLC and avoids the overcharging and deep draining of the associated battery. In addition, Figure 12 shows a battery charging/discharging comparison. Finally, Figure 13 demonstrates the difference in ramp rate before and after using the proposed IMPC. Similarly, the designed IMPC is tested for power output firming (Figure 14), SoC management (Figure 15), battery charging/discharging power (Figure 16), and ramp rate reduction (Figure 17) using wind power data. Thus, the resultant power is substantially firmer and SoC is properly controlled due to intelligent and dynamic regulation of the HE depending on the battery parameter data. The IMPC works well with both solar and wind power, while also enabling clean hydrogen integration in the microgrid by the hydrogen electrolyzer system.Figure 10
Fluctuating solar power and IMPC controlled power output, (August 2020).Figure 11
Battery SoC evaluation without control, FLC, and IMPC.Figure 12
Battery charging/discharging power evaluation of FLC and IMPC.Figure 13
Ramp rate reduction through IMPC employment (solar power).Figure 14
Wind power with and without IMPC, (Year 2010).Figure 15
Battery SoC comparison with no control, FLC, and IMPC.Figure 16
BESS charging/discharging power evaluation of FLC and IMPC.Figure 17
Ramp rate reduction through IMPC employment (wind power).


## 5. Conclusion

In this research, a general intelligent model predictive hydrogen electrolyzer output control system is devised and implemented to smooth the erratic variations of solar-wind power and manage the battery SoC. To achieve the smoothing of solar-wind power(i)
The NN with a model predictive controller is used in the developed control strategy(ii)
The IMPC uses the NN plant model instead of the conventional MPC’s mathematical plant model for predictive optimization(iii)
Contrary to a mathematical plant model, the NN accurately depicts the plant’s dynamic structure and avoids problems associated with the MPC plant model’s mathematical complexity that appear as the plant grows more complex. The proposed controller offers a more straightforward method because neural networks have been demonstrated to represent extremely complicated systems with minimalism(iv)
According to the findings of the simulation, the developed IMPC, in conjunction with HE-FC and battery, successfully handles solar-wind power fluctuations and battery SoC(v)
The commonly utilized fuzzy logic controller and the IMPC were contrasted in terms of SoC and battery charging and discharging. The results show that the IMPC has greater SoC control capabilities since the status of charge is kept well within the defined boundaries(vi)
The ramp rate and power needed to charge and discharge the battery are also reduced using the IMPC. This study’s multipurpose controller is compatible with both solar and wind energy(vii)
The proposed control technique makes the assumption that plant dynamics, such as the installation of new energy and storage systems, does not change. Future research should therefore concentrate on creating a controller that continuously updates the neural network model to account for any new changes to the plant(viii)
In future study, the controller should also be tested using hybrid linked solar and wind renewable energy sources as well as a combination of capacitor and battery storage technologies(ix)
Finally, for the proposed IMPC, a sensitivity and robustness analysis should be conducted to study the controller’s performance in different operating conditions



---

*Source: 4531054-2023-03-02.xml*