# Adaptive HVAC System Based on Fuzzy Controller Approach
## 4 System Model Implementation
### Generation of FIS Rules  
The proposed approach is implemented using fuzzy rules to measure total energy usage. The rules in the FIS tend to increase in conjunction with the FIS input parameters. Figure 8: Three different electricity tariffs. Figure 9: Electricity tariff membership. Combinatorics and 175 weightage rules are added to the existing 486 rules in [57]. The weightage is assigned to each input parameter in the algorithm, which is then used to measure the score, which is then used to assign values to output parameters. The process of FLC involves a fuzzification process to initialize and define all the input membership functions, a rule definition process to assign the required output fuzzy value to the input parameter membership functions, and a defuzzification process following rule evaluation to achieve a crisp value for energy consumption. After that, the remaining performance metrics are determined. To avoid the combinatorial growth of the IF-THEN rule, the score parameter is introduced as an indicator of energy consumption. The overall weights assigned to the variables' membership functions are used to measure the score. The weights are determined by the membership function, with weights of 0, 1, and 2 for low, medium, and high membership functions (see Algorithm 1). The occupancy input parameter has binary weights of 0 or 1. The model for the rule generation algorithm is based on the score (S) of combinations of input parameters, as presented in Equation (19) below. \[\text{S}=\sum_{i=1}^{6}\text{W}(\sigma_{i}) \tag{19}\]  
``` \(\text{Outdoor}_{\text{T}}\leftarrow\{\text{N},\text{W},\text{H},\text{VH}, \text{EH}\}\) \(\text{Indoor}_{\text{T}}\leftarrow\{\text{L},\text{N},\text{H}\}\) \(\text{Humidity}_{\text{rel}}\leftarrow\{\text{L},\text{N},\text{H}\}\) \(\text{Prate}\leftarrow\{\text{L},\text{N},\text{H}\}\) \(\text{Occ}\leftarrow\{\text{A},\text{P}\}\) \(\text{ISPs}_{\text{s}}\leftarrow\{\text{L},\text{N},\text{H}\}\) \(\text{ForHumidity}_{\text{rel}}[1]\) to \(\text{Humidity}_{\text{rel}}[n]\) do \(\text{ForOutdoor}_{\text{T}}[1]\) to \(\text{Outdoor}_{\text{T}}[n]\) do \(\text{ForIndoor}_{\text{T}}[1]\) to \(\text{Indoor}_{\text{T}}[n]\) do \(\text{For}\text{Prates}[1]\) to \(\text{Prates}[n]\) do \(\text{ForISPs}_{\text{s}}[1]\) to \(\text{ISPs}_{\text{s}}[n]\) do \(\text{ForOcc}[1]\) to \(\text{Occ}[n]\) do \(\text{ComputeS}\) \(\text{IFS}\)=\(\text{norS}\)=\(\text{IC}\)=\pressure zone to the lower pressure zone in the room, the fresh air intake must be calculated for each HVAC cycle, the average air velocity of laminar flow should be 90 \(\pm\) 20%, and openings such as doors or windows should be closed (not to exceed more than 15 min) to allow room comfort levels to recover properly. The case study incorporated an innovative lightweight structure approach utilizing a stick-built timber frame and a cassette floor-building system. The thermal properties and thicknesses of the building materials are shown in Table 1. These attributes are useful for assessing occupant dynamics and steady behavior. It is important to note that ethical approval was obtained from the Monash University Research Ethics Committee. Subsequently, informed consent was obtained from all participants involved in this research. ### Impact of Using Feedback Loop

In this scenario, the proposed controller aims to respond to a change in the electricity tariff using the RTP scheme and change the initialized setpoint based on defining FIS rules. The proposed controller is designed to respond appropriately under the three scenarios considered in this study, though any additional scenario can be incorporated by simply modifying the fuzzy rules.