Control design for the reduction of buildings’ energy consumption