# High-impedance Fault Detection in DC Microgrid Lines Using Open-Set Recognition
## 3 Fault Detection
### Open-Set Recognition  
#### 3.2.1 Open-Set Recognition Problem  
The open-set recognition problem might be difficult to comprehend when described directly for NNs, so a simple example showing binary classification in Figure 2 is provided. The decision boundary separating the positive (\"+\") and negative (\"\(\alpha\)\") samples lays in the margin plane A, which is maximized during the training of the classifier. Although this is an efficient approach to distinguish between these two classes, it leads to an overgeneralization for the OSR problem. In this setting, the unknowns (\"?\") and samples from unknown classes (\"\(\triangle\)\") would be labeled as positive samples. The reason for this is that these samples are not considered when creating the boundary--it is only determined by the positive and negative samples, so there is nothing to limit the propagation of the positive label [36]. The suggested approach is to introduce the plane \(\Omega\) that bounds the space of positive samples. Now, the samples that are far away in the positive half-space can be rejected by the classifier.  
The formal definition of the OSR problem is given in [36] and presented here in a short form. First, the measurable recognition function \(f:\mathbb{R}^{\text{d}}\mapsto\mathbf{N}_{0}\) is defined, which maps the d-dimensional input \(x\) to the label \(y\). Next, \(S_{o}\) is defined as a ball containing the positively labeled open space \(O\) and all positive training samples. The open space risk \(R_{O}(f)\) is now defined as:  
\[R_{O}(f)=\frac{\int_{O}f(x)\,dx}{\int_{S_{o}}f(x)\,dx}, \tag{6}\]  
measuring the ratio of positively labeled open space and the overall measure of positively labeled space. Before defining the OSR problem, some instances have to be introduced. Positive training data are defined as \(\mathcal{V}=\{v_{1},\ldots,v_{m}\}\) from \(\mathcal{P}\), and samples from other known classes \(\mathcal{K}\) negative training data \(\bar{R}=\{k_{1},\ldots,k_{n}\}\). \(\mathcal{U}\) is the set of all other unknown classes seen only in testing, hence the test set is defined as \(\mathcal{T}=\{t_{1},\ldots,t_{z}\}\), where \(t_{i}\in\mathcal{P}\cup\mathcal{K}\cup\mathcal{U}\). The goal is to find function \(f\in\mathcal{H}\) (\(\mathcal{H}\) is a class of functions that separate the  
Figure 2: Illustration of the open-set recognition problem. Plane A separates the sample space into two half-spaces, so that unknowns (“?”) and samples from unknown classes (“\(\triangle\)”) are part of the positive sample space. The second plane \(\Omega\) is added to limit the open space risk by restricting the positive sample space. In case of fault detection, negative samples are steady states and positive samples are load changes. The unknowns and unknown classes are HIFs and other disturbances that occur in the microgrid.  
hyperplanes), trained on training data \(\hat{V}\cup\hat{K}\) with given open space risk function \(R_{O}(f)\) and empirical risk function \(R_{e}\), such that it minimizes the open set risk:  
\[\operatorname*{argmin}_{f\in\mathcal{H}}\{R_{O}(f)+\lambda_{r}R_{e}(f(\hat{V} \cup\hat{K}))\}, \tag{7}\]  
where \(\lambda_{r}\) is the regularization constant. Now, not only is the empirical risk of the training dataset reduced, but also the open space risk associated with unknown classes \(\mathcal{U}\).