Patent attributes
A thermostat includes an equipment controller and a model predictive controller. The equipment controller is configured to drive the temperature of a building zone to an optimal temperature setpoint by operating HVAC equipment to provide heating or cooling to the building zone. The model predictive controller is configured to determine the optimal temperature setpoint by generating a cost function that accounts for a cost operating the HVAC equipment during each of a plurality of time steps in an optimization period, using a predictive model to predict the temperature of the building zone during each of the plurality of time steps, and optimizing the cost function subject to a constraint on the predicted temperature of the building zone to determine optimal temperature setpoints for each of the time steps.