at University of California, Irvine

The Smart Building with HVAC Systems

The smart building, as an application of the cyber-physical systems (CPSs), plays an important role in everyday lives of people. Smart buildings are comprised of components such as HVAC systems, sensors, actuators, controllers etc. During the system’s lifetime, faults are inevitable for one or many of these components. Since the controllers of the HVACs heavily rely on data of sensors that are deployed in the buildings, temporary or permanent sensor faults may lead to increased energy consumption or decreased thermal comfort far below expectations.

Thermal comfort and energy efficiency are primary issues for HVAC systems in smart buildings. In this project, our goal is to control room temperatures in a distributed fashion and meet expectations of all occupants with the emphasis on thermal comfort and energy consumption.


We adopt a model-based design approach for a multi-room smart building as a CPS application. Model-based design (MBD) allows the designer to design, analyze, verify, and validate CPSs through several consequent design phases. Models of the physical system (PS) and the cyber system (CS) interact typically in a simulation environment.


Figure 1. Model-based CPS design methodology.

Our model based CPS design methodology is shown in Figure 1. A common CPS model consists of the physical system model, the cyber-physical (CP) interface model, and the cyber system model, as represented with green rectangles in Figure 1. The physical system model can be expressed as the description of physical behavior with differential equations. Those equations should reflect both inner dynamics (i.e., plant behavior and conditions) or outer dynamics (i.e., conditions of environment surrounding the plant) of the physical system. The cyber-physical (CP) interface model represents the network of sensors and actuators. The cyber system model can be expressed as the control algorithm, and the behavior of software and hardware components of the cyber system.

Since our use-case CPS application is a multi-room smart building incorporating temperature sensors, controllers, and HVAC systems, from CPS standpoint, the building, the phenomenon being observed (i.e., room temperatures), and HVAC systems represent the physical system, the controllers represent the cyber system and the temperature sensors represent the interface between the cyber and physical systems. In this project, we examine sensor data faults observed in the real-world sensor deployments, and their effects on thermal comfort and energy efficiency in multi-room buildings.


  • Modeling temperature sensor faults that are observed in the real-world sensor deployments, namely :

    • Single-sample-spike
    • Spike-and-stay
    • Stuck-at
  • Modeling a multi-room building with HVAC systems by using CPS approach and developing reusable system models in the MATLAB/Simulink environment
  • Providing fault mitigation techniques based on temporal and spatial correlations between sensors’ data without the need to replace faulty sensors


Multi-room HVAC Systems:

We investigate multi-room HVAC systems that integrate temperature sensors and controllers as a CPS application. Each room has a dedicated sensor, controller, and HVAC system. The controllers utilize data of the sensors to turn on/off HVAC systems.


Figure 2: Heat flows in a building having two rooms.

To model temperature variation in the building, a thermal model of the building and HVAC systems are required. Figure 2 shows a sample 2-room building as an illustration of heat flows in the building. T1 and T2 refer to room temperatures for room1 and room2, respectively. T0 refers to outside temperature. Q10, Q20 and Q12 represents the heat flows from room1 to outside, from room2 to outside, and from room1 to room2, respectively. We describe the thermal behavior of a multi-room building through the laws of thermodynamics.

System Simulation Framework

We implemented our MBD approach for the design of a multi-room smart building with HVAC systems in the MATLAB/Simulink environment. The system simulation framework, presented here, includes:

  • Physical System Model : Thermal properties of the building and HVAC systems)
  • CP Interface Model : Temperature sensor and fault semantics
  • Cyber System Model : Control logic and fault mitigation functionality


Figure 3: Simulink model of the multi-room building.

Figure 3 shows a snapshot of our system model developed in Simulink. The building subsystem incorporates a thermal model of the building and models of sensor and controller components. HVAC systems and thermal properties of the building are modeled using the aforementioned thermodynamic equations.


Figure 4: Simulink model of one room.

Figure 4 shows a Simulink model for one room, namely room1, incorporating thermal parameters, a temperature sensor, and a controller for the room. Each room in the building has a similar model. In Figure 4, QHeater1 and QCooler1 represent the heat flows supplied by the heating and cooling systems in room1, respectively. Since supplied hot air increases the temperature, QHeater1 is added to aggregate heat flow and since supplied cool air decreases the temperature, QCooler1 is subtracted from aggregate heat flow. Q12 and Q10 represent the heat transfer from room1 to room2 and outside respectively and are subtracted from aggregate heat flow for room1. Similar parameters are defined for other rooms as well, following the same notation.

Thermal resistance and capacitance parameters in the model depend on the physical properties of the materials used in the building. Thermal resistance of a material is the function of thickness, surface area, and thermal conductivity of the material and thermal capacitance of a material is the function of mass and heat capacity of the material. In Figure 4, Tr1 actual refers to the actual temperature of room1. Tr1 sampled refers to data of temperature sensor in room1. Tr1 mitigated refers to the temperature data after mitigation technique being applied by the controller for room1. The controller processes the sampled temperature data and apply mitigation techniques if any fault is detected. Outputs of the controller carry control commands for the HVAC system’s heating and cooling facilities. The HVAC system is controlled by considering the mitigated temperatures.

To have a well-defined thermal model of the building, the effect of direct solar radiation is considered for North, South, East, and West directions and the outcome is referred as Tout felt. The sun’s angle of incidence and the orientation of the room (South/North and East/West) are specified and the result is added to Tout to calculate Tout felt, which is then used to calculate Q10 as shown in Figure 4.


The system models and complementary matlab scripts are available at the following github repository:

github vgunes/sb-hvac

For support please contact Volkan

Related Publications:

  • Improving Energy Efficiency and Thermal Comfort of Smart Buildings with HVAC Systems in the Presence of Sensor Faults; Volkan Gunes, Steffen Peter, Tony Givargis; In 12th IEEE International Conference on Embedded Software and Systems (ICESS), 2015; [Document]