Artificial Intelligence-Aided Model Predictive Control for a Grid-Tied Wind-Hydrogen-Fuel Cell System

Integrating renewable energy into power grids is seen in increase in recent years since these energy sources are sustainable and clean. However, the integration brings about considerable technical challenges associated with ﬂuctuations and uncertainties of the energy availability whilst maintaining the stability of smart grids. The prediction of renewable energy generation is key to achieve optimal power dispatch in renewable-intensive smart grids. However, uncertain interruption and prediction errors will make an optimal decision more challenging. Model predictive control (MPC) is an effective way to overcome the discrepancies between the prediction and the real-world system through a closed-loop correction over iteration process. This study develops an improved MPC scheme used with a hybrid energy storage system for optimal power dispatch in a smart grid. This hybrid renewable energy system consists of a wind farm, a hydrogen/oxygen storage system and several fuel cells (FCs). In this study, particle swarm optimization (PSO) with a back propagation (BP) artiﬁcial neural network is developed to predict the wind energy availability by using measured data. Then, a genetic algorithm (GA) is combined with a state space model (SSM) to achieve the MPC control. A dataset of 24-hour ahead predictive generation is calibrated from the measured data and is deﬁned for optimal power ﬂow between the grid, the wind farm and the storage subsystem so as to balance the supply and load. The optimization target is to achieve a minimal energy exchange between the power grid and the hybrid renewable energy storage system. Based on actual measured data, the test results have shown that the proposed methodology can maximize the local usage of wind power whilst minimizing the power exchange with the grid. An optimal power dispatch strategy is proved to be effective to meet the demand and efﬁciency with dynamic control of the FCs. The usage of the intermittent wind power is increased from 45% to 90% in the four test studies. Therefore, this work can minimize the impact of ﬂuctuating renewable energy on the power grid and enhance uptakes of FC-based energy systems. This is particularly economic and relevant to the remote and under-developed regions where their power networks are weak and vulnerable

predicted value at the first k time point T OP average value of the measured data U n voltage of a electrolytic bath x 1 (k) the first state variable at time point k x 2 (k) the first state variable at time point k y (k) the output variable at time point k Z root mean square error ε maximum permissible error ρ air density η act over-potential of activation loss η con over-potential of concentration loss η ohim over-potential of ohmic loss η we transformation efficiency over electrolysis ξ 1 Coefficient of the first state variable φ 1 measurement error.

I. INTRODUCTION
Wind and hydrogen are considered to be clean energy resources, which attract tremendous interest across the world. It is predicted that hydrogen will account for 24% of the overall energy supplies in 2050 according to an EU report [1].
The development of hydrogen-economy has also been high on the Chinese government agenda [2]- [4]. Hydrogen production associated with fuel cell utilization is one of the most promising approaches for renewable applications. Similarly, wind energy has been a prime renewable source in the EU and China. However, there are also some technical issues associated with the utilization of these renewables. In general, wind is a primary source of renewable energy whilst hydrogen is generally produced from electrolyzing water. In this study, hydrogen is a means of energy storage, not a primary source. How to maximize local usage of wind power and stabilize power exchange between wind and the grid becomes important in smart grids. Water is electrolyzed to produce hydrogen and oxygen when wind power is abundant. Therefore, wind power is converted into electricity and then into an electrochemical form in hydrogen. When electricity is needed for peak loads, fuel cells (FCs) can produce electricity from a chemical reaction of hydrogen and oxygen. It is commonly accepted that hydrogen-based storage systems are very effective owing to their high energy density and safety [5]. The investigations in references [6], [7] explored the benefits of wind-hydrogen energy systems to stabilize the power supply. These systems are characterized with low generation cost and zero CO 2 emissions. Reference [8] simulated a 5GW wind farm incorporating a 30 MW electrolysis plant which can reduce 7.6% curtailment of wind power under optimization strategies. In reference [9], the authors investigated a wind-hydrogen energy system connected to the power grid. The test results have shown the grid-connected wind-hydrogen energy system is the optimum configuration with the benefits of maximizing wind utilization as well as hydrogen production. In these systems, control strategies play an important role in the system performance. Traditionally, proportion, integration and differentiation (PID) control has advantages of high robustness and stability. It is useful in linear systems in the most applications [10]- [13], but it is less effective for non-linear system due to high uncertainty, unknown parameters and complex disturbances. In these cases, empirical methods are also used in the control strategies in these applications [14], [15]. In terms of energy consumption of electrical equipment, consumers generally use predefined energy tariffs to predict their energy bills. This often involves historical data and previous experience. In the control loop design, proportional-integral (PI), PID and binary control are commonly used in the field [16], [17]. Quadratic approximation is an alternative control strategy to overcome nonlinearity in power systems [18], [19]. However, these application are limited because of the lack of the empirical knowledge. Artificial intelligence incorporating with control theorem has receiving increasing attraction in the field. Among them, expert system, fuzzy logic, particle swarm, artificial neural network (ANN), and genetic algorithm (GA) are utilized in different applications. The ANN has many usage areas in modeling, simulation and control of renewable energy systems [20]. The ANN has been used to forecast 24-hour ahead of power generation [21] and to estimate solar VOLUME 8, 2020 energy from the PV panels [22]. In reference [23], the ANN is proved to improve the system operation stability. As PSO can find the optimum solution more quickly [24], it has been used to optimize the renewable energy-combined heat and power systems [25], neuro-fuzzy photovoltaic systems [26] and optimal power flow problems [27]. In recent years, the PSO is found to solve MPC problems in different research areas [28]- [31]. However, PSO easily falls into the local optimum so that a global optimum is difficult to be achieved. Therefore, it is commonly replaced by GA when global optimization is needed. GA is a very effective algorithm owing to its high convergence rate in applications [32], [33], especially incorporated with model predictive control (MPC). In reference [34], the GA is utilized as an optimization solver for the MPC formulation. Also, the GA can be used to solve the multi-objective problems with MPC [35]. The combination of MPC and GA can achieve an optimization among different factors [36]. Thus, in this paper, the GA is utilized for defining optimal power dispatch.
MPC is regarded as one of the promising methods to deal with the system with high uncertainty, multi disruption and unknown parameters. It corrects the operational errors by continuedly checking the difference between the reference and measured data in a closed loop. Therefore, the stability of the controlled systems are ensured. MPC has been widely applied in various fields, such as food processing, irrigation system, robotics, building ventilation, automation vehicle, public transport. In particular, they are gaining popularity in power and energy systems as prediction of energy supply or loads are becoming important in today's smart grids.
In reference [37], an MPC strategy regulates an inverter to maintain the voltage of the power line where the multi renewable resources are integrated. In the investigation, the criteria in relation to the cost and emission are employed by setting optimization objectives. The outcomes evaluate the effectiveness of the developed method. Reference [38] develops an MPC strategy to govern a conventional boiler-turbine system where the problems with the non-linear and time-delay features are solved. Reference [39] develops a droop current regulator incorporated with an MPC scheme to operate a photovoltaic power system. The scheme is capable of faulttolerant operation. An MPC scheme in [40] has reduced the torque ripples in a permanent magnet machine. The study emphases the importance to establish an objective model while exploring an MPC scheme.
The motivation of this work is to develop an MPC strategy for an optimized energy dispatch in a multiple-source smart grid involving wind energy, hydrogen, and electricity. There are three optimization targets: the security of the storage, minimizing power curtailment of the wind power, and minimizing the energy exchange with the power grid.
The contributions of this study are three. Firstly, a grid connected wind-hydrogen-fuel cell system is developed for optimal power flow management. Secondly, by employing the particle swarm optimization with a back propagation (BP) artificial neural network (PSO-BP), the historical data of the regional wind power is explored so as to forecast the wind power with accuracy. Thirdly, an MPC scheme consisting of GA and a state space model (SSM) are developed to regulate the power dispatch among the components in the smart grid.
The rest of the paper is arranged as follows: Section 2 introduces the system configuration where the relationship of each part is clarified. Section 3 states the development of the proposed MPC. Three key elements, namely, forecasting, optimization and systematic model are elaborated. The tests, outcomes and analysis are explored in section 4 following by the conclusions in section 5.

II. SYSTEM CONFIGURATION
In this study, a smart grid is built in the campus of Guizhou University, China. As shown in Fig. 1, the system is composed of three units: a utility power grid, a renewable-based DC microgrid and a wind-hydrogen-fuel cell AC microgrid. It is capable of supplying energy to the three buildings in the campus. The power flow between the three different units is managed via the modularized micro converters (MMCs) and other controllers. This study is focused on optimal power flow management for the wind-hydrogen-fuel cell system and the AC power grid. This system consists of a windturbine, the power converters, a water electrolyzer, two hydrogen/oxygen tanks and fuel cells. The multi-vector energy system is connected to an existing smart grid via a three-line AC power grid.
In order to simplify the analysis, this work is based on the following assumptions.
1) The power network is strong and the grid voltage is constant all the time.
2) Energy conversion efficiency is fixed. For instance, the conversion efficiency from wind to hydrogen f wf keeps constant.

A. CHALLENGES IN A SMART GRID WITH RENEWABLE PENETRATION
There are two challenges in this work. The first one lies in the uncertainty associated with wind power generation. The second one is in line with the optimal power flow management that limits wind power curtailment to the least. In order to balance the AC grid power and the fluctuated wind power, a combined renewable power system with an equivalent energy storage system consisting a water electrolysis unit, the hydrogen/oxygen storage tanks and the hydrogen fuel cells are formed. By using an energy storage system, the distinction between the supply and the local load are balanced while limited power is required by the three-line AC grid. By using the predictive model to estimate the next 24-hour wind power and to define the optimal power flow, an optimal management strategy is developed under a genetic algorithm so as to maximize the usage of the wind power and minimize the grid power exchange.
where m w , m e , ρ, A, ν denote the mechanical power of the wind turbine, the electrical power of the wind system, the air density, the equivalent area and the average wind speed. The volume ratio of the hydrogen and the oxygen in electrolysis is 2:1 approximately. Thus, the flow rate of the production can be given by: where V H 2 , V O 2 , η we , U n refer to the hydrogen flow rate (liter/hour), oxygen flow rate (liter/hour), transformation efficiency, and the voltage of the electrolytic bath, respectively.

C. FUEL CELLS
The actual output voltage of a proton exchange membrane fuel cell (PEMFC) E cell , is lower than its equilibrium potential due to irreversible losses for several reasons. The losses, which are generally called polarization or overpotential, originate primarily from activation loss, ohmic loss and concentration loss. E cell is a function of output current density, temperature, partial pressure of reactant, which can be expressed as follows: where E 0 is the open-circuit potential or thermodynamic equilibrium potential, η act , η ohim and η con are over-potential with respect to activation, ohmic and concentration losses, respectively.
The power density of a PEM fuel cell is written by: where i is the current density.

D. EQUIVALENT STATE OF CHARGE
The water electrolyzer, hydrogen/oxygen tanks and fuel cells constitute the energy storage system in this study. Hydrogen and oxygen are generated by consuming electricity in the similar way of charging batteries. In discharging, the fuel cells generate electricity by consuming hydrogen/oxygen while hydrogen/oxygen decreases gradually. In order to evaluate the remaining amount in the storage, an equivalent state of charge (ESOC) is introduced shown in Eqs. 6-8.
where ESOC H and ESOC O are the ESOC of the hydrogen and oxygen storage; P h is the pressure of the hydrogen tank; P 0 h is the full pressure of the hydrogen tank; P O is the pressure of the oxygen tank and P 0 O is the full pressure of the oxygen tank; V H and V O are the volumes of the hydrogen and oxygen tanks, respectively.

III. OPTIMAL POWER DISPATCH UNDER MODEL PREDICTIVE CONTROL
A PSO-BP is used to forecast the wind power prior to the application of model predictive control associated with a GA strategy and a state space model. The following sections discuss them in details.

A. MODEL PREDICTIVE CONTROL
The key points in an MPC scheme includes three parts, prediction, optimization and system model. Fig. 2 illustrates the three elements associated with the key datasets. A PSO-BP network (see Fig. 2) is developed to provide a series of data {p wind (k), . . . , p wind (k + 23)} subjected to the forthcoming wind power. They are used by the GA optimization incorporating with other inputs, such as ESOC S (k), p wind (k), p load (k), p (H 2 O) (k). The GA optimization mainly constitute the optimization objective and the constraints. The study aims to maximize the usage of wind power while maintaining the storage within its safe range. As far the model, a state space model is employed where the datasets including the measured wind power, predictive wind power, the charging or discharging power of the storage system are fed. The outputs of the SSM also are used as the inputs of the optimization for the next step over the iteration process. It is worthy to be mentioned that a closed loop is formed between the optimization and the SSM. Therefore, the MPC is capable to correct the errors caused by the uncertainties or discrepancy between the predicted wind power and the measured counterparts. In overall, the principle of an MPC predicts the forthcoming inputs and then feed them into the system model. Control parameters in line with the optimal targets are determined with the assistance from the model outputs as references. These steps are repeated to reach an optimal state over the whole optimization horizon.

B. PSO-BP NETWORK FOR WIND POWER PREDICTION
A BP neural network is used in this system for wind power prediction where the environmental information, such as ambient temperature, wind speed and humidity are taken as the inputs. The network is extremely sensitive to the weighting factors, and different initial values will lead to different results [41]- [44]. Improper selection of the weights will incur the network oscillation or out of convergence. To overcome these problems, this study combines BP with PSO to build the PSO-BP prediction model for wind power forecast. The basic procedure is in two steps. Firstly, the PSO algorithm is to optimize the weight ω i and the threshold b i of the neural network; then, the PSO-BP model is to predict the wind power. The PSO-BP neural network algorithm is shown in Fig. 3. It can be divided into two parts: a BP neural network and a PSO scheme. The right-hand side in Fig. 3 illustrates how a BP neural network is determined according to the training outcomes by the historical samples where its threshold and the connection weights are given by the PSO strategy. On the other side, a PSO has been implemented by the following steps: Step 1: Initialization. It includes the initialization of the weights and thresholds for the BP neural network.
Step 2: Giving the first location and the speed of the particles.
Step 3: Calculating the fitness value of the particles.  Step 4: Comparing the new fitness value with the previous one. If it is better, the values are assigned to the particles. Otherwise, the particles keep the previous one.
Step 5: Updating the speed and the location of the particles.
Step 6: checking the termination conditions. If the conditions are satisfied, the iteration ends. Otherwise, it returns to Step 3.
By adopting the measured data from a wind farm, the PSO-BP neural network is used to predict the wind power with the 24-hour prediction horizon. 2928 sets of data are taken as the samples where the 360 datasets are used as the test samples with a one-hour interval and the rest are used as the training samples. By feeding training sample into the model, the predicted value is obtained which will be used as the starting point for the next prediction. By integrating the predicted value and the past datasets, the next-step prediction is obtained. Following this process, a series of 24-hour wind power data (from time point k) {p wind (k) , p wind (k + 1) , . . . , p wind (k + 23)} can be received. The demonstration of prediction outcomes will be given in the result section. Table 1 lists the PSO-BP parameters for the study.

C. STATE SPACE MODEL
In an SSM, a state includes one or more state variables in time sequence. In essence, the target of a GA is to find the best decision set over an optimal horizon where the objective is met in favor of its fitness function.
In the system, the energy balance equation can be expressed as where p wind , p grid , p fc , p H 2 O , p load refer to the measured power data from the wind turbine, grid, fuel cells, water electrolysis and the electrical load, respectively. In order to form a state space equation, two state variables and one output variable are defined as follows.
The state space model can be presented as

D. OPTIMIZATION WITH GENETIC ALGORITHM (GA)
GA is inspired by natural selection and genetic mechanism in biological evolution. It is a stochastic optimization method that was introduced and developed by Professor Holland in 1975 [45]. Essentially, GA is a global search algorithm that aims to find the best solution for optimized problems.
In the process, the three important operators are involved, namely ''selection'', ''crossover'' and ''mutation''. As shown   Fig. 4, a GA employs selection to allow the elite individuals to reproduce. In this study, the approach of tournament selection is used to find the individuals with the best fitness. After selection, ''crossover scattered'' operator carries out the information exchange between the different individuals and produce the new generation. To prevent irrecoverable loss of useful genes, this study uses uniform mutation to allow genes being uniformly distributed over the range of the gene. The key indicators in the GA algorithm are summarized in Table 2. Some parameters are selected based on the empirical and trial-and-error methods. In this study, the GA algorithm is to find a set of operational variables which allow the maximum wind power be consumed locally over the whole process. In order to derive the relationship between each energy component, an SSM expression is used which is a conventional method to describe a complex multi-vector energy system. Furthermore, the SSM is also taken as a constituent in a GA fitness function to present the relationship between the variables.
The aim of the optimization is to minimize the power sending to or coming from the grid while maximizing the local consumption of wind power. Therefore, the objective function can be described as:

IV. TEST RESULTS AND ANALYSIS
The test data in this simulation including both the wind power and the load are obtained from the actual measurements.
Starting from the analysis on the features of both the demand and the wind power, the demand in Fig. 5(a) has shown similarity while the wind power supplies in Fig. 5(b) being illustrated. Fig. 5(a) shows the load waveforms over one month. Even the different values in the same time point of the different days are observed, the variation of the daily demands shows a similar pattern. The values range between 1.8 and 2.3 MW in the month. By contrast, the wind power demonstrates no a fixed pattern in the month. There are dayto-day difference in relation to the peaks and the variation as shown in Fig. 5(b).
Obviously, the uncertainty of the wind power supply as well as the dissimilarity between the demand and the supplies will increase the difficulty if an optimal strategy is defined by using conventional ways.

A. PREDICTION RESULTS
In order to evaluate the effectiveness of the proposed PSO-BP model, a traditional BP neural network model is constructed for comparison where the maximum permissible error is set at ε = 10 (−7) . The forecasting curve of the wind power is shown in Fig. 6. The prediction error is shown in Fig. 7. The key values in the results are shown in Table 3. The performance indicators of the both prediction methods are summarized in Table 4.
For the evaluation of prediction methods, a common indicator e MAPE is employed as an error function. Furthermore, the root mean square error Z and r are used to quantify the accuracy and quality. Equations (16)-(19) provides the    calculation as follows:  where k represents the time point, a total of 360 time points; T 1k is the predicted value at the first k time point; T Ok is the measured value at the first k time point; and T OP is the average value of the measured data. Fig. 6 provides a comparison of the test datasets and the model prediction where a solid line is for the test data and the prediction is drawn by a dot line. Both two curves fit well. In order to demonstrate the difference, Fig. 7 illustrates the error margins. As shown in Fig. 7, the most values are limited within 5% where the first 8 hours contribute the main difference by comparison. Furthermore, Table 4 Table 4 where the mean error, the root mean square error, the accuracy, and the percentage of qualified data are included. By using the PSO to improve the BP neural network, the error is better, with only 4.5% in average. On the other side, the root mean square error is only 1.4%; The accuracy rate reaches at 92.3%, with an improvement of 11.0% by comparing to the general BP. The W rate is 96.5% with an increase of 9%.
All indicators fully show that the PSO-BP neural network model is superior to the traditional BP. As a result, a PSO-BP is used to estimate the wind power before the GA optimization for better power dispatch.

B. WIND POWER PROFILES
A set of four-day demand waveforms are randomly selected and demonstrates in each diagram (a) in Figs. 8 to 11. The wind power profiles of the corresponsive four days are shown in each diagram (b). The demand profiles fluctuate over 24 hours in each profile while similarity being found in these waveforms.
In essence, the wind power profiles are different in the four days. Day one starts with very low wind power and gradually raises to its peak in the end as Fig. 8(b) shows. Day four in Fig. 11(b) demonstrates an opposite way to day one where the power peaks at the beginning and gradually decreases in the day time. Day two in Fig. 9(b) shows very low supply over the whole day where day three in Fig. 10(b) shows variation over the whole day. Average wind speed is measured and recorded on the test site which ranges from 0 to 21 m/s. There is no fix pattern available among them and the four waveforms of the wind power vary differently. The wind power in day one and day three ranges from 0 to 1.5 MW. 7:30 has the peaks in these two days while strong wind appears in day time. Day two plays a different scenario to day one and three. The wind power gradually increases until the peak 3.5 MW at 24:00. Day four has the peak at 1:00. Afterward, the wind power gradually decreases and keeps low over the whole day time. From 19:00 onward, the wind power keeps growing over the night. In case one, the demand fluctuates within the range from 2.2 MW to 2.7 MW shown in Fig. 8(a) while wind power starts from very low and gradually increases over the next few hours. The ESOC curve in Fig. 8(c) displays very limited change at the first 10 hours since the wind power is less than the demand over this period. Afterwards, ESOC gradually increases along with the wind power growing. Until 23:00, both of the wind power and the ESOC reach the peaks. By comparing the two curves in Fig. 8(d), it can been noticed that the less grid power is needed with the assistance of the storage system under optimization.
The wind power in Fig. 9(b) rises slightly in the first two hours and decreases gradually until 10:00. It goes up to 3 MW at 16:00 with minor variation until 20:00. Afterwards, it peaks at 23:00. With the first two-hour surplus power, the storage system is charged as seen in Fig. 9(c). Therefore, almost no power is needed from the grid as shown in the line with the rhombic marks in Fig. 9(d). With the decrease of the wind power in the next few hours, the ESOC decreases until hitting its low limit at 5:00. The grid power as supplement supports the balance between the demand and the wind power. As the wind power gets stronger, the storage is charged again while limited grid power is needed. By comparing the lines in Fig. 9(d), the grid power with an optimization strategy is less than that without optimization. Fig. 10(c) shows that ESOC varies within a limited range from 0.2 to 0.4 over the whole day since the wind power is always lower than the demand. By comparing the curves with and without optimization in Fig. 8(d), it can be observed that the lower grid power is required under optimization than that under non-optimization without the storages system. Fig. 11 (a) shows a similar scenario to Figs. 8(a), 9(a) and 10(a). However, the curve in Fig. 11(b) is different from those in Figs. 8(b), 9(b), 10(b). The variation in Fig. 11(c) follows the variation of the wind power in Fig. 11(b). The less grid power under optimization is needed than that without optimization as shown in Fig. 11(d).
Overall, in all cases, the wind power is utilized to fullest with the assistance of the energy storage system under GA optimization. As a result, less grid power is needed in the system with optimization than that without optimization.

V. CONCLUSION
This paper has presented an AI-enhanced MPC strategy for a wind-hydrogen-fuel cell power system which is integrated in a smart grid. A PSO-BP neural network is used to forecast the 24-hour wind power for the MPC to achieve the optimal power dispatch. A GA optimization is adopted to iteratively define the best solutions over the 24-hour optimal horizon while the SSM compares the forecasting with measured data to adjust the operational strategy.
The findings of this work can be summarized as follows: 1) The usage of the wind power is increased by 45-90% by the developed MPC scheme.
2) The energy storage system consists of a water electrolyzer, hydrogen/oxygen storage tanks and fuel cells to balance the demand and supply while the operation of the storage system is kept within a safe range.
3) The effectiveness of the proposed methodology is verified in the simulation environment where the influential factors is assumed in a limited way. In the future work, the developed strategy will be implemented in a practical wind farm with fuel cell energy storage. A full-scale experimental test rig is also under development.
The developed technologies provide a new method to operate grid-tied energy system where intermittent renewable can be effective used. This will encourage the uptake of wind, hydrogen and fuel cells in power generation. He is currently a Professor with the School of Electrical Engineering, Guizhou University. His research interests include renewable energy systems and optimization algorithms.