## 1 Introduction
In [20], a microgrid system including different power sources, such as wind turbine generators, PV, and storage batteries, is presented. The PV array was modeled using ISD, neglecting the temperature effect. The system cost with respect to the desired system reliability requirements was found. Furthermore, a compromise between cost and reliability, to find the optimum design of an autonomous hybrid generating system, using the particle swarm optimization (PSO) algorithm was achieved. In [21], the authors presented a method of controlling the load with the PSO technique for a smart micro grid. The PV system was designed using the ISD model. Moreover, the optimal size for system components was determined using the complex multi-objective optimization PSO method. In [22], the authors developed a model with several hybrid power schemes using the PSO algorithm. The output power of a PV array was estimated using the ISD model while neglecting the effect of temperature and using the irradiance on a horizontal surface instead of the incident irradiance values. However, they designed the system under different uncertainty scenarios, including load variation and reliability. In [5], the authors presented a method to optimize a hybrid solar and wind RES, combined with battery banks. The solar PV was modeled using ISD. The objective was to find the total cost of energy, using a stochastic gradient search optimization method. In [23], the researchers found the optimal energy management of an HRES. This system is composed of a hydropower plant combined with a solar PV, wind turbine, distribution generator, and battery bank as an energy storage system (ESS). Different load demand and weather conditions were studied with the aim of minimizing the system's operation cost. In [24], the authors presented an optimal energy management model of a standalone system, including a solar PV model using an ISD, diesel generator, and battery storage system. Their goal was to meet the load demand completely whilst satisfying the system constraints. In [25], the authors presented a method to find the optimal size for a hybrid solar PV and wind farm combined with battery storage. The PV output power was determined using the ISD-equivalent circuit. However, their goal was to minimize the total cost of the system, while maximizing power supply reliability. Furthermore, different constraints on the standalone system operation were considered while minimizing the fluctuations of power supplied to the utility grid. In [2], the researchers optimized a small-scale HRES using simulated annealing as a heuristics global approach. The system consists of solar and wind plants with batteries as ESS. The objective was to minimize the total cost of the HRES. Other reliability indicators, such as the loss of load probability (LOLP) and index of reliability (IR), were found at the optimum point in order to confirm the reliability of the system. In summary, much of the research of HRES studies use the ISD or SD models for PV system design, for simplicity. However, the PV system designed in this paper was done using three different PV models for comparison purposes on a power system level. In other words, the PV plant, in this investigation, was modelled using the ISD, SD, and TD models. Then, the plant size, the index of reliability (IR), and detailed reliability results were computed for a grid-connected system, for each PV model for comparison purposes. It was shown that the TD solar model provides realistic and accurate sizing of the PV array, and hence the size and reliability of the entire system can be precisely found. In this paper, an on-grid system including a PV array combined with PHS, as shown in Figure 1, was optimized using the PSO algorithm and whale optimization algorithm (WOA). The main components of the grid-connected system include the PV array, PHS sub-system showing the upper and lower reservoir, AC and DC bus with the appropriate power electronics converters, and the load demand, which is connected to the AC bus.