# Vision Based Dynamic Thermal Comfort Control Using Fuzzy Logic and Deep Learning
## 3 Methodology
### Calculation of the PMV Thermal Index  
The thermal comfort level has been classified by the American Society of Heating, Refrigerating, and Air-Conditioning Engineers (ASHRAE) as a standard thermal sensation scale [25]. The PMV was used as the thermal comfort index. ASHRAE recommended the preferred range of PMV to be between \(-0.5\) and \(+0.5\) for thermal neutrality and comfort. The PMV thermal comfort index has been used in many studies to quantify the thermal comfort. The occupant's metabolic rate is one of the most effective variables in \begin{table}
\begin{tabular}{c c c} \hline \hline
**Action** & **Metabolic Rate (Sit)** & **Metabolic Rate (Stand)** \\ \hline Eat & 90 & 120 \\ Drink & 90 & 120 \\ Lay down on sofa & 46 & 46 \\ Play game & 90 & 120 \\ Play guitar & 120 & 180 \\ Read book & 76 & 105 \\ Sit down & 58 & 58 \\ Stand up & 70 & 70 \\ Use laptop & 70 & 93 \\ Write on a paper & 105 & 133 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: A number of exemplar actions and the corresponding metabolic rates whilst sitting and standing [29]. PMV. However, it is widely taken as a constant in most research. This can be accurately extracted, as shown in the previous section (related information can be seen in Section 3.1). Assigning metabolic rates to activities gives the opportunity to provide accurate thermal comfort levels based on the action of an occupant of a room. The PMV value can then be calculated from [10] based on [PERSON]'s experiments on the perception of thermal comfort [33], as follows:  
\[PMV=(0.303e^{-0.036M}+0.028)L \tag{2}\]  
where \(M\) is the metabolic rate and \(L\) is the thermal load on the body. The thermal load on the body is defined as the difference between the internal heat production and the heat loss to the actual environment. This is for a person to be kept at a hypothetically thermally comfortable level. The thermal load can be calculated with:  
\[L=(M-W)-3.96\times 10^{-8} f_{\rm cl}[(T_{\rm cl}+273)^{4}-(T_{\rm mr}+273)^{4}]+f_{\rm cl}h _{\rm c}(T_{\rm cl}-T_{\rm a})\] \[+3.05[5.73- 0.007(M-W)-\rho_{\rm a}]+0.42[(M-W)-58.15]\] \[+0.0173M(5.87-\rho_{\rm a})+0.0014M(34-T_{\rm a}) \tag{3}\]  
where \(M\) is the metabolic rate, \((\frac{mMT}{m^{2}})\). \(W\) is the external work, \((\frac{mMT}{m^{2}})\), assumed zero in indoor environments. \(T_{\rm a}\) is the air temperature, (\({}^{\circ}\)C). \(T_{\rm mr}\) is the mean radiant temperature, (\({}^{\circ}\)C) assumed to be equal to the air temperature. \(\rho_{\rm a}\) is partial water vapour pressure. \(f_{\rm cl}\) is the ratio of a person's body surface area when cdt to the person's body surface area when nude. \(T_{\rm cl}\) is the surface temperature of clothing, and \((C^{\circ})\). \(h_{\rm c}\) is the convective heat transfer coefficient, \((\frac{W}{K.m^{2}})\). The partial water vapour pressure \(\rho_{\rm a}\) is given by:  
\[\rho_{\rm a}=6.11\times\frac{HR}{100}\times 10^{\frac{7.5T_{\rm a}}{2M \gamma+T_{\rm a}}}. \tag{4}\]  
where \(HR\) is the relative humidity. The surface temperature of clothing \(T_{\rm cl}\) can be obtained by:  
\[T_{\rm cl}=35.7-0.028\cdot(M-W)-I_{\rm cl}\cdot\{3.96.10^{-8} \cdot f_{\rm cl}\cdot\] \[[(T_{\rm cl}+273)^{4}-(T_{\rm mr}+273)^{4}]+f_{\rm cl}\cdot h_{ \rm c}\cdot(T_{\rm cl}-T_{\rm a})\} \tag{5}\]  
where \(I_{\rm cl}\) is the thermal insulation of clothes and \((m^{2}\frac{K}{W})\) assumed to be 0.2. \(T_{\rm cl}\) can have a linear relationship with air temperature \(T_{\rm a}\) in a range 16-26 degree as mentioned in [25]. This can simplify the calculation of \(T_{\rm cl}\) to:  
\[T_{\rm cl}=0.5760\times T_{\rm a}+14.1810 \tag{6}\]  
The convective heat transfer coefficient \(h_{\rm c}\) is given by:  
\[h_{\rm c}= \begin{cases}2.38[T_{\rm cl}-T_{\rm a}]^{0.25},&\text{if}\quad 2.38 [T_{\rm cl}-T_{\rm a}]^{0.25}\geq 12.1\sqrt{V};\\ 12.1\sqrt{V},&\text{if}\quad 2.38[T_{\rm cl}-T_{\rm a}]^{0.25}<12.1\sqrt{V}. \end{cases}  \tag{7}\]  
where \(V\) is the relative air velocity and \(\frac{m}{s}\) that is assumed to be 0.15.