## 4 System Model
### Single-Level MPC State-Space and Optimization Model
#### 4.2.2 Single-Level MPC Programming Model  
1. 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 \({p_{i}}^{\text{wd}}\) (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:  
\[\min\sum_{t=0}^{N}\left(w_{i}\left|{p_{t}}^{\text{sp}}-{p_{t}}^{\text{plan}} \right|+w_{i}{p_{t}}^{\text{wu}}-w_{i}{p_{t}}^{\text{wd}}\right) \tag{10}\]  
where \(N\left(N=23\right)\) is the prediction horizon of the MPC and \({w_{1}}\), \({w_{2}}\), and \({w_{3}}\) are positive weight factors of the sub-objectives. The choice of the weight factor is mainly based on on-site demand. \({w_{1}}\), \({w_{2}}\), and \({w_{3}}\) can be replaced by \({w_{1}}(t)\), \({w_{2}}(t)\), and \({w_{3}}(t)\), showing that the weight factors are related to time. We will examine the differences caused by the differences between \({w_{i}}(t)\) and \({w_{1}}\) in the simulation results. 2. 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), respectively. 4. The upper and lower bounds of pumped storage decision variable are: \[ \begin{array}{ll}{p_{t}}^{\text{pp}}\leq{p_{t}}^{\text{pp}}\leq{p_{t}}^{ \text{pp}}&\quad t\in[0,23]\\ {p_{t}}^{\text{pa}}\leq{p_{t}}^{\text{pa}}\leq{p_{t}}^{\text{pa}}&\quad t\in[ 0,23]\\ {E_{t}}^{\text{ps}}\leq{E_{t}}^{\text{ps}}\leq{E_{t}}^{\text{ps}}\leq{E_{t}}^ {\text{ps}}&\quad t\in[0,23]\end{array} \] (11)  
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 time series axis, and we use \(t_{s}\) to represent the time series. The definition of \(t_{s}\) is different from that of \(t\). \(t_{s}=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, \(t_{s}=3\), whereas we regard the first scheduling interval for rolling optimization as \(t=0\). The function of \(t_{s}\) is to determine the cases the MPC condition corresponds to (see Equation (1)). In case 0, \(t=0,6,12,18\) represent four initial points of a half-hour period, and at the initial point of the half- hour period, the pumped hydro storage can change its operating state. \(p_{t}^{\text{px}}=p_{t+1}^{\text{px}}=p_{t+2}^{\text{px}}=p_{t+3}^{\text{px}}= p_{t+4}^{\text{px}}=p_{t+5}^{\text{px}}\) indicates that pumped hydro storage must remain in the same operating state for 30 min (six scheduling intervals), and the optimal operating state is determined by rolling optimization. The Case 1 constraint can be obtained from Figure 5, Case 1. \[ \begin{split}\text{Case}1&:p_{t}^{\text{px}}=p_{t+1} ^{\text{px}}=p_{t+2}^{\text{px}}=p_{t+3}^{\text{px}}=p_{t+4}^{\text{px}}=p_{t_ {-initial}}^{\text{px}}\ (t=0)\\ p_{t+5}^{\text{px}}=p_{t+6}^{\text{px}}=p_{t+7}^{\text{px}}=p_{t+8}^{ \text{px}}=p_{t+9}^{\text{px}}=p_{t+10}^{\text{px}}\ (t=0,6,12)\end{split}  \tag{17}\]  
where \(p_{t_{-}initial}^{\text{px}}\) is the pumped hydro storage operating state at the beginning of the half-hour period.