# Markov Chain Monte Carlo Based Energy Use Behaviors Prediction of Office Occupants
## 3 Proposed Method
### Model Training
#### 3.3.3 Air-Conditioner Energy Use Behavior Model  
The air-conditioner can effectively improve the indoor thermal environment and meet the desired thermal comfort of office occupants. Through the collection of the environmental parameters (temperature, humidity) of the office air outlet, the on-off state and the set temperature of the air-conditioner could be analyzed, then the air-conditioner energy use behaviors of office occupants could be predicted. The MCMC algorithm was used to build the energy use behavior model of the manual on and off air-conditioner and predict the user's air-conditioner use behavior based on temperature data. The energy use behavior model of the air-conditioner refers to the probability that the air-conditioner enters into the cooling or heating state in a given temperature. The air-conditioner energy use behavior model included air-conditioner heating-on, heating-off, cooling-on, and cooling-off action model. The training process of the air-conditioner energy use behavior model was similar to the example of the energy use action model in Section 3.3.1. The difference was that the air-conditioner energy use behavior model was based on temperature, while the energy use action model was based on time series of the equipment state. Specifically, the steps of MCMC algorithm for the air-conditioner energy use behavior model are as follows. At first, we needed to observe the air-conditioner state distribution based on the temperature to determine the fitting function with the parameters that needed to be trained; the logistic function was selected similarly, and we set the number of samples and gave the initial value to the parameters for the sampling. Secondly, we assumed the a priori distribution of the parameters was 2D Gaussian, and MH random sampling was carried out by searching the distribution space of the parameters. Based on Markov characteristics, new values were randomly assigned to the parameters according to the current state. Thirdly, we checked the new random values; if they satisfied the MH sampling theorem, then we accepted them as a new current state; if not, we rejected and returned them to the previous state. Lastly, we repeated the previous two steps for the specified number of iterations, until it reached the detailed condition of a Markov chain, which was the probability distributions of the air-conditioner energy use behavior. The experimental period was from 22 January 2019 to 4 June 2019. The highest, lowest, and average outdoor temperatures of Jinan in each month during the experiment are shown in Figure 10. The temperatures in May and June were higher, with the average temperatures of 24 \({}^{\circ}\)C and 27.5 \({}^{\circ}\)C, respectively. The highest temperature in May was 38 \({}^{\circ}\)C; the lowest temperature in January was \(-7\)\({}^{\circ}\)C.  
Figure 11 shows the temperature change of a user's office with the air-conditioner from 22 to 25 May 2019. It can be seen from Figure 11 that the temperature of the air outlet was about 10-15 \({}^{\circ}\)C, which was lower than the indoor temperature when the air-conditioner was running. Based on this, the working states of the air-conditioner could be judged. Figure 9: Energy use working hours model of electrical equipment. Figure 11 shows several typical air-conditioner operation processes. Processes 2 and 4 show that after the user turned on the air-conditioner, the air outlet temperature dropped to about 17 \({}^{\circ}\)C, and with little fluctuation, so the air-conditioner compressor was in constant frequency operation. After the operation of Processes 1, 3, and 5 for a period of time, due to the frequency conversion of the compressor, the temperature was fluctuating continuously. Before the air-conditioner was started manually, the temperature was basically stable and high. Therefore, the above judgment method could distinguish the manual on and off condition of the air-conditioner from the automatic on and off process, so as to obtain the record of the manual on and off condition of the air-conditioner.