# A Heuristic Algorithm for Locating Line-to-Line Faults in Photovoltaic Systems
## 4 Simulation Test and Discussion  
Furthermore, this paper uses MATLAB/Simulink to conduct simulation tests to verify the accuracy of the heuristic line-to-line fault location algorithm in locating faults within the PV array, then discusses the test results. First, each line segment in the 21 \(\times\) 2 PV module array is numbered counterclockwise, as shown in Figure 19, with the entire array sequentially numbered from 1 to 42. Second, a fault test point reference table based on the troubleshooting scope of each module group is created, as shown in Table 9. Finally, short-circuit fault location tests are conducted between points using the NOCT environment parameters. The simulation test results for line-to-line fault location are shown in Figure 20. Here, P1 and P2 represent the two endpoints of a line-to-line fault, varying from 1 to 42. Green cells with a recorded value of 1 indicate successful fault location, while red cells with a recorded value of \(-1\) indicate failures to locate faults. The figure shows that most fault scenarios are successfully located by the heuristic line-to-line fault location algorithm, though it still cannot locate some faults. The diagonal from the top-left to the bottom-right represents scenarios where P1 and P2 are at the same test point, indicating no actual fault and thus no location being found, which is regarded as normal. The diagonal from the top-right to the bottom-left represents cases where the endpoints of the line-to-line fault  
Figure 19: Schematic diagram showing the numbering for the test array. are in different strings but share the same potential, so no fault characteristics are reflected in the module group voltages, resulting in no location being found. In addition, there are two unlocatable cases in the middle left and top middle of the figure, where P1 = 1, P2 = 22 and P1 = 22, P2 = 1, respectively. These represent faults caused by a short circuit between the positive and negative terminals of the array's total output. This will cause all module voltages to read 0 V, preventing the fault location algorithm from accurately locating the fault. Finally, the overall fault location success rate is calculated as shown in Equation (9). The denominator is the total of 42 \(\times\) 42 = 1764 combinations, minus 42 non-fault scenarios, resulting in a base of 1722. The numerator is the number of combinations successfully located. Subtracting an additional 40 combinations with the same potential and 2 instances of short-circuit between the array's positive and negative terminals, the effective denominator is 1680. The calculated success rate is 97.56%. \[\textit{success Rate}=\frac{42\times 42-42-40-2}{42\times 42-42}\times 100\%=97.56\% \tag{9}\]  
Compared with existing literature, the proposed heuristic algorithm demonstrates significant improvements in fault localization precision and practical applicability. While many prior studies, such as [PERSON] et al. (2016) and [PERSON] et al. (2017), have achieved high fault detection accuracy using machine learning classifiers, their methods often require large training datasets and complex computational resources, limiting real-time applicability. The approach by [PERSON] et al. (2015) effectively isolates affected strings but does not achieve localization at the module group level, which is critical for reducing maintenance scope. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Module Group \#** & **Fault Test Point \#** & **Module Group \#** & **Fault Test Point \#** \\ \hline \(V_{1,1}\) & 1, 2, 3, 4 & \(V_{2,1}\) & 1, 40, 41, 42 \\ \(V_{1,2}\) & 4, 5, 6, 7 & \(V_{2,2}\) & 37, 38, 39, 40 \\ \(V_{1,3}\) & 7, 8, 9, 10 & \(V_{2,3}\) & 34, 35, 36, 37 \\ \(V_{1,4}\) & 10, 11, 12, 13 & \(V_{2,4}\) & 31, 32, 33, 34 \\ \(V_{1,5}\) & 13, 14, 15, 16 & \(V_{2,5}\) & 28, 29, 30, 31 \\ \(V_{1,6}\) & 16, 17, 18, 19 & \(V_{2,6}\) & 25, 26, 27, 28 \\ \(V_{1,7}\) & 19, 20, 21, 22 & \(V_{2,7}\) & 22, 23, 24, 25 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Reference table for module groups and fault test point numbers.