This project presents the design, implementation, and rigorous comparison of various automated control strategies applied to a residential thermal environment. By leveraging a high-fidelity Digital Twin of a house, we analyze the trade-offs between energy efficiency, system robustness, and user comfort across different control paradigms.
The project architecture integrates specialized platforms to create a seamless control loop:
| Component | Role | Description |
|---|---|---|
| Home I/O | 🏘️ Environment | A real-time 3D simulation providing realistic house physics and sensor data. |
| MATLAB & Simulink | 🧠 Intelligence | The computational core where system identification and control algorithms are executed. |
We explore a progression of control complexity to achieve optimal temperature regulation:
The foundational feedback mechanism. It regulates the internal temperature by reacting to the instantaneous error, its history, and its trend.
An enhancement that anticipates external disturbances (e.g., ambient temperature drops) before they affect the interior. This proactive approach significantly reduces the settling time and peak overshoot.
The state-of-the-art approach. Using a dynamic state-space model identified from data, the MPC optimizes the control actions over a future horizon, directly handling constraints and optimizing energy usage.
A rigorous comparison was conducted in the same conditions to ensure steady-state evaluation. The results demonstrate the superiority of MPC in both precision and efficiency.
Figure 1: Comparison of PID, Feed-Forward, and MPC controllers under identical environmental disturbances ($10ºC$ to $23ºC$ ambient).
| Controller Type | Avg. Power (W) | Mean Error (ºC) |
|---|---|---|
| PID + Clamping | 194.66 | 0.8955 |
| PID + Feed-Forward | 195.69 | 0.8681 |
| MPC (Model Predictive Control) | 176.30 | 0.8302 |
To further evaluate the dynamic response, the following integral criteria were calculated:
| Controller Type | IAE ( |
ITAE ( |
ITSE ( |
|---|---|---|---|
| PID + Clamping | |||
| PID + Feed-Forward | |||
| MPC (Model Predictive Control) |
- IAE (Integral of Absolute Error): Accumulates the absolute error over time. It provides a global measure of tracking precision.
- ITAE (Integral of Time-weighted Absolute Error): Penalizes errors that occur later in the simulation, making it a key indicator of settling time and long-term stability.
- ITSE (Integral of Time-weighted Squared Error): Squares the error and weights it by time, heavily penalizing large oscillations and promoting smoother control responses.
While MPC dominates in IAE and ITAE (speed and precision), the Basic PID shows a slightly better ITSE due to its smoother, less aggressive response in certain transitions.
├── proyecto_homeIO.slx # Main Simulink model
├── identificacion_ss.m # State-Space system identification script
├── calculo_metricas.m # Performance metrics calculation
├── images/ # Standard image export (SVG/PNG)
└── figures/ # Original MATLAB figures (FIG)- Energy Efficiency: MPC reduces power consumption by ~9.4% compared to PID variants.
- Precision Control: MPC achieved the lowest RMS error across all test scenarios.
- Robustness: The system maintains stability even with sudden window openings or extreme weather changes.
This project was developed in group by:
Project created for Educational & Research purposes in Automation and Control Engineering. Master in Robotics and Automation