To better track the planned output (forecast output), energy storage systems (ESS) are used by wind farms to compensate the forecast error of wind power and reduce the uncertainty of wind power output. When the error compensation degree is the same, the compensation interval is not unique, different compensation intervals need different ESS sizing. This paper focused on finding the optimal compensation interval not only satisfied the error compensation degree but also obtained the max profit of the wind farm. First, a mathematical model was proposed as well as a corresponding optimization method aiming at maximizing the profit of the wind farm. Second, the effect of the influencing factors (compensation degree, electricity price, ESS cost, and wind penalty cost) on the optimal result was fully analyzed and deeply discussed. Through the analysis, the complex relationship between the factors and the optimal results was found. Finally, the comparison between the proposed and traditional method was given, and the simulation results showed that the proposed method can provide a powerful decision-making basis for ESS planning in current and future market.Energies 2019, 12, 4755 2 of 21 fluctuation of wind power output [3,4], dealing with the peak shaving problem of power systems with wind power [5,6], and compensating the forecast error of wind power output, and so on.The forecast error of wind power is inevitable because of the characteristics of wind power generation. The ESS is installed at the outlet of the wind farm to compensate the forecast error of wind power and ensure that the wind farm can output the power reliably according to the pre-declared plan. In real-time dispatching, the ESS can store or release energy to balance the corresponding power error when the real-time power value of a wind farm is different from the planned output. In terms of compensating wind power forecast error, there are many references discussing this top from different aspects [7,8].The authors of [9] optimized the capacity of energy storage devices by controlling the wind power forecast error within a certain range to minimize the cost of energy storage equipment. In [10] the authors optimized the capacity of energy storage devices with the objective of minimizing wind power prediction errors. By quantifying the functional relationship between energy storage capacity and unserved energy, the minimum energy storage capacity corresponding to different unserved energy is analyzed. The authors of [11] synthetically considered the energy efficiency, environmental benefit and one investment of wind power and ESS, constructed the corresponding economic evaluation model, and evaluated the feasibility of using ESS to improve the wind power acceptance scale in different dispatching risk scenarios. The authors of [12] reduced the impacts of wind power forecast errors while prolonging the lifetime of ESS. In [13] the authors used a simple autoregressive model to capture the stochastic behavior of day-ahead forecast errors, in particular the au...