# A Review on Distribution System State Estimation Algorithms
## 4 Auxiliary Algorithms
### Bad Data Detection  
Bad data detection is of substantial importance for successfully estimating the system's true state. Bad data can stem from: (i) erroneous measuring data [77], (ii) system faults [78], and (iii) False Data Injection Attacks (FDIAs) [79, 80, 81, 82]. Thus, the discovery of false data can also help DSOs identify possible attacks in their system. The algorithms utilized for performing bad data detection can be classified into two main categories: (i) model-based detection algorithms and (ii) data-driven algorithms [83], as presented in Table 4.  
Model-based detection algorithms are prediction methods that measure the similarity between the predicted states and the actual field measurements. In literature, model-based bad data detection algorithms are used extensively. In [84, 85, 86, 87, 88, 89] the authors use the L\({}_{2}\)-norm that is the Euclidean distance of the residual and compare it to a certain threshold as presented in (19), where measurement \(\mathbf{z_{i}}\) is considered faulty when its Euclidean distance from its respective calculation upon the predicted state, \(\mathbf{h(x_{i})}\), is greater than the threshold, e.  
\[\mathbf{P_{L_{2}}(z_{i})}= \left\{ \begin{array}{ll}1,&\text{if }\|\mathbf{z_{i}}-\mathbf{h(x_{i})}\|_{2}> \text{ e}\\ 0,&\text{otherwise}\end{array} \right. \tag{19}\]  
Similar to the previous one, the authors of [90, 91, 92, 93, 94] utilize the Largest Normalized Residual (LNR) test that is presented in (20), where, \(\sigma_{\text{E}}\)= diag(\(\mathbf{E}\)), is the residual error covariance matrix. \[\mathbf{P_{\text{LNR}}(z_{i})}= \left\{ \begin{array}{ll}1,&\text{if }\|\mathbf{z_{i}}-\mathbf{h(x_{i})}/ \sigma_{\text{E}}\|_{\infty}>\text{ e}\\ 0,&\text{otherwise}\end{array} \right. \tag{20}\]  
Last but not least, in [78, 95, 96, 97] the authors present the Chi-square test for the purpose of FDIA detection. Chi-squared is given by (21), where \(\mathbf{J(x)}\) is the cost function of the DSSE. \[\mathbf{P_{\chi^{2}}(z_{i})}= \left\{ \begin{array}{ll}1,&\text{if }\mathbf{J(x_{i})}\;>\text{ e}\\ 0,&\text{otherwise}\end{array} \right. \tag{21}\]  
In certain applications, L\({}_{2}\)-norm test outperformed the Chi-square test [78]. Finally, by combining the L\({}_{2}\)-norm and the LNR tests, the authors of [98] achieved better results in FDIA detection than the cases of using only one detection test. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Method** & **Description** & **Advantages and Disadvantages** \\ \hline GMM and EM [70, 71, 72] & Probabilistic and statistical approaches using Gaussian distributions, correlations, etc. & \begin{tabular}{l} \\ \end{tabular} \\ \hline \begin{tabular}{l} \end{tabular} & \begin{tabular}{l} \end{tabular} & \begin{tabular}{l} \end{tabular} \\ \hline \begin{tabular}{l} DNN [74] \\ \end{tabular} & \
\begin{tabular}{l} Solutions with learning-based approaches, \\ using mostly neural networks. \\ \end{tabular} &
\begin{tabular}{l} Modern, advanced algorithms, but with database requirements. \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Auxiliary algorithms for the acquisition of pseudo-measurements [70, 71, 72, 74, 75, 76]. Unfortunately, it was mathematically proven by [79] that the model-based detection algorithms discussed above are vulnerable to attack vectors inserted from individuals that have prior knowledge of the system. These vectors are, in some cases, undetectable from the tests presented. Data-driven methods for bad data detection can solve this issue. Supervised learning techniques, in which the ML models are trained with labeled data, are used extensively in literature. In more detail, the authors of [99] use Linear Regression (LR) to fit a measurement vector in the linear model. If the vector does not fit in the model, FDIA is detected. Another technique used is the Support Vector Machine (SVM), which is the most common ML technique for bad data detection. The authors of [96; 100; 101; 102; 103] utilize SVM classifiers for bad data and FDIA detection.