This study proposes an advanced approach to demand-side management (DSM) within smart grids by presenting an integrated building energy management system (BEMS) driven by a fuzzy logic controller (FLC). Faced with the limitations of traditional DSM strategies, the objective is to minimize operational costs and carbon emissions of a residence equipped with a hybrid renewable energy system (HRES). The proposed BEMS dynamically selects energy sources (grid, solar, battery) based on the grid energy cost and the state of charge (SoC) of the HRES. The methodology involved implementing the system in the MATLAB/Simulink environment to validate its control logic and evaluating its technical and economic feasibility by comparing the results with those of a reference model under HOMER Pro. The results of the 48 fuzzy logic rules executed demonstrate intelligent load management, resulting in significant savings. The system reduced grid energy consumption by 80% during the day and 35% at night, prioritizing the use of solar and wind resources, followed by batteries. These findings confirm the effectiveness of BEMS in reshaping the load profile, thus contributing to grid sustainability and the optimization of energy resources.

