## 5 Simulation Verification
### Comparison of Existing Solutions  
The existing waveform-similarity-based pilot protections usually utilize the Pearson coefficient algorithm, cosine coefficient algorithm, or structure coefficient algorithm, whose expressions are as follows:  
\[\left\{\begin{array}{c}cos(x,y)\ =\ \frac{\sum\limits_{i=1}^{n}\left(x_{i}-y_{i} \right)}{\sqrt{\sum\limits_{i=1}^{n}x_{i}^{2}}\sqrt{\sum\limits_{i=1}^{n}y_{i} ^{2}}}\\ S(x,y)\ =\ \frac{2\mu_{x}\mu_{y}\times 2\sigma_{\rm xy}}{\left(\mu_{x}^{2}\ +\ \mu_{y}^{2} \right)(\sigma_{x}^{2}\ +\ \sigma_{y}^{2})}\\ r(x,y)\ =\ \frac{\sum\limits_{i=1}^{n}\left(x_{i}-\overline{x} \right)(y_{i}-\overline{Y})}{\sqrt{\sum\limits_{i=1}^{n}\left(x_{i}-\overline {x}\right)^{2}}\sqrt{\sum\limits_{i=1}^{n}\left(y_{i}-\overline{Y}\right)^{2}} }\end{array}\right. \tag{17}\]  
Figure 8: Calculation results under different PV outputs and different SNRs. (**a**) Fault phase. (**b**) Healthy phase.  
Figure 9: Comparison of current sampling value distribution before and after noise addition.  
In practical applications, when a permanent fault arises during circuit breaker reclosure on one side of the protected line, the samples on that side will become zero. At this moment, as indicated by Equation (17), the sampling array consisting entirely of zeros leads the denominators of all three similarity algorithm formulas mentioned above to become zero, which renders the protection algorithms meaningless and impossible to compute. In contrast, the proposed pilot protection represented by Equations (10)-(13) will not encounter this issue.  
Pilot protections based on different similarity algorithms exhibit varying capabilities in resisting synchronization errors. The three methods derived from Equation (17) all require highly precise data synchronous. When a data synchronization error of 1 ms exists, sub-expressions such as \(x_{i}-y_{i}\) in the formulas are affected by this error, leading to computational inaccuracies, and finally can cause protection maloperation. In contrast, the data processing method in this paper employs reorganization of the original data sequence for discrete probability distribution. This approach significantly mitigates the impact of synchronization errors. Even considering errors like those from current transformers, a 1 ms synchronization error causes the influence on the calculation results in Equations (12) and (13) to not exceed ten percent.  
Taking an internal single-phase-to-ground fault (AG) as an example, simulation results are shown in Figure 10, where the dashed line represents the setting value. As shown in Figure 10, the pilot protections based on cosine similarity and the Pearson algorithm operate when their calculated coefficients exceed \(-0.9\), while the method based on structural similarity operates when its calculated coefficient falls below the setting value of 0.9. Therefore, the Pearson algorithm and cosine similarity fail to reliably distinguish fault phases from healthy phases. Similarly, as shown in Figure 10d, healthy phases are also erroneously activated when the structural similarity algorithm is used.  
Figure 10: Calculation results of the proposed pilot protection and existing solutions under phase-A-to-ground fault. (**a**) The proposed pilot protection. (**b**) Pilot protection based on Pearson coefficient. (**c**) Pilot protection based on cosine similarity coefficient. (**d**) Pilot protection based on structural similarity.