#### 5.1. 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_{WTn} and its geographical location minimises the capacity of

A_{FESS} storage limiting the annual time of supplies of power values to the power grid below

P_{3min} (considering only the periods which last up to

T_{max}) to

T_{sumTmaxY}. The vector of decisive variables

x includes: wind turbine type

N_{WT} (x

_{1}), turbine height

h_{WT} (x

_{2}), number of turbines

n_{WT} (x

_{3}), type of kinetic storage

N_{FESS} (x

_{4}), and the number of connected energy storage modules

n_{FESS} (x

_{5}). The minimisation task defined in this way takes the following form:

where:

${\dot{A}}_{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 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_{WFn} farm assumed in the algorithm. With the assumed minimum power

P_{3min} (definition in

Section 2.1), the number and duration of periods of power generation by the farm below the level

P_{3min} 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:

Constraints in the true power of the farm P_{WFr}(**x**) are related to the inclusion in the calculation process of a finite collection of turbine designs whose multiple power values are not always equal to the assumed rated power of the farm P_{WFn}.

Functional constraints (not related to vector **x**) cover the parameters which are a result of a numerical analysis of the system operation (output power P_{3}) and are related to characteristic indicators of the control algorithm of the energy flow between the farm, storage, and power grid. In the analysed task, the functional constraints in a standardised form cover:

time T

_{sumTmax}(

**x**) − Equation (6):

where:

T_{sumTmaxY} is the total annual boundary time of power generation below

P_{3min} assumed in the optimisation task, covering only the periods lasting up to

T_{max};

maximum power of kinetic storage P

_{FESSMax}(

**x**):

Interrelations between the parameters of the selected turbine (power characteristic, height) and a single module of energy storage (rated energy capacity, maximum charging and discharging power) directly affect, for the given location (wind conditions), the

T_{sumTmax} parameter in

Figure 5. Equation (13) of limiting the indicated parameter to the value of

T_{sumTmaxY} therefore requires the use of different storage capacities for various types of turbines and energy storage. Therefore, the parameters determined in Equation (11) determine the value of the energy storage capacity, and the application of the optimization algorithm described in the paper allows the determination of the optimal structure of the wind farm—kinetic energy storage, minimizing the capacity of the storage working in it, while fulfilling all technical requirements for the cooperation of the farm with power system.

#### 5.2. Selection of Optimisation Method, Description of Application Developed

The selection of the optimisation method dedicated to the solution defined in

Section 5.1 of the task requires a detailed analysis of several elements, including in particular: the form of the function of the objective, the number of decisive variables and the size of the acceptable solution area [

25,

34,

35,

36]. Additionally, one should consider the possibilities of including in the optimisation complex numerical calculations used for identifying the value of the function of the objective and constraint control. The experience of the authors in the effective use of the method to solve similar tasks is very important [

37].

The multi-modal nature of the acquired function of Equation (11) requires the use of stochastic methods or heuristics in order to seek its global extreme. Even though only five variables were defined in the reference task, the task remains complex and time-consuming, as a result of the multiple identification of changes in the power value in the analysed system, the integer nature of decisive variables and the hidden occurrence of variables in the criterion function. In relation to the above, a genetic algorithm population method is used to optimise the structure of a wind farm-kinetic energy storage system, which leads to the minimisation of storage capacity

A_{FESS}, according to the system operation algorithm described in

Section 2.1. An important advantage of the method is related to its ability to modify the basic parameters in order to improve its effectiveness when performing detailed tasks. A disadvantage in the case of tasks with highly complex calculations is the reduced reproducibility of the results [

35,

36]. It is also necessary to perform initial tests whose results help to identify the appropriate AG parameters that would improve the reproducibility of the results and reduce calculation time.

The effectiveness of the proposed method in solving tasks of global optimisation in the area of electrical engineering and renewable energy was proven in a number of scientific publications, e.g., [

38,

39] and the authors used it successfully to optimise the structure of complex electrical light systems, the shape and parameters of high-power lines, and to minimise the cost of power generation in hybrid generation systems [

37,

40,

41,

42,

43,

44,

45].

Based on the mathematical model described in

Section 3 and a selected optimisation method in Matlab (Lincence no: 975466, Version 2014b, Poznan University of Technology, Poznan, Poland, 2014) and MS Visual Studio environment, an application was developed intended to optimise the structure of a wind farm—kinetic energy storage system with a view to minimising energy storage capacity. The application uses proprietary structures and classes related to different types of energy storage, wind turbines, PV modules, power electronics systems and indicators of the reliability of power supplies to the power grid mentioned in

Section 4, as well as functions from the Global optimisation toolbox of the Matlab environment to implement the modified genetic algorithm method.

The assessment of the quality of solutions obtained through optimisation required an analysis of power: generated by farm P_{1}, energy storage P_{2}, and supplied to the power grid P_{3} in the analysed system. To that end, measurements of the wind speed in a one-year period and data from wind turbines and PV modules collected in a database developed for the purpose of the application were used.

The Augmented Lagrangian Genetic Algorithm (ALGA) interior penalty function method [

46] was employed to consider the constraints of the optimisation tasks (Equations (12)–(14)). The ALGA method was implemented in the Matlab environment.

#### 5.3. Optimisation Calculations

A search for the structure of a wind farm—kinetic energy storage system which minimises the capacity of energy storage A_{FESS} (Equation (11)) for the assumed output parameters of the system, was carried out for wind farms with two power values: P_{WFn(1)} = 5 MW and P_{WFn(2)} = 10 MW (indices expressed as integers stand for a parameter option). Six time values were taken into account concerning power generation periods with power values below P_{3min}: T_{max}_{(1)} = 5 min, T_{max}_{(2)} = 10 min, T_{max}_{(3)} = 15 min, T_{max}_{(4)} = 20 min, T_{max}_{(5)} = 25 min and T_{max}_{(6)} = 30 min; two minimum power values P_{3min(1)} = 10%P_{WFn}, and P_{3min(2)} = 20%P_{WFn}; and four values of the acceptable total time: T_{sumTmax(1)} = 75 h, T_{sumTmax(2)} = 100 h, T_{sumTmax}_{(3)} = 125 h, and T_{sumTmax}_{(4)} = 150 h.

The calculations were carried out using the developed optimisation algorithm and application described in

Section 5.2 in order to conduct a preliminary study involving changes in the AG parameters to solve the test task. The obtained results helped to draw conclusions relating to the value of the algorithm parameters which contribute to the final solution before the maximum number of iterations, and reduce computing time to ca. 3 h. Finally, a genetic algorithm was applied using the remainder selection method, the Gaussian mutation and elite strategy with a transfer of three best individuals. The number of individuals

N_{p} = 50 and the number of generations

N_{g} = 50 were established experimentally.

Figure 6 presents the changes in the value of the best individual’s (solution) adaptation as a function of the generation number for five activations of the algorithm (

Figure 6b) for a farm with rated power

P_{WFn(2)} = 10 MW, power

P_{3min(2)} = 20%

P_{WFn} = 2 MW,

T_{max}_{(5)} = 25 min, and

T_{sumTmax}_{(1)} = 75 h.

Figure 7 presents the results of optimisation calculations as changes in the minimum capacity of a kinetic storagesystem which meets the required parameters of a system controlling the flow of energy between the farm, storage and power grid as a function of time

T_{max} for two wind farms with power

P_{WFn(1)} = 5 MW (

Figure 7a) and power

P_{WFn(2)} = 10 MW (

Figure 7b). In each case, the calculations were made for two minimum power values

P_{3min(1)} = 10%

P_{WFn} and

P_{3min(2)} = 20%P

_{WFn} and

T_{sumTmax}_{(1)} = 100 h.

An essential issue for the analysed class of systems is to identify the relationship between the minimum capacity of the storage

A_{FESSmin} and the time of eliminated outages

T_{max} depending on the maximum total time

T_{sumTmax}. Optimisation calculations representing the aforementioned task were performed for a farm with power

P_{WFn(2)} = 10 MW, two power values

P_{3min(1)} = 10%

P_{WFn} = 1 MW and

P_{3min(2)} = 20%

P_{WFn} = 2 MW and four times

T_{sumTmax}:

T_{sumTmax}_{(1)} = 75 h,

T_{sumTmax}_{(2)} = 100 h,

T_{sumTmax}_{(3)} = 125 h and

T_{sumTmax}_{(4)} = 150 h. The results (value of the minimum capacity of energy storage

A_{FESS}_{min} meeting the assumed algorithm of the system operation as a function of time

T_{max}) are presented in

Figure 8a (

P_{3min(1)} = 10%

P_{WFn} = 1 MW) and 8b (

P_{3min(2)} = 20%

P_{WFn} = 2 MW).

Figure 9 presents the relationship between the minimum capacity of the storage unit

A_{FESS}_{min} and the maximum total time

T_{sumTmax} for two values of time

T_{max}_{(3)} = 15 min and

T_{max}_{(5)} = 25 min.

Details of the optimisation results of the wind farm-kinetic energy storage system for rated power

P_{WFn(2)} = 10 MW and selected parameters

P_{3min},

T_{sumTmax}, and time

T_{max} are presented in

Table 1.

Figure 10 presents the changes in the percentage value of the coefficient of elimination of power generation periods with power values below P

_{3min} for solutions optimum as a function of time

T_{sumTmax} for two power values

P_{3min(1)} = 10%

P_{WFn} and

P_{3min(2)} = 20%P

_{WFn}, and two time values

T_{max}_{(3)} = 15 min (

Figure 9a) and

T_{max}_{(4)} = 20 min (

Figure 9b). The data were developed based on information given in

Table 1.

#### 5.4. Discussion

Following a thorough analysis of the results it was concluded that the applied optimisation methods, the parameters of the control algorithm of the energy flow between a wind farm, energy storage system and the power grid, and the system model were correct for the characteristics of the analysed task. Its solution had high reproducibility in minimising the capacity of the kinetic storage

A_{FESSmin} (

Figure 6a) and fast computation times (

Figure 6b). In the analysed examples, the tasks were solved between the 30th and 40th generations.

Based on the completed studies, it was established that the relationship between the minimum capacity of the energy storage system

A_{FESSmin} meeting the required criteria of a wind farm—kinetic energy storage system and time T

_{max} was non-linear (

Figure 7 and

Figure 8). It was demonstrated that the dependence points

A_{FESSmin} =

f(

T_{max}) could be approximated by polynomial functions of order 3. The values of the determination coefficients identified for the functions amount to over 0.97, confirming the good fit of a polynomial model for the calculation points. A non-linear character was also observed for changes in the capacity

A_{FESSmin} as a function of the optimisation time constraint

T_{sumTmax} −

A_{FESSmin} =

f (

T_{sumTmax}) (

Figure 9).

The application of higher constraints (lower values of

T_{sumTmax}) amounting to 150, 125, 100, and 75 h/year contributed to an increase in the required capacity of energy storage

A_{FESSmin}. The increase was diversified for different values of time

T_{max} and power

P_{3min}, but between subsequent values of

T_{sumTmax} it usually ranged from 1.5 to 3.0 times (

Figure 8). In the case of optimising calculations made for time

T_{max} = 30 minutes and the strongest constraint

T_{sumTmax} = 75 h, the task was not solved (

Figure 8) for neitherpower

P_{3min} = 10%

P_{WFn} nor for

P_{3min} = 20%

P_{WFn}. Tests were repeated many times and an additional detailed analysis of the system operation with optimised parameters (type and number of turbines) was performed with a simultaneous increase in the power storage capacity. It was demonstrated that

T_{sumTmax} could not be limited at the level of 75 h/year by further increasing storage capacity. This was caused by the characteristics of the annual changes in wind speed for the reference geographical location (especially for the mean annual wind speed, which amounts to 4.1 m/s at an altitude of 1 m AGL, and to 6.2 m/s at 100 m AGL), and the nominal parameters of the analysed turbines and energy storages systems.

Depending on the geographical location of the farm and the parameters of the turbines and storage systems, it is possible that no solutions can occur for different values of time T_{max}. Therefore, it is important to identify the maximum value of time for the assumed wind farm power P_{WFn}, location and basic parameters of the system for which elimination of power generation periods with power values below P_{3min} is possible on the T_{sumTmax} level. Still, the developed algorithm and application require significant modifications, alongside additional studies. The authors plan to address this in future works on the cooperation between wind farms and kinetic energy storages.

The level of the guaranteed output power

P_{3min} (

Figure 7 and

Figure 8) in periods lasting up to

T_{max} greatly affects the minimum energy storage capacity

A_{FESSmin}. Before establishing the parameter value, one should analyse the actual wind farm operating conditions, especially its mean working power. Increasing the power

P_{3min} above the value results in a significant increment in the required energy storage capacity and may mean that the storage unit cannot be fully charged. Consequently, the system is not able to eliminate all assumed energy deficits lasting up to

T_{max} and does not meet a certain group of constraints

T_{sumTmax} (e.g.,

Table 1—results for

T_{max} = 30 min and constraints

T_{sumTmax} = 75 h). A lack of solutions for the cases analysed in

Table 1 applies to a farm with low mean annual power of ca. 1 MW. In cases where solutions were found, the optimum mean annual power values of the wind farms ranged from about 1.5 MW to 3 MW.

The optimisation of the kinetic energy storage capacity helps to achieve high percentage values of the coefficient of elimination of power generating periods when the power value is below

P_{3min} (Δ

T_{sumTmax}_{%} − Equation (9)) which amount to 40–80% (mean 53%) of the analysed cases depending on the value of time T

_{max} and constraint value

T_{sumTmax} (

Figure 10). The value of the indicator Δ

T_{sumTmax}_{%} increased as the system operation constraints become more stringent (shorter times

T_{sumTmax}), entailing a significant increase in the required storage capacity. When the value of the constraint time is reduced twice (from

T_{sumTmax} = 150 h to

T_{sumTmax} = 75 h), the optimised values of the energy storage capacity were 5 to 14 times higher, depending on time

T_{max}.

Values of power not supplied to the power grid Δ

A (Equation (10)) in the system operation periods with power below

P_{3min} and time up to

T_{max}, analysed in a one-year period (

Table 1), were established for the optimised structures of a farm with a kinetic energy storage system. The power value increased as time

T_{max} and constraint time

T_{sumTmax} increase. In the case of the analysed farm with power

P_{WFn} = 10 MW, the values were low (

Table 1) compared to the total energy generated in a one-year period and they did not exceed 0.5%.

It should be emphasised that it was possible to achieve the presented results of a wind farm—kinetic energy storage system optimisation due to a short (ca. 47 s) period of wind speed averaging. For a typical value of 10 min, it was not possible to precisely simulate the system cooperation with the power grid due to an approximated analysis of the energy storage operation. In such cases, the results for the minimum energy storage capacity A_{FESSmin} suffered from a much higher error. Based on the authors’ experience in the modelling of energy storage using RES, they suggest that the averaging period of wind speed measurements and other parameters related to power generation in RES—irradiation in particular—should be shorter than the period used currently and should amount to one or a few seconds.