Neural Network-Based Control for Hybrid PV and Ternary Pumped-Storage Hydro Plants

: The growth in renewable energy integration over the past few years, primarily fueled by the drop in capital cost, has revealed the requirement for more sustainable methods of integration. This paper presents a collocated hybrid plant consisting of solar photovoltaic (PV) and Ternary pumped-storage hydro (TPSH) and designs controls that integrate the PV plant such that the behavior and the controllability of the hybrid plant are similar to those of a conventional plant within operational constraints. The PV array control and hybrid plant control implement a neural–network-based framework to coordinate the response, de-loading, and curtailment of multiple arrays with the response of the TPSH. With the help of the designed controls, a symbiotic relationship is developed between the two energy resources, where the PV compensates for the TPSH nonlinearities and provides required speed of response, while the TPSH ﬁrms the PV system and allows the PV to be integrated using its existing infrastructure. Simulations demonstrate that the designed controls enable the PV system to track references, while the TPSH’s ﬁrming and shifting transforms the PV system into a base load plant for most of the day and extends its hours of operation.


Problem Statement
With the increasing addition of renewables, the requirements for flexibility in power networks have increased. During periods of high renewable penetration, flexible resources, such as fossil-fueled plants, are not available. This reduces system inertia and reserves due to which system flexibility and resilience are compromised. Furthermore, the frequency of high-impact events such as storms, forest fires, and cyberattacks has increased in recent years [1]. To cope with these disturbances, flexible resources are required. Although battery energy storage is a solution, the scale of battery storage required for utility-scale PV or wind projects presents a technoeconomic barrier [2].

Proposed Solution
To remedy the issue of higher flexibility requirements of modern and future power networks, more sustainable methods of renewable integration are required. This paper proposes a hybrid PV and ternary PSH (TPSH) combination and designs controls for the same to ensure that the PV system and the TPSH system work in a coordinated manner to cater to the network requirements and to suppress internal disturbances. The proposed system controls can be decomposed into three parts: (a) hybrid plant control, (b) PV plant control, and (c) TPSH plant control. These are detailed in this paper.
Resilience is enhanced by fast responses of the PV converter systems and flexibility of the pump mode with hydraulic short-circuit (HSC) of the TPSH. Reliability is provided through the firming capability of TPSH in pump mode using the HSC. Using the HSC, the TPSH firms the irradiance-based PV disturbances within operational constraints. through the firming capability of TPSH in pump mode using the HSC. Using the HSC, the TPSH firms the irradiance-based PV disturbances within operational constraints.
When used in a collocated manner with the PV plant, the TPSH aids in firming and shifting PV generation. To firm PV generation is to make constant the power generated from the PV plant by absorbing the excess and supplying the deficit. Shifting PV generation is to absorb the excess and supply the absorbed during peak hours. The key strategy is to utilize the HSC of the TPSH to firm the PV system during the entire day while also storing energy. This stored energy is then used during the peak hours of the day using generation mode of TPSH. This provides an option for avoiding curtailment. Since both PV and TPSH are collocated, the transmission losses while pumping are negligible. The controls for the PV plant enable it to compensate for the nonlinearities of the hydro plant and enhance its response.

Motivation and Literature Review
The modern power system is a hybrid energy system and has the capability to manage multiple energy sources. Thus, the concept of hybridization is not new; however, a collocated PV and TPSH plant is proposed for the first time. No single energy source is optimal for all situations. Hybridization and coordinated control are required to utilize the benefits of each source while overcoming their shortcomings [3]. The designed controls facilitate this using the fast response of PV inverters and the storage capacity of PSH. A TPSH is considered to leverage the pump mode power consumption flexibility of the TPSH to firm the PV system.
To enhance the flexibility of the pumped hydro plant, many configurations have been proposed and implemented, such as the adjustable-speed PSH [4,5] and the TPSH [6,7]. A TPSH is composed of a synchronous machine, turbine, and pump on the same shaft as shown in Figure 1. The pump and turbine are separated with a clutch. Key advantages of the TPSH include (a) rapid mode change without the loss of synchronism, (b) pump mode power consumption flexibility using HSC, and (c) smooth start capability in pump mode [6,7]. In the turbine mode and pure pump mode, its working principles are like hydro turbines and pumps, respectively. When the HSC (or the shared penstock connecting the pump and turbine) is activated in pump mode, a part of (or all of) the water pumped is transferred to the turbine. This in turn causes the turbine to produce torque that is supplied to the shaft. This mechanical torque from the turbine will reduce the current drawn from the grid while still rotating at the synchronous speed. The remaining water is pumped up to the upper reservoir. Another perspective is that, when rotating at the rated speed, the pump still generates the rated head, but the amount of water transferred to the upper reservoir or true work done decreases.  To magnify the benefits of the proposed PV + TPSH hybrid, it can be compared with the quaternary PSH (QPSH) [8]. In QPSH, the pump and turbine have separate shafts and electrical machines, although the HSC still exists. The proposed hybrid provides a better alternative to the QPSH due to several reasons. Firstly, in QPSH, although the converterbased pump adds flexibility, it does not add generation capacity to the existing PSH system. The proposed PV + TPSH system has added generation capacity and added flexibility through the PV system. In fact, the QPSH reduces generation capacity if a retrofitting case is considered, as the space for one unit will have to be spared for the variable speed pump. Secondly, in generation mode the QPSH is similar in performance to any conventional PSH; however, the proposed PV + TPSH takes advantage of the PV inverters to provide rapid response to system disturbances in generation and pump modes. Lastly, the QPSH is a significant investment burden as not only do the pump and turbine have separate shafts but the converter also adds to the cost of the system without adding generation capacity.
The proposed PV + TPSH takes advantage of the existing infrastructure which is unused for PSH plants during the day. In addition, a report from the World bank [9] highlighted that floating PV systems can have several advantages as follows: • Reduced capital cost with utilization of existing transmission infrastructure at hydropower sites, • Proximity to demand centers in case of water supply reservoirs or lakes, • Improved energy yield from the cooling effect of water, reduced shading effects, and decreased presence of dust, • Elimination of the need for large-scale site preparation, • Additional capacity for hydro plants which increases revenue and simultaneously allows water use for irrigation or other purposes.
The most relevant dynamic modeling and analysis works on a PV + battery + hydro hybrid can be found in Wang and Xu [10], where, to test the stability of the PV hydro system, a dynamic model of a real system was created and simulated with disturbances. The purpose of the collocated PV + battery plant was to supplement the hydrogeneration during the dry season.
The Longyangxia Hydropower plant in Qinghai, China is an example of such a plant with a hybrid hydropower/PV system [11]. On a typical day, the output from the hydro facility is reduced, especially from 11:00 a.m. to 4:00 p.m., while PV generation is high. The saved energy is then requested by the operator for use during early morning and late-night hours. Although the daily generation pattern of the hydropower has changed, the daily reservoir water balance could be maintained at the same level as before to meet the water requirements of other downstream reservoirs.
Gevorgian and O'Neill [12] concluded that, with the fast and precise action of the PV inverters, multiple services such as fast frequency response and power oscillation damping can be provided to the grid, and that the technology required is already available. However, the accurate estimation of available peak power is important for all services, and the extent of these services will depend upon the maximum amount of available PV. When PV penetration is low, there will be other plants in the system that will provide ancillary services; however, when PV penetration increases, it becomes essential that utility-scale PV plants provide these services. The estimation of maximum power available and the DC operating voltage required for a particular power output is of utmost importance.
Hoke, Muljadi, and Maksimovic [13] proposed a second-order polynomial model to estimate the maximum power of a PV module from measured irradiance and temperature, where the coefficients of the model were derived through a linear regression of the PV MPP in different insolation and temperature conditions. Although the model seems accurate when the insolation and temperature is steady, during transient states, the model becomes highly inaccurate. Following the same trend, Hoke et al. [14] stored the P-V curves of the array as a look up table where interpolation is performed with a spline, which requires a considerable amount of memory that introduces error. Pappu, Chowdhury, and Bhatt [15] and Watson and Kimball [16] used pseudo-MPP by controlling the operating voltage to a  [17] used the curtailed PV power to realize the primary frequency control using the fixed-droop characteristics.
This paper is organized as follows: Section 2 describes the modeling and control effort for the PV and TPSH systems while also describing the plant controls. Section 3 describes the simulation results of the control algorithms.

The Hybrid Plant
A PV plant rated 100 MVA with four PV arrays of 25 MVA each was constructed in Simulink. Each 25 MVA array was assumed to have a lumped DC/DC converter and a lumped DC/AC inverter. A 100 MVA TPSH dynamic model was constructed in Simulink. The TPSH and PV plant were coupled together to the grid using a 110 MVA step-up transformer, as shown in Figure 2.
accurate when the insolation and temperature is steady, during transient states, the model becomes highly inaccurate. Following the same trend, Hoke et al. [14] stored the P-V curves of the array as a look up table where interpolation is performed with a spline, which requires a considerable amount of memory that introduces error. Pappu, Chowdhury, and Bhatt [15] and Watson and Kimball [16] used pseudo-MPP by controlling the operating voltage to a value greater than the MPP voltage. Here, the operating point is searched by the Perturb and Observe (P&O) algorithm over the power-voltage (P-V) characteristics, implemented through the DC/DC converter. Neely et al. in [17] used the curtailed PV power to realize the primary frequency control using the fixed-droop characteristics.
This paper is organized as follows: Section 2 describes the modeling and control effort for the PV and TPSH systems while also describing the plant controls. Section 3 describes the simulation results of the control algorithms.

The Hybrid Plant
A PV plant rated 100 MVA with four PV arrays of 25 MVA each was constructed in Simulink. Each 25 MVA array was assumed to have a lumped DC/DC converter and a lumped DC/AC inverter. A 100 MVA TPSH dynamic model was constructed in Simulink. The TPSH and PV plant were coupled together to the grid using a 110 MVA step-up transformer, as shown in Figure 2.

Hybrid Pant Control
The plant control, as shown in Figure 3, performs the secondary control which involves set-point distribution among the resources of the hybrid plant.

Hybrid Pant Control
The plant control, as shown in Figure 3, performs the secondary control which involves set-point distribution among the resources of the hybrid plant.
where P re f _TPSH , P re f _TPSH * , Plant re f , and P sch stand for the real power reference for TPSH, constrained real power reference for TPSH, reference to the entire plant, and scheduled power for the TPSH; PG TPSH , PG TPSH , PP TPSH , and PP TPSH stand for the minimum and maximum possible generation from TPSH, and minimum and maximum possible pump power consumption of TPSH. where, , , , and refer to the minimum and maximum limits of terminal voltage and frequency , respectively. • Since NN_P is used by the array control (described in the next section) and by the plant control, any steady-state error in PV output estimation through the ∑P_PV channel is compensated for by the TPSH. This ensures accurate tracking of plant references.  The plant control estimates the PV generation using NN_P and the array's curtailment gain Kc n , where NN_P is a neural network emulating the maximum output power of each array (as the output of the NN_P) given the solar irradiance, G, and temperature, T, as inputs. As shown in Figure 3, the plant control utilizes the PV plant reserve and control capability for (a) compensating for sudden changes in insolation through ∆P PV_comp , (b) compensating for hydro plant nonlinear behavior through ∆P PSH_comp and, (c) curtailing the PV plant through ∆P curt . The TPSH is used mainly for (a) firming slow disturbances in PV output, and (b) generation shifting. Both PV and TPSH system participate in voltage control. Some of the design features of the plant control are as follows: • Each i-th array, producing P_PV i , is assumed to be curtailed to 10% of its MPP or Kc n is taken as 0.9 for all N arrays. The 10% curtailment assumption was inspired by [18] which stated that this curtailment is economically compensated for by using the reserve so provided in ancillary services.

•
The plant control implements a reference model-based control where a first-order reference model is used to describe the desired behavior of the hydro plant. The PV plant compensates for the difference between desired and actual plant behavior using the ∆P PSH_comp channel through P c . More details on model reference adaptive control can be found in [5,19].

•
The above feature can also lead to the PV plant compensating for the inertia response and primary frequency response of the hydro plant. The logic flags, mode flag ρ m and reset flag ρ r , are used to stop compensating for these TPSH plant behaviors in the case of a network disturbance. The flags then reset the model and initialize it to post-disturbance conditions.
where, V min , V max , f min , and f max refer to the minimum and maximum limits of terminal voltage V and frequency f , respectively. • Since NN_P is used by the array control (described in the next section) and by the plant control, any steady-state error in PV output estimation through the ∑P_PV channel is compensated for by the TPSH. This ensures accurate tracking of plant references.

•
Curtailing the PV plant is achieved through ∆P curt . where del_PV stands for deviation of total generation of the hybrid plant from the plant's reference.

•
The PV plant compensates for the difference between desired and actual plant behavior using the ∆P PSH_comp channel through P c .
To enable the implementation of the described control, Equations (1)-(4) were used in the software defined controller, as shown in Figure 3.

PV Plant Model and Control
The dynamic model of a solar module can be formulated as a current source with series and shunt resistance to mimic the internal voltage drop and heating due to leakage current. The dynamic model is popularly described as shown in Figure 4. The dynamic model of solar module consists of the photo current or the light-generated current I ph , the dark current or reverse saturation current I d , and the leakage current I sh .
Energies 2021, 14, x FOR PEER REVIEW To form the array, the generated current and voltage are multiplied by the n of modules in a string or in series and the number of such parallel strings, respec The three subsections below describe the control and implementation of array a verter control. The parameter values of the above equations can be found in Ta (Appendix C).

Array Control through DC/DC Boost Converter
The array controller, as displayed in Figure 5, provides primary frequency s through fixed droop and virtual inertia control. It also tracks the required set-point array and implements the commands from plant control. It accomplishes these ta controlling the DC/DC boost controller to which the array is connected, as can b later in Figure 6. The current of a solar module, as a function of voltage, is given as follows [13,20]: where I sc and I o are the short-circuit and the diode reverse saturation currents, respectively, V t is the thermal voltage, R sh is the parallel resistances, and V D is the diode voltage of the cell. K i is the temperature coefficient of cell's short-circuit current, T is the cell's absolute temperature, T n is the reference temperature, and G and G n are the solar radiation at actual and nominal level, respectively. The diode reverse saturation current, I o , used in Equation (6) is given by An alternative and more accurate formulation of Equation (7a) can be given as follows [20]: where V oc is the cell's open circuit voltage, E g is the band gap energy of the semiconductor used in the cell, and V t is the thermal voltage, given by where q is the electric charge (1.6 × 10 −19 C), a is the cell idealizing factor (1.1), and k is the Boltzmann constant (1.38 × 10 −23 J/K). The diode voltage V D can be expressed as To form the array, the generated current and voltage are multiplied by the number of modules in a string or in series and the number of such parallel strings, respectively. The three subsections below describe the control and implementation of array and inverter control. The parameter values of the above equations can be found in Table A4 (Appendix C).

Array Control through DC/DC Boost Converter
The array controller, as displayed in Figure 5, provides primary frequency support through fixed droop and virtual inertia control. It also tracks the required set-point for the array and implements the commands from plant control. It accomplishes these tasks by controlling the DC/DC boost controller to which the array is connected, as can be seen later in Figure 6. To form the array, the generated current and voltage are multiplied by the number of modules in a string or in series and the number of such parallel strings, respectively. The three subsections below describe the control and implementation of array and inverter control. The parameter values of the above equations can be found in Table A4 (Appendix C).

Array Control through DC/DC Boost Converter
The array controller, as displayed in Figure 5, provides primary frequency support through fixed droop and virtual inertia control. It also tracks the required set-point for the array and implements the commands from plant control. It accomplishes these tasks by controlling the DC/DC boost controller to which the array is connected, as can be seen later in Figure 6. The signal ΔP_PV, from plant control, as shown in Figure 3, is shared among the arrays by the ratio of reserve power from each array to the total amount of reserve of the entire plant. Certain arrays of the plant may be completely or partially shaded and, hence, their temperatures will also be different, as will their power output and reserve levels. Thus, the set-point from plant control is divided among the arrays in proportion to their reserves such that the array with largest amount of reserves participates more. This generates the signal ΔPsec, as shown in Figure 5, using where Rn is the reserve of array n. The array control also consists of the conventional droop control to produce ΔPprim. The inertia control is formulated as the rate of change of frequency (ROCOF)-based controller, as given below, to produce ΔPin.
where Hsyn is the synthetic inertia coefficient, and f is system frequency. Adding inertia, droop, and plant control to the desired steady-state curtailed output PPV produces the real operating point P*, where P* is limited by the MPP and 0. This real operating point P*, along with the average irradiance over n-th array Gn and array temperature Tn, is used as input to NN_V, to produce Vdc' as the output of NN_V. This DC voltage is further corrected with the help of an integrator to remove NN error and produce Vdc'', which is tracked by the DC/DC boost converter. For this paper, each array is assumed to be curtailed to 10% below its MPP unless purposely curtailed further. The terminal voltage of the PV array is controlled using DC/DC boost converters, as illustrated in Figure 6. The neural networks used for array control are described in the next subsection.

NN_P and NN_V Training and Implementation for Array Control
First, the MPPs were regressed as a function of irradiance (G) and temperature (T) with NN_P. Three methods of regression were compared for this: (a) curve fit [21], (b)  The signal ∆P_PV, from plant control, as shown in Figure 3, is shared among the arrays by the ratio of reserve power from each array to the total amount of reserve of the entire plant. Certain arrays of the plant may be completely or partially shaded and, hence, their temperatures will also be different, as will their power output and reserve levels. Thus, the set-point from plant control is divided among the arrays in proportion to their reserves such that the array with largest amount of reserves participates more. This generates the signal ∆P sec , as shown in Figure 5, using where R n is the reserve of array n. The array control also consists of the conventional droop control to produce ∆P prim . The inertia control is formulated as the rate of change of frequency (ROCOF)-based controller, as given below, to produce ∆P in .
where H syn is the synthetic inertia coefficient, and f is system frequency. Adding inertia, droop, and plant control to the desired steady-state curtailed output P PV produces the real operating point P*, where P* is limited by the MPP and 0. This real operating point P*, along with the average irradiance over n-th array G n and array temperature T n , is used as input to NN_V, to produce Vdc' as the output of NN_V. This DC voltage is further corrected with the help of an integrator to remove NN error and produce Vdc", which is tracked by the DC/DC boost converter. For this paper, each array is assumed to be curtailed to 10% below its MPP unless purposely curtailed further. The terminal voltage of the PV array is controlled using DC/DC boost converters, as illustrated in Figure 6. The neural networks used for array control are described in the next subsection.

NN_P and NN_V Training and Implementation for Array Control
First, the MPPs were regressed as a function of irradiance (G) and temperature (T) with NN_P. Three methods of regression were compared for this: (a) curve fit [21], (b) feedforward neural network (FFNN) [22], and (c) cascade-forward neural network (CFNN) [23]. As can be seen in Table 1, using the curve fit tool resulted in high MSE, while CFNN resulted in the lowest MSE with 15 neurons; hence, the CFNN was adopted for implementation. This produced NN_P (G, T), as described in Equation (10). Second, the terminal voltage of the module was regressed for any given power output P*, irradiance (G) and temperature (T) with NN_V. Figure 7 highlights the P-V characteristics of a single module, where the right-hand side (RHS) of the MPP was regressed. With different number of hidden neurons, the FFNN and CFNN were examined in terms of their regression accuracy, and results of the comparison are shown in Table 2.
Second, the terminal voltage of the module was regressed for any given power output P*, irradiance (G) and temperature (T) with NN_V. Figure 7 highlights the P-V characteristics of a single module, where the right-hand side (RHS) of the MPP was regressed. With different number of hidden neurons, the FFNN and CFNN were examined in terms of their regression accuracy, and results of the comparison are shown in Table 2.  Learning the right-hand side (instead of left-hand side) of the MPP was done for three reasons: (a) to increase regression accuracy of the NN_V (learning both sides of the P-V characteristics gives two voltages for the same power level that reduces regression accuracy), (b) maneuvering the operating voltage in the second half of the MPP requires reduced controller effort and, hence, increased performance, and (c) the DC/DC converter implemented before the inverter is generally a boost converter and, having a higher input voltage, provides headroom for the boost converter. The output of NN_V (G, T, P*) is the voltage for the desired power output or the voltage setpoint, Vdc'.
Here, two separate networks were used to generate P* and Vdc' to maintain a high level of accuracy. Both networks were trained with the Levenberg-Marquardt algorithm [24,25].
To train NN-V (G, T, P*), 112,477 samples (G, T, and desired power P* as inputs and Vdc' as the output) were extracted from the P-V characteristics. The model was simulated under different operating conditions of G, T, and P* to collect Vdc'. These samples were randomly divided such that 70% were used for training, 20% were used for validation, and 10% were used for testing. To train NN_P (G, T), 1911 samples of MPP were used and were divided as above. The samples consisted of G and T as inputs and maximum power as the output, and they were collected by simulating the model under different conditions of G and T. The error frequency distribution results of the NNs from testing are displayed in Appendix D.  Learning the right-hand side (instead of left-hand side) of the MPP was done for three reasons: (a) to increase regression accuracy of the NN_V (learning both sides of the P-V characteristics gives two voltages for the same power level that reduces regression accuracy), (b) maneuvering the operating voltage in the second half of the MPP requires reduced controller effort and, hence, increased performance, and (c) the DC/DC converter implemented before the inverter is generally a boost converter and, having a higher input voltage, provides headroom for the boost converter. The output of NN_V (G, T, P*) is the voltage for the desired power output or the voltage setpoint, Vdc'.
Here, two separate networks were used to generate P* and V dc ' to maintain a high level of accuracy. Both networks were trained with the Levenberg-Marquardt algorithm [24,25].
To train NN-V (G, T, P*), 112,477 samples (G, T, and desired power P* as inputs and Vdc' as the output) were extracted from the P-V characteristics. The model was simulated under different operating conditions of G, T, and P* to collect V dc '. These samples were randomly divided such that 70% were used for training, 20% were used for validation, and 10% were used for testing. To train NN_P (G, T), 1911 samples of MPP were used and were divided as above. The samples consisted of G and T as inputs and maximum power as the output, and they were collected by simulating the model under different conditions of G and T. The error frequency distribution results of the NNs from testing are displayed in Appendix D.

Inverter Control
The array control can accommodate the primary and secondary control but will perturb the DC voltage. To maintain the DC voltage and the AC bus voltage, the inverter control described below is used. The PV system is interfaced to the grid with a DC/DC R f and L f are filter resistance and inductance, respectively. The parameter values can be found in Table A5. The DC voltage reference, V dc * , and positive sequence bus voltage magnitude reference, |V + | * , can be tracked if we choose the control V dconv , and V qconv , as follows: where PI 1 is a proportional and integral controller that forms the inner loop and tracks the dq-axis current, whose reference is generated by the PI 2 , where PI 2 is a proportional and integral controller that forms the external loop and tracks the DC voltage or the positive sequence bus voltage magnitude.
By choosing V dcomp and V qcomp , we can cancel out the cross-coupling of states, i q and i d , in Equation (12). The PI controllers can be tuned using transfer function approximations of the compensated filters and pole placement techniques. Here, v and V indicate measured and controlled voltage. Subscripts d, q, comp, conv, and g stand for d-axis, q-axis, compensation, converter-side values, and grid-side values; ω s is the synchronous frequency in rads/s.

TPSH Plant Model and Control
A 100 MW TPSH dynamic model was constructed in Simulink with parameters listed in Table A3. The TPSH turbine and governor model was constructed as described in previous works and studies [7,26] with a few changes to accommodate the logic flags for automatic mode change. This model is available in Figure A1. The automatic mode change control allowed the TPSH to change its modes simply on the basis of the desired power reference. To further detail the automatic mode change control, the pseudocode for the mode change is provided in Appendix B. According to this pseudocode, the controller generates logic flags ρ p , and ρ t , with which it changes the mode of operation of the TPSH. The logic flags indicate on or off commands to the pump and turbine, respectively. The synchronous machine used for the TPSH is a sixth-order machine model [27], with a standard IEEE Type1 excitation system [28], without any stabilizer. All these components are readily available in Simulink libraries. The parameters used for all these components are provided in Tables A1-A3. The model was implemented in [7,26], which demonstrated that it can describe the reference tracking performance, the fast frequency response performance of the TPSH in both turbine and pump mode, and its mode change capability.

Implementation
The important model modifications and techniques used while implementing the model shown in Figure 3 were as follows:

•
Although the TPSH mode change capability can be used in firming, it was avoided. This was done mainly to avoid repeated mode change and oscillation between modes, which can lead to early failure of the ternary set. • The excitation system of the TPSH and inverters maintain the voltage set or determined by the load flow performed before the initialization.

•
The TPSH model implemented head by dividing the discharge by the gate command. The gate command is limited to a minimum value of G min > 0. Thus, the TPSH model would never have a 0 output for mechanical and electrical power.

•
The reverse saturation current depends on the photo current, which created an algebraic loop. To break this algebraic loop, a unit delay was used. • Through MATLAB code, the neural network toolbox of MATLAB allowed the training of the NNs and deployment of the NNs into Simulink, with a particular sample time suited for the simulation.

•
To avoid a time-varying filter model, ω s in Equation (12) was fixed at ω o with 60 Hz as the nominal frequency.

•
For the simulation of the 9-bus system in pump mode with HSC and pure pump mode, real and reactive power loads at buses 5, 7, and 9 were reduced to 50% for HSC mode and 10% for pure pump mode.

PV Plant Set Point Tracking
To show the accuracy and efficiency of the PV plant and array control, the PV plant with four 25 MW arrays was integrated to an infinite bus and tested for its set-point tracking capability. The main aim of performing set-point tracking is to validate the control scheme described in Figure 5. The solar irradiation levels for the four PV arrays were set to 850, 950, 900, and 400 W/m 2 with temperature set to 25 • C.
Step increments of power reference were made at intervals of 5 s to replicate automatic generation control (AGC) signals. If all arrays were curtailed by 10% with insolation levels being 850, 950, 900, and 400 W/m 2 , array 4 would have the least amount of reserves. When the AGC step change was equally divided, array 4 was not be able to supply its share accurately as array 4 would saturate at its own MPP faster than the others and, hence, would cause inaccurate tracking of the set-point, as we can see at t = 7, 11, and 24 s in Figure 8a. However, when the set-point change was divided in proportion to the reserve of each array, accuracy of set-point tracking increased, as shown in Figure 8b. In other words, the controls were able to coordinate unshaded and shaded arrays to meet a particular set-point.
It was also noticed that the set-point tracking with neural networks was highly accurate. From Figure 8, the output was tracked accurately when the desired output was below the MPP. However, if the desired output was greater than the MPP of the plant, the output saturated at the MPP, as observed from t = 11 to 24 s. Figure 8c reflects the accurate and smooth performance of the inverter controls.

Hybrid Plant Set Point Tracking
Although the PV plant can perform set-point tracking, it can only do so within certain limits of available PV power. Thus, the reserve provided by the PV system was used for primary frequency response and TPSH response enhancement only. When the set-point for the hybrid plant changes, the PV plant momentarily responds to correct the error between the hydro plant and the reference model as dictated by the plant control system in Figure 3.
In Figure 9b,d,f, at t = 10 s, when the reference increased, the PV system was first to respond and then attempted to absorb the reverse response of the hydro turbine governor system. This capability decreases the response time of the plant and prevents the hydraulic nonlinearities from interfering with the grid, as can be seen in Figure 9a,c,e. However, the PV plant did not compensate for the tracking error completely due to the delays in the inverter control. Moreover, due to its nonlinear nature, the TPSH model exhibited greater oscillations on set-point reduction, which resulted in an increase in transient set-point tracking error. Nonetheless, this capability also provided the plant with pump mode flexibility, as can be seen in Figure 9e.

Hybrid Plant Set Point Tracking
Although the PV plant can perform set-point tracking, it can only do so within certain limits of available PV power. Thus, the reserve provided by the PV system was used for primary frequency response and TPSH response enhancement only. When the set-point for the hybrid plant changes, the PV plant momentarily responds to correct the error between the hydro plant and the reference model as dictated by the plant control system in Figure 3.
In Figure 9b, 9d, and, 9f, at t = 10 s, when the reference increased, the PV system was first to respond and then attempted to absorb the reverse response of the hydro turbine governor system. This capability decreases the response time of the plant and prevents the hydraulic nonlinearities from interfering with the grid, as can be seen in Figure 9a, 9c and 9e. However, the PV plant did not compensate for the tracking error completely due to the delays in the inverter control. Moreover, due to its nonlinear nature, the TPSH model exhibited greater oscillations on set-point reduction, which resulted in an increase in transient set-point tracking error. Nonetheless, this capability also provided the plant with pump mode flexibility, as can be seen in Figure 9e.

PV Firming Results
TPSH can perform firming only in generation mode and pump mode with HSC active. While mechanical governors cannot be used to compensate for rapid changes in PV, they can be used for slow changes in PV. A low-pass filter is used to filter out the fast transients in the PV output as shown in Figure 3, while the self-compensation feature through ∆P PV_comp of the PV inverter controls is used for compensating fast changes in PV and for the damping transients due to mode change from pump to generation mode of the TPSH. Figures 10-12 show a case study for one day. To ease the simulation burden, certain sections of the day were picked and simulated separately.

PV Firming Results
TPSH can perform firming only in generation mode and pump mode with HSC active. While mechanical governors cannot be used to compensate for rapid changes in PV, they can be used for slow changes in PV. A low-pass filter is used to filter out the fast transients in the PV output as shown in Figure 3, while the self-compensation feature through ΔPPV_comp of the PV inverter controls is used for compensating fast changes in PV and for the damping transients due to mode change from pump to generation mode of the TPSH. Figures 10-12 show a case study for one day. To ease the simulation burden, certain sections of the day were picked and simulated separately.
The steady-state simulation of the day is shown in Figure 10a-c. In Figure 10a, we period of 30 min (from t = 420 min to t = 450 min) of the profile in Figure 10a. During this period, the TPSH operated in pump mode with HSC and was seen to adjust its output to minimize the error in set-point tracking. By operating in pump mode with HSC, it prevented curtailment of the PV system. However, since the TPSH was prevented from transitioning into the generation mode and due to reserve limitations, it could not reduce the plant's tracking error to zero.  transient errors. As shown in Figure 10a, the TPSH changed its mode from HSC to generation, as scheduled to meet the increase in base load from 50% to 70%. The dynamic simulation of this phase is shown in Figure 12. The TPSH had a minimum generation of 40%, and the available PV was 50%. The controls curtailed the PV system to compensate for the transition transients of the TPSH and meet the base load of 70%. The PV system saturated and was unable to completely compensate for the transition transients.

Fast Frequency Response of Hybrid Plant in IEEE 9-bus System
The above tests verified the secondary control capability of the hybrid plant and its controls. The subsequent tests were performed to verify the primary controls. The hybrid plant was integrated to the IEEE 9-bus system [29], as indicated in Figure 13, and a load was applied suddenly at bus 5 at t = 60 s. As a result, the frequency of the system declined. The frequency profile for this test is shown in Figures 14a, 14c, and, 14e, where the TPSH is in generation mode, pump mode with HSC active, and pure pump mode. The real power contributions from the hybrid and TPSH plant are compared in Figures 14b, 14d and, 14f. In all cases, the hybrid plant outperformed the TPSH plant in that it improved the frequency nadir and damped frequency oscillations. This was mainly attributed to the joint response of the PV and TPSH plant. The PV plant utilized its reserves for inertia control and droop control, to support frequency.  Figure 10a, the TPSH changed its mode from HSC to generation, as scheduled to meet the increase in base load from 50% to 70%. The dynamic simulation of this phase is shown in Figure 12. The TPSH had a minimum generation of 40%, and the available PV was 50%. The controls curtailed the PV system to compensate for the transition transients of the TPSH and meet the base load of 70%. The PV system saturated and was unable to completely compensate for the transition transients.

Fast Frequency Response of Hybrid Plant in IEEE 9-bus System
The above tests verified the secondary control capability of the hybrid plant and its controls. The subsequent tests were performed to verify the primary controls. The hybrid plant was integrated to the IEEE 9-bus system [29], as indicated in Figure 13, and a load was applied suddenly at bus 5 at t = 60 s. As a result, the frequency of the system declined. The frequency profile for this test is shown in Figures 14a, 14c, and, 14e, where the TPSH is in generation mode, pump mode with HSC active, and pure pump mode. The real power contributions from the hybrid and TPSH plant are compared in Figures 14b, 14d and, 14f. In all cases, the hybrid plant outperformed the TPSH plant in that it improved the frequency nadir and damped frequency oscillations. This was mainly attributed to the joint response of the PV and TPSH plant. The PV plant utilized its reserves for inertia control and droop control, to support frequency. The steady-state simulation of the day is shown in Figure 10a-c. In Figure 10a, we see the PV profile with and without curtailment and the base load. The aim of the controls was to modify Figure 10a into Figure 10c using actions in Figure 10b. The base load in the morning hours was ignored, and the plant was allowed to ramp up to the base load, which would support load increase. Figure 10d-f display the dynamic simulation results for a period of 30 min (from t = 420 min to t = 450 min) of the profile in Figure 10a. During this period, the TPSH operated in pump mode with HSC and was seen to adjust its output to minimize the error in set-point tracking. By operating in pump mode with HSC, it prevented curtailment of the PV system. However, since the TPSH was prevented from transitioning into the generation mode and due to reserve limitations, it could not reduce the plant's tracking error to zero. Figure 11 shows the firming effect of the controls using the generation mode of the TPSH. Due to the availability of upward reserve, the set-point was tracked with small transient errors. As shown in Figure 10a, the TPSH changed its mode from HSC to generation, as scheduled to meet the increase in base load from 50% to 70%. The dynamic simulation of this phase is shown in Figure 12. The TPSH had a minimum generation of 40%, and the available PV was 50%. The controls curtailed the PV system to compensate for the transition transients of the TPSH and meet the base load of 70%. The PV system saturated and was unable to completely compensate for the transition transients.

Fast Frequency Response of Hybrid Plant in IEEE 9-Bus System
The above tests verified the secondary control capability of the hybrid plant and its controls. The subsequent tests were performed to verify the primary controls. The hybrid plant was integrated to the IEEE 9-bus system [29], as indicated in Figure 13, and a load was applied suddenly at bus 5 at t = 60 s. As a result, the frequency of the system declined. The frequency profile for this test is shown in Figure 14a,c,e, where the TPSH is in generation mode, pump mode with HSC active, and pure pump mode. The real power contributions from the hybrid and TPSH plant are compared in Figure 14b,d,f. In all cases, the hybrid plant outperformed the TPSH plant in that it improved the frequency nadir and damped frequency oscillations. This was mainly attributed to the joint response of the PV and TPSH plant. The PV plant utilized its reserves for inertia control and droop control, to support frequency.

Conclusions
To cope with high flexibility and resilience requirements of future low inertia power systems, this paper proposes a novel PV + TPSH hybrid plant and designs its controls using a neural network-based structure. The TPSH was chosen because of its pump mode flexibility. The aim was to exploit the flexibility of the TPSH and leverage the controller-induced flexibility of the PV system to make the hybrid plant be-have as a conventional plant. The advantages of the proposed hybrid configuration include (a) the addition of generation capacity, (d) the formation of a self-sufficient source, and (d) reduced transmission loss in pump mode. If a floating PV system is used, the additional advantages of that can be realized as well.
The designed controls can be decomposed into three parts: (a) hybrid plant control, (b) PV plant control, and (c) TPSH plant control. The hybrid plant control distributes the set-point among the TPSH and PV systems, while the array controls make sure that the hybrid plant control commands are followed accurately, and that the primary control is provided. The TPSH control is a nominal hydro-governor enhanced with mode change capability. To control the PV arrays, a neural network-based reference governor framework was used, with a mixture of CFNN and FFNN. Here, two separate neural networks are used to accurately regress the required DC link voltage and the maximum power as a function of irradiance and temperature.
Through detailed simulation case studies, it was shown that, using the designed controls within operational constraints, the hybrid plant behaved like a conventional plant. In addition to configuration advantages mentioned above, it is concluded that the controls can (a) enable the PV plant to track set-points, (b) coordinate the response and coordination of shaded and unshaded PV arrays, (c) enhance the response of the TPSH plant for set-point tracking in generation and pump mode with HSC, (d) enable pure pump mode set-point tracking (f) can firm the PV plant with array control, systematic curtailment and TPSH response, and (g) enhance fast frequency response through combined response of PV and TPSH.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
The parameter values used for TPSH governor turbine, excitation, and synchronous machine can be found in the tables below. Table A1. Synchronous machine parameters [28].  if Pref is greater than 0 set ρ t as 1; set ρ p as 0; set P resent mode as 1; elseif P ref is lesser than -. 6 update P ref as 0; set ρ t as 0; set ρ p as 1; set P resent mode as 2; elseif Pref is lesser than 0 and Pref is greater than -. 6 update P ref as 1 + P ref ; set ρ t as 1; set ρ p as 1; set P resent mode as 3; Table A4. Solar module parameters [30].

Appendix C
The parameters for the solar PV modules and inverters are presented below.   Error frequency distributions for NN_V are given below. Error frequency distributions for NN_V are given below.