Memuat
Memuat
A digital twin of a room compares an ordinary thermostat with a scheduled PI controller that saves AC electricity.
0 views
A two-mass thermal room model (air and wall) with a daily outdoor temperature, solar radiation and occupant or equipment loads. Two strategies run in one model: a hysteresis Relay thermostat with a fixed 24 C setpoint, and a PI controller with a scheduled setpoint (24 C by day with one hour of pre-cooling, 28 C at night). The AC power uses a COP that depends on outdoor temperature.

Outdoor temperature, solar radiation on the wall, occupant and equipment load from 08 to 18, and the setpoint schedule.
Two Integrators for air and wall temperature with conductances and heat capacities.
The AC runs at full power above the upper band and switches off at the lower one.
A PI tracks the scheduled setpoint with limited cooling power.
Electric power = cooling power / COP(outdoor T); energy is integrated, and comfort error is computed in degree-hours.
System
A two-mass room: 3 MJ/K of air, 20 MJ/K of wall, a 9 kW maximum cooling AC, and a COP that falls from 5.2 to 3.0 over 20 to 40 C outdoors.
Scenario
A 3-day simulation with a 5 s step; metrics average days 2 and 3 (day 1 is discarded as a transient).
Note: The room parameters are illustrative, not data from a real building; the roughly 16 percent saving applies only to this simulated scenario and is not a guarantee for an actual building.
Simulink model hvac_gedung_pintar.slx (standard block diagram); Builder script buat_model.m and runner jalankan.m; Result plots grafik_hvac (PNG) and metrik.json; Step-by-step PDF guide (sent with the package; also part of the video class); Video tutorial in the MATLAB Simulink 2026 Trends class (this project's episode; episode 1 is free); Requires MATLAB and Simulink (built in R2025b); the slh.m builder helper is included.
Yes. The .slx model opens in MATLAB with Simulink (built in R2025b; use the same or a newer release). Project 09 also needs the Communications Toolbox. The package includes the builder script and the runner, so you can also rebuild the model and rerun the plots yourself.
Yes. Parameters are kept in the Model Workspace, so you can change values such as gains, capacities and profiles and rerun the simulation. If you would like us to adapt or extend the model for you, message us on WhatsApp.
The project costs US$17. Use the "Buy via WhatsApp" button on this page; the project files are delivered after payment is confirmed.
Found a problem or have a suggestion for this project? Tell us on WhatsApp
Back to MATLAB Simulink portfolio