# Low-Rate Non-Intrusive Load Disaggregation with Graph Shift Quadratic Form Constraint
## 2 Methodology
### Graph Shift Quadratic Form Constrained Active Power Disaggregation
In GSP-based data classification, the elements with strong correlation are usually connected by high-weight edges and represented via the same classification label \(s(i)\), which makes \(\mathbf{s}\) vary smoothly from node to node, i.e., the signal values of connected nodes are likely to be the same [40]. Therefore, using the information about similarity between elements, we can infer unknown labels from known ones. If graph signal \(\mathbf{s}\) is piecewise smooth with respect to the underlying graph structure, \(S_{2G}(2)\) and \(S_{2L}(2)\) are generally small. Thus, we can introduce them as a regularization term for the optimization problem in Equation (4). Since experiments in Ref. [38] show that classifiers designed by graph shift matrix create higher classification accuracy than the classifier based on the graph Laplacian matrix, we adopt the graph signal's total variation based on the shift matrix as a regularization term in this paper. In the training stage, we assume that \(\Delta P(i)\) and \(\Delta p_{k}(i)\) is accessible, for \(i=1,\,\ldots,\,n\). The final disaggregation task is to estimate \(\Delta p_{k}(i)\), for \(i=n+1,\,\ldots,\,N\). First, we define an \(N\)-length graph signal \(\mathbf{s}_{k}\) for appliance \(k\) as,  
\[s_{k}(i)=\left\{ \begin{array}{l}+1,\text{ if }|\Delta p_{k}(i)|\geq Thr_{k} \text{ and }i\leq n\\ -1,\text{ if }|\Delta p_{k}(i)|<Thr_{k}\text{ and }i\leq n\\ 0,\text{ if }n<i\leq N\end{array} \right. \tag{8}\]  
where \(Thr_{k}\) is the power threshold for appliance \(k\), which is set to be one half of the base \(\Delta\overline{p}_{k}\). During the training process (\(i\leq n\)), if appliance \(k\) changes its state at time \(t_{i}\), \(s_{k}(i)\) is set to \(+1\); if not, \(s_{k}(i)\) is set to \(-1\). For the testing dataset (\(n<i\leq N\)), we do not know whether the appliance change state at first, so we initialize \(s_{k}(i)\) to 0. Then, using piecewise smoothness of graph signal as a prior, we introduce \(S_{2G}(2)\) as a regularization term of the optimization problem in Equation (4), i.e.,  
\[\mathbf{A}_{1:N_{p}}=\text{argmin}\sum_{i=n+1}^{N}\|\Delta P(i)-\mathbf{b \alpha}(i)\|_{2}^{2}+\omega\sum_{k=1}^{N_{p}}\frac{1}{2}\|\mathbf{s}_{k}- \mathbf{E}^{norm}\mathbf{s}_{k}\|_{2}^{2} \tag{9}\]  
where \(\omega\) is a regularization parameter, which controls the relative importance of minimization Equation (4) and smoothness of graph signal. Note that there is a mapping between \(s_{k}(i)\) and \(a_{k}(i)\). The following is the specific mapping process. Firstly, we need to set the classification threshold \(T_{s}\). Then, if \(s_{k}(i)>T_{s}\), we can infer that appliance \(k\) changed state at time \(t_{i}\); otherwise, appliance \(k\) did not change state, \(a_{k}(i)=0\). When judging the stat of appliance \(k\) changed at \(t_{i}\), we need to further determine whether it is on or off. If \(\Delta P(i)\) is positive, we can judge appliance \(k\) is opening at time \(t_{i}\), so \(a_{k}(i)=+1\). On the contrary, if \(\Delta P(i)\) is negative, we can judge appliance \(k\) is closing at time \(t_{i}\), so \(a_{k}(i)=-1\).