# A Heuristic Algorithm for Locating Line-to-Line Faults in Photovoltaic Systems
## 3 Proposed Method
### Heuristic Algorithm for Line-to-Line Fault Location
#### 3.2.2 Fault Location Determination
The voltages of all modules are divided into four values, A, B, C, and D, with the same relative magnitudes as in Case 4. Following the fault marking process, the results are shown in Table 6, Stage 1. In String 1, fault points 7, 6, and 7 are marked sequentially, with the final recorded voltage direction as 1. In String 2, fault points 1 and 6 are marked sequentially, with the final recorded voltage direction as \(-1\). The process then proceeds to fault marking, where duplicate fault points in the fault sequence \(L_{i}\) are removed and sorted, and the fault point count \(k_{i}\) is recalculated. The results are shown in Table 6, Stage 2, with \(d_{1}=1\) and \(d_{2}=-1\), so s is set to 1. If the fault location is determined directly using the approach in Case 4, it will result in an error because the low-potential end fault point is located at the last fault point of tha  
Figure 13: Experimental results under NOCT conditions. (**a**) Array P–V curve; (**b**) current curves. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Stage 1**} \\ \hline String \# & \(k_{i}\) & \(d_{i}\) & \(L_{i}\) \\ \(i=1\) & 3 & \(1\) & \(7,3,4\) \\ \(i=2\) & 3 & \(-1\) & \(1,3,4\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Case 4 fault location process. locate the fault, if the low-potential end is found in the second-to-last module group, it is necessary to first confirm whether the voltages of the second-to-last and third-to-last module groups are equal. In accordance with the premise of even voltage distribution, if the fault indeed occurs in the last module group, the voltages of the second-to-last and third-to-last module groups will be equal. Thus, when this condition is observed, the last fault point in the low-potential string should be adjusted to the last module group index to achieve an accurate fault location. In Case 5, this condition is indeed confirmed, so the sequence \(L_{2}\) is modified accordingly, as shown in Table 6, Modified. The fault location is then determined using the approach in Case 4, resulting in a short-circuit fault identified between module group 6 in String 1 and module group 7 in String 2. Case 6: A cross-string short-circuit fault occurs between two strings, with the high-potential end located in the first module group of the string, as shown in Figure 15. The fault occurs between module groups \(V_{1,1}\) and \(V_{2,2}\). The voltages of all modules are divided into four values, A, B, C, and D, with the same relative magnitudes as in Case 4. Following the fault marking process, the results are shown in Table 7, Stage 1. In String 1, fault points 7 and 2 are marked sequentially, with the final recorded voltage direction as 1. In String 2, fault points 1, 2, and 3 are marked sequentially, with the final recorded voltage direction as -1. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Stage 1**} \\ \hline String \# & \(k_{i}\) & \(d_{i}\) & \(L_{i}\) \\ \(i=1\) & 3 & \(1\) & \(7,6,7\) \\ i = 2 & 2 & \(-1\) & \(1,6\) \\ \hline \multicolumn{3}{c}{**Stage 2**} \\ \hline String \# & \(k_{i}\) & \(d_{i}\) & \(L_{i}\) \\ \(i=1\) & 2 & \(1\) & \(6,7\) \\ \(i=2\) & 2 & \(-1\) & \(1,6\) \\ \hline \multicolumn{3}{c}{**Modified**} \\ \hline String \# & \(k_{i}\) & \(d_{i}\) & \(L_{i}\) \\ \(i=1\) & 2 & \(1\) & \(6,7\) \\ \(i=2\) & 2 & \(-1\) & \(1,7\) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Case 5 fault location process. Figure 14: Case 5 fault. After entering the fault marking process, the marked results are organized as shown in Table 7, Stage 2; \(d_{1}=1\) and \(d_{2}=-1\), so s is set to \(1\). When the high-potential end is located in the first module group of the string, the same issue as in Case 5 arises. However, in this case, the comparison is between the voltages of the second and third module groups in the high-potential string. If these two voltages are equal, this indicates that the fault is not in the first module group.