Next Article in Journal
Prioritization of the Critical Factors of Hydrogen Transportation in Canada Using the Intuitionistic Fuzzy AHP Method
Previous Article in Journal
A State-of-the-Art Review of Wind Turbine Blades: Principles, Flow-Induced Vibrations, Failure, Maintenance, and Vibration Suppression Techniques
Previous Article in Special Issue
Sustainable Mobility and Emissions: The Role of the Sale Structure in the Automotive Energy Transition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Occupant-Centric Load Optimization in Smart Green Townhouses Using Machine Learning

by
Seyed Morteza Moghimi
1,*,
Thomas Aaron Gulliver
1,*,
Ilamparithi Thirumarai Chelvan
1,† and
Hossen Teimoorinia
2,3,†
1
Department of Electrical and Computer Engineering, University of Victoria, STN CSC, P.O. Box 1700, Victoria, BC V8W 2Y2, Canada
2
Department of Physics and Astronomy, University of Victoria, Victoria, BC V8P 5C2, Canada
3
NRC Herzberg Astronomy and Astrophysics, 5071 West Saanich Road, Victoria, BC V9E 2E7, Canada
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Energies 2025, 18(13), 3320; https://doi.org/10.3390/en18133320
Submission received: 29 March 2025 / Revised: 14 June 2025 / Accepted: 19 June 2025 / Published: 24 June 2025
(This article belongs to the Special Issue Environmental Sustainability and Energy Economy)

Abstract

This paper presents an occupant-centric load optimization framework for Smart Green Townhouses (SGTs). A hybrid Long Short-Term Memory and Convolutional Neural Network (LSTM-CNN) model is combined with real-time Internet of Things (IoT) data to predict and optimize energy usage based on occupant behavior and environmental conditions. Multi-Objective Particle Swarm Optimization (MOPSO) is applied to balance energy efficiency, cost reduction, and occupant comfort. This approach enables intelligent control of HVAC systems, lighting, and appliances. The proposed framework is shown to significantly reduce load demand, peak consumption, costs, and carbon emissions while improving thermal comfort and lighting adequacy. These results highlight the potential to provide adaptive solutions for sustainable residential energy management.

1. Introduction

The increasing demand for energy efficiency and sustainability in the building sector has led to substantial advances in smart building technologies. Smart Green Townhouses (SGTs) integrate Renewable Energy Sources (RESs), Internet of Things (IoT) devices, and advanced control systems to optimize energy consumption, reduce costs, and lower environmental impact. However, effective load management in residential buildings remains challenging due to the influence of occupant behavior on energy use patterns [1,2]. Occupant energy behavior is shaped by psychological and economic factors such as daily routines, comfort preferences, and decision-making habits [3]. These factors are captured in the proposed framework by modeling occupancy patterns based on presence and usage tendencies. This enables real-time occupant-centric optimization for improved energy efficiency in dynamic residential environments.
Machine Learning (ML) has emerged as a powerful tool for managing the complexity of load forecasting and control in smart buildings [4]. ML models allow for accurate prediction and effective control in real-time systems [5,6]. For example, hybrid deep learning architectures, such as the combination of Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) networks, have been used for robust and accurate forecasting [7]. CNN-LSTM models have been combined with metaheuristic algorithms like the Coati Optimization Algorithm for renewable energy forecasting [8]. While these methods have proven effective, existing research does not sufficiently address the role of real-time occupant behavior in residential load optimization [5,6,9].
Deep learning has been considered for equipment scheduling and energy control in dynamic systems [10,11]. However, few approaches provide real-time adaptability while balancing energy savings, cost efficiency, and occupant comfort. While occupancy-based HVAC prediction and control have been employed [12,13], integration with occupant-aware load forecasting has not been considered. Thus, a real-time, occupant-centric load optimization framework is proposed. This framework integrates a hybrid LSTM-CNN model with Multi-Objective Particle Swarm Optimization (MOPSO) to dynamically balance load demand, cost, emissions, and comfort. Public datasets and real-time IoT sensor data [14,15,16] are used to enable intelligent control of systems such as HVAC and lighting based on actual occupancy and preferences. While LSTM-CNN models have been employed in energy forecasting, the integration with real-time occupant-centric data has not been considered. The results presented for Connected Smart Green Townhouses (CGSTs) demonstrate the applicability, scalability, and performance of the proposed framework in realistic residential scenarios.
The contributions of this work are as follows.
  • A hybrid LSTM-CNN model is proposed to predict load demand, cost, and emissions.
  • Occupant behavior is integrated into a dynamic multi-objective optimization framework.
  • The proposed framework is evaluated for four connected townhouses in Burnaby, British Columbia (BC), Canada. The results obtained indicate significant load reduction and cost savings while ensuring occupant satisfaction.
The remainder of this paper is structured as follows. Section 2 presents the methodology and optimization algorithms. The performance is evaluated in Section 3 and the results are discussed. Section 4 provides some concluding remarks including the implications for residential load optimization.

2. Methodology

A hybrid LSTM-CNN model is employed for dynamic load, cost, and carbon emission prediction [5,6]. It was implemented using Python with Pandas for data manipulation, NumPy for calculations, and Matplotlib for visualization [5]. Although the framework has been designed for real-time applications, model execution time and update frequency depend on available computational resources and sensor sampling rates. In the experiments, the hybrid LSTM-CNN model was used for prediction and optimization for a 24 h horizon within 12–18 s on a standard desktop computer which is sufficient for real-time hourly operation. The framework can be configured to run at hourly intervals for day-ahead optimization and at shorter intervals (e.g., 15 min) for finer control. An LSTM is used due to its ability to capture long-term dependencies and temporal patterns in sequential data, which is critical for accurate forecasting of loads influenced by occupant behavior and weather. A CNN is employed to extract local features and spatial correlations from multi-dimensional inputs such as occupancy and environmental data. In this paper, occupant behavior refers to measurable actions and patterns that affect residential energy consumption. This includes real-time presence detection (e.g., motion and door sensors), appliance usage habits (e.g., when and how long devices are used), HVAC and lighting preferences (e.g., thermostat setpoints, lighting usage), and feedback interactions with control systems. This behavior is inferred from IoT sensor data and smart devices to support dynamic load optimization.
The MOPSO algorithm is used to optimize the tradeoff between load efficiency, cost savings, and carbon emission reduction while ensuring occupant comfort. It was chosen considering the advantages and applicability to SGT systems [5]. It is a well-established algorithm that has excellent convergence [17], diversity preservation, and suitability for nonlinear, multi-objective problems. Here, MOPSO is used to effectively balance load, cost, and emissions while ensuring occupant comfort which is particularly challenging in real-time residential applications. This illustrates the practicality of MOPSO for the optimization of complex, dynamic building energy systems.
Real data from several sources is employed including occupancy and load demand data from [14,15], IoT sensor data from [16], weather data from [18,19], and energy prices from [18]. Data from IoT sensors (e.g., motion detectors, door sensors) and smart devices (e.g., thermostats) are integrated with utility data to infer occupancy patterns [20]. The AMPds dataset [14,15] provides high-resolution time-series data on electricity, water, and natural gas consumption. This facilitates load demand modeling under seasonal and weather variations. IoT sensors support real-time adjustments due to changes in load [16]. Energy-efficient technology such as heat pumps [21] ensure efficient and sustainable SGTs [22].
Although the focus here is on short-term, real-time occupant behavior, the proposed framework can easily be adapted to long-term patterns. Seasonal and holiday-related behavior can be captured using historical data to improve load prediction while maintaining adaptability to dynamic occupant profiles. However, the goal here is real-time prediction in a dynamic environment that is more challenging due to the very short time scale.

2.1. The Proposed Framework

The proposed framework uses publicly available datasets [14,15,16] and real-time IoT data collected from SGTs [5,6]. To ensure consistency across diverse features, the data are normalized to the range [0, 1]. The normalization for load type j (e.g., electricity, gas, water) and townhouse type i is
L normalized , i , j ( t ) = L i , j ( t ) L min , i , j L max , i , j L min , i , j ,
where L i , j ( t ) is the load for townhouse type i and load type j at time t, L max , i , j is the maximum load for townhouse type i and load type j across the dataset, and L min , i , j is the corresponding minimum load. This ensures that normalization is performed independently for each load and townhouse type to prevent any single parameter from dominating the total load profile due to differences in magnitude or units such as electricity (kWh), gas (m3), and water (liters). The normalization for the ith bedroom townhouse is
L normalized , i ( t ) = 1 3 j = 1 3 L normalized , i , j ( t ) ,
Normalization is critical for the performance of ML models so that features with a large numerical range do not disproportionately influence model learning. It also improves numerical stability and accelerates convergence, particularly for gradient-based optimizers such as ADAM used in the proposed LSTM-CNN model.
The electricity load in kilowatt-hours (kWh) is
Electricity Load ( kWh ) = L appliance + L lighting + L HVAC ,
where L appliance , L lighting , and L HVAC represent the demand from electrical appliances, lighting, and HVAC systems, respectively. The gas load is
Gas Load ( kWh ) = Gas Volume · C gas ,
where Gas Volume ( m 3 ) is the volume of natural gas consumed and C gas is the calorific value of gas (kWh/m3). The water load is
Water Load ( kWh ) = Water Volume · C water ,
where Water Volume ( m 3 ) is the volume of water used and C water is the energy required to pump, heat, and treat water (kWh/m3).
The base (unoptimized) load demand at time t is given by
L base ( t ) = L demand ( t ) L renewable ( t ) ,
where L demand ( t ) is the total unoptimized load demand (kW) and L renewable ( t ) is the unoptimized renewable energy (e.g., PV power). The optimized load without occupant data at time t is
L opt , noOcc ( t ) = L base ( t ) L renewable , opt ( t ) + L battery ( t ) ,
where L renewable , opt ( t ) is the optimized renewable energy (kW) and L battery ( t ) is the battery energy used to offset grid demand (kW). The maximum limits for battery and grid power ( L battery , max and L grid , max ) are based on practical system design assumptions supported by real-world parameters. L battery , max is set in the range 5–10 kW. This aligns with commercially available residential-scale lithium-ion battery systems, and is consistent with industry-standard systems used in residential microgrids in Canada [5,6]. L grid , max is set in the range 12–15 kW. This reflects typical urban service capacity in a townhouse unit in BC and aligns with empirical values used in predicting load management for smart grid applications [9,13]. These values are not dictated by specific regulations but are based on realistic operating conditions and previous research.
The optimized load with occupant data at time t considers occupant-driven factors and is given by
L opt , occ ( t ) = L opt , noOcc ( t ) L occ , adj ( t ) ,
where L occ , adjustment ( t ) accounts for real-time occupancy-based load optimization including HVAC demand adjustments considering presence, load shifting to avoid peak times, and adaptive appliance control (e.g., delayed washing machine cycles). Substituting (7) in (8) gives
L opt , occ ( t ) = L base ( t ) L renewable , opt ( t ) + L battery ( t ) + L occ , adj ( t ) .

2.2. LSTM-CNN Model

The LSTM is used to capture temporal patterns in the input data to learn dependencies over time. The hidden state at time t is
h t = σ ( W x x t + W h h t 1 + b l ) ,
where x t is the input at time t which includes features such as load demand and occupancy data, W x and W h are weight matrices for the input data and previous hidden state, respectively, b l is the bias term, and σ is the sigmoid activation function
σ ( x ) = 1 1 + e x .
This function limits values to the range [ 0 , 1 ] and helps the network learn complex, non-linear relationships by introducing smooth gradients and preventing large outputs.
The CNN extracts spatial features from multi-dimensional data. The CNN output is
y = σ ( Conv 2 D ( x , W ) + b c ) ,
where x is the input data structured as a two-dimensional (2D) matrix, Conv 2 D ( ) is 2D convolution given by
Conv 2 D ( x , W ) = i j W [ i , j ] · x [ i , j ] ,
where W is the convolutional filter (kernel) used to extract local patterns, and b c is the bias term. The kernel is a small matrix of learnable weights used to extract spatial features from the input data. During training, it slides across the input matrix to learn local patterns such as occupancy and appliance usage. This helps improve the prediction capability of the model. The bias terms are randomly initialized and updated each iteration via backpropagation using the ADAM optimizer.
The combined LSTM and CNN output is
Output = g ( h t , y ) ,
where g ( ) is the fusion function which here is concatenation. The average training time was 4.6 h. A dropout rate of 0.2 is applied after each LSTM and CNN layer to prevent overfitting. The model was trained using the Adam optimizer with a learning rate of 0.001 and batch size of 64.
The MOPSO algorithm objective function is
F = w 1 f 1 + w 2 f 2 + w 3 f 3 ,
where
f 1 = t = 1 N L demand ( t ) ,
is the total load demand in kWh that includes all electrical appliances, HVAC systems, and other energy-consuming devices within the building
f 2 = t = 1 N L demand ( t ) · C electricity ,
is the operational costs
f 3 = t = 1 N L demand ( t ) · E factor ,
is the carbon emissions, N is the number of time steps, C electricity is the electricity cost per kWh, E factor is the carbon emission factor in kg CO2/kWh, and w 1 ,   w 2 , and w 3 are weights representing the importance of each objective. The weights used here are w 1 = 0.3 , w 2 = 0.4 , and w 3 = 0.3 . They were selected empirically to balance the three goals: load efficiency, operational cost reduction, and carbon emission reduction and are the result of extensive evaluation across many scenarios. Parameter tuning was conducted to ensure that no single objective disproportionately dominates the optimization. The corresponding constraints are
L grid ( t ) + L renewable ( t ) + L battery ( t ) L demand ( t ) , t
0 L grid ( t ) L grid , max ,
0 L battery ( t ) L battery , max ,
where L grid ( t ) is the load supplied by the grid (kWh), L renewable ( t ) is the load met by renewable sources (kWh), and L battery ( t ) is the energy supplied from battery storage (kWh).
To maintain occupant comfort, the deviation between the actual and desired indoor temperature should be within an acceptable range
t = 1 N L demand ( t ) · T actual ( t ) T desired ( t ) Threshold ,
where T actual ( t ) is the actual indoor temperature at time t, T desired ( t ) is the corresponding desired temperature, and Threshold is the maximum acceptable cumulative deviation over the N time steps (optimization period). This ensures energy savings do not compromise thermal comfort so load scheduling decisions account for occupant preferences.

2.3. Performance Metrics

Occupant comfort satisfaction is based on thermal comfort, lighting adequacy, and feedback adherence. The thermal comfort measures how close the indoor temperature is to the desired temperature and is given by
Thermal Comfort ( t ) = 1 min 1 , | T actual ( t ) T desired ( t ) | 5 ,
where 5 °C is considered the maximum difference. The lighting adequacy assesses how well lighting levels meet occupant needs. It is based on the percentage of time that the lighting intensity stays within the desired range and is expressed as
Lighting Adequacy ( t ) = i = 1 r β L min L i ( t ) L max r ,
where L i ( t ) is the actual lighting intensity in room i at time t, L min and L max are the minimum and maximum acceptable light levels, β ( ) is an indicator function that returns 1 if the lighting is within the desired range, and 0 otherwise, and r is the number of rooms. Feedback adherence measures how well the building systems (e.g., HVAC, lighting) respond to occupant feedback and is given by
Feedback Adherence ( t ) = F implemented ( t ) F submitted ( t ) ,
where F implemented ( t ) is the number of feedback requests that were implemented by the system at time t and F submitted ( t ) is the corresponding number of feedback requests submitted by occupants.
The occupant comfort satisfaction at time t is a weighted sum of thermal comfort, lighting adequacy, and feedback adherence and is expressed as
Occupant Comfort Satisfaction ( t ) = w T · Thermal Comfort ( t ) + w L · Lighting Adequacy ( t ) + w F · Feedback Adherence ( t ) ,
where w T = 0.4 , w L = 0.3 , and w F = 0.3 . These weights are based on the relative importance of thermal comfort, lighting adequacy, and feedback adherence in the overall comfort of the occupants.
The performance evaluation metrics are
Mean Absolute Error ( MAE ) = 1 n i = 1 n | Predicted i Actual i | ,
Root Mean Squared Error ( RMSE ) = 1 n i = 1 n ( Predicted i Actual i ) 2 ,
Coefficient of Determination ( R 2 ) = 1 i = 1 n ( Predicted i Actual i ) 2 i = 1 n ( Actual i Actual ¯ ) 2 ,
where n is the number of data values, Predicted i is the ith predicted value from the ML model, Actual i is the corresponding actual value, and Actual ¯ is the mean of the actual values given by
Actual ¯ = 1 n i = 1 n Actual i .
The MAE is the average magnitude of the prediction errors so smaller values indicate better accuracy. The RMSE measures the standard deviation of prediction errors, penalizing larger errors more heavily than the MAE. Lower values indicate higher accuracy. R 2 indicates how well the model explains the variations in the actual data. Values closer to 1 signify better model performance.

3. Performance Results

The results presented in this section were generated using OpenStudio (v3.4.0) for load simulation with and without occupant input. Data analysis and optimization were performed using Python v3.11.5 with Pandas v2.1.1 and Matplotlib v3.8.0 [5,6]. Real-time occupancy data was collected with ThingSpeak v2.0 [23].
We consider a CSGT complex with 1-bedroom, 2-bedroom, 3-bedroom, and 4-bedroom units as shown in Figure 1. Connected townhouses include two key components: connected water systems [14,24] and party walls [25,26]. Party walls are shared walls between adjacent properties and are jointly owned and maintained by property owners. Party wall agreements outline the responsibilities for maintenance, repairs, alterations, and dispute resolution.
Table 1 gives the SGT parameters including the number of residents, occupancy, hot water usage, lighting, EV charging, HVAC consumption, shared wall insulation, and fire safety. Table 2 presents the base and optimization results with and without occupant data for the CSGT complex. The percentage reduction compared to the base results is also given. This indicates a significant improvement in load efficiency, cost savings, and carbon emission reduction. The load is decreased by 10.6% without occupant data and 14.3% with occupant data, confirming the effectiveness of real-time adaptive load management. Operational costs are reduced by up to 13.0% and carbon emissions are 11.0% and 15.5% lower, respectively. Peak load is reduced by 10.5% and 14.0% which helps grid stability and lowers peak-hour costs. Overall, occupant-centric optimization increases load efficiency, cost savings, and environmental performance, making CSGTs a practical solution for the future.
While the proposed framework benefits significantly from real-time occupant data, there are practical challenges in data acquisition. These include sensor inaccuracies, intermittent connectivity, and privacy concerns related to monitoring occupant presence and preferences. In this study, these issues were mitigated by using anonymized data collection protocols, leveraging non-intrusive IoT sensors (e.g., motion detectors, smart thermostats), and implementing local edge-processing to minimize data transmission risks.
Figure 2, Figure 3, Figure 4 and Figure 5 present the base load, optimized load without occupant data, and optimized load with occupant data for the individual CSGTs over a 24 h period. Figure 6 gives the corresponding results for the CSGT complex. Occupant data includes real-time and historical information on occupant presence, behavior, and preferences collected via sensors, IoT devices, smart meters, and user inputs [5,6,14]. These results indicate that occupant-aware optimization improves load efficiency and reduces peak demand. For example, the 1-bedroom CSGT has a base load peak of 14.3 kWh, and this decreases to 13.9 kWh without occupant data and 13.3 kWh with occupant data. The 2-bedroom unit has a peak load reduction from 15.7 kWh to 15.2 kWh and 14.7 kWh. The 3-bedroom and 4-bedroom CSGTs have base peak loads of 16.8 kWh and 18.1 kWh, respectively, and they decrease to 15.3 kWh and 16.4 kWh without occupant data and 13.8 kWh and 14.5 kWh when occupant data is incorporated. Figure 6 indicates that the cumulative effect is a significant decrease in the complex peak load from nearly 67 kWh to 61 kWh without occupancy data and 54 kWh with this data. These results demonstrate the value of real-time occupancy data in dynamic energy management, enabling control strategies that adapt load profiles to actual usage patterns and occupancy conditions. They also confirm that the proposed framework effectively improves load efficiency and lowers operational costs and carbon emissions while ensuring occupant comfort.
Figure 7 presents the townhouse complex base, optimized without occupant data, and optimized with occupant data HVAC and peak load reductions, cost savings, carbon emissions reduction, and occupant comfort satisfaction compared to the historical data in [14,15,16]. The base results are the worst as optimization improves all five parameters. For example, optimization without occupant data provides an improvement in HVAC and peak loads of about 18%, and with occupant data there is an additional 2–6% improvement for all parameters. In particular, occupant comfort satisfaction is improved to over 85%. These results show the effectiveness of incorporating real-time occupant data into load management to improve efficiency, reduce costs, and lower environmental impact while maintaining a high level of occupant satisfaction.
Figure 8 gives the cost savings versus emissions reduction for the townhouse complex optimized with occupant data. This shows the tradeoff between economic and environmental benefits with cost savings between 10% and 17%, and emission reductions between 10% and 17%. This reflects optimization considering load demand and occupant behavior and indicates an inverse relationship between the two parameters. Thus, reducing the environmental impact increases costs.
Figure 9 presents the townhouse complex occupant satisfaction in terms of thermal comfort, lighting adequacy, and feedback adherence for the base, optimized without occupant data, and optimized with occupant data cases. These results indicate optimization increases all three parameters. For example, thermal comfort increased from a base of approximately 67% to 80% optimized without occupant data and 86% optimized with occupant data. The corresponding lighting adequacy improved from 75% to 83% and 89%, and the feedback adherence from 60% to 72% and 82%. This confirms the effectiveness of occupant-aware energy optimization in improving occupant satisfaction.
Figure 10 illustrates the impact of occupancy on the CSGT complex optimized load with occupant data over a 24 h period. Full occupancy indicates all residents are present which results in significant HVAC, lighting, and appliance use. With partial occupancy, there are fewer residents so energy consumption is lower. No occupancy means the building is unoccupied so only essential systems are running such as standby appliances, HVAC with setback control, and water heating. The results in Figure 10 show that occupancy has a significant effect on load demand. With full occupancy, the peak load is about 66 kW at midday due to increased appliance and HVAC usage. Partial occupancy has a lower peak load of about 61 kW, reflecting moderate demand due to fewer residents. No occupancy has the lowest peak load which is below 57 kW. Thus, occupancy-driven load optimization is important to reduce peak demand and overall CSGT load. The performance improvements observed, i.e., reductions in load, operational cost, and carbon emissions, are a result of the integration of the prediction capability of the hybrid LSTM-CNN model and the dynamic capability of the MOPSO algorithm. The LSTM effectively captures time-dependent occupancy and load trends, while the CNN identifies spatial usage patterns from sensor inputs across multiple zones and townhouses. This reduces grid dependence during peak hours and aligns energy use with occupant presence, which lowers energy demand, utility costs, and greenhouse gas emissions.
Table 3 presents the MAE, RMSE, and R 2 for the CSGT complex load optimization with the Linear Regression (LR), LSTM, CNN, and proposed hybrid LSTM-CNN models. The LR model has the worst performance with an MAE of 0.80 kWh and RMSE of 1.20 kWh, indicating poor prediction accuracy. The LSTM model has an MAE of 0.60 kWh and an RMSE of 0.72 kWh, which is lower. The CNN model improves on these results with an MAE of 0.56 kWh and an RMSE of 0.75 kWh. Further, R 2 is 0.93 which is better than with the LR and LSTM models. The proposed model provides the best overall performance with the lowest MAE (0.47 kWh) and RMSE (0.68 kWh), and the highest R 2 (0.95), indicating superior prediction accuracy and reliability. These results validate the effectiveness of the model in energy load forecasting. While the proposed model outperforms the others, its decisions are less interpretable due to the deep learning architecture. Incorporating explainable AI techniques can improve understanding of the input-output relationships, particularly for stakeholders seeking clarity in operational decisions.

Sensitivity of Key Parameters

The impact of key parameters is now considered.
  • Occupant Behavior Weights ( w T , w L , w F ): Increasing the weight assigned to thermal comfort (e.g., w T from 0.4 to 0.6) will improve temperature satisfaction but also increase HVAC usage, potentially raising energy consumption by up to 8% [12]. Similarly, a higher feedback adherence weight ( w F ) will improve personalization but may introduce variations that will reduce energy efficiency.
  • Optimization Objective Function Weights ( w 1 , w 2 , w 3 ): Adjusting the MOPSO weights shifts the balance between load, cost, and emissions. Prioritizing emissions ( w 3 > 0.4 ) will reduce carbon emissions but increase reliance on storage and renewable energy, resulting in higher costs [18,19]. On the other hand, emphasizing cost ( w 2 > 0.4 ) will improve affordability but may lower occupant satisfaction due to less flexible HVAC control.
  • MOPSO Parameters: As observed in [17], larger swarm sizes or increased cognitive/social weights improve convergence but require longer computation times which may not be feasible for real-time applications.
  • Model Hyperparameters (e.g., depth, learning rate): Deep architectures such as LSTM and CNN can provide better accuracy but risk overfitting, especially with small datasets [7,8]. A properly tuned architecture balances prediction accuracy and generalizability. The hyperparameters used here are based on the results in [5,6].

4. Conclusions

This paper introduced a scalable occupant-centric load optimization framework for Connected Smart Green Townhouses (CSGTs), integrating a hybrid Long Short-Term Memory-Convolutional Neural Network (LSTM-CNN) with Multi-Objective Particle Swarm Optimization (MOPSO). Real-time occupant data was used to dynamically optimize energy loads, resulting in substantial performance improvements. The results obtained indicate reductions in load by 12.7%, operational costs by 13.0%, and carbon emissions by 15.5%. Furthermore, peak load demand was reduced by up to 12.7% which helps improve grid stability. In addition, occupant satisfaction was improved with thermal comfort increasing by 19%, lighting adequacy by 14%, and feedback adherence by 22%. The tradeoff between cost savings and emissions reduction indicates the proposed framework can be used in real-world applications. Future research will consider Renewable Energy Systems (RESs) and system scalability to ensure sustainable and adaptive energy management for CSGTs considering occupant satisfaction. Further, Transformer-based architectures and statistical time-series models such as Prophet can be employed to improve long-term forecasting and model interpretability. Parameters such as occupant comfort weights and the cost-emission tradeoff can be investigated to assess their impact on model performance in residential scenarios considering occupant behavior.

Author Contributions

Conception and design, S.M.M., T.A.G., I.T.C. and H.T.; preparation and analysis, S.M.M., I.T.C. and T.A.G.; writing—original draft, T.A.G., S.M.M. and I.T.C.; writing—review and editing, T.A.G., S.M.M., I.T.C. and H.T.; supervision, T.A.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SymbolDescriptionSymbolDescription
BCBritish ColumbiaCADCanadian Dollar
COACoati Optimization AlgorithmCNNConvolutional Neural Network
CSGTConnected Smart Green TownhouseHVACHeating, Ventilation, and Air Conditioning
IoTInternet of ThingsLRLinear Regression
LSTMLong Short-Term MemoryMAEMean Absolute Error
MLMachine LearningMSEMean Squared Error
PVPhotovoltaicR2Coefficient of Determination
RESRenewable Energy SourceRMSERoot Mean Squared Error
SGTSmart Green Townhouse

References

  1. Bäcklund, K.; Molinari, M.; Lundqvist, P.; Palm, B. Building occupants, their behavior and the resulting impact on energy use in campus buildings: A literature review with focus on smart building systems. Energies 2023, 16, 6104. [Google Scholar] [CrossRef]
  2. Mylonas, A.; Tsangrassoulis, A.; Pascual, J. Modelling occupant behaviour in residential buildings: A systematic literature review. Build. Environ. 2024, 256, 111959. [Google Scholar] [CrossRef]
  3. D’Oca, S.; Chen, C.F.; Hong, T.; Belafi, Z. Synthesizing building physics with social psychology: An interdisciplinary framework for context and occupant behavior in office buildings. Energy Res. Soc. Sci. 2017, 34, 240–251. [Google Scholar] [CrossRef]
  4. Moghimi, S.M.; Gulliver, T.A.; Chelvan, I.T. Energy management in modern buildings based on demand prediction and machine learning—A review. Energies 2024, 17, 555. [Google Scholar] [CrossRef]
  5. Moghimi, S.M.; Gulliver, T.A.; Chelvan, I.T.; Teimoorinia, H. Resource optimization for grid-connected smart green townhouses using deep hybrid machine learning. Energies 2024, 17, 6201. [Google Scholar] [CrossRef]
  6. Moghimi, S.M.; Gulliver, T.A.; Chelvan, I.T.; Teimoorinia, H. Load optimization for connected modern buildings using deep hybrid machine learning in island mode. Energies 2024, 17, 6475. [Google Scholar] [CrossRef]
  7. Agga, A.; Abbou, A.; Labbadi, M.; El Houm, Y.; Ali, I.H.O. CNN-LSTM: An efficient hybrid deep learning architecture for predicting short-term photovoltaic power production. Electr. Power Syst. Res. 2024, 208, 107908. [Google Scholar] [CrossRef]
  8. Abou Houran, M.; Bukhari, S.M.S.; Zafar, M.H.; Mansoor, M.; Chen, W. COA-CNN-LSTM: Coati optimization algorithm-based hybrid deep learning model for PV/wind power forecasting in smart grid applications. Appl. Energy 2023, 349, 121638. [Google Scholar] [CrossRef]
  9. Moghimi, S.M.; Gulliver, T.A.; Chelvan, I.T.; Teimoorinia, H. Adaptive machine learning for automatic load optimization in connected smart green townhouses. Algorithms 2025, 18, 132. [Google Scholar] [CrossRef]
  10. Zhang, J.; Qian, K.; Luo, H.; Liu, Y.; Qiao, X.; Xu, X.; Tian, J. Process monitoring for tower pumping units under variable operational conditions: From an integrated multitasking perspective. Control Eng. Pract. 2025, 156, 126229. [Google Scholar] [CrossRef]
  11. Zhang, J.; Tian, J.; Alcaide, A.M.; Leon, J.I.; Vazquez, S.; Franquelo, L.G.; Luo, H.; Yin, S. Lifetime extension approach based on the Levenberg–Marquardt neural network and power routing of DC–DC converters. IEEE Trans. Power Electron. 2023, 38, 10280–10291. [Google Scholar] [CrossRef]
  12. Meftah, U. Smart Strategies for Building Energy Efficiency: Integrating Occupancy-Based HVAC Control and Machine Learning Predictions. Master’s Thesis, University of Missouri-Columbia, Columbia, MO, USA, 2024. Available online: https://www.proquest.com/openview/80467fcdfaef57fe457c5f5ee3b925c3/1?pq-origsite=gscholar&cbl=18750&diss=y (accessed on 31 July 2024).
  13. Wang, Z.; Calautit, J.; Wei, S.; Tien, P.W.; Xia, L. Real-time building heat gains prediction and optimization of HVAC setpoint: An integrated framework. J. Build. Eng. 2022, 49, 104103. [Google Scholar] [CrossRef]
  14. Makonin, S. Electricity, water, and natural gas consumption of a residential house in Canada from 2012 to 2014. Sci. Data 2016, 3, 160037. [Google Scholar] [CrossRef] [PubMed]
  15. Makonin, S.; Popowich, F.; Bartram, L.; Gill, B.; Bajić, I.V. AMPds: A public dataset for load disaggregation and eco-feedback research. In Proceedings of the IEEE Electrical Power & Energy Conference, Halifax, NS, Canada, 21–23 August 2013. [Google Scholar] [CrossRef]
  16. Gaur, M.; Makonin, S.; Bajić, I.V.; Majumdar, A. Performance evaluation of techniques for identifying abnormal energy consumption in buildings. IEEE Access 2019, 7, 62721–62733. [Google Scholar] [CrossRef]
  17. Chen, X.; Xiao, S. Multi-objective and parallel particle swarm optimization algorithm for container-based microservice scheduling. Sensors 2021, 21, 6212. [Google Scholar] [CrossRef]
  18. Yuan, J.; Zeng, X.; Zhou, J.; Li, J.; Lv, J.; Chen, R.; Chen, K.; Yang, W.; Zhang, Y. Data-driven real-time home energy management system based on adaptive dynamic programming. Electr. Power Syst. Res. 2025, 238, 111055. [Google Scholar] [CrossRef]
  19. Da, T.N.; Cho, M.Y.; Thanh, P.N. Hourly load prediction based on feature selection and a hybrid CNN-LSTM method for building’s smart solar microgrid. Expert Syst. 2024, 41, e13539. [Google Scholar] [CrossRef]
  20. Ren, J.; Zhou, X.; Jin, X.; Ye, Y.; Causone, F.; Ferrando, M.; Li, P.; Shi, X. A systematic review of occupancy pattern in urban building energy modeling: From urban to building-scale. J. Build. Eng. 2024, 95, 110307. [Google Scholar] [CrossRef]
  21. Decuypere, R.; Robaeyst, B.; Hudders, L.; Baccarne, B.; Van De Sompel, D. Transitioning to energy-efficient housing: Drivers and barriers of intermediaries in heat pump technology. Energy Policy 2021, 156, 112709. [Google Scholar] [CrossRef]
  22. Benavente-Peces, C. On the energy efficiency in the next generation of smart buildings—Supporting technologies and techniques. Energies 2019, 12, 4399. [Google Scholar] [CrossRef]
  23. Madhan Raj, B.; Ashwin, S.; Harish, R.; Manishwar, M.; Sophia Jasmine, G. Occupancy-based cost-efficient campus energy management system. In Proceedings of the International Conference on Inventive Computation Technologies, Lalitpur, Nepal, 24–26 April 2024; pp. 2047–2051. [Google Scholar] [CrossRef]
  24. Jangsten, M.; Lindholm, T.; Dalenbäck, J.O. Analysis of operational data from a district cooling system and its connected buildings. Energy 2020, 203, 117844. [Google Scholar] [CrossRef]
  25. Agugiaro, G.; Zwamborn, A.; Tigchelaar, C.; Matthijssen, E.; León-Sánchez, C.; van der Molen, F.; Stoter, J. On the influence of party walls for urban energy modelling. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci. 2022, XLVIII-4/W5-2022, 9–16. [Google Scholar] [CrossRef]
  26. Palmer, J.; Terry, N. Looking critically at heat loss through party walls. Sustainability 2022, 14, 3072. [Google Scholar] [CrossRef]
Figure 1. Four connected SGTs as a townhouse complex.
Figure 1. Four connected SGTs as a townhouse complex.
Energies 18 03320 g001
Figure 2. Base load, optimized load without occupant data, and optimized load with occupant data for the 1-bedroom CSGT over a 24 h period.
Figure 2. Base load, optimized load without occupant data, and optimized load with occupant data for the 1-bedroom CSGT over a 24 h period.
Energies 18 03320 g002
Figure 3. Base load, optimized load without occupant data, and optimized load with occupant data for the 2-bedroom CSGT over a 24 h period.
Figure 3. Base load, optimized load without occupant data, and optimized load with occupant data for the 2-bedroom CSGT over a 24 h period.
Energies 18 03320 g003
Figure 4. Base load, optimized load without occupant data, and optimized load with occupant data for the 3-bedroom CSGT over a 24 h period.
Figure 4. Base load, optimized load without occupant data, and optimized load with occupant data for the 3-bedroom CSGT over a 24 h period.
Energies 18 03320 g004
Figure 5. Base load, optimized load without occupant data, and optimized load with occupant data for the 4-bedroom CSGT over a 24 h period.
Figure 5. Base load, optimized load without occupant data, and optimized load with occupant data for the 4-bedroom CSGT over a 24 h period.
Energies 18 03320 g005
Figure 6. Base load, optimized load without occupant data, and optimized load with occupant data for the CSGT complex over a 24 h period.
Figure 6. Base load, optimized load without occupant data, and optimized load with occupant data for the CSGT complex over a 24 h period.
Energies 18 03320 g006
Figure 7. Performance improvement relative to historical data for the base load, optimized load without occupant data, and optimized load with occupant data.
Figure 7. Performance improvement relative to historical data for the base load, optimized load without occupant data, and optimized load with occupant data.
Energies 18 03320 g007
Figure 8. Cost savings versus emissions reduction for the CSGT complex optimized with occupant data.
Figure 8. Cost savings versus emissions reduction for the CSGT complex optimized with occupant data.
Energies 18 03320 g008
Figure 9. Base, without occupant data, and optimized with occupant data CGST complex occupant satisfaction over a 24 h period.
Figure 9. Base, without occupant data, and optimized with occupant data CGST complex occupant satisfaction over a 24 h period.
Energies 18 03320 g009
Figure 10. CSGT complex optimized load with full, partial, and no occupancy.
Figure 10. CSGT complex optimized load with full, partial, and no occupancy.
Energies 18 03320 g010
Table 1. CSGT Parameters.
Table 1. CSGT Parameters.
Feature1-Bedroom CSGT2-Bedroom CSGT3-Bedroom CSGT4-Bedroom CSGTCSGT
Residents2 (Couple)3 (Couple + Child)4 (Couple + 2 Children)5 (Couple + 3 Children)Multiple Units
Peak Load (kW)79121436
Occupancy (Hours/Day)8–1210–1614–1816–20Distributed
Hot Water Usage (Liters/Day)1802704004601020
Lighting (Hours/Day)3–55–76–96–10N/A
EV ChargingN/AN/A1–2 EVs (2–3 h/day)2 EVs (2–4 h/day)N/A
HVAC Consumption (kWh/m2/Year)26283032N/A
Shared Wall InsulationR-22R-22R-22R-22Energy-Efficient Walls
Fire Safety2 h Fire Rated Walls2 h Fire Rated Walls2 h Fire Rated Walls2 h Fire Rated WallsFire-resistant Construction
Table 2. CGST Complex Optimization Results.
Table 2. CGST Complex Optimization Results.
ParameterBaseOptimized Without Occupant DataOptimized With Occupant Data
Load (kWh)20,00017,880 (10.6%)16,950 (14.3%)
Operational Costs (CAD)25002250 (10.0%)2175 (13.0%)
Carbon Emissions (kg CO2)50004450 (11.0%)4225 (15.5%)
Peak Load (kW)15.013.4 (10.5%)12.9 (14.0%)
Table 3. CSGT performance with four models.
Table 3. CSGT performance with four models.
ModelMAE (kWh)RMSE (kWh)R2
Linear Regression (LR)0.801.200.85
LSTM0.600.720.89
CNN0.560.750.93
Proposed0.470.680.95
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Moghimi, S.M.; Gulliver, T.A.; Thirumarai Chelvan, I.; Teimoorinia, H. Occupant-Centric Load Optimization in Smart Green Townhouses Using Machine Learning. Energies 2025, 18, 3320. https://doi.org/10.3390/en18133320

AMA Style

Moghimi SM, Gulliver TA, Thirumarai Chelvan I, Teimoorinia H. Occupant-Centric Load Optimization in Smart Green Townhouses Using Machine Learning. Energies. 2025; 18(13):3320. https://doi.org/10.3390/en18133320

Chicago/Turabian Style

Moghimi, Seyed Morteza, Thomas Aaron Gulliver, Ilamparithi Thirumarai Chelvan, and Hossen Teimoorinia. 2025. "Occupant-Centric Load Optimization in Smart Green Townhouses Using Machine Learning" Energies 18, no. 13: 3320. https://doi.org/10.3390/en18133320

APA Style

Moghimi, S. M., Gulliver, T. A., Thirumarai Chelvan, I., & Teimoorinia, H. (2025). Occupant-Centric Load Optimization in Smart Green Townhouses Using Machine Learning. Energies, 18(13), 3320. https://doi.org/10.3390/en18133320

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop