Optimal Real-time Scheduling for Hybrid Energy Storage Systems and Wind Farms Based on Model Predictive Control

Energy storage devices are expected to be more frequently implemented in wind farms in near future. In this paper, both pumped hydro and fly wheel storage systems are used to assist a wind farm to smooth the power fluctuations. Due to the significant difference in the response speeds of the two storages types, the wind farm coordination with two types of energy storage is a problem. This paper presents two methods for the coordination problem: a two-level hierarchical model predictive control (MPC) method and a single-level MPC method. In the single-level MPC method, only one MPC controller coordinates the wind farm and the two storage systems to follow the grid scheduling. Alternatively, in the two-level MPC method, two MPC controllers are used to coordinate the wind farm and the two storage systems. The structure of two level MPC consists of outer level and inner level MPC. They run alternatively to perform real-time scheduling and then stop, thus obtaining long-term scheduling results and sending some results to the inner level as input. The single-level MPC method performs both long-and short-term scheduling tasks in each interval. The simulation results show that the methods proposed can improve the utilization of wind power and reduce wind power spillage. In addition, the single-level MPC and the two-level MPC are not interchangeable. The single-level MPC has the advantage of following the grid schedule while the two-level MPC can reduce the optimization time by 60%.


Introduction
With the increasing penetration of wind energy into power grids, the negative influences of wind farms are non-negligible [1,2].The variability and intermittence of wind power cause fluctuation of the voltage and frequency of the grid, affecting the safety of the power grid [3,4].Energy storage systems have been verified to be an effective method for overcoming these deficiencies [5][6][7].The system that coordinates a wind farm with energy storage systems can be dispatched into power grids, which is similar to that of a conventional energy plant [8].Energy storage systems can be classified into two general categories: high power density and high energy density types [9][10][11].Moreover, energy storage systems can be classified as fast response or slow response depending on the response time [12].Because smoothing the complex fluctuation of wind power using a single type of energy storage is difficult, hybrid energy storage systems may be a better choice for wind farms for both technical and economic reasons [13,14].
Wind farm scheduling can be classified into the day-ahead scheduling and the real-time scheduling according to the influence of wind power on the grid [15].The day-ahead scheduling is employed to address the long-term influence, and the real-time scheduling is applied to address the short-term influence.Both the day-ahead and the real-time scheduling have drawn much attention in recent years [16,17].The approaches of model predictive control (MPC), fuzzy logic control (FLC) [18], dynamic programming [19] and mixed-integer nonlinear programming (MINLP) [20] have been used to perform real-time scheduling.The MPC algorithm has been widely used in industry cases since its first application in chemical process industry in 1990.Recently, MPC has been adopted in power and renewable energy systems as well [21][22][23][24][25][26][27][28].MPC has two main advantages: the simplicity of handling complex constraints and real-time control based on rolling horizon optimization.Indeed, MPC transforms a control problem into an optimization problem [29].First, MPC solves a finite horizon optimization problem with some future information at the sampling time, and only the results for the current time are used.The overall procedure is then repeated at the next sampling time [18].The optimal results closely describe the actual situation because of the look-ahead characteristic of MPC.On the other hand, other conventional control approaches such as the proportional integral derivative (PID) method and fuzzy control methods can also be implemented in real time scheduling.However, the PID and fuzzy control do not belong to optimal algorithm, and their scheduling results are less than the results of MPC.Meanwhile, in this paper the Equations (15) and (16) are logic constrains, these logic constraints can be easily fulfilled using a CPLEX optimal tool, which is a common tool used in building MPC model.In contrast, they are hard to perform with the PID and fuzzy controller methods.Moreover, the MPC method can easily handle complex constraints, while the PID and fuzzy control have difficulty in handling them.
The application of the MPC method to control energy storage systems and wind farms has been studied by many investigators.In the research, they employed the multi-level hierarchical MPC [24,[30][31][32] or one-level MPC [25][26][27] according to the difference in control architectures.Wei et al. proposed a two-level hierarchical MPC to reduce the MPC optimization time [24].In this application, energy storage is used to coordinate wind-solar subsystems to optimize the production of desalinated water and the water and storage requirement is met.The upper level is modeled as a long-timescale problem, while the lower level is a short-timescale problem.The optimized upper level results are used as the input of the lower level.In [25], the architecture of the MPC is single-level.A wind-battery optimization model is established for a storage system and wind farm to conduct scheduling in the same manner as a traditional plant does.Other literature is available on real-time scheduling involving fuzzy logic control and dynamic programming.Lei et al. presented a two-level dynamic programming to manage a wind farm and a storage system [33], in which the upper level is implemented over the whole period to obtain the reference trajectory and the lower level is implemented for real-time operation.In [28], a combination of the MPC method with fuzzy logic control was proposed, in which MPC is used for real-time control to achieve the optimization objective, and a fuzzy logic controller adjusts the power reference to increase the lifetime of the storage system.
In [24], the author took advantage of two-time-scale property of the dynamics of the integrated system to improve the computational efficiency of the control problem formulation.This merit has reduced the computation burden of the method, and now it can be implemented in real time system.However, we think this method could exist a demerit in running stability.In extreme condition, the prediction error could lead to the optimal mode failure in finding feasible solution.In [25], the merit of the paper is presented with a third-order battery model and a state space is used to describe the battery model.Additionally, author has also found that the prediction horizon of MPC is an important parameter that contributes to the scheduling performance.The demerit of this paper could be that the battery energy storage system (BESS) charge/discharge frequency is relatively high.Thus, the limit constrain of charge/discharge frequency should be added in this model.In [28], the merit of the method is that MPC method is combined with fuzzy logic control (FLC) method to control the wind farm and energy storage.The combination of the two methods is a novel way, and the results have demonstrated that the wind farm revenue has been improved by 3%.The demerit of this paper is that authors adopt single storage rather than two types of storage.The hybrid storage has more advantages than single type energy storage, and these advantages can assist the wind farm in following scheduling.In [33], the author has succeeded in overcoming the dilemma of the conflict between long horizon and prediction accuracy.The method is very useful in controlling sophisticated system consisted by wind farm and energy storage.However, we think there was a minor unreasonable description in the battery model.We believe that the battery ought is to occupy only one of the three states at any given time: charge, discharge, or shut-down, while according to the battery mode (Equation ( 5)) a battery can be in charge and discharge state simultaneously, therefore we think the author may have neglected this minor point in his model.
Although many researchers have investigated the management of a wind farm with a single type of storage based on MPC, few researchers have studied a wind farm with a hybrid storage system based on MPC, especially when the hybrid storage system includes pumped hydro storage.A battery storage system may be more practical than a pumped hydro storage system; however, there are some special cases in which a battery storage system cannot replace a pumped hydro storage system.For example, on an isolated island, pumped hydro storage serves as not only energy storage but also a reservoir for local citizens.Moreover, the pumped hydro storage system has some advantages such as large storage capacity, high efficiency, mature construction technology, relatively low capital cost per unit of energy and time-shifting between wind generation and demand profiles.The purpose of this paper is to present two MPC models to be implemented in wind farms with hybrid storage systems including a pumped hydro storage system and a fly wheel system.The MPC models presented consider the power characteristics of wind farms and hybrid storage systems, and the results confirm the efficiency of the MPC model.The merit of propose method is as follows: First, two types of energy are adopted.Second, the MPC method is used to smooth wind power fluctuation.Finally, two type of MPC methods are discussed and compared.
The contributions are listed as follows: (1) We have adopted a fast response speed energy storage and a slow response speed energy storage to smooth the short term and the long term wind power fluctuations, respectively.Due to the two different response speeds, how to get the two energy storages to cooperate is a problem for real time scheduling.We have exploited the modularity of wind farms based on the MPC method with two types of storage to solve the problem.(2) We present that the MPC prediction horizon should be two hours according to the wind farm power spectrum density and prediction error.(3) Additionally, we have implemented a two-level MPC to reduce the optimal computation time.
The experimental results are close to that of a single-level MPC.The single-level MPC has its own advantages in following the grid plan.The two-level MPC cannot be substituted for single-level MPC, and vice versa.(4) Two sound conclusions are drawn through theory analyses and simulations: One is that the decision values of the pumped storage are not sensitive to the flywheel capacity.The other is that in some situations, wind power generation being sent to the grid is sacrificed to reduce the wind curtailment.
The rest of this paper is organized as follows.In Section 2, the problem to be addressed is described.In Section 3, the system configuration and operating process are given.In Section 4, the proposed system model is described.In Section 5, the numerical results are presented.Finally, the conclusions are presented in Section 6.

Problem Description
In this paper, two types of energy storage systems were used to assist a wind farm in smoothing the power fluctuations.One of the key issues is how the two energy storage systems cooperate with each other to perform such power smoothing.In the case of hybrid storage systems, it is important to determine whether common or special decision-making processes exist when a pumped hydro storage system is replaced by another high-energy density storage system.In the following paragraphs, we state the characteristics of wind power and energy storage systems first and then determine the relationships between them.Finally, some useful results and suggestions were obtained.

Characteristics of Wind Power
Wind power fluctuations consist of two overlapping parts: macro-meteorological fluctuations and micro-meteorological fluctuations [34].Figure 1 shows the wind fluctuations decomposed into macro-meteorological fluctuations and micro-meteorological fluctuations.From Figure 1, it can be seen that the macro-meteorological fluctuations are relatively slow and smooth and display the trend of wind power generation.In addition, the macro-meteorological fluctuations vary over a large band from 0 to 22 MW, while the micro-meteorological fluctuations are relatively fast and sharp and vary over a relatively narrow band of around 2.5 MW.These observations indicate that two types of storage systems can be used to smooth these two fluctuations.One type of storage is applied to address macro-meteorological fluctuations; in this case, the storage should be a high energy density type with a large power and capacity, but its response speed may be slow.The other type of storage is used to address the micro-meteorological fluctuations; in this case, the storage system requires the capability of rapidly changing power, but a large capacity is not needed.

Characteristics of Typical Energy Storage Systems
Table 1 shows some characteristics of typical energy storage systems.Pumped hydro storage has large power and capacity.However, its response time is long due to the high inertia of water turbines and some security considerations.Additionally, pumped hydro storage may be forbidden from switching from pumped mode to generation mode (and vice versa) within a short time frame [35].As a result, in this paper, we adopt the reasonable assumption that the pumped hydro storage only has permission to change its operating state once each half hour and that the changing time occurs at the beginning of the half hour (Assumption 1).This assumption can enable pumped hydro storage easy to control and operate safely.Note that for the pumped hydro storage, the term "change state" means that the pumped hydro storage changes the generation mode into pumped mode, and vice versa.Moreover, the term also means that the pumped hydro storage changes the power value of generation or pumping.For fly wheel, the meaning of the term is similar to that for pumped hydro storage.The fly wheel has low capacity and fast response speed, as indicated in Table 1.The response time of a fly wheel is 0.05 s.For conventional scheduling processes, the fly wheel is regarded as a fast storage device, and it can change its operating state at any scheduling time (Assumption 2).
In this paper, we assume that the scheduling interval is five minutes and the scheduling horizon is one day or 24 h (Assumption 3).

Relationship between Wind Power Fluctuation and Storage Systems
As mentioned above, a pumped hydro storage is used to address the macro-meteorological fluctuations.According to Assumption 1, pumped hydro storage changes its work state once each half hour to handle hour-level fluctuations.In addition, it has high power and high capacity characteristics, which assist pumped storage in a smooth wide band of wave.A fly wheel is suitable for dealing with turbulence due to its fast response and low power characteristics.
Substituting compressed air storage for pumped hydro storage appears to be feasible because they have similar parameters.If we substitute a battery for pumped storage, we must consider whether the battery can have both high power and high capacity.Even if a battery system has sufficient power and capacity, the control of the battery will be challenging.

The Principle of Choosing Prediction Horizon
In this paper, the length of the prediction horizon is depended on the wind power spectrum density and the type of energy storage.We explain the reason as following: First, for fly wheel storage, it mainly deals with the turbulence due to its fast response speed and low power characteristics.Pumped storage handles macro meteorological fluctuation due to its slow response speed and high power characteristics.Turbulence belongs to minute-level fluctuation, and macro meteorological fluctuation is hour-level or day-level fluctuation.Therefore, the length of the prediction horizon should be hour-level, if the MPC controller is controlling the pumped storage.
Second, the wind farm power spectrum density curve was shown in Figure 2. The macro meteorological fluctuation is relatively low frequency and huge energy, therefore, it should belong to the left part of the curve.The turbulence is relatively high frequency and low energy, so it should belong to the right part of the curve.In Figure 2, "One hour window" means that the length of the MPC prediction horizon is one hour, and "Two hour window" means that the length of MPC prediction horizon is two hours."One hour window" contains much turbulence and little macro meteorological fluctuation; on the contrary, the "Two hour window" includes much turbulence and some macro meteorological fluctuation.According to these observations, we decided to choose two hours as the MPC prediction horizon.
Finally, we undeniably agree that the three hour solution is also feasible, perhaps it is better than the two hours solution because it contains more macro meteorological fluctuations.However, the prediction accrual of three hours is worse than two hours, which is not beneficial for the real time scheduling.Thus, to balance the prediction accrual and macro meteorological fluctuations, we choose the two hour solution.

The System Configuration and Operating Process
In this section, two types of system configurations are presented because MPC methods include a conventional MPC (single-level MPC) and a hierarchical MPC (multi-level MPC).The single-level MPC system configuration is shown in Figure 3a, and the two-level MPC system configuration is shown in Figure 3b.

Single-Level System Configuration and Operating Process
Figure 3a shows that the single-level system consists of a wind farm, a hybrid storage system, a grid, and an MPC controller.The single-level MPC operating process is presented as follows: First, the MPC obtains the available information, such as the current wind power, forecasted wind power, energy levels in the two energy storage systems, grid plan and working states of the two energy storages (pumped mode or generation mode, charging mode or discharging mode).
Second, the MPC makes optimal decisions based on this information and then implements the actions based on these decisions.Note that only the current time optimal decisions can be made.
The two above-mentioned steps are repeated when the next scheduling time arrives.

Two-Level System Configuration and Its Operating Process
In hierarchical systems, a number of regulators perform their control actions at different timescales.This approach can be useful when the overall process under control is characterized by slow and fast dynamic behavior [29].In this paper, pumped hydro storage is a slow form of storage, and the fly wheel is a fast form of storage according to the response time.Therefore, hierarchical MPC is adopted to present the system.This two-level system is composed of a wind farm, a hybrid storage system, a grid, an MPC1 controller, and an MPC2 controller, as shown in Figure 3b.
To understand the cooperation between the MPC1 controller and MPC2 controller, the above-mentioned Assumptions 1, 2 and 3 must be explained in detail.Assumption 3 is that the scheduling interval is 5 min; Assumption 2 is that a fly wheel can change its operating state at any scheduling time interval.Assumption 1 which is crucial, is that the pumped storage cannot change its operating state within a 30 min period until the next 30 min period starts.In other words, pumped hydro storage can change its operating state only at the beginning of the 30 min period and must then maintain its operating state until the 30 min period ends.Note that 30 min corresponds to six scheduling intervals.
The level of MPC 1 is regarded as the inner level or short-term level, and the level of MPC 2 is viewed as the outer level or long-term level.Similar to the conventional hierarchical MPC, in this paper, the long-term MPC operates by first making decisions and then transmitting some decisions to the short-level MPC; that is, information is output from the long-term MPC and then input to the short-term MPC [29].
The two-level MPC operating process is presented as follows: First, the long-term MPC (MPC 2) runs and makes decisions.Some decisions are then transmitted to the short-term MPC (MPC 1), and further decisions are made.
Second, when the next scheduling interval arrives, the long-term MPC (MPC 2) stops working, and then the short-term MPC (MPC 1) starts working.MPC 1 makes decisions and then performs them.
If a new 30 min period arrives, the first step is repeated, or else the second step is repeated.
There are three ways to communicate between the two controllers.The three ways are Ethernet communications, global system for mobile communications (GSM) and satellite communication technology, respectively.Ethernet communication solution is the cheapest solution among the three ways, and the satellite communication solution is the most expensive solution.We consider the three following implement cases: If internet is available in the pumped storage station and the fly wheel station then Ethernet communication is recommended.
If the mobile signals exists in the pumped storage station and the fly wheel station, then GSM communication is adopted.
Otherwise, the satellite communication has to be chosen.In this paper, the two controllers communicate once every five minutes, the speed of above three technologies is fast enough to ensure synchronization of their communication.Meanwhile, it also possible to adopt some protocols in the software to ensure synchronization-for example, the shake hand protocol is a common way to synchronize communication.

System Model
In Section 2 (Problem description), the cooperation between the pumped hydro storage and the fly wheel storage was noted.However, the process and details of the cooperation based on rolling optimization have not yet been addressed.The rolling optimization plays a significant role in MPC.When applying MPC method to wind farm and hybrid energy storage, which consist of a fast response speed storage and a slow response speed storage, two types of MPC methods can be implemented.One type is single-level MPC method, and the other is two-level MPC method.For single-level MPC method, a two time scales problem will be met due to two kinds of respond speeds of energy storage.To overcome this problem, single-level MPC method must divide the problem into several situations, and for every situation, a model is used to describe it.The models are carried out in turn according to the situations.In contrast, two-level MPC method is suitable for the hybrid storages.Outer level and inner level MPC run alternatively to perform real-time scheduling.Therefore, in this section, we first analyze the process and details of the cooperation based on two types of MPC method and then attempt to use the optimization model and the state-space method to represent the process in detail.The single-level MPC method is addressed and then two-level MPC method is discussed below.

Single-Level MPC Method
Before the rolling optimization process is analyzed, some basic information must be given.We assume that the prediction horizon is equal to the control horizon and each of them are two hours.The sample time is 5 min.Let ts = 0 when MPC controller begins to work, where ts represents the serial number of the scheduling interval.Two hours are equal to twenty-four scheduling intervals.
The principle of rolling optimization is as follows: First, at the current time, the MPC controller samples the current interval information, and predicts the information for the next two hours.
Second, MPC performs on-line optimization.
Finally, MPC makes the current time decisions.The above process is repeated on the arrival of the next scheduling interval.
Although the principle is easy and clear, it will become relatively complex, once it is implemented to hybrid energy storage, which has significantly different response speeds.For understanding the principle, we will first analyze a simple example, and then we will explain the complex process.The simple example is that the pumped hydro storage is replaced by a battery.From Table 1, the response speed of the fly wheel is almost equal to that of the battery; therefore, at any scheduling interval, the battery and fly wheel are ready to change their work states according to the optimal results.In contrast, according to assumption 1, the pumped storage is not ready to change its work state at any scheduling interval.In other words, at any scheduling interval, we have the control right to change the fly wheel and battery, but we have almost lost the control right for pumped storage.Therefore, when the principle is applied to the battery and the fly wheel, it is a simple example, and the analysis process is as follows: MPC controller samples, forecasts, execute on line optimization and produces the results.The MPC controller repeats the above process on the next scheduling interval.Therefore, the MPC controller always performs the same set of actions at any scheduling interval.The process is shown in Figure 4.In Figure 4, at any scheduling interval, the context of MPC controller performing is similar.When the principle is applied to pumped storage and fly wheel, the process will become relatively complex, due to the control right of the pumped storage.According to Assumption 1, the pumped storage is under control at every starting half an hour, consequently, when ts is 0, 6, 12, 18, 24…, both the pumped storage and the fly wheel are under control.The control right situation is similar to that of battery and fly wheel.Any other time, the two situations are different.The details are shown in Figure 5.
Figure 5 schematically shows the process by which the single-level MPC performs the rolling optimization."Change" means that, at the beginning of this half-hour period, the pumped storage can change operating state once; "hold on" means that, in the scheduling interval, pumped hydro storage cannot change its operating state; and "Case 0-5" denotes the difference conditions.The difference between Figure 4 and Figure 5 is significant.The main reasons for this difference are as follows: When ts = 0 (Case 0), the MPC controller starts working, samples and predicts information, performs on-line optimization, and then sends its optimization decisions to the pumped hydro storage and the fly wheel.The pumped hydro storage system receives and executes the decisions.Once the pumped storage changes its operating state, it must remain in the state until the half-hour period ends.In other words, when ts = 1, 2…5, the pumped hydro storage cannot change its operating state for x min, where x is 25, 20, 15, 10, and 5, respectively.For example, in Figure 5, Case 3 shows that the pumped hydro storage cannot change its operating state for the first 15 min, but it can change its operating state once when the new half-hour period begins.We can also explain the above process in a different way: when ts = 0 (Case 0), the MPC controller, fly wheel, and pumped hydro storage start working, the MPC controller provides the decision, and then the fly wheel and pumped hydro storage systems perform the actions based on the decision.In Case 0, the decision variable of pumped storage belongs to the control variable.Once the pumped storage changes its operating state, it must remain in this state for half an hour.In the following Cases 1-5, the decision variable of the pumped storage is a constant at the initial time, not a variable.In other words, in Cases 1-5, the variable of pumped storage does not take part in the on-line optimization, and it is assigned according to the value of Case 0.
When ts = 1, 2…5, the corresponding conditions are Case 1…Case 5, and when ts = 6, the corresponding condition is Case 0. The relationship between ts and the case can be described by Equation (1): Case mod( ,6) where mod is the remainder operator, and the relationship is shown in Figure 6.In Figure 6, the Ci represent Case i, the roll optimization based pumped storage and fly wheel is repeated after six scheduling intervals.

Single-Level
Equation ( 3) describes the composition process for system total generation [28].
Equation ( 4) describes energy balance of the pumped hydro storage at time t.Equation ( 5) describes the energy balance of the fly wheel at time t.
Subsequently, the discrete-time five-order dynamic equation of the wind power with hybrid storages can be written as follows: ( 1) ( ) ( ) ε( )   ps ps ps fw ( ) ( ) Constraints including logic constraints are difficult to present.However, logic constraints can be easily formulated in a programming model.Therefore, in this paper, a programming model is used.

Single-Level MPC Programming Model (a) Objective Function of the Model
The objective function includes three sub-objectives: the system generates power strictly according to the grid plan (the first sub-objective); reduces the quantity of wind curtailment (the second sub-objective); and improves the ratio of wd t p (the third sub-objective).The reasons for the first and second sub-objectives are obvious, and the reason for the third sub-objective is that there is a loss of energy when wind power is stored into the energy storage system and is then generated from the energy storage system, i.e., the third sub-objective can improve the wind energy utilization efficiency.The objective function is as follows:   where N (N = 23) is the prediction horizon of the MPC and 1 w , 2 w , and 3 w are positive weight factors of the sub-objectives.The choice of the weight factor is mainly based on on-site demand. 1 w , 2 w , and w can be replaced by 1 ( ) w t , 2 ( ) w t , and 3 ( ) w t , showing that the weight factors are related to time.We will examine the differences caused by the differences between 1 ( ) w t and 1 w in the simulation results.
(b) Constraints of the model (1) The assignment process of wind power is described in Equation ( 2).
(2) The composition process of the system total generation is described in Equation ( 3).
(3) The energy balances of the pumped hydro storage and the fly wheel are presented in Equations ( 4) and ( 5 The left side of the inequality presents the lower bounds, while the right side displays the upper bounds. (5) The upper and lower bounds of the fly wheel decision variable are described as follows: The left side of the inequality presents the lower bounds, while the right side displays the upper bounds.
(6) The pumped hydro storage occupies only one of three states at any given time: generation, pumping, or shut-down.The constraint is as follows: where where fa With the help of the sub-objective in the objective function, the constraints can ensure that wd t p is close to the power plan and improve the utilization ratio of wind power.These benefits are possible because the wind power is directly injected into the grid and the insufficient part of the demand is compensated by the energy storage system when the wind power is less than power plan.Moreover, when the wind power exceeds the power plan, wd t p can only be close to the generation plan to meet the sub-objective and Equation ( 15). ( 9) Constraints of Assumption 1: Assumption 1 is that pumped storage can change its operating state at the beginning of a new half-hour period and then remain in this state until the half-hour period ends.Meanwhile, as shown in Figure 5, Assumption 1 is classified into six cases, as described in the following: The case 0 constrain can be obtained according to Figure 5 16) describe the pumped storage must keep work state unchanging in half hour, and the specific optimal value is decided by the optimal model.Therefore, in Case 0, the pumped storage is under control.Meanwhile, Equation (16) shows the prediction horizon is two hours, and it is a long-term optimization.Note that, on the top of Figure 5, the horizontal axis is the time series axis, and we use ts to represent the time series.The definition of ts is different from that of t. ts = 0 means the system has started; however, t = 0 denotes the first scheduling interval for rolling optimization.t = 1 represents the second scheduling interval, and t = 23 represents the last two-hour scheduling interval.For example, Case 3 in Figure 5, the MPC system has performed three scheduling intervals; thus, ts = 3, whereas we regard the first scheduling interval for rolling optimization as t = 0.The function of ts is to determine the cases the MPC condition corresponds to (see Equation ( 1)).
In case 0, Please refer to Equation (18).The constraint of Case 4 can be obtained according to Figure 5.
Please refer to Equation (18).The constraint of Case 5 can be obtained according to Figure 5.

Two-Level Rolling Optimization
As mentioned in Section 3.2, a hierarchical MPC is adopted to present the system considered in this study.MPC 1 mainly controls the fly wheel, and MPC 2 mainly manages the pumped hydro storage.In contrast, the single-level MPC manages both the pumped hydro storage and the fly wheel.The pumped hydro storage system and one of the MPC controllers are regarded as the outer level, and the fly wheel storage system and the other MPC controller are regarded as the inner level.The outer level and inner level run alternatively to perform real-time scheduling.First, the outer level runs for one scheduling interval for optimization and then stops, thus obtaining long term scheduling results and sending some results to the inner level as input.Next, the inner level performs a short-term scheduling task.For a real-time scheduling system, the solution speed is one of the important system characteristics.In Figure 7, for Case 0, the control horizon is two hours, and the two-hour period is useful for pumped storage because pumped storage mainly addresses the slow fluctuation.To obtain the slow fluctuation by decomposing the wind power, this relatively long control horizon is essential.However, because the flywheel mainly manages turbulence fluctuations, the two hour period is unnecessary for the following reasons: (1) the turbulence fluctuation is difficult to forecast, i.e., the accuracy decreases with an increase in the prediction horizon; and (2) the solution time increases with an increase in the prediction horizon.We reduce the prediction horizon when the fly wheel is used.In other words, the prediction horizon of the fly wheel (MPC 1) decreases significantly, and the prediction horizon of the pumped hydro storage (MPC 2) remains unchanged.The reduction of the fly wheel (MPC 1) prediction horizon is performed in the two-level rolling optimization, as shown in Figure 7.
From Figure 7, it can be noted that at the beginning of scheduling (Case 0), MPC 2, which manages the pumped hydro storage, is on and MPC 1 is off.The MPC2 controller makes decisions based on the two-hour prediction horizon.The decisions include a key one that is the decision of pumped storage.The pumped storage decision is transmitted to the inner MPC (MPC 1) as an input value.In Cases 1-5, the pumped storage value is a constant, not a decision variable at the initial time.Moreover, the prediction of MPC1 is 25, 20, 15, 10, 5 min for the different cases for the above reasons.Let ts be equal to 0, corresponding to the time when the system is set into operation.The two-level rolling optimization process is presented as follows: First (Step 1), when ts = 0, the condition is Case 0. Only the MPC 2 controller is available, and the MPC 1 does not make system decisions.The MPC 2 controller obtains information, which is similar to that of the single-level approach; next, MPC 2 makes optimal decisions and then performs these decisions.In addition, the pumped hydro storage operating state is then transferred to the MPC 1 controller.The main purpose of the first step is to carry out a long-term and a look-ahead dispatch when the system begins to work.Because the optimal results contain some of the future information, the results can indicate the tendency of current values.The long-term rolling optimization is used to conduct the macro meteorological fluctuations by controlling the pumped storage.In Step 1, the pumped storage obtains an optimal result, and in case 0, the pumped storage in under control.We can use the following equation to describe the under control pumped storage.
The Equation (22) describes that the pumped storage must keep the work state unchanged for half an hour, and the specific optimal value is decided by the optimal model.Therefore, in case 0, the pumped storage is under control.Meanwhile Equation ( 22) also shows that the prediction horizon is two hours, and it is a long-term optimization.
Second (Step 2), when ts = 1, the condition is Case 1. MPC 2 does not make system decisions, and MPC 1 takes charge of making decisions.The MPC 1 controller obtains information (except for the pumped hydro storage information).MPC 1 then makes optimal decisions (except for pumped hydro storage decisions) and performs actions based on the decisions.Note that the MPC 1 controller cannot be in charge of the pumped hydro storage.The main purpose of the second step is to carry out a short-term and a look-ahead dispatch when the system continues to work.The short-term rolling optimization is used to deal with the turbulences by controlling the fly wheel.In Case 1, the pumped storage participated in scheduling; however, the power value of pumped storage was not decided in Case 1, and it is up to Case 0. In Case 1, the decision process of the pumped storage can be described by the following equation: means that, for this instance of rolling optimization, the pumped storage decision variable is constant at the initial time.In Equation ( 23), the prediction horizon is 25 min, this indicated that the computation burden is significant less than that of Case 0. This is main reason that two-level MPC is adopted to controlling wind farm and hybrid storages.Third (Step 3), when ts is in the range of 2-5, the conditions are Cases 2-5, respectively, and MPC 1 and MPC 2 operate as in Step 2.
Finally, when ts = 6, a new 30 min period starts, and MPC1 and MPC 2 repeat Step 1 (Case 0).The relationship between ts and the cases is expressed by Equation (1).
Figure 8 shows the work sequence of MPC1 and MPC2.In Figure 8, when ts = 0, ts = 6, ts = 12…, a new 30 min period has arrived, and at these scheduling intervals, MPC 2 starts to work, while MPC 1 stops working.When ts is in the range of 1-5, 7-11, …, MPC 2 stops working, and MPC 1 starts to work.Note that at any scheduling interval, only one MPC controller is working.In Figure 7 Case 0, MPC 2 is working, while MPC 1 is not working.Case 0 is similar to Case 0 for the single-level MPC.Therefore, the state-space of the long-term MPC (MPC 1) can be represented by Equations ( 8) and ( 9).

(b) State-space of MPC 1
In Cases 1-5, the pumped hydro storage must remain in its operating state at the initial time, and the decision value of the pumped hydro storage is constant.The sample dynastic equations are similar to Equations ( 4), (5), and (7), and the differences are the decision variables of the pumped hydro storage.
The equation for ps t p is similar to Equation ( 7).The fly wheel energy balance equation is similar to Equation ( 5).The pumped hydro storage energy balance equation is similar to Equation (4).Subsequently, the discrete-time three-order dynamic equation of the wind power with hybrid storages can be written as follows: ( 1) ( ) ( ) ε( ) and the output equation is: The programming model of MPC2 is similar to that of single-level MPC Case 0; therefore, the objection and constraints can be represented by Equations ( 10)-( 16).
(2) MPC1 Constraints Equations ( 11)-( 15) are also the constraints of MPC 1 because the prediction horizon is reduced significantly, i.e., it is smaller than that of the single-level MPC, as described in Table 2.
The meanings of the five constraints are the same as those in Equation ( 17).

Simulation Results and Discussion
To verify the proposed scheduling method, extensive simulations are performed based on an actual wind farm using MATLAB (R2011a) and Cplex (12.4) software.The data used in this study are obtained from the power generation data for a wind farm in Inner Mongolia, China, with an installed capacity of 50 MW.The sampling time of the MPC is 5 min.The simulations have a duration of 24 h and include a total of 288 test points in total.At each sampling point, the forecast power data of the wind farm is required, and these data can be obtained from the prediction software or algorithm [36].In this paper, these data are obtained by adding random noise to the power data of a real wind farm.The parameters of pumped storage and flywheel storage are listed in Table 3.
The parameters of the hybrid storage systems are taken from our previous study [37].In [33], we considered the minimized investment and the maximized revenue of hybrid storage systems.A wind farm power dataset covering a one-year timespan is used to obtain the optimal storage.Table 3. Parameter representations of the pumped storage station and the fly wheel power station.The aim of this research was to present two MPC models to manage a wind farm and a hybrid storage system.In Section 5.1, the simulation results of the single-level MPC are compared with those of the two-level MPC.

Simulation Test for Three Sub-Objectives Based on Single-Level and Two-Level MPC
Three sub-objectives were tested under the condition that w1 = 0.9, w2 = 1.0, and w3 = 0.1, where w1, w2, and w3 are the weighting coefficients of three sub-objectives.Note that in Section 5.1, the weighting coefficients are constants; however, in Section 5.2, the values of these coefficients vary with time.
Figure 9 shows the time histories of the power signals over the 24 h simulation time.Three power signals are shown: the plan power of the grid plan (solid, red), the single-level generation power of the wind-storage system ps t p (dash-plus, black), and the two-level generation power of the wind-storage system ps t p (dash-dot, gray).From Figure 9, it can be noted that the single-level ps follows the plan closely, except for some points.From the magnified views of different areas, ps clearly does not follow the plan clearly at 655, 680 or 710 min.Two possible reasons for the differences between the single-level ps and plan are as follows: (1) the capacity of fly wheel storage is close to saturation in these moments, strongly limiting the charging ability, and (2) the weight of wind curtailment (w2 = 1.0) is greater than that of the difference between ps and plan (w1 = 0.9).It seems that a difference between the plan and ps t p should be permitted, for reducing wind curtailment.Moreover, the two-level ps also follows the plan closely, except for the time points of 640, 655, 670, 680, 685, and 710.However, the two-level ps fails to follow the plan completely at the 880-minute point.It is likely that the single-level MPC method performed better than the two-level MPC method in terms of following the plan.A possible explanation for this behavior is that the prediction horizon of the single-level MPC is longer than that of the two-level MPC, as shown in Figures 5 and 7.The two-level MPC method has the benefit of reducing the solution time.For the two-level method, the average computing time of a scheduling interval is approximately 12.1 ms, while for the single-level MPC method, the time is 33.6 ms.In other words, the two-level method significantly reduces the computing time by approximately 64%.
The result of the second sub-objective is as follows.
In Figure 10, two power signals are depicted: the single-level wind curtailment (wu) (solid-plus, black) and the two-level wind curtailment (dash-dot, gray).Figure 10 shows the results of the wind curtailment of the single-level MPC method vs. that of the two-level MPC method.For both methods, the time of occurrence of wind curtailment is nearly the same, and the amount of single-level wu is approximately the same as that of the two-level wu.The amount of single-level wu is 11.68 MW, corresponding to 0.3% wind energy during a day, while that of two-level wu is 10.35 MW, corresponding to 0.26% wind energy.The results suggest that for the second sub-objective, the two-level MPC method may be slightly better than the single-level MPC method.
This waste of wind-sourced energy can be attributed to two main reasons: (a) the fly wheel is almost full, and (b) although the pumped hydro storage has a large amount of unused storage, it is constrained by Assumption 1, which does not allow it to use the excess wind energy.
Taking the single-level MPC as an example, the following explains the reason for the first wind curtailment.As shown in Figure 10, the first wind curtailment occurs at minute 435 (interval 88),  1), we know that pumped hydro storage is in Case 4, i.e., it remained unchanged from 420 to 445 min (six scheduling intervals, half hour).Some basic information is provided as follows.The result of the third sub-objective is shown as follows: Figure 11 shows the wind power that is directly sent to the grid wd t p (wd).Moreover, Figure 11 shows that the single-level wd t p is equal to the two-level wd t p .The reason for this may be as follows: wd t p is the third sub-objective.When wind plan t t p p  (the inequality means the wind power is less than the grid demand; thus, the storage systems must release energy to compensate for the missing energy between the wind power and the grid demand-in other words, in this situation, pa f a w u , , , the optimal wd t p should be equal to plan t p .However, when the fly wheel is almost full, wind curtailments ( wu t p ) will occur.We know that the wu t p weighting coefficient w2 (w2 = 1.0) is larger than the wd t p weighting coefficient w3 (w3 = 0.1), and the difference between w2 and w3 forms a decision principle; that is, for reducing wind curtailments, sacrificing wd t p is permitted.Therefore, as shown in Figure 11 From the above-mentioned information, for the third sub-objective, the effect of the single-level MPC method is equal to that of the two-level MPC method.
The operating states of pumped storage are as follows: Figure 13 shows the one-day and four-day test results for pumped storage; from Figure 13a, it can be seen that the ps t E (Ep) of the single-level MPC method is equal to that of the two-level MPC method.To show the differences between the single-level and the two-level MPC, one-day simulations were performed, and the results are depicted in Figure 13b.As shown in the figure, the values of ps t E for the two cases are equal, except at some points.For example, at minute 1920, the two ps t E values begin to differ.Moreover, the two pa t p (pa) values also start to display differences.A possible explanation for these differences between the pairs of ps t E and pa t p values is as follows: In Figure 14a , i.e., the storage systems can store excess energy.At minute 1920, the two-level MPC method is in Case 0 (Equation (1)); in Case 0, the model of the two-level MPC method is similar to that of the single-level MPC method.Meanwhile, the pumped storage of the two-level MPC method is 20 MWh, and the wind power and plan is also equal.The only difference is the capacity of the fly wheel.As shown in Figure 14b, at minute 1920, the fly wheel capacity of the single-level MPC is 0.26 MWh, and that of the two-level MPC is 0.73 MWh; their difference leads to the difference in the pumped storage.A sensitivity analysis was performed for the capacity of the fly wheel and pa t p of the pumped storage; and the result is described below.
As shown in Figure 15, the curve of pa t p is a steep curve, indicating that pa t p is not sensitive to the capacity of the fly wheel.In other words, the decision for the pumped storage is not closely related to  Figure 16 shows the one-day and four-day operating states of the fly wheel.The differences for the fly wheel are greater than those for the pumped storage, and the differences for former often occurs when the fly wheel is nearly full or empty.The differences may be attributed to the length of the prediction horizon.In the single-level MPC method, the length is two hours, while it is less than half an hour in the two-level MPC method.To show the details of the reduction of wu t p , the case of the minute 435 was tested again with the same data.For the original weight of wu t p , reduction occurs at minute 435, while for the enhanced weight of wu t p , it does not occur.The decision values obtained are listed in Table 5.
Table 5. Case analysis of the increased weights.5, the wind curtailment does not occur at the current moment (minute 435) but shifts to a future time (minute 440).According to the MPC decision process, the current time decision value is used, while the rest of the decision values are discarded.Moreover, when the next scheduling times arrive, the MPC makes decisions, and the result for minute 440 does not exhibit wind curtailment.Therefore, at minute 435, all the wind energy is utilized, without any waste.
The results suggested that the method of enhancing weight could assist the MPC in reducing the number of times of occurrence and the amount of wind curtailment.
Figure 19 shows the comparison result of wd t p using for the enhanced and original weights respectively.In Figure 19

Conclusions
This paper presented two real-time MPC scheduling models that utilize storage systems to assist the wind farm in meeting the scheduling of the grid.On the basis of the different control constructions, the models are classified a single-level MPC model and a two-level MPC model.Both models have their own advantages, and they cannot be interchanged.The single-level MPC runs steadily and has a high capability to follow the plan of the grid.In contrast, the two-level MPC provides high calculation speed, and the optimal objectives are close to those of the single-level MPC.Moreover, the decision values of the pumped storage are not sensitive to the fly wheel capacity and that, in some situations, the wind power generation sent to the grid ( wd t p ) is sacrificed to reduce the wind curtailment.In addition, the method of weight enhancement is simple, practical, and can be easily implemented in real-time applications.

Figure 4 .
Figure 4. Single-level MPC performing rolling optimization (based on battery and fly wheel).

Figure 5 .
Figure 5. Single-level MPC performing rolling optimization (based on pumped storage and fly wheel).

Figure 6 .
Figure 6.Relationship between ts and the case.

( 8 )
analogous to those for the pumped storage.Wind delivered directly to grid cannot exceed generation plan:

4. 4 .
Two-Level MPC State-Space and Optimization Model 4.4.1.Two-level MPC state-space model (a) State-space of MPC 2 .4.2.Two-Level MPC Programming Model (a) Programming Model of MPC2 (b) Programming Model of MPC1 MPC 1 addresses Cases 1-5.In these cases, the pumped hydro storage variable is a constant.(1) MPC1 Objective Function of the Model

Figure 9 .
Figure 9. Simulation result for the first sub-objective.

Figure 10 .
Figure 10.Simulation result for the second sub-objective.

Figure 12 .Figure 13 .
Figure 12.Simulation result for the third sub-objective after the exchange of w2 and w3.

Figure 14 .
Figure 14.Minute 1920 of the wind power plan and operating states of the fly wheel.(a) Four days wind power and plan; (b) Operating states of the fly wheel.

Figure 15 .
Figure 15.Sensitivity analysis for the capacity of the fly wheel and pa t p of the pumped storage.
fewer times, and the amount of the enhances weight decreased by 6%.

Figure 17 .Figure 18 .
Figure 17.Results of the first objective after increasing the weighting.
, two power signals are shown: the enhanced weight of wd t p (solid, black) and the original weight of wd t p (solid, gray).
Figure 19 shows that when wind < plan, both wd t p values are basically equal to wind, while both wd t p values are very close to plan when wind > plan.Therefore, the third objective is achieved.However, the comparison result shows that the enhanced weight wd t p is slightly less than the original weight wd t p .One possible explanation for this result is that wd t p is sacrificed to reduce the wind curtailment wu t p .

Figure 19 .
Figure 19.Simulation results for the third objective after increasing the weight.

wi
The weight factor of the No. i sub-objective Ep energy of the pumped hydro storage(used in Figure) [MWh] pa pumped power of the pumped hydro storage(used in Figure) [MW] Ef energy of the fly wheel system(used in Figure) [MWh] fa charging power of the fly wheel storage(used in Figure) [MW] wd generated wind power sent to the grid(used in Figure) [MW] wu wind curtailment(used in Figure) [MW]

Table 1 .
Characteristics of typical energy storage types.
MPC State-Space and Optimization Model 4.2.1.Single-Level MPC State-Space ModelThe following simple linear dynamic equations based on the single-level system configuration are considered: ), respectively.(4) The upper and lower bounds of pumped storage decision variable are:

Table 2 .
Parameters for different cases of two-level model predictive control (MPC1).

Table 4
indicates that the wind power is greater than the grid plan ( wind

Table 4 .
Analysis on the cause of the wind curtailment.
Simulation result for the third sub-objective.

Table 5
shows the MPC decision result for the enhanced weight.Note that for this test, minute 435 is the current time, and minutes 440-455 are future times.Comparing Table5with Table4, we find that only the amounts of fa t E change.From Table