1. Objective

The goal of this project is to design a simple HVAC (Heating, Ventilation, and Air Conditioning) control system. We will simulate this system using MATLAB Simulink.
The model will automatically switch Heating or Cooling ON or OFF based on the cabin temperature.


2. System Requirements

ConditionAction
Temperature > 24ยฐCTurn ON Cooling
Temperature < 20ยฐCTurn ON Heating
20ยฐC โ‰ค Temperature โ‰ค 24ยฐCMaintain previous state (deadband)
Desired Cabin Temperature22ยฐC

This means:

  • If the cabin is too hot, cooling should start.
  • If the cabin is too cold, heating should start.
  • Between 20ยฐC and 24ยฐC, no action is taken; the system holds the last state.

3. Concept

The Unit Delay latch is used to store the last output. It remembers whether the system was in the Heating or Cooling state. This occurs when the temperature is within the deadband range (20โ€“24ยฐC).
This helps avoid frequent ON/OFF switching of the HVAC system, which improves stability and saves energy.


4. Model Blocks Overview

BlockPurpose
ConstantSet the desired temperature value (22ยฐC).
In1 (Input)Input temperature signal.
Relational OperatorCompare input temperature with limits (20ยฐC and 24ยฐC).
Logical OperatorCombine logical conditions (AND, OR).
SwitchChoose between Heating or Cooling based on comparison results.
Unit DelayHolds the previous output when inside deadband.
Out1 (Output)Shows final control output (Heating = 1, Cooling = 0).

5. Model Logic Explanation

  1. Input Temperature (T_in) is compared with 20ยฐC and 24ยฐC.
  2. Three possible conditions are checked:
    • If T_in < 20ยฐC โ†’ Heating ON.
    • If T_in > 24ยฐC โ†’ Cooling ON.
    • If T_in is between 20ยฐC and 24ยฐC, the Unit Delay block keeps the previous output.
  3. The Switch block selects the new state based on these conditions.
  4. The Unit Delay output feeds back to maintain the last output when the temperature is within the deadband range.

6. MATLAB SIMULINK LOGIC

Output

7. Test Results

Temperature (ยฐC)Expected OutputDescription
18Heating ONBelow 20ยฐC
22Hold StateWithin deadband
26Cooling ONAbove 24ยฐC

8. Conclusion

The HVAC system model successfully:

  • Turns ON Heating when temperature < 20ยฐC.
  • Turns ON Cooling when temperature > 24ยฐC.
  • Maintains previous state between 20โ€“24ยฐC.

This approach using Unit Delay latch ensures smooth operation and avoids unnecessary switching.