## 4 Proposed Architecture of Model-Based Predictive Control for Thermal Comfort in Building
### Fuzzy Based Control Model
The input membership functions for the PMV, PMV variation and outside temperature are represented in Figures 3-5, respectively, while the output membership functions for the fan coil speed is depicted in Figure 6. Table 3 illustrates the linguistic terms of the input and output variables and their corresponding trapezoidal fuzzy sets. The following equation is applied in the proposed fuzzy control system to calculate the quantifiable results of the given fuzzy sets and corresponding membership degrees:  
\[mCoA=\frac{\int f(x)\cdot xdx}{\int f(x)dx}. \tag{11}\]  
The Modified Center of Area (\(mCoA\)) defuzzification method is considered as it takes into account all of the area covered by the scaled membership functions, even if this area extends beyond the range of the output variable. The interval of integration lies between the minimum membership function value and the maximum membership function value. The comfort control process of the fuzzy controller is detailed in Figure 7. The fuzzifier module takes the PMV index value and its variation value every ten minutes as well as the OT. These parameters are converted into fuzzy sets to the fuzzy inference system (FIS) and then the output sets are computed, which are referenced by the control rules. The defuzzifier module infers the output value V from the output set, in a range from 0-100%, which stands for the minimum to maximum speed of the fan coil unit. Figure 4: Input variable PMV variation membership function definition. Figure 5: Input variable outside temperature membership function definition. Figure 3: Input variable PMV membership function definition. The proposed fuzzy controller focuses on maintaining the indoor comfort level in a summer comfort condition if the outside temperature is very high. Otherwise, the environment comfort level is set to neutral by the controller when the outside temperature is high. In simple terms, the controller acts more like a regulator of HVAC equipment according to the PMV index value and its variation. Table 4 shows a sample of the fuzzy rules and, in total, 175 rules have been built. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Input Variables** & **Linguistic Terms** & **Fuzzy Sets** \\ \hline \multirow{4}{*}{Outside Temperature} & Very Low (VL) & \(-\)inf, \(-\)inf, 1, 4 \\  & Low (L) & 0, 4, 10,14 \\  & Medium (M) & 10, 14, 20, 24 \\  & High (H) & 20, 24, 30,34 \\  & Very High (VH) & 30, 34, +inf, +inf \\ \hline \multirow{4}{*}{PMV Variation} & Negative Big (NB) & inf, \(-\)inf, \(-\)0.5, \(-\)0.3 \\  & Negative Medium (NM) & \(-\)0.5, \(-\)0.3, \(-\)0.2, \(-\)0.05 \\  & Negative Small (NS) & \(-\)0.2, \(-\)0.1, \(-\)0.05, 0 \\  & Zero (Z) & \(-\)00.5, 0.05 \\  & Positive Small (PS) & 0, 0.05, 0.1, 0.2 \\  & Positive Medium (PM) & 0.05, 0.2, 0.3,0.5 \\  & Positive Big (PB) & 0.3, 0.5, +inf, +inf \\ \hline \multirow{4}{*}{PMV} & Too Cold (TC) & \(-\)3, \(-\)3, 0.9, 0.4 \\  & Winter Comfort (WC) & \(-\)0.6, \(-\)0.3, \(-\)0.1, 0 \\ \cline{1-1}  & Neutral (N) & \(-\)0.2, 0.1, 0.2 \\ \cline{1-1}  & Summer Comfort (SC) & 0, 0.1, 0.3,0.6 \\ \cline{1-1}  & Too Hot (TH) & 0.4, 1, 3, 3 \\ \hline Output Variables & Linguistic Terms & Fuzzy Sets \\ \hline \multirow{4}{*}{Fan Speed} & Zero (Z) & 0, 0, 0.1, 0.2 \\  & Low (L) & 0.1, 0.2, 0.3,0.4 \\ \cline{1-1}  & Medium (M) & 0.3, 0.4, 0.6, 0.7 \\ \cline{1-1}  & High (H) & 0.6, 0.7, 0.8, 0.9 \\ \cline{1-1}  & Very High (VH) & 0.8, 0.9, 1, 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Fuzzy sets for the input and output variables. Figure 6: Output variable fan speed membership function definition.