# Simulation and Optimisation of Utility-Scale PV-Wind Systems with Pumped Hydro Storage
## 2 Modelling Approach
### Optimisation  
The software simulates different combinations of possible components in time steps of 15 min during the system lifetime _Life_\({}_{\mathrm{S}}\) (usually 20-25 years, defined by the user): the PV generator (including its own inverter), wind turbine group (size and number of wind turbines), pump-turbine reversible unit, and water reservoir size. Further, it considers four set points for control, as detailed in Section 2 and Table 1.  
Considering a system lifetime of 25 years, the number of time steps simulated for each combination is 876,000 (25 \(\times\) 365 \(\times\) 24 \(\times\) 4). Considering the nonlinear characteristics of many components (PV inverter efficiency, wind turbine output curve, pump-turbine efficiency, penstock losses, etc. ), optimisation cannot be performed by the classical methods or MILP. In this study, GA metaheuristic techniques were used for the optimisation. Two GAs were considered in the optimisation: a main algorithm to determine the optimal configuration of the components, and a secondary GA to determine the optimal control. Five variables are optimised with the main GA.  
\[\big{|}PV_{type},\;WT_{type},N_{WT},\;P/HT_{type},Duration\big{|}, \tag{29}\]  
where \(PV_{type}\), \(WT_{type}\), \(N_{WT}\), \(P/HT_{type}\), and \(Duration\) represent the code for the PV generator type (including its own inverter), code for the wind turbine type, number of wind turbines in parallel, code for the pump-turbine reversible machine type, and water storage duration defined in Equation (28), respectively. In each case, the penstock diameter was calculated to obtain the specific water speed for the nominal flow of the pump/turbine. For each combination, the maximum reservoir volume is calculated as follows: \(V_{UR\_max}\) is obtained from the \(Duration\) (Equation (28)), and the \(V_{LR\_max}\) is proportional to the upper reservoir by a factor (\(f_{LR\_/UR}\)) that depends on the design conditions. \[V_{LR\_max}=f_{LR\_/UR}V_{UR\_max}. \tag{30}\]  
The secondary GA optimises the control strategy, which is composed of four setpoint variables (explained in Section 2). \[\big{|}Pr_{E\_Eurch\_load\_step},P_{\%},Pr_{E\_Eurch/sell\_Low\_step},\;Pr_{ E\_Eurch/sell\_High\_step}\big{|}. \tag{31}\]  
For each combination of the main GA, the secondary GA is run to obtain its optimal control, simulation, and evaluation of a number of combinations of the four set-point variables. In the LSS, the objective of the optimisation is to find a combination of components and a control strategy to minimise the NPC (calculation of NPC is detailed in Section 2.3). \[\mathrm{min}\;(NPC)\;. \tag{32}\]  
Under the constraint that the unmet load \(UL\) (%) must be lower than the maximum unmet load allowed (\(UL_{\mathrm{max}}\)),  
\[UL<UL_{\mathrm{max}}. \tag{33}\]In the PSS systems, the objective of optimisation is to find a combination of components and a control strategy to maximise the NPV. \[\max\left(NPV\right)\,, \tag{34}\]  
where NPV is the opposite of the NPC. The main GA begins with the random generation of the population (\(N_{main}\) individuals) of the first generation. For each individual of the main GA, the secondary GA runs to obtain its optimal control, the first generation (random generation of the population of the first generation composed of \(N_{sec}\) individuals); then, it calculates NPC or NPV and fitness; selection, crossing, and mutation are performed to obtain a new generation, which is repeated until the maximum number of generations of the secondary GA is evaluated to obtain the best control. Each individual of the main GA (with its optimal control obtained by the secondary GA) is evaluated (its NPC or NPV is known, and its fitness is calculated), and then selection, crossing, and mutation are used to obtain a new generation of the main GA. The process is repeated until the maximum number of generations of the main GA has been evaluated, and the optimal combination (components and control) is the one with minimum NPC or maximum NPV.