# Deducing Energy Consumer Behavior from Smart Meter Data +
## 4 Proposed Framework
### Load Disaggregation Algorithm (LDA)
#### 4.3.5 Recognition Methods  
Methods based on Hidden Markov Model (HMM) are a very popular method for NILM. Three methods are selected to be validated in this paper. The methods are selected since they are often referenced in the literature, and is often used for benchmarking. All of the algorithms are based on HMM or clustering in different configurations. The following subsections will briefly introduce the algorithms.  
Factorial Hidden Markov Models  
The HMM has proven to be one of the most used tools to create probabilistic models based on time series data. This is done by seeing the system as a series of observable states \(Y_{t}\), and a series of hidden states \(S_{t}\)[45]. It is assumed that there exists a probabilistic relation between the observations \(Y_{t}\) and a sequence of hidden states \(S_{t}\). This is implemented as a first order model, which implies that the current hidden state \(S_{t}\) is only depended on the previously state \(S_{t-1}\) and the current observed state \(Y_{t}\). In NILM can the observed state \(Y_{t}\) be seen as the observed consumption as seen from the main meter. Where the hidden state \(S_{t}\) can be the unknown consumption of an appliance.  
\[p(\{S_{t},Y_{t}\})=p(S_{1})P(Y_{1}|S_{1})\prod_{t=2}^{T}p(S_{t}|S_{t-1})p(Y_{t }|S_{t}) \tag{8}\]  
The joint probability for a specific hidden state \(S_{t}\) that has caused the observed output \(Y_{t}\) can be seen in Equation (8). \(p(Y_{t}|S_{t})\) is the emission probability, which shows the conditional probability for \(Y_{t}\) being outputted by a given hidden state \(S_{t}\). The probability for a state change is given by the transition property \(p(S_{t}|S_{t-1})\).  
Factorial Hidden Markov Models (FHMM) [45] is an extension of this classic HMM where there exists several hidden state chains that all contribute to the observed output. This can be seen as an extension to Equation (8) where the hidden states \(S_{t}\) can be seen as a set of states as shown on Equation (9) where \(|\) is the number of chains.  
\[S_{t}=\{S_{t}^{(1)},...,S_{t}^{(i)},....,S_{t}^{(j)}\} \tag{9}\]  
As an extra constraint can each hidden state, in each chain, only depended on the previously state in the chain, and not on the hidden state of other chains. This makes the state transition probability to be defined as in Equation (10).  
\[P(S_{t}|S_{t-1})=\prod_{m=1}^{M}P\left(S_{t}^{(m)}|S_{t-1}^{(m)}\right) \tag{10}\]  
The observed stated is therefore created by the contribution of many different hidden states. In this implementation there is normally used only two or three states, since most appliances are seen as Type-1 or Type-2 appliances. One chain for each of the appliances plus one that is called the other chain is created in the model. The other chain is to allow for the other appliances that are not taken into the model and noise. The model can therefore be used to validate for a given output what is the probability that a given appliance is contributing to the output. The concrete implementation for this algorithm has been adapted from the NILMTK [11].