Vehicle Climate Control System
This model interfaces simulates the working of a climate control system in a car.
The user can enter the temperature value they would like the air in the car to reach by double clicking on the USER SETPOINT IN CELSIUS Block and entering the value into the dialog box. The EXTERNAL TEMPERATURE IN CELSIUS can also be set by the user in a similar way. The numerical display on the right hand side of the model shows the reading of a temperature sensor placed behind the driver's head. This is the temperature that the driver should be feeling. When the model is run and the climate control is active, it is this display box whose value changes showing the change of temperature in the car.
The control of the system is implemented in Stateflow. Double clicking on the Stateflow chart will show how this supervisory control logic has been formulated.
In the Blower State, the larger the difference between the setpoint temperature and the current temperature, the harder the fan blows. This ensures that the temperature will reach the required value in a reasonable amount of time, despite the temperature difference. Once again, when the temperature of the air in the car reaches to within 0.5 deg C of the setpoint temperature, the system will switches off.
The Air Distribution and Recycling Air States are controlled by the two switches which trigger the Stateflow chart. An internal transition has been implemented within these two states to facilitate effective defrosting of the windows when required - when the defrost state is activated , the recycling air is turned off.
The Heatermodel was built from the equation for a heater exchanger shown below:
Tout = Ts - (Ts-Tin)e^[(-pi.D.L.hc)/(m_dot.Cp)]
where
The Air Conditioner: The final temperature to exit from the A/C is calculated as follows:
y.(w.Tcomp) = m_dot.(h4-h1)
where
The above effects are inputs into the thermodynamic model of the interior dynamics of the cabin. The temperature of the air exiting the vents is taken into account by calculating the difference between the vent air temperature and the current temperature inside the car and multiplying it by the fan speed proportion (mass flow rate). 100W of energy is added per person in the car. Lastly, the difference between the temperature of the outside air and the interior air temperature is multiplied by a lesser mass flow rate to account for the air radiating into the car from the outside.
The output of the interior dynamics model is fed to the display block as a measure of the temperature read by a sensor which is placed at the back of the driver's head.