# Vision Based Dynamic Thermal Comfort Control Using Fuzzy Logic and Deep Learning
## 3 Methodology
### Comfort Time Constant  
The comfort time constant can be defined as a time required to respond to a change in ambient temperature when the ambient temperature is changed from \(T_{1}\) to \(T_{2}\). The technical definition is: \"the time required to change 63.2% of the total difference between initial and final temperature when subjected to a step function change in temperature\" [35]. The time constant, \(\tau\), is an appropriate mathematical way that can be used to describe the thermal properties of a room. Thermal comfort can be supported by considering the maximum and minimum indoor temperatures that the tenants accept. Therefore, a convenient environment can be provided by an adjustment of a comfort time constant, \(\tau\) according to an occupant's preferences. The relationship between the time elapsed during the temperature change and comfort temperature can be written, as follows [35]:  
\[T=(T_{2}-T_{1})(1-e^{(\frac{-t}{\tau})})+T_{1} \tag{9}\]  
When \(t\) and \(\tau\) are equal, then, the equation can be simplified, as follows:  
\[T=(T_{2}-T_{1})(1-e^{(-1)})+T_{1} \tag{10}\]  
Because \((1-e^{-1})\) = 0.632, then \(T\) = 0.632 \(T_{2}\) + 0.268 \(T_{1}\). This shows that the environment reaches 63.2% of the total difference between initial and final temperatures within time constant \(\tau\) (seconds). In this work, different comfort time constants are used to support various occupants' preferences, i.e. fast, medium, or slow. The sitting action is selected here as an instance in the fuzzy temperature control to show the difference between the various comfort time constants. The initial temperature used is 20 \({}^{\circ}\)C. Subsequently, the temperature is controlled based on the fuzzy rules, as discussed previously. Figure 5 shows the results of fuzzy temperature control for this sitting action using different temperature change rates over (1, 1.25, 2.5) hours. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **B-Negative** & **Negative** & **S-Negative** & **Zero** & **S-Positive** & **Positive** & **B-Positive** \\ \hline T-Warm & \(N_{1}\) & \(N_{4}\) & \(N_{4}\) & \(N_{4}\) & \(N_{4}\) & \(N_{4}\) & \(N_{4}\) \\ \hline Warm & \(N_{1}\) & \(N_{3}\) & \(N_{2}\) & \(N_{4}\) & \(N_{4}\) & \(N_{4}\) & \(N_{4}\) \\ \hline S-Warm & \(P_{1}\) & Z & Z & N1 & \(N_{2}\) & \(N_{4}\) & \(N_{4}\) \\ \hline Neutral & \(P_{4}\) & \(P_{3}\) & Z & Z & Z & \(N_{2}\) & \(N_{4}\) \\ \hline S-Cold & \(P_{4}\) & \(P_{4}\) & \(P_{2}\) & \(P_{1}\) & Z & Z & \(N_{1}\) \\ \hline Cold & \(P_{4}\) & \(P_{4}\) & \(P_{3}\) & \(P_{3}\) & \(P_{2}\) & \(P_{2}\) & \(P_{1}\) \\ \hline T-Cold & \(P_{4}\) & \(P_{4}\) & \(P_{4}\) & \(P_{4}\) & \(P_{3}\) & \(P_{2}\) & \(P_{1}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Rules of fuzzy temperature control system based on PMV and \(\Delta\)PMV inputs. From Figure 5, it can be seen that different comfort time constant (fast, medium, and low) can be achieved based on the temperature change rate. This provides an opportunity for an occupant to select the option according to their comfort preferences. For instance, the occupant may choose the fast mode (big temperature change) that speeds up the system to reach 63.2% of preferred level within 16 minutes. This is shown in Figure 5a. This mode could also be utilised if there is a big gap between the preferred and current temperature levels. It could be then changed to another mode in order to stabilise the temperature. However, this may be preferred by some people, but not others. Therefore, in Figure 5b,c, other modes are considered, i.e., medium and low. These are provided to cover various preferences that have different comfort time constant. As can be seen, the medium mode  
Figure 5: Illustration of the results of different comfort time constants for the proposed thermal control system with an initial temperature of 20 \({}^{\circ}\)C changing to a sitting position for both the PMV and temperature of a room. Top: PMV values; and Bottom: Temperatures as functions of different comfort time constants.