1 Syllabus
12-770 | Sec. A | Spring 2026
TR 12:30PM - 1:50 PM ET Location: GHC 5222
Instructors: Mario Bergés, PH 123L, Phone: x8-4572 Office Hours: Thursdays 3:00 PM - 4:00 PM ET in PH 123G and by appointment.
Teaching Assistant: Chenrui Xu (chenrui2@andrew.cmu.edu) Office Hours: TBD
Textbooks (optional):
- Though no official textbooks are required, the instructor will draw from multiple sources and post the relevant references on Canvas.
Prerequisites: ((12-740 + 12-741) | 12-778) + Python
1.1 Official Course Description
We spend a significant portion of our lives inside buildings: working, sleeping, and on leisure activities. Unsurprisingly, buildings are responsible for over 40% of our annual greenhouse gas emissions. The history of buildings goes hand in hand with the history of energy efficiency, as we have moved from non-renewable/inefficient fuel sources and technologies (e.g., firewood, cookstoves) to more renewable/efficient ones (e.g., solar energy, heat pumps). Increasing efficiency has also resulted in tighter integration between buildings, their systems, and the supporting services. All of these trends have led to an explosion in the number of instrumentation systems (for monitoring and/or controlling) installed in buildings, and an associated increase in the number and complexity of the decisions that are being (and can be) made in light of these new instruments. Autonomous technologies (which make decisions on our behalf in order to achieve pre-established goals) are well suited to address the challenges that these information-rich and highly-interconnected buildings pose.
With a focus on real-world deployments, case studies and group projects, this course will cover the theory and emerging practice of retrofitting existing buildings with hardware and software to significantly increase their autonomy and overall sustainability. The focus will be primarily on the operational stage of the life-cycle of buildings, and particularly on HVAC, electrical and water systems within them. In particular, this course will expose the students to recent advances in the quest to endow buildings with the ability to operate autonomously (i.e., with minimal human assistance), in order to provide the services they were designed for, while maintaining quality of service and upholding human values such as privacy, equity and environmental sustainability. The course will be based on lectures, assignments and a final project where the students will have the opportunity to design and implement an autonomous technology and evaluate it through a hardware-in-the-loop experiment in the lab. This course builds upon machine learning, statistics, data acquisition and instrumentation, linear systems and (some) control theory.
It is intended to be a upper-graduate level course (i.e., for Ph.D. students or senior M.S. students) interested in gaining practical exposure to the state-of-the-art in data science for building systems. As such, the format of the course is tailored to that experience and will include reading and critiquing recent publications in the field, learning to implement data analysis techniques described in them, and producing novel results using these newly acquired skills.
The course assumes students are familiar with concepts in instrumentation, linear algebra, probability, statistics and programming, though this is not a strict requirement if the student has previously discussed with the instructor and has received approval.
1.2 Informal Course Description
I have been doing research on buildings and energy efficiency (in the so-called “smart buildings” area) for almost two decades. However, and embarrassingly, it was not until recently that I had the opportunity to carefully study the physics and scientific theories that describe our understanding of how buildings behave and consume energy (i.e., the so-called “building science”). To put it simply, I have largely focused on the smart aspects of “smart buildings” and kept my understanding of the rest at the bare minimum required to come up with good solutions. The reason for this gap in my knowledge is not a lack of interest; but the incentives in academia are such that there are virtually only two ways to expand one’s knowledge on fundamentals: by taking a sabbatical, or by teaching a course. I chose the latter and this the real reason for why this course exists.
I learn best through practice and by having specific motivations for acquiring knowledge. Given this, when I started the course I thought it would be most interesting if the specific theories and concepts that are covered in the course are directly connected to a smart buildings application that we can build from the ground up. This means that we will not cover all of building physics (far from it!), but it is a trade-off that will serve us well. In time, my plan is to increase my coverage of fundamental topics by introducing new final projects with each new edition of the course.
I’m splitting the course into three approximately equal-length periods: concepts, case studies and implementation. During the first third, concepts, we will learn about the scientific theories that are most relevant for the specific final projects options that are on offer and, during the case studies period we will review specific solutions that have been proposed in the (recent) literature to solve the problems that motivate the final project options. The last third of the course will be dedicated to the final project with lecture time being re-purposed for lab sessions (i.e., step-by-step instructions on how to get started with each project), project feedback sessions and hands-on guidance with the specific project implementations by each team.
2 Grading
| Component | Weight |
|---|---|
| Assignments | 40% |
| Interim Project Progress Update | 15% |
| Written Knowledge Contributions | 5% |
| Final Project Report and Demo | 40% |
| - Written Report | 30% |
| - Demo | 10% |
2.1 Assignments
A total of four assignments are scheduled. The topics covered in each assignment will closely follow the concepts and theory covered during the first third of the course, as well as the academic manuscripts that will be reviewed during the second third.
All assignments are to be solved individually. Discussions and conversations with other students regarding the problem sets are encouraged. However, the final solutions along with the reasoning behind them need to come from you and be clearly explained in the submitted documents.
Each assignment will be worth 10% and is due at the beginning of class on the date that is indicated in each assignment. Assignments that are submitted before this deadline can receive 100% of the available credit. There is a 3 day grace period for late submissions, with the following available credit in each of those five days: 1 Day Late: 90%, 2 Days late: 70%, 3 Days late: 40%. After this time, assignments will not be graded. Of course, if you anticipate not being able to meet this schedule due to a major problem, please talk to the instructor as soon as possible.
2.2 Written Knowledge Contributions
A small pprtion (5%) of the grade for the course will be based on the individual contributions each of you make to the body of knowledge we are collectively capturing on a website/book for the course. The main way you will gain points here is by suggesting corrections for errors, ommissions or other possible improvements to the content. This year I’m running an experiment to test whether pre-trained LLMs from frontier labs can generate the content with enough prompting and guidance, so I expect there will be multiple opportunities to spot errors. The other way to contribute and earn these points is by submitting your own content: terms, definitions, methods, summaries, worked-out exercises, diagrams, and other contributions are fair game for this purpose. The website is hosted on a private Gitlab instance, and will require that you log in with an account in order to edit it. This will give me the opportunity to evaluate your contributions by simply following the commit log of the repository.
2.3 Project Update
Another small portion (15%) of the grade for the course will be based on a progress update that will take place during the last period of the course. This update will consist of: (1) a written 2-page report, authored by all team members; and (2) a 10 minute individual meeting with the instructor to discuss the project, its goals and the plan forward. The written progress report will confer 10% of the final grade, while the individual meeting discussion will be used to provide the remaining 5%.
2.4 Final Project Report
The final project report and demonstration are worth almost half of the total grade and, in some ways, are the most important assignment. The written report is worth 30% and the demonstration 10% of the total grade. For the written report, we are asking that you submit it using the ACM BuildSys template (either LaTeX or MS Word). You should use your own words when writing it and avoid plagiarism of any kind. In it you will describe, in simple terms, the motivation and specific objectives of your project, the design choices made for the hardware and or software prototype that you put together, the experiments you performed to validate whether or not your solution satisfies the objective, and a discussion about the results and limitations. You should make all code and datasets available as part of your submission.
The rubric that will be used for grading the written report is as follows:
- Formatting and organization (15%)
- Grammar, clarity and accuracy of ideas (15%)
- Display of mastery of concepts covered in class (35%)
- Creativity expressed in the solution (10%)
- Depth of discussion related to the pros/cons of the implemented solution (15%)
- Overall assessment of the project’s idea nd execution (10%)
3 Course Policies
Though there are definitely reasons to like anarchism, I still prefer democracy, so here are the rules of the game as they are now (and subject to change if enough of you request that I do).
3.1 Collaboration
Collaboration is expected within the limits of discussing concepts and problems. However, each student must produce his/her own solution to the problems. Copying from another student’s assignment is clearly plagiarism. Using information directly from websites, books, papers and other literary sources without appropriate attribution is also plagiarism. Assignments submitted for this class will be reviewed by the instructor and TA and may be scanned through web-based academic integrity software. Occurrences of cheating or plagiarism will be handled according to the university policy on Academic Integrity, https://www.cmu.edu/policies/documents/Academic%20Integrity.htm. Students are expected to have read this policy and conform to the highest standards of academic integrity. For incidents of academic misconduct, the University Academic Disciplinary Actions Policy, found at https://www.cmu.edu/student-affairs/theword/acad_standards/creative/disciplinary.html, will be followed.
3.2 Class Participation
Students are expected to be in class on time and participate in class discussions. If you cannot make class, please inform your instructors and group members ahead of time. In class, students are expected to be courteous and respectful of the views and needs of other students and instructors.
3.3 Students with disabilities
Students requesting classroom accommodation must first register with the Dean of Students Office. The Dean of Students Office will provide documentation to the student who must then provide this documentation to the Instructor when requesting accommodation.
3.4 Posting of course materials
All the material used in the course (syllabus, readings, problem sets, reports) is intended for use in the class only. No unauthorized posting, publication or redistribution is expected. Uploading course materials to Course Hero or other web sites is not an authorized use of the course material.
4 Course Outline
Here is a more detailed overview of how the lectures will unfold over the three periods. Most of this is subject to change. The list of “learning objectives” should be understood as responding to the phrase By the end of the lecture, students should be able to…
4.1 First third: Concepts and Tools
This period covers the first six weeks of classes. The goal is to introduce the theory behind the operation of heating, ventilation and air conditioning, which includes the science of heat flows in buildings, occupant thermal comfort and occcupant behavior models, as well as simple control theory concepts, such as Proportional Integral Derivative (PID) control; and even some of the policy, control and institutional context relevant to HVAC systems. We will also use some time to get to know each other better and to set up our learning and tinkering environments for the rest of the semester, as well as to decide the specific project option you will be working on.
Learning Objectives:
- Recognize the relative importance of the assessed components of the course (final project, assignments and written contributions)
- Get to know other students in the course and their motivation for joining it
- Understand the goals of the course and its structure
References:
No references for this week.
Learning Objectives:
- Be able to identify sense, plan and act components in an autonomous system.
- Be familiar with the scope and objectives of the final project
- Be able to recite basic facts about global energy demand and generation.
- Reason about energy demand growth trends and their impact
References:
A good companion paper for this lecture is González-Torres et al. (2022). The three projects from my own lab that were referenced during the lecture were:
- Contactless sensing of appliance state transitions through variations in electromagnetic fields Rowe et al. (2010, PDF)
- Brick: Towards a unified metadata schema for buildings Balaji et al. (2016, PDF)
- Gnu-RL: A Precocial Reinforcement Learning Solution for Building HVAC Control Using a Differentiable MPC Policy Chen et al. (2019, PDF)
Learning Objectives: - Understand how their computers need to be configured for maximum efficiency in working on the Final Project and assignments - Have a working Python installation on their computer, with Jupyter Notebook and uv as the package and project manager - Understand how to use uv and Jupyter Notebooks to: - Create, load, edit and run Jupyter notebook files - Create and manage Python projects and virtual environments - Create Jupyter kernels specific to a uv Python project - Create and access a public git repository on Github - Use git to clone, commit and push changes to a remote repository - Ensure that their computer has a working SSH client and understand the value of this tool
References:
Learning Objectives: - Understand the hardware and software ecosystem components for Home Assistant and its value for the final project - Work with a local Home Assistant container on which to test functionality before deploying things to the Home Assistant Green hub - Set up a Home Assistant Green hub and have it receive voice commands with the Voice Preview - Set up integrations to sensors - Set up one automation routine - Create a simple external controller that interacts with the HA server via WebSockets
References: TBD
Learning Objectives: - Name the main processes by which heat loss takes place in buildings - Recognize the value of thinking about heat lossess as stemming from the product of building’s leakiness and the temperature demand - Be able to mathematically model the different modes of heat transfer (conduction, convection and radiation), understanding the underlying physical laws underpinning them - Have familiarity with different building materials and their thermal conductivity as well as the thermal conductance of a material assembly - Represent wall and window assemblies as networks of thermal resistances and capacitances
References:
- Chapter 2 of Reddy
Learning Objectives: - Derive thermal network models from first principles: - Describe the elelments of the Fourier heat equation (the 1-D Fourier transient heat conduction PDE and its steady-state version), including its solution as a sum of steady state plus an infinite sum of exponentials. - Recognize the link between the Fourier heat equation PDE and the Thermal Network Model, understanding it as a finite difference approach using physical construction-based slicing/lumping that leads to a set of N simultaneous first-order differential equations to be solved. - Understand the link between Kirchoff’s voltage/current laws and the heat balance equations we can work out in thermal network models. - Recognize that the linearity assumption means with respect to the behavior of network elements (independent of temperature and time), and other implications. - Directly represent radiation heat transfer interactions, lumped building mass components, solar radiation, heat extraction by HVAC, infiltration heat paths. - Solve 1R1C and 2R2C networks to find a building’s time constants - Understand the importance of time constants even if they are just approximations - Write down the linear state-space representation of an arbitrary thermal network model
References: TBD
- Chapter 8 of Reddy
Learning Objectives: - Recreate the basic equation for the thermal balance of a human body, which gives rise to expressions about heat dissipation to the environment - Understand latent heat (and its distinction from sensible heat, which is what we’ve covered so far), and Fick’s law for moisture transfer (relating it to Fourier’s law for conduction) - Be able to calculate shape factors of simple symmetric geometries, and understand their relevance in radiative heat transfer - Derive the Mean Radiant Temperature and its approximation when surfaces have similar temperature - Derive the concept of “Operative Temperature” by starting with convective and radiative heat transfer equations between the outer clothing and the environment - Be familiar with clothing insulation values (and their units of clo) - Calculate total conductive plus radiative sensible heat loss for a person if given their metabolic rate and clothing insulation (as well as the operative temperature). - Use the Predictive Mean Vote method for caluclating a thermal sensation index - Reason about comfort levels using ASHRAE’s comfort chart relating operative temperature and humidity ratio.
References:
- Chapter 3 of Reddy
Learning Objectives: - Understand how power is delivered from the grid to the electrical appliances/loads in a building, including: - The mathematical basis for AC power delivery: - Make use Ohm’s Law and Kirchhoff’s Voltage/Current Laws for DC circuits in order to derive an expression for power provided to an arbitrary RLC load. - Distinguish between power losses and power transmitted in a circuit - Understand the steady-state and transient effects of the R, L, and C compoments for the load in the DC case. - Recreate the expression for power under an AC voltage/current source an an arbitray impedance - Recognize the steady-state and transient effects of the impedance (resistance + reactance) in the circuit for the AC case. - Be able to use time domain (i.e., instantaneous) power expressions, as well as phasor and/or complex representations. - The underlying physical mechanism from which sinusoidal voltage sources arise: - Understand the working principles and components of an AC electrical generator in general, and 3-phase generators in particular - Derive an expression for the voltage at each of the 3 phases of the generator (mathematically showing their phase difference) - Understand how power delivered/consumed and power generated need to be balanced, and the effect of this balance on the grid’s frequency - Describe, conceptually, how power from the generator gets transmitted to the distribution system and to the buildings in it. - Understand the role of transformers in the transmission/distribution grids - Understand how split-phase systems to residential buildings in the US work - Analyze AC Power Usage - Starting from a known voltage source \(v(t)\) and current \(i(t)\), derive expressions for active, reactive, apparent and instantaneous power, as well as power factor - Understand the value of RMS and average quantities for voltage and current over some cycle-aligned period - Be able to leverage the phasor representation of these quantities - Calculate power quantities (active, reactive, etc.) from RMS or sub-cycle measurements of voltage and current - Be familiar with the VI trajectory (a single AC cycle plot of current versus voltage) as a visualization aid to differentiate between different load impedances.
References: TBD - Power in an AC Circuit from the University of Central Florida.
Learning Objectives: - Recognize the different branches of control theory, and where optimal control sits - Identify the components of a Model Predictive Control problem formulation for a given context: cost functional, constraints, dynamics model, decision variables, etc. - Identify how the choice of constraints, cost and variables determines the type of optimization problem and the available solutions - Use linear models of thermal dynamics (e.g., RC thermal networks) to formulate simple MPC problems - Use a solver (e.g, cvxpy) to implement an MPC controller for a 1R1C thermal model - Recognize the value of a standardized environment for benchmarking and comparing different control algorithms - Identify the major endpoints of the BOPTEST API - Test a controller against a BOPTEST testcase
References: - Blum, David, Javier Arroyo, Sen Huang, Jan Drgona, Filip Jorissen, Harald Taxt Walnum, Yan Chen, et al. “Building Optimization Testing Framework (BOPTEST) for Simulation-Based Benchmarking of Control Strategies in Buildings.” Journal of Building Performance Simulation 14, no. 5 (September 3, 2021): 586–610. https://doi.org/10.1080/19401493.2021.1986574 - Drgoňa et al. “All you need to know about model predictive control for buildings” Annual Reviews in Control, Volume 50 (2020): 190-232. https://www.sciencedirect.com/science/article/pii/S1367578820300584
Learning Objectives:
References: TBD
Learning Objectives:
References: TBD
Learning Objectives:
References: TBD
4.2 Second third: Case Studies
This period covers the four weeks that follow. The goal during this period is to use the knowledge we gained in the first third and directly tackle recent academic publications describing smart thermostat and smart metering solutions. The “smart” part of these systems will likely need to be further dissected, as much of that will not have been covered during the first third. We will continue to make heavy use of our collaborative website to jointly acquire the background (and foreground) knowledge that these publications require and convey.
Learning Objectives:
References: None.
Learning Objectives:
References: Nikseresht, Fateme, and Bradford Campbell. “FTM-Sense: Robust Sensor-free Occupancy Sensing Leveraging WiFi Fine Time Measurement.” BuildSys 2023. DOI
Learning Objectives:
References: Naug, Avisek, Antonio Guillen, Ricardo Luna Gutiérrez, Vineet Gundecha, Sahand Ghorbanpour, Lekhapriya Dheeraj Kashyap, Dejan Markovikj, Lorenz Krause, Sajad Mousavi, Ashwin Ramesh Babu, and Soumyendu Sarkar. “PyDCM: Custom Data Center Models with Reinforcement Learning for Sustainability.” BuildSys 2023. DOI
Learning Objectives:
References: Chen, Bingqing, Zicheng Cai, and Mario Bergés. “Gnu-RL: A Precocial Reinforcement Learning Solution for Building HVAC Control Using a Differentiable MPC Policy.” BuildSys 2019. DOI
Learning Objectives:
References: Onyejizu, James, Sandipan Mishra, and Koushik Kar. “Modeling the Impact of Passive Ventilation Systems on Multi-Zone Thermal Dynamics.” BuildSys 2024. DOI
Learning Objectives:
References: Bouchur, Mazen, Nan Li, and Andreas Reinhardt. “Can Attention Improve Sequence-to-Point Load Disaggregation? A Comparative Assessment.” BuildSys 2025. DOI
Learning Objectives:
References: Xia, Stephen, Peter Wei, Yanchen Liu, Andrew Sonta, and Xiaofan Jiang. “RECA: A Multi-Task Deep Reinforcement Learning-Based Recommender System for Co-Optimizing Energy, Comfort and Air Quality in Commercial Buildings.” BuildSys 2023. DOI
Learning Objectives:
References: Bianco, Federica B., Steven E. Koonin, Charlie Mydlarz, and Mohit S. Sharma. “Hypertemporal Imaging of NYC Grid Dynamics.” BuildSys 2016. DOI
Learning Objectives:
References: Jain, Achin, Rahul Mangharam, and Madhur Behl. “Data Predictive Control for Peak Power Reduction.” BuildSys 2016. DOI
Learning Objectives:
References: Lange, Henning, and Mario Bergés. “BOLT: Energy Disaggregation by Online Binary Matrix Factorization of Current Waveforms.” BuildSys 2016. DOI
4.3 Final third: Implementation
This period covers the last four weeks of class, from April 5 to April 28. This is when we finally get our hands dirty and start stepping on the shoulders of giants to create our novel solutions to the problems represented in the two final project options. This period will begin with considerable hand-holding, starting with a review of the background instrumentation theories required to understand the sensors/actuators in the projects, as well as a tutorial on how to set up the basic systems. Then, each group will have the opportunity to get individualized feedback from the instructors as they prepare for the final project’s demonstration and report submission.
Learning Objectives:
References: TBD
Learning Objectives:
References: TBD
Learning Objectives:
References: None.
Learning Objectives:
References: None.
Learning Objectives:
References: None.
Learning Objectives:
References: None.
Learning Objectives:
References: TBD