## 5 Case Study: Experimental Validation in a Representative Smart Building Scenario
### Implementation of the JFML-IoT-Based Energy Management System
#### 5.4.1 Sensor and Actuator Object Instantiation
Sensor readings indicate very low CO\({}_{2}\) concentrations and medium temperature, resulting in the activation of rules R02, R05, and R17 to decrease the intensity of the HVAC and ventilation systems while preserving thermal comfort. Additionally, low illuminance levels detected in both zones lead to the activation of rules R09 and R12, thereby increasing artificial lighting to maintain visual comfort. Overall, Scenario S4 demonstrates the fuzzy system's capacity to

* Prioritize visual comfort under low-lighting conditions while maintaining energy efficiency;
* React to nuanced combinations of environmental factors and occupancy;
* Produce interpretable, graded outputs even under overlapping rule activation. #### 5.5.5 Scenario S5: Low/High Light, Un/Occupancy, and High Humidity

This scenario evaluates the system's response to a situation in which one zone of the room is unoccupied and exposed to low illuminance, while the second zone is occupied and subject to high illuminance. Both zones present elevated humidity levels. This configuration is representative of a heterogeneous indoor environment, such as a partially lit space with varying occupancy, potentially occurring during transitional periods of the day or in buildings with uneven natural light distribution and high moisture levels. Table 18 details the input values. \begin{table}
\begin{tabular}{l l c c} \hline \hline
**Rule** & **Description** & \multicolumn{2}{c}{**Membership Degree**} \\ \hline R02 & IF RoomTemperature1 IS Medium AND Occupancy1 IS True THEN HVACControl IS Low & 0.67 \\ R05 & IF RoomTemperature2 IS Medium AND Occupancy2 IS True THEN HVACControl IS Low & 0.8 \\ R09 & IF Illuminance1 IS Low AND Occupancy1 IS True THEN LightingControll IS Bright & 0.67 \\ R12 & IF Illuminance2 IS Low AND Occupancy2 IS True THEN LightingControll2 IS Bright & 0.5 \\ R17 & IF CO\({}_{2}\)Level IS Low THEN VentilationControl IS Off & 1.0 \\ R24 & IF Occupancy1 IS True OR Occupancy2 IS True THEN HVACControl IS Medium, VentilationControl IS Moderate, LightingControll IS Dim, LightingControl2 IS Dim & \\ \hline \hline \end{tabular}
\end{table} 
Table 16: Inference results and active rules for Scenario S4. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Input Variable** & **Value** & **Input Variable** & **Value** \\ \hline RoomTemperature1 & 20.0 °C & RoomTemperature2 & 21.0 °C \\ RoomHumidity1 & 50.0\% & RoomHumidity2 & 55.0\% \\ Occupancy1 & 1.0 & Occupancy2 & 1.0 \\ Illuminance1 & 100.0 lx & Illuminance2 & 150.0 lx \\ CO\({}_{2}\) Level & 400.0 ppm & – & – \\ \hline \hline \end{tabular}
\end{table} 
Table 15: Input values for Scenario S4. Table 19 lists the contributing rules and their degrees of activation, while Table 20 summarizes the inferred output values. As observed, rule R24 is activated to establish a baseline comfort environment in the room due to the presence of at least one occupied zone. Illuminance sensors detect high lighting levels in the occupied area and very low lighting in the unoccupied zone. Consequently, rule R10 is triggered to deactivate the lighting system in the well-lit (occupied) zone, while Rule R13 is activated to increase lighting in the darker (unoccupied) area. This coordinated response helps avoid stark contrasts in brightness across the room, thereby enhancing visual comfort for occupants. Finally, humidity sensors report elevated levels in the occupied zone, prompting the activation of rule R22, which increases HVAC intensity to a high level. However, rule R5, detecting medium temperature in the same area, and rule R17, responding to low CO2 levels, both contribute to reducing the overall intensity of the HVAC. These combined activations result in a moderated and balanced control output that maintains comfort while optimizing energy usage.