## 2 Modeling of PV and FID  
### Modeling of PV Considering Multiple Reactive Power Output Modes  
A PV system mainly consists of the photovoltaic panel and the inverter. The photovoltaic panel transforms solar energy into electricity based on the photoelectric effect. The inverter controls the power output. Both active power and reactive power can be provided. The total output of active power and reactive power should not exceed the capacity of the inverter at any time. The constraint can be described as follows:  
\[\sqrt{\left(P_{\text{PV},m}\right)^{2}+\left(Q_{\text{PV},n}\right)^{2}}\leq S _{\text{FV},n} \tag{1}\]  
where \(P_{\text{PV},m}\) is the active power output of \(\text{PV}_{m}\). \(Q_{\text{PV},n}\) is the reactive power output of \(\text{PV}_{m}\). \(S_{\text{FV},n}\) is the capacity of \(\text{PV}_{m}\). \(m\) is the number of PV.  
The active power output is related to light intensity and environmental temperature. Generally, a PV is operated under the maximum power point tracking (MPPT) mode. Thus, maximum active power can be output, and a high consumption rate of PV is obtained. However, owing to the big resistance/inductance ratio (R/X) of a distribution network, the voltage is also sensitive to the change in active power. The injection of large amounts of active power can cause the voltage rise or even voltage out-of-limit. The intermittence and fluctuation of active power output also affect the power flow. Thus, the active power output of PV\({}_{m}\) cannot exceed the active power of PV\({}_{m}\) under MPPT mode (\(P_{MPPT,m}\)). To make full use of the PV and keep voltage within limits, the ratio of PV abandonment is set as an objective function to be minimized. The optimization will obtain an optimal solution for the whole system, instead of only for the PV.  
According to the investigation of the product specifications of photovoltaic inverter manufacturers and the technical specifications established by some countries, the reactive power output by PV inverter holds three schemes. The first one is the power factor controlling scheme. The power factor of a PV inverter is restricted to the range of \(-\cos\theta\) to \(\cos\theta\). This scheme can only be used during daytime. The reactive power is limited as follows:  
\[-\tan\theta\leq\frac{Q_{PV,m}}{P_{PV,m}}\leq\tan\theta \tag{2}\]  
The second scheme is the direct reactive power output scheme. The reactive power output is no more than \(\pm\)tan \(\theta\) of the rated power. The constraint is as follows:  
\[-\tan\theta\times S_{PV,m}\leq Q_{PV,m}\leq\tan\theta\times S_{PV,m} \tag{3}\]  
The third scheme is the night SVG scheme. The reactive power output is only limited by the rated power. The following occurs:  
\[-S_{PV,m}\leq Q_{PV,m}\leq S_{PV,m} \tag{4}\]  
These last two schemes can be used during both daytime and nighttime. However, during daytime, the active power and reactive power output should also satisfy the capacity constraint.  
The first two schemes are mainly used to satisfy the dispatching of reactive power. The third scheme is utilized to compensate the reactive power of the devices. To evaluate the performance of PV inverters' participation in reactive power optimization, different schemes are adopted at different time periods, such as during the day and night. Five reactive power output modes are built. The reactive power output ranges of the PV inverter in each mode are shown in Figure 1. The corresponding constraint equation selections are listed in Table 1. In the paper, \(\cos\theta\) is set as 0.95.  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Mode**} & \multirow{2}{*}{**Day (PVs Output Active Power)**} & **Night (PVs Do Not Output Active Power)** \\  & & **Active Power** \\ \hline
1 & Equation (3) & Equation (3) \\
2 & Equation (3) & Equation (4) \\
3 & Equation (4) & Equation (4) \\
4 & Equation (3) & Equation (5) \\
5 & Equation (4) & Equation (5) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Constraint equations of five modes.