## 5 Optimisation of a Wind Farm--Kinetic Energy Storage System  
### Purpose of Optimisation, Function and Constraints  
The purpose of the optimisation task solved in the paper is to identify the structure of a wind farm--kinetic energy storage system, which for the set rated power of the farm \(P_{\text{WT}\text{t}}\) and its geographical location minimises the capacity of \(A_{\text{{FESS}}}\) storage limiting the annual time of supplies of power values to the power grid below \(P_{\text{3 min}}\) (considering only the periods which last up to \(T_{\text{max}}\)) to \(T_{\text{sum}\text{Tmax}}\). The vector of decisive variables \(x\) includes: wind turbine type \(N_{\text{WT}}\) (x\({}_{1}\)), turbine height \(h_{\text{WT}}\) (x\({}_{2}\)), number of turbines \(n_{\text{WT}}\) (x\({}_{3}\)), type of kinetic storage \(N_{\text{{FESS}}}\) (x\({}_{4}\)), and the number of connected energy storage modules \(n_{\text{{FESS}}}\) (x\({}_{5}\)). The minimisation task defined in this way takes the following form:  
\[\dot{A}_{\text{{FESS}}}=\text{min}\{A_{\text{{FESS}}}(x)\}=f(N_{\text{WT}},\ n_{\text{WT}},\ h_{\text{WT}},\ N_{\text{{FESS}}},\ n_{\text{{FESS}}},\ w) \tag{11}\]  
where: \(\dot{A}_{\text{{FESS}}}\) is the minimum capacity value meeting the requirements for the set operating conditions of the system, as \(w\) is the collection of algorithm parameters of energy flow between the farm, storage, and power grid. The type of turbine used (variable x\({}_{1}\)) determines its power curve and at the same time the power generated in the moments specified by available wind speed samples. In the case of turbine, several variants are available differing in the installation height of the rotor (variable x\({}_{2}\)), which, according to  
Figure 5: The diagram presenting the difference between T\({}_{\text{max}}\), T\({}_{\text{sum}\text{Tmax}}\) and T\({}_{\text{sum}\text{Tmax}}\)(0): **(a)** FESS’s state of charge; **(b)** process of output power changes P\({}_{3}\) with marked periods shorter than T\({}_{\text{max}}\), in which the system does not provide minimum power P\({}_{\text{3 min}}\); **(c)** process of changes in output power P\({}_{\text{3}}\) with marked periods shorter than T\({}_{\text{max}}\), in which the system does not provide minimum power P\({}_{\text{3 min}}\). Equation (2) to the vertical profile of wind speed variations, also affects the level of power generated by the turbine. The number of turbines specified by the variable \(x_{3}\) allows obtaining the nominal power of the \(P_{W\!F\!n}\) farm assumed in the algorithm. With the assumed minimum power \(P_{3 min}\) (definition in Section 2.1), the number and duration of periods of power generation by the farm below the level \(P_{3 min}\) depend on the variables \(x_{1}\), \(x_{2}\) and \(x_{3}\) in Figure 5. Individual modules of kinetic magazines are characterized by different energy capacities, but the most important from the point of view of the analysed problem are the values of their maximum charging and discharging power (these parameters are determined by the variable \(x_{4}\)). The last of these parameters in various ways adapt the properties of the energy storage in the field of exchange the energy, to the real dynamics of wind speed changes at a specific farm location (the course of changes in wind speed). The last variable \(x_{5}\) affects the total capacity and power of the used kinetic energy storage system. Equation (11) can be solved only when considering the collection of constraints, i.e., the relationships (equality and/or inequality) which identify the size of the acceptable solution area \(X\). Structural constraints in the analysed task (related directly to the vector of decisive variables) expressed in a standardised form include:  
* True power of the farm \(P_{W\!F\!r}(\textbf{x})\): \[1-\frac{P_{W\!F\!r}(x)}{0.9P_{W\!F\!n}}\leq 0\cap\frac{P_{W\!F\!r}(x)}{1.1P_{W \!F\!n}}-1\leq 0\] (12)
* Size of turbine database (number of designs and turbine heights) and kinetic storage units (number of energy storage types).