# Non-Intrusive Load Disaggregation by Linear Classifier Group Considering Multi-Feature Integration
## 3 Methodology
### Building Appliance Candidate Model  
After clustering the events, \"positive\" clusters containing rising edges and \"negative\" clusters composed of falling edges are obtained. Then, the pairing method is designed to generate appliance candidate models automatically. Most of the existing NILM algorithms only consider the single-state appliances, so the identification of multi-state loads is limited. The multi-state appliances are very common which cannot be described by ON/OFF model, so it is necessary to establish an appropriate model for them. The finite state machine (FSM) [1] is a typical model for these appliances. The sum of power changes in any cycle of state transition is zero, which can be called zero loop-sum constraint (ZLSC) [1]. Meanwhile, the operating states in an FSM model have different power levels, i.e., uniqueness constraint (UC). The two constraints ensure that it is possible to construct individual FSM from streams of events. In the following, the method of generating appliance models is introduced. For the single-state appliances, an interruption model is established, and for controllable load, a FSM model is established. It includes two main steps, i.e., cluster pairing and event pairing. Step (1): to construct ON/OFF models for the single-state appliance candidates, this paper pairs the \"positive\" cluster and \"negative\" cluster with similar absolute average power. We take advantage of special algebraic properties of events in a complete transition cycle, i.e., ZLSC and UC, to construct the FSM models. In order to reduce the complexity of cluster pairing, the ON/OFF models are built firstly. After the completion of all positive-negative cluster pairs, they are removed from the total clusters and FSM models are established from the other clusters. Step (2): after the cluster pairing, some cluster pair candidates for single-state or finite-state appliances will be generated. It is essential to further match the events in each cluster pair. For example, each rising edge in the positive cluster is matched with a falling edge in the paired negative cluster by difference in the pairing features of two events. Then, a specialized forward-backward pairing procedure is designed to realize the effective pairing. Let \(\mathbf{C}_{p}\) and \(\mathbf{C}_{n}\) denote two paired clusters, where \(|\mathbf{C}_{p}|\) and \(|\mathbf{C}_{n}|\) denote their cardinality. 1. Forward Pairing  
For each \(C_{p}(i)\)\(\in\)\(\mathbf{C}_{p}\), the forward pairing is to match an optimal falling edge among all elements in \(C_{n}\) according to the order from \(i=1\) to \(|\mathbf{C}_{p}|\)-1. Normally, the ON and OFF events appear alternately, that is, using time stamps to sort events belonging to the same appliance will get an ON/OFF/ON/OFF... sequence. Thus, the falling edge paired with \(C_{p}(i)\) must occur after \(C_{p}(i)\) and before \(C_{p}(i+1)\). Denoted by \(\mathbf{\Omega}\), the subset of \(\mathbf{C}_{n}\) that satisfy the above condition are considered as a set of candidates. Let \(|\mathbf{\Omega}|\) represent the element number in \(\mathbf{\Omega}\), the values of \(|\mathbf{\Omega}|\) can be divided into three cases. Different pairing processes are designed for these cases. Two vectors \(\mathbf{M}_{p}\) and \(\mathbf{M}_{t}\) are defined to represent the power difference and time intervals between paired events. Case 1: When \(|\mathbf{\Omega}|=1\), the absolute power difference \(\Omega_{p}\) and time interval \(\Omega_{t}\) between \(C_{p}(i)\) and the only element in \(\mathbf{\Omega}\) are calculated. The probability of pairing \(C_{p}(i)\) and the element in \(\mathbf{\Omega}\) can be defined as:  
\[c_{i}=\frac{\Omega_{p}m_{p}+\Omega_{t}m_{t}}{\sqrt{(\Omega_{p}{}^{2}+\Omega_{ t}{}^{2})({m_{p}}^{2}+m_{t}{}^{2})}} \tag{11}\]  
where, \(m_{p}\) stands for the mean value of the elements in \(\mathbf{M}_{p}\), and \(m_{t}\) denotes the median value of the elements in \(\mathbf{M}_{t}\).