In this work, nonlinear model of a Heating, Ventilating, and Air Conditioning (HVAC) system in the cooling mode is first derived using energy and mass balance equations. All components of the system are independently modeled in the modeling process. The responses of the open loop system are then obtained and the reliability of modeling is verified by comparing the actual system records with those of the other researchers. The nonlinear model of the system is linearized using the Jacobian matrix method, and a PID-action as well as the Linear Quadratic Regulator (LQR) controller as the linear control systems are developed on the linear model. PID-action is a classic and robust controller and the LQR is a modern and optimal controller system. In the final part, Sliding Mode Controller (SMC) is designed on the nonlinear model as a robust and proper controller system. The comparison between these proposed controller systems confirms the superiority of the SMC controller, which results in a reduction of the settling time, the omission of overshoot, and an improvement in the actuator's performance via the reduction of energy consumption in the system.