# Applying Knowledge Inference on Event-Conjunction for Automatic Control in Smart Building
## 5 Experiment and Evaluation
### Assumption for Automatic Control on Elevator for Zero-Waiting Time  
In order to evaluate the usability of the proposed framework, an automatic control scenario on elevator has been assumed. In general, when the user wanted to use the elevator, he/she has to first reach the elevator hall and press the upward or downward button to make a call on the elevator (given the timestamp of \(t_{2}\) shown in Figure 13). Then the elevator received the command and arrived at the floor (given the timestamp of \(t_{3}\) shown in Figure 13) to pick-up the user. The automatic control scenario was an assumption based on knowledge inference on event conjunction. Suppose:  
1. Room occupancy has been monitored in real-time based on the sensor observations;
2. If the agent detected a user leaving the room and further predicted the user has an intention of using the elevator;
3. Then, the agent triggers the elevator in-advance to move to the user's departure floor. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \begin{tabular}{c} **Short\_Dist** \\ **(Hops)** \\ \end{tabular} & \begin{tabular}{c} \(\mu\) **Based on** \\ **by LR Optimization** \\ \end{tabular} & \
\begin{tabular}{c} \(\bar{\mu}\) **of Observed** \\ **Sensor Data** \\ \end{tabular} &
\begin{tabular}{c} **MCMC Sampling Process** \\ \(\bar{\mu}\) \\ \end{tabular} \\ \hline Room\_A305 & 2 & 55.62 & 60.76 & 60.68 & 54.852 & 66.673 \\ Room\_A304 & 3 & 70.08 & 118.38 & 116.933 & 110.495 & 123.556 \\ Room\_A202 & 5 & 99.00 & 136.09 & 134.465 & 126.945 & 142.471 \\ Room\_B202 & 5 & 84.54 & 109.72 & 109.144 & 103.462 & 115.141 \\ Room\_B204 & 3 & 70.08 & 58.78 & 55.62 & 54.366 & 63.421 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: MCMC sampling results \(\Delta t\) of several representative spaces. Figure 12: Examples of approximated \(\mu\) values of \(\Delta t\), where (**a-1,b-1,c-1**) show the mean value result on the observed raw data, while (**a-2,b-2,c-2**) show the approximated \(\Delta t\) after MCMC posterior sampling process. The above assumption means when the user arrives at the elevator hall at \(t_{2}\) time, the elevator has been ready for picking up the user. Thus, he/she can take a ride on the elevator immediately and no waiting time (\(t_{3}-t_{2}\)) was needed. Therefore, the effectiveness of automatic control on elevator was evaluated by extracting the historical users' waiting time. The numbers of inferred event conjunction of room occupancy \(\sim\) elevator arriving (\(E_{r}\)\(>\)\(E_{el}\)) has been listed in Table 6. Regarding the elevator usage, the count of non-waiting, waiting have been calculated as well. Furthermore, the percentages of the different waiting time also have been inferred, respectively. Figure 14 shows the statistical result of users' waiting time calculated from collected sensor data. The result demonstrated there were 267 waiting events happened among the total of 471 elevator-using events, with the probability of waiting was 56.7%. In addition, the total amount of waiting time was 3085 s and the average waiting time per user was 11.55 s (SD = 5.30 s). These numerical results of users' waiting time demonstrated the great potentials of automatic control on elevator for pursuing the goal of zero-waiting of using the elevator. The quantitative results also showed the effectiveness of the knowledge inference on \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \(E_{r}\)\(>\)\(E_{el}\) & **Without Waiting** & \multicolumn{3}{c}{**With Waiting**} \\ \hline
**Sum** & **471** & **210** & \multicolumn{3}{c}{**267**} \\ \hline  & & & 5 s & 10 s & 15 s & 20 s \\ \cline{3-6} Probability & & & 0.232 & 0.446 & 0.101 & 0.221 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Statistics of the users’ waiting event on elevator based on the mapping result of FSMs. Figure 14: The statistics of users’ waiting time on elevator mapped by FSMs. Figure 13: Example shows the real event trace of room-usage and elevator.