Skip to content

This project uses Home I/O, Connect I/O, and Simulink to develop advanced temperature controllers. We implement and compare PID, PID with Feed-Forward, and MPC strategies to optimize thermal comfort and energy efficiency in a simulated smart home.

Notifications You must be signed in to change notification settings

FerXxk/Project-HomeIO

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomeIO: Advanced Temperature Control System 🏠🌡️

MATLAB Home I/O Control Systems

🌟 Project Overview

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.


🛠️ Technical Ecosystem

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.

🧠 Control Strategies Implemented

We explore a progression of control complexity to achieve optimal temperature regulation:

1. PID Controller (Proportional-Integral-Derivative) with anti-windup (clamping)

The foundational feedback mechanism. It regulates the internal temperature by reacting to the instantaneous error, its history, and its trend.

2. PID with Feed-Forward (Proactive Control)

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.

3. MPC (Model Predictive Control)

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.


📊 Performance Analysis

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.

Graphical Results

Global Control Comparison Figure 1: Comparison of PID, Feed-Forward, and MPC controllers under identical environmental disturbances ($10ºC$ to $23ºC$ ambient).

Core Metrics

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 ($\int e dt$) ITAE ($\int t e dt$) ITSE ($\int t e^2 dt$)
PID + Clamping $3.53 \times 10^5$ $7.62 \times 10^{10}$ $2.29 \times 10^{11}$
PID + Feed-Forward $3.41 \times 10^5$ $7.16 \times 10^{10}$ $2.48 \times 10^{11}$
MPC (Model Predictive Control) $3.28 \times 10^5$ $6.93 \times 10^{10}$ $2.38 \times 10^{11}$

Metrics Definition

  • 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.


📂 Project Structure

├── 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)

📈 Key Results

  • 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.

🤝 Contributors

This project was developed in group by:

  • Juan Luque Girón - GitHub
  • Andrés Martínez Márquez - GitHub
  • Fernando Román Hidalgo - GitHub

Project created for Educational & Research purposes in Automation and Control Engineering. Master in Robotics and Automation

About

This project uses Home I/O, Connect I/O, and Simulink to develop advanced temperature controllers. We implement and compare PID, PID with Feed-Forward, and MPC strategies to optimize thermal comfort and energy efficiency in a simulated smart home.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%