## 1 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. [PERSON] _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.