## 3 Problem Formulation
### Fuzzy Logic Controller  
Conventional controllers are expressed in the form of mathematical modeling so that they can represent the physical quantities of the real system. Inputs and outputs of Fuzzy Logic Controllers (FLC) are real variables that are mapped with a nonlinear function. Because of this, they have been found to be very helpful in modeling the nonlinear HVAC system. FLC is advantageous because of having no mathematical modeling requirement as compared to the conventional controllers. Conceptual diagram of the FLC system is shown in Figure 1.  
FIS takes the crisp inputs, fuzzifies them, applies fuzzy operators on the premise (antecedent), performs implications from the premise to the conclusion (consequent), aggregates the conclusion across fuzzy rules to generate fuzzy output and defuzzify it to get a crisp output. The model proposed in this paper is evaluated and tested using the Mamdani FIS and Sugeno FIS. Mamdani FIS rules are generated using the linguistic variables for both the premise and conclusion.  
_IF_ Outdoor-Temp is \"Normal\" \(AND\) Indoor-Temp is \"Normal\" \(AND\) Rates is \"High Peak\" \(AND\) Occupancy is \"Absent\" \(AND\) ISP is \"Low\" \(AND\) Humidity is \"Low\" \(THEN\) energy consumption is \"Low\".  
The formula used for the centroid defuzzification method in Mamdani FIS is as follows [50]:  
\[z=\frac{\int\mu_{\mathrm{C}}(z)\cdot zdz}{\int\mu_{\mathrm{C}}(z)dz}. \tag{1}\]  
Sugeno FIS takes the premise part as a linguistic variable; however, its conclusion part is a function that can be of zero order (constant) or first order.  
Figure 1: Conceptual diagram of the fuzzy logic controller.  
\(IF\) Outdoor-Temp is \"Normal\" \(AND\) Indoor-Temp is \"Normal\" \(AND\) Rates is \"High Peak\" \(AND\) Occupancy is \"Absent\" \(AND\) ISP is \"Low\" \(AND\) Humidity is \"Low\" \(THEN\) energy consumption = energy-consumption ( \(temp_{in}\), \(temp_{out}\), \(price\), \(occupancy\), \(ISP\), \(humidity\)).  
The formula used by Sugeno FIS for the average weighted defuzzification method is as follows:  
\[z=\frac{\sum\mu_{C}z\cdot z}{\sum\mu_{C}z}. \tag{2}\]  
To conclude, Mamdani FIS is intuition based method that is well suited for the human input, whereas Sugeno FIS is a computationally efficient method and is well suited for the mathematical analysis [51]. In order to calculate the total cost of electricity consumption in this paper, the following formula is used where \(Cost(h)\) is the hourly cost, \(EC(h)\) is the electricity consumption on an hourly basis and \(Rates(h)\) are the hourly pricing tariffs based on ToU:  
\[Cost(h)=EC(h)\times Rates(h). \tag{3}\]  
PAR is used to get the information of the load peaks and to determine how much load balance is achieved. PAR is calculated using the formula below:  
\[PAR=\frac{Load_{maximum}}{Load_{average}}. \tag{4}\]  
The efficiency of the proposed technique as compared to the previous technique is calculated from the equation below where \(Value_{pre}\) is the value achieved using a previous approach and \(Value_{pro}\) is the value obtained by applying the proposed technique:  
\[Efficiency\ Gain=\frac{Value_{pre}-Value_{pro}}{Value_{pre}}. \tag{5}\]