Abstract
The global shift toward sustainable energy and electric mobility addresses environmental concerns related to fossil fuels. While these alternatives are increasingly utilized in residential and commercial sectors, integrating renewable energy in building systems presents significant challenges. This is particularly evident in cold regions where unpredictable resource availability complicates energy reliability. The study emphasizes the need for innovative approaches to address these complexities and ensure consistent energy performance in dynamic conditions. This research explores the energy dynamics within a residential community located in a relatively cold climate region (Tabriz). The study begins by estimating the energy requirements of individual buildings, including the additional demand generated by electric vehicles. It then evaluates the potential for solar energy generation from photovoltaic systems. Finally, a machine learning-based approach (i.e., LSTM, Long Short-Term Memory) is employed to optimize the management of energy supply and demand across the community. This study demonstrates that heating demands in a cold climate are substantially higher than cooling needs, with solar energy providing sufficient (~ 32.1%) coverage during warmer months but requiring grid support in colder seasons. The prediction of EV charging patterns using LSTM models achieved over 93% accuracy, enabling improved energy demand forecasting and load management. These findings highlight the potential for optimizing renewable energy use, reducing grid dependency, and enhancing energy efficiency through effective production-demand management.
Similar content being viewed by others
Introduction
Under current conditions, buildings play a key role in driving global energy consumption and environmental impacts1. The energy use within this sector has soared, fueled by factors such as broader access to power in developing areas, widespread adoption of energy-hungry equipment, and the rapid growth of construction worldwide2. A large part of this energy is devoted to maintaining comfortable indoor environments through heating, cooling, and ventilation systems, with the remainder allocated to lighting, appliances, and water heating3,4. Regions with colder climates face even greater energy demand, as extended harsh winters significantly increase the need for heating5,6. In the regions with relatively colder climates, the building sector stands out as a major contributor to overall energy use and greenhouse gas emissions7,8.
Efforts to tackle these issues have led to a variety of strategies, such as promoting clean energy technologies, relying on localized sustainable energy sources, incorporating electric and hybrid vehicles, boosting energetic efficacy, and introducing high-operation building materials9,10. Nevertheless, regions with cold climates face unique hurdles when it comes to adopting renewable energy, due to its unpredictable nature11. Energy use remains the largest contributor to human-made greenhouse gas emissions and air pollution, driving the majority of environmental harm12,13. Without proper measures to reduce these impacts, the energy sector continues to exacerbate environmental degradation unchecked14. The shift to low-carbon energy is crucial for addressing climate change, improving air quality, and protecting public health. It enhances energy security, reduces dependence on finite fossil fuels, and supports long-term economic growth by creating jobs and lowering costs15,16. Additionally, it helps preserve biodiversity and fulfills global commitments, such as those in the Paris Agreement, ensuring a sustainable future for both people and the environment17.
Renewable energy systems provide several key benefits, such as reducing greenhouse gas emissions, improving energy security, and promoting long-term sustainability. They rely on naturally replenished resources like sunlight, wind, and water, which minimize environmental impact and lower dependence on finite fossil fuels18,19. In 2023, renewable energy sources accounted for approximately 30% of the global final electricity consumption, marking their growing role in the energy landscape. This share reflects the increasing adoption of technologies like solar panels, wind turbines, and hydroelectric power, which are driving the global transition toward cleaner and more sustainable energy systems. Compared to other renewable energies, one key advantage of solar energy over other renewable sources is its versatility and scalability, as it can be deployed in small-scale rooftop systems or large solar farms, making it accessible for both urban and rural applications20,21.
The rapid expansion of solar-PV technology is driven by its growing cost competitiveness compared to conventional energy sources, increasing awareness of its advantages, favorable governmental support, and rising electricity demand22. Buildings, particularly through rooftop PV installations, have become key urban spaces for deploying this technology. Today, distributed PV systems account for a significant portion of global PV installations, although a large share of their potential remains untapped23. Urban areas, home to the majority of the global population, are responsible for consuming most of the world’s energy and generating a large proportion of carbon dioxide emissions caused by human activity24. To address these challenges, cities must implement comprehensive sustainable strategies to meet energy demands, combat climate change, and ensure better living standards25. Renewable energy offers enormous opportunities to improve urban sustainability and reduce environmental impacts26.
Solar-PV systems are becoming an essential part of urban energy systems, helping cities transition towards sustainability by reducing carbon emissions. Local governments play a major role in this shift by implementing supportive policies, adapting urban planning strategies, and encouraging the integration of PV systems into buildings27. However, challenges such as limited urban space, regulatory inconsistencies, and insufficient collaboration between planners and policymakers create obstacles for widespread adoption. Public awareness and community engagement are also crucial for overcoming resistance and fostering the acceptance of solar technologies. To address these challenges, local authorities need standardized regulations, improved planning practices, and advanced tools to effectively integrate solar-PV systems into urban energy strategies28.
EVs run on electric motors powered by hydrogen/rechargeable batteries, eliminating the need for fossil fuels and significantly reducing greenhouse gas emissions, especially if powered by renewable energy. They offer lower running and maintenance costs while improving urban air quality by eliminating harmful pollutants, contributing to healthier city environments29. Despite these advantages, challenges include a lack of charging infrastructure, high initial costs due to expensive battery technology, and limited driving ranges compared to conventional cars. Additionally, their production relies on scarce resources like lithium and cobalt, raising sustainability concerns, while their widespread adoption puts pressure on existing power grids30,31. Overcoming these obstacles is crucial for ensuring the efficient and sustainable growth of electric vehicle technologies32,33. Solutions to overcome these challenges include expanding charging infrastructure, reducing battery production costs through technological innovations, using sustainable and alternative materials for battery manufacturing, increasing power grid capacity with a focus on renewable energy, and providing government incentives to boost the adoption of electric vehicles34.
Electric vehicles typically operate for 2 to 4 h daily for activities like commuting, while their charging time varies based on the charger type: slow chargers require 8–12 h, moderate chargers 4–6 h, and fast chargers around 30 min to an hour for an 80% charge35. The availability of EVs, beyond just driving or charging, enhances their value by enabling additional uses such as energy storage for the grid (Vehicle-to-Grid) or household backup power (Vehicle-to-Home). This versatility increases their practicality and user reliance36. In terms of energy efficiency, EVs significantly reduce energy losses due to the high efficiency of electric motors compared to internal combustion engines37. They also support demand-supply management as energy storage units, aiding grid stability, and allow for the effective use of renewable energy by storing surplus power for future use. Their adoption minimizes reliance on fossil fuels, contributing to overall system efficiency38. In bottom-up energy models, EVs play a crucial role in integrating transportation with broader energy systems. They help forecast electricity demand, evaluate the impact of transitioning to cleaner energy sources, and support decision-making for energy policies and infrastructure planning39,40. Overall, EVs enhance energy system performance while promoting sustainability and renewables41.
Adiansyah et al.42 conducted a life cycle impact assessment of solar-PV systems on a small island in Indonesia, evaluating two end-of-life management strategies. Their findings indicate that recycling could diminish environmental impacts by 25% compared to landfilling, particularly in the areas of human health and ecosystem burdens. To further enhance the sustainability of solar-PV deployment, the authors suggested the establishment of localized recycling infrastructure, the optimization of transportation methods, and the implementation of tax incentives. However, a significant challenge in these systems is the mismatch between electricity demand and solar-PV’s output. Consequently, deploying an energy storage system presents a viable option for capturing and utilizing excess energy43. Buildings are a major global energy consumer, accounting for about 40% of energy use and significant CO2 emissions, largely due to operational needs and considerable energy wastage from inefficiencies in design and system. Addressing this requires robust energy management strategies; including efficiency upgrades, smart technologies, behavioral changes, and energy audits to reduce consumption. Simultaneously, integrating renewable energy sources like solar and wind power directly into buildings or through district energy systems is crucial for sustainable energy supply44. Supportive policies and green building standards are essential to drive the adoption of these energy management and renewable energy solutions in the building sector, leading to a more sustainable future. By combining these approaches, buildings can significantly minimize their energy footprint and environmental impact45.
Demand forecasting in buildings enables proactive energy management, which is crucial for effective demand response programs within smart grids, leading to improved grid stability and efficiency46. This capability also allows buildings to optimize their energy consumption, reduce costs, and better integrate with renewable energy resources47. However, developing accurate demand forecasting models for buildings faces challenges including the complexity of building energy dynamics due to diverse factors and the need for high-quality, real-time data acquisition and processing. Consequently, this area has drawn increasing interest from researchers. Shaqour et al.48 performed a comprehensive quantitative analysis of various levels of aggregated demand. Their advanced deep learning models demonstrated impressive predictive capabilities. However, the majority of weather variables did not significantly impact the prediction outcomes. At a 30-aggregation level, mean absolute percentage errors were recorded below 10%. In contrast, at a 479-aggregation level, errors ranged from 2.47 to 3.31%. Meanwhile, Sekhar and Dahiya49 introduced an optimal hybrid methodology that integrates Grey Wolf Optimization (GWO) with Convolutional Neural Networks (CNN) and Bidirectional Long Short-Term Memory (BiLSTM) networks for forecasting electrical energy consumption in buildings. The 1-dimensional CNN, in conjunction with BiLSTM, was employed to extract nonlinear features from time series data. To assess the forecasting performance, four datasets representing buildings with varying characteristics were analyzed. A hyperparameter optimization was conducted using the Grey Wolf Optimizer, which validated the accuracy and stability of the GWO–CNN–BiLSTM model. Overall, in existing literature, two predominant methodologies are highlighted for energy load forecasting: models grounded in physical principles and models that employ statistical and machine learning approaches.
Pallonetto et al.50 conducted an evaluation of machine learning methodologies for electricity forecasting within a complex commercial building environment. Their study compared the performance of a deep neural network model, specifically LSTM, against that of a support vector machine. The focus was on predicting high peak and valley consumption for the following day, which is crucial for demand response initiatives. Additionally, they compared short-term forecasts relevant to the deployment of secondary reserve energy systems. The forecasting outcomes are intended to enhance the dynamic management of buildings, facilitating a balance between electricity supply and demand. In a separate study, Makaremi51 developed a multi-output deep learning model aimed at predicting electric vehicle energy demand and port availability. This model demonstrated superior performance compared to single-output deep learning and transformer models. The evaluation highlighted the model’s capacity for interpretable predictions, dynamic adaptability, and spatial-operational generalizability. Implementing this model could contribute to grid stability, enhance transparency, and inform policy-driven planning for EV infrastructure.
Rodríguez et al.46 focused on forecasting the day-ahead energy demand of buildings with a resolution of 15 min. To accommodate the constraints of flexible energy markets, they utilized data from two days prior. Their analysis included decomposition and shape factor techniques to improve forecasting accuracy. The findings revealed that the proposed methodology is both effective and precise, achieving a MAPE ranging from 10.77 to 31.52% and an R² value between 0.51 and 0.70 for individual buildings. Zhou et al.52 introduced a grey seasonal model designed for time series exhibiting varying trends. The new model’s application was subjected to a systematic analysis from multiple perspectives. The study examined data distributions as well as daily and hourly series within the grey prediction framework. The results underscored the model’s superiority compared to alternative forecasting methods. While significant progress has been made in leveraging machine learning and advanced forecasting techniques for energy demand prediction in buildings and EV infrastructure, existing studies often focus on specific resolutions, single-use cases, or limited operational conditions. A research gap exists in the development of a unified, multi-scale forecasting model capable of integrating diverse inputs (e.g., building load, EV demand, and market flexibility) to enhance adaptive and comprehensive energy management within smart grid ecosystems.
Key factors influencing building energy efficiency include the persistent management and oversight of chronological energy data, building materials, and the integration of energy-efficient technologies like smart controls and renewable energy systems53. Additionally, occupant behavior, real-time energy management, and accurate demand forecasting play crucial roles in optimizing energy consumption and reducing energy waste54. Sequential prediction models play a crucial role in accurately forecasting time-dependent energy demand patterns, enabling proactive energy management and improved alignment with dynamic grid requirements. Aste et al.55 suggested that substantial energy conservation opportunities in buildings are linked to commissioning, sophisticated controls, and performance monitoring techniques. These opportunities are influenced by various elements, including policy support, financial backing, eco-friendly materials, technological advancements, and environmental consciousness. Thus, not all current building frameworks may be suited to integrate these sophisticated functionalities. Implementing predictive economic control strategies for buildings interacting with smart energy systems faces challenges such as the need for accurate, real-time data and robust models capable of handling the complexity of energy dynamics and market fluctuations. Additionally, integrating these strategies requires overcoming computational limitations, ensuring cyber-security, and addressing uncertainties in renewable energy supply and occupant behavior56.
Liu et al.57 integrated the Dung Beetle Optimizer with Variational Mode Decomposition alongside various neural networks to develop nine distinct models for predicting daily air-conditioning energy consumption. This approach significantly mitigated the occurrence of substantial local errors during the prediction of energy use in complex public buildings. The optimized models achieved reductions in mean absolute percentage error of 62.8%, 59.4%, and 60.2%, correspondingly. Skomski et al.58 investigated the application of sequence-to-sequence recurrent neural networks for short-term electrical load forecasting, focusing on a case study involving four commercial office buildings. Their findings indicated that initiating the training process during the midpoint of a heating or cooling season, utilizing a minimum of six months of data, yielded optimal results. Additionally, the models demonstrated superior performance when predictions were based on three to twelve hours of preceding data, with a noticeable decline in accuracy for shorter time frames. Serra et al.59 introduced a Reservoir Computing-based methodology that effectively predicts district heating and cooling loads. The incorporation of explainable artificial intelligence enhanced transparency, trust, and informed decision-making. This approach demonstrated superior performance compared to baseline models in terms of percentage root mean square error and percentage mean absolute error, while also mitigating the risk of overfitting. It excelled in long-term forecasting, maintaining low error rates over extended periods. Among the models evaluated, Reservoir Computing was noted for its high level of explainability and consistent feature impact.
Meanwhile, Runge and Saloux60 explored various artificial intelligence models for forecasting district heating demand, comparing prediction and forecasting methodologies. They assessed model performance based on accuracy, training duration, and stability, finding that the prediction method utilizing forecasted inputs yielded marginally improved outcomes. The LSTM and XGBoost models surpassed other techniques, achieving an error rate of 11%. Additionally, Krishnamurthy et al.61 investigated the significant policy contexts and sociotechnical factors influencing energy resource management. They identified that the effectiveness of most forecasting models was constrained by a deficiency of localized information necessary for effective implementation. Their research delved into both AI-driven methods and traditional approaches for managing energy resources, presenting recent advancements in AI-based energy resource forecasting that employed data decomposition techniques. They also provided insights into the deployment of AI predictive models for the adoption of energy solutions in the South African context.
Although previous studies have advanced forecasting models and energy management systems, there is limited focus on developing predictive frameworks that combine real-time building-level energy demands with EV energy storage capabilities to harmonize intermittent renewable energy outputs. Furthermore, the impact of user behavior, policy incentives, and technological constraints on the scalability of such integrated systems remains underexplored. Investigating optimized control algorithms that leverage both machine learning and real-time adaptive methods could bridge these gaps, enabling a more seamless and efficient integration of EVs into smart grids and sustainable building infrastructures. Moreover, most studies have concentrated on single-agent systems, where the electricity produced by renewable sources operates independently of the energy demand. Further, despite advancements in building energy management and forecasting systems using machine learning, limited studies have focused on the seamless integration of variable energy consumption loads, including electric vehicle charging, with renewable energy production in specific climatic regions. In particular, there is a lack of in-depth exploration of the interaction between user behavioral patterns, smart EV charging management systems, and renewable energy frameworks like solar power. Furthermore, the development of models based on real-world data that can scale across diverse climates and function effectively within urban smart infrastructure remains underexplored. Therefore, there is a need to create novel methods capable of adaptively and simultaneously analyzing real-time dynamics between consumers, storage systems in EVs, and renewable energy-driven smart grids.
This study focuses on a groundbreaking methodology that bridges two domains: machine learning advances and strategies for optimizing energy efficiency in the construction sector. The research relies on two years’ worth of operational energy data from a building, applying supervised machine learning (here, LSTM technique) to predict electricity demands—including EV charging needs—and to estimate solar-PV energy production. These insights were used to address the challenge of balancing energy supply and demand in real-time. The feasibility of a vehicle-to-home technology was evaluated, based on real-world PV usage and production data from occupants in a relatively cold-weather region (i.e., Tabriz, Iran). The study also examines how energy consumption behaviors—spanning heating, cooling, electric vehicle charging, and household devices—are influenced by individual preferences and comfort needs. Consumption trends were represented through annual visuals, alongside graphs comparing solar-PV energy production and grid supply. Using prediction models and machine learning tools, the research explored how EV charging could be coordinated with energy outputs, ensuring the system operate more efficiently within its urban context. Therefore, the contributions, objectives, and groundbreaking innovations of this research are outlined below, showcasing a transformative approach to redefining energy management systems, bridging technological gaps, and addressing critical challenges in renewable energy integration and urban infrastructure development:
-
(i)
This study unveils a cutting-edge predictive framework that masterfully intertwines dynamic building energy demands with the energy storage potential of EVs, paving the way for harmonizing intermittent solar-PV outputs and establishing a new paradigm in energy optimization.
-
(ii)
By deploying advanced LSTM models on an extensive two-year dataset, this research delivers precise predictions of energy demand—including EV charging—and solar energy production, presenting a robust solution for real-time energy equilibrium.
-
(iii)
Anchored in empirical data from the cold-weather region of Tabriz, Iran, the study breaks new ground by demonstrating the feasibility of vehicle-to-home technology while addressing the complexities of renewable energy integration within urban infrastructures.
-
(iv)
Through a deep exploration of the interplay between human behavior and energy consumption—spanning heating, cooling, EV charging, and household appliances—the study sheds light on how comfort preferences and individual habits shape energy systems.
-
(v)
By orchestrating a seamless synergy between EV charging and renewable energy production, this research charts an innovative path toward scalable, efficient, and climate-resilient energy systems tailored for smart, sustainable urban developments.
This work is groundbreaking due to its integration of real-time building energy demand, EV storage capabilities, and solar-PV generation through advanced machine learning techniques, while simultaneously addressing the interplay of user behaviors, challenging climatic conditions, and urban scalability—an area largely unexplored in existing literature.
Methodology: case study and system process description
The diagram of the configuration is depicted in Fig. 1. A relatively cold climate region, Tabriz in Iran, was selected as a case study to demonstrate how the metropolitan construction energy modeling system performs in a practical urban environment. Drawing from the boundary and construction footprint information of the studied cold climate region, this research focused on a set of buildings within the area. During the data preparation phase, relevant urban data for the simulations were systematically organized. Despite the data spanning from 2019 to 2023, this study operates under the assumption that there were negligible urban developments during this period, thus considering all data as representative of Tabriz for 2023.
The building exteriors were categorized into different types according to their orientations. Due to the specific 40° orientation in the considered area in Tabriz, adjustments were made to the conventional orientations in the Energy Performance Coefficient’s calculator. Note that, the floor and volume extents of the classified facades are computed to serve as inputs for the energy simulation system. In this analysis, only the buildings themselves are regarded as barriers for shading impacts and other shadow obstacles as well as the impact of dust on solar-PV panels have been omitted. For the demonstration of window placements, point matrices are established on fronts that are wider than 160 cm and exceed one-story in height, with an assumption of uniformly distributed windows across each floor. Considering that the structures in the selected area are low-rise, with a maximum height of three stories, and are relatively spaced apart, no points are marked on their facades. As a result, shading analysis is not required for this study.
Figure 2 displays the climate chart (average ambient temperature and relative humidity) for Tabriz, adopted from62,63. Within this analysis, the mean street width and construction heights are determined for any segment to establish the dimensions of the canyons. To evaluate the proportions of former roads and building roofs, data were sourced from land cover information that was overlaid with the census tracts, as shown in Fig. 3.
The process begins with the selection of the study area, where buildings in Tabriz were examined using the PVWatts tool to evaluate the solar-PV capabilities of building rooftops. The next phase involves constructing a model for the community energy framework utilizing a variety of software applications. Initially, an energy model of the building is created to ascertain the community’s thermal demand. The thermal behavior of the study area is then evaluated using IES VE (Integrated Environmental Solutions Virtual Environment) program. Following this, the electrical demand of the building is estimated based on household energy consumption patterns.
A novel approach was utilized to compute the mean daily electricity usage in the community. Subsequently, eQUEST software was employed to simulate the power requirement and develop a distinctive annual load profile. By integrating hourly and daily variability factors in the software, the yearly hourly demand was produced. Utilizing the data from the initial phase, specifically the accessible roof space and the preliminary solar capacity of the region, the PV installation in residential properties was modeled using PV*SOL software. This involved inputting detailed technical specifications of the photovoltaic system into PV*SOL to calculate the generated solar power. Note that, the solar-PV panel used was type of LG NeON® 2 350 N1C-G4.
Furthermore, the demand for electric vehicles was assessed by accounting for the average number of electric vehicles per household, the travel distance per household, and the charge needs of each vehicle after covering a specific mileage. In this framework, a model emphasizing energy provision from independent buildings and their own solar-generated electricity was conceptualized. Three demand profiles—specifically for heating, cooling, and electrical requirements—and one profile for energy provision —photovoltaic output—were established as constant and immutable criteria. While the energy demand of electric vehicles is known, their charging schedules were considered adjustable. The primary aim of the goal formulation was to effectively manage the scheduling of electric vehicle charging to enhance the utilization of available solar energy. Consequently, an electric vehicle charging strategy that emphasizes maximizing solar power usage is introduced. Essentially, the timing for charging electric vehicles is aligned with periods when solar energy production is at its peak. Machine learning technique (i.e., LSTM) is then applied to predict the most effective charging times for electric vehicles and to assess the efficacy of the developed model in determining these times.
Building-energy simulation
IES VE is a cutting-edge simulation software specifically developed for in-depth analysis of building energy performance, environmental impact, lighting, thermal comfort, and airflow dynamics. Unlike other tools, IES VE offers a modular approach, allowing users to conduct detailed simulations such as dynamic thermal modeling, daylighting studies, and renewable energy integration. The software is renowned for its ability to meet rigorous green building standards such as LEED, BREEAM, and ASHRAE64,65. The process to formulate the initial model is described in the following steps:
The most comparable dimensions and layouts were selected for the buildings at the designated site. Given that the modeling is conducted at an urban scale, the plan map has been slightly simplified to ease the integration of the building model into the software. As a result, the building’s plan was streamlined as shown in Fig. 4. Initially, a building was configured within the site using the software’s drawing tools (here, AutoCAD). Utilizing the different tools, the structures were arranged in an approximation of the configuration. After simulating a single building and developing a series of buildings in the neighborhood, it is necessary to perform an analysis of the cooling and heating loads for the buildings. To this end, the composition of the building’s walls and roof was first defined and inputted into the software. A standard activity plan for the occupants was then adopted from the default options available within the software. Table 1 details the materials/construction of the building’s roof/walls. As the analyses for structures with varying alignments revealed negligible variations, the load computations were conducted for a single construction.
To facilitate these calculations of cooling and heating loads, a surcharge rate of 25% was utilized. These computations were executed on an annual basis at hourly intervals, as well as during specific weeks designated for heating/cooling structure, to determine the typical demands. The datasets scrutinized in the investigation were segmented into various classifications. The primary category encompasses the heating/cooling loads. Because of the tight spacing of the residences in this area and their largely homogeneous architectural design, the cooling and heating demand for one construction is assumed to be representative of the entire complex. Likewise, the energy production profile of the solar-PV panels was consistent across all buildings. Conversely, while the mean electrical demand necessity for each building was comparable, the power-load modeling performed with eQUEST software generated distinct profiles, each with consistent daily and hourly variation coefficients. This methodology culminated in the estimation of the total load.
Electric-power load analysis
Once the cooling and heating loads have been ascertained, it becomes necessary to calculate the electrical load as well. For this purpose, eQUEST software is utilized. From the calculations, the daily average power consumption for electrical devices stands at 213.5 kWh for the entire community. Incorporating a potential rise in consumption coefficient of 20%, the value adjusts to 256.2 kWh. Further, eQUEST software facilitates the generation of an annual hourly electric-load pattern by using the building’s average annual electric-energy consumption data across different times of the day. Figure 5 demonstrates the seasonal-electrical load for overall buildings. The demand was assessed on a seasonal-basis, and a coefficient is applied to the monthly consumption to formulate the load profile. Peaks typically occur during daylight hours due to higher activity and usage, whereas valleys are more common at night.
The daily energy usage of each device is determined by the subsequent formula:
In this formulation, \(\:{\tau\:}_{k}\) denotes the product of the proportion of operating days per week and the operating time (in hours) of k-th equipment. The overall daily base-load for a single building within the community is derived by aggregating the power consumption of all components, taking into account potential increases in the consumption coefficient:
Solar system’s simulation
Once the community’s demands, encompassing heating/cooling and electricity requirements, are established, the subsequent phase involves simulating and assessing the community’s solar panels. The PV*SOL software developed by Valentin Software GmbH is utilized to assess the performance of the Solar-PV system. Select exact geographic location in the PV*SOL software allows for the collection of meteorological data like solar irradiance and air temperature from atmospheric repository. The seasonal-basis global horizontal irradiance for Tabriz is illustrated in Fig. 6. As depicted, the maximum solar radiation transpires in the central months of the year, offering a prime opportunity to optimize solar energy capture. Table 2 gives the key Features of LG NeON® 2 350 N1C-G4 solar panel.
EV simulation
The aim of this study is to refine the timing of charging periods for electric vehicles. For this purpose, specific basic information is essential. Since electric vehicles are not widely used in Iran, basic information for these vehicles was selected according to similar literature (see Table 3). Further, Tesla Model 3 selected as the representative electric vehicle for the designated area. The Tesla Model 3 offers an impressive EPA-estimated range of 438 km on a single charge. When it comes to charging, using a standard household outlet of 120 V, the Tesla Model 3 takes approximately 30 h to fully charge its battery. However, if using a Level 2 public charging station or a 240 V outlet at home, the Model 3 can be fully charged in around 6 to 8 h. It is also capable of fast charging using Tesla’s Supercharger network, where it can charge up to 80% of its battery in just about 20 min.
The Tesla Model 3 comes with a standard 120 V charging cable, but it is also compatible with 240 V Level 2 chargers and Tesla’s proprietary Supercharger stations. In terms of energy efficiency, the Model 3 consumes roughly 0.15 kWh per kilometer. Furthermore, the battery pack in the Tesla Model 3 has a capacity of 55 kWh. Tesla’s battery is also strategically placed under the passenger cabin, enhancing driving comfort and stability. In summary, it is designed to cater to longer driving needs and more efficient energy usage, making it a more suitable option for extended travel.
The Tesla Model 3 Standard Range Plus variant has a 55 kWh battery. Using a 3-kW charging cable, a full charge of the 55 kWh battery pack would take around 18 h. However, considering that the Tesla Model 3 does not typically deplete its battery to 0% in daily use, the required charging time during a typical cycle would be lower. For example, recharging 20-30% of the battery would take ~ 4 to 6 h using this cable. Based on typical energy consumption and daily mileage, the EV would likely need to be charged approximately every 48 h. Additionally, to model the charging pattern of the Tesla Model 3, we can assume that the car charges when solar power generation is at its maximum. Charging the car during peak solar generation times ensures efficient energy usage and supports the stability of the community energy system.
The community’s overall constant demand at each interval is computed as follows:
The disparity among the constant requirement and the on-site solar production is determined by:
To enhance the system’s self-sufficiency, it is optimal to charge the electric vehicle when both the solar energy and are at their highest. Consequently, during each 72-hour cycle (3 days), the maximum difference is determined as follows:
The calculated value serves as the pivotal hour for charging within each cycle. Figure 7 displays the proposed charging algorithm.
For electric vehicle charging, a technique is advocated wherein the electric car is charged during periods when the discrepancy among local power production and the construction’s electrical requirement reaches its peak. This method seeks to minimize the disparity between production and demand curves, simultaneously increasing the consumer’s dependence on electricity produced by solar power for vehicle charging. Essentially, this straightforward technique establishes a preliminary charging model grounded on the assessments of photovoltaic manufacturing capability and structural demand. Additionally, by employing pertinent historical data, a machine-learning strategy (here, LSTM) is formulated to assist consumers in predicting the most favorable charging times for their vehicles in forthcoming days.
Machine learning model
Machine learning is a transformative branch of artificial intelligence that enables systems to learn, adapt, and make intelligent decisions by uncovering patterns and insights within data—without relying on explicit programming66. By leveraging techniques like supervised learning, unsupervised learning, reinforcement learning, and deep learning, it drives groundbreaking advancements across fields such as medicine, finance, automation, and communication67. Specifically, in the scenario of electric vehicle charging management in the desired region (Tabriz), where a strong correlation exists between energy consumption and production, forecasting becomes vital to optimize the balance between supply and demand. The developed analysis revealed a dataset where time series analysis is crucial. As a result, we chose to deploy Recurrent Neural Networks (RNN), which are well-suited for time-varying data and offer a more streamlined learning process.
LSTM is a special type of RNN designed to efficiently process and model sequential data while overcoming the vanishing gradient problem. It uses a unique architecture consisting of memory cells and gates (input, forget, and output gates) to control the flow of information, allowing it to maintain long-term dependencies within sequences while selectively forgetting irrelevant information. One of the key features of LSTM is its ability to retain information over long periods, making it particularly effective for tasks like time-series prediction, language modeling, and speech recognition. The forget gate enables it to discard unnecessary information, while the input gate decides what new information to store, and the output gate controls what part of the stored information is used at each timestep. These mechanisms allow LSTM to adapt its memory dynamically.
Compared to GRU (Gated Recurrent Unit), LSTM offers a more complex structure, which includes separate memory cells and gates. This additional complexity gives LSTM greater flexibility in modeling intricate patterns in data, especially for problems with very long-term dependencies, where GRUs might struggle due to their simpler architecture. LSTMs provide enhanced control with their three-gate mechanism, making them exceptionally strong in tasks where long-term dependencies need to be carefully managed, such as large-scale natural language models or learning intricate temporal patterns. By prioritizing flexibility and control, LSTM stands out as a powerhouse for solving problems where ordinary RNNs and their derivatives fall short68.
The forget gate determines how much of the previous cell state information should be retained or discarded:
Here, \(\:{f}_{t}\) is the forget gate output, \(\:{h}_{t-1}\) is the previous hidden state, \(\:{x}_{t}\) is the current input, and \(\:{x}_{t}\) and \(\:{b}_{f}\) represent the weight matrix and bias, respectively. The sigmoid function \(\:\sigma\:\) ensures that \(\:{f}_{t}\) is between 0 and 1. The input gate updates the cell state by determining how much of the current input should be added:
Along with it, the candidate cell state (\(\:{\stackrel{\sim}{C}}_{t}\)) is computed using a tanh activation function:
where, \(\:{i}_{t}\) is the input gate output, and \(\:{\stackrel{\sim}{C}}_{t}\) represents the new candidate additions to the cell state. The updated cell state \(\:{C}_{t}\) is a combination of the previous cell state (\(\:{C}_{t-1}\)) and the new candidate information modulated by the forget and input gates:
The output gate determines how much of the cell state should be converted into the hidden state for the next step:
The hidden state (\(\:{h}_{t}\)) is then computed as:
Here, \(\:\sigma\:\) is the sigmoid activation function, ensuring outputs between 0 and 1 and \(\:tanh\) is the hyperbolic tangent function, which scales inputs between − 1 and 1. Further, \(\:{W}_{f}\), \(\:{W}_{i}\), \(\:{W}_{C}\), and \(\:{W}_{o}\) are weight matrices, and \(\:{b}_{f}\), \(\:{b}_{i}\), \(\:{b}_{C}\), and \(\:{b}_{o}\) are biases for the respective gates. Through this architecture, LSTMs can effectively manage long-term dependencies, allowing them to excel in tasks requiring sequence memory over extended periods.
In an LSTM, the error and gradients are computed similarly to standard RNNs. At each time step \(\:t\), the error is defined as:
where, \(\:L\) is the loss function (e.g., MSE or cross-entropy). Furthermore, the total error over the entire sequence is computed as:
LSTMs use the chain rule to compute gradients, considering the dependencies of the cell state (\(\:{C}_{t}\)), hidden state (\(\:{h}_{t}\)), and gates.
Cell state gradients
Forget gate gradients
Input gate and candidate cell state gradients
Output gate gradients
Finally, the gradients for weights and biases are summed over all time steps:
LSTMs handle dependencies within sequences via gates, and thus gradient computation involves managing these gates’ contributions across time steps. The chain rule systematically propagates errors through \(\:{C}_{t}\), \(\:{h}_{t}\), and the gates, ensuring effective learning.
The most straightforward method for dividing the modeling dataset into training and testing subsets involves allocating two-thirds of the data points to the training set and the remaining third to the testing set. Consequently, the model undergoes training utilizing the designated training set and is subsequently implemented on the testing set. This approach facilitates the assessment of the model’s efficacy. Figure 8 depicts the procedure of the LSTM method.
Results and discussion
In the community modelling conducted using IES VE, extensive site-specific data are collected. The average annual ambient temperature and relative humidity for Tabriz are around 12.5 °C and 60%, respectively. During the middle months (e.g., Jun), the dry-bulb and dew point temperatures are 22.5 and 11.1 °C, respectively. However, in some cold months of the year (such as Dec, Jan and Feb), the ambient temperature also drops below zero. The wind direction remains stable throughout the year, which aids in natural ventilation within the residences. However, wind speeds vary over the year, experiencing both increases and decreases. Figure 9 depicts the hourly-basis cooling and heating demands for the desired buildings. Notably, due to case study’s relatively cold climate, the demand for building cooling is considerably lower than for heating. In fact, the peak annual heating demand is more than 2.8-fold that of cooling requirements. These cooling and heating needs were modeled as design loads to provide a more detailed understanding of the requirements in the study area.
The design load refers to the specific days annually where peak cooling and heating demands are identified, marking the period of highest mechanical cooling and heating needs. The design days for cooling loads is pinpointed in Jul, while the peak heating requirement week occurs in end of December. Figure 10 displays the seven-day design requirements for both cooling and heating. In addition to modeling these seasonal design loads, it is crucial to examine the typical daily profiles of cooling and heating loads for each season. As such, cooling and heating demands were calculated for representative days during Jul (hot months) and Dec (cold months). This approach provides insight into the consistent patterns of mechanical cooling and heating requirements for the construction and the entire district. Figure 11 showcases the standard winter and summer demands of the buildings.
Upon determining the electricity/heat demands, the power transfers within the community can be effectively managed. Figure 12 displays the community’s overall seasonal-basis demands, not accounting for the electric vehicle demand. From this, it is clear that heating is a predominant component of the energy requirements. When excluding the electric vehicle’s demand as a constant factor in the power calculations, the system’s energy sources include solar panels and the power network, catering to loads such as heating, cooling, and general electrical needs.
The energy equilibrium is concisely tabulated in Table 4, where negative quantities signify the reintroduction of energy into the network. Figure 13 shows the community’s seasonal-basis and total energy demands in conjunction with the total energy produced by the solar unit, highlighting both the mean demand across the buildings and the solar unit’s output.
Figure 14 presents the seasonal-basis profile of the overall demand, indicating a shortfall in solar energy during the initial and final quarters of the year, meanwhile during the mid-year, solar generation adequately meets the community’s demands. As noted in Figs. 12 and 13, in the cooler months, the solar unit nearly covers the hourly demand at midday, suggesting that reducing the load or enhancing midday production could fully meet the electrical requirements through solar energy alone. Conversely, during the warmer months, there is significant surplus generation from the solar unit, offering prime opportunities for charging EVs or exporting surplus electricity to the network.
Prediction under the machine learning model
To ascertain if EVs’ charging is vital at a particular hour, we constructed different aspects and characterized the outlet vehicle as an Enums function, as detailed in Table 5. Three-fourths of the dataset was designated for the training set, with the remaining portion set aside for the testing set. The employed LSTM network comprises two layers, the first layer with 512 hidden units and the second layer with 256 hidden units. A fully-integrated network was also employed, and the Mean Squared Error (MSE) served as the error function for classification tasks, utilizing RMSprop as the optimization algorithm. Following training over 7000 epochs, the outcomes are presented in Fig. 15. The diagram illustrates successful training of the model. To prevent overfitting on the training data, accuracy calculations on the test set will be performed and the results visualized.
The computed accuracy reached roughly 93% on the test dataset, which is commendable considering the volume of data involved. Moreover, the results for the test set are displayed in Fig. 16. In this diagram, the colored areas denote the times when the vehicle requires charging. It should be noted that ‘0’ signifies the initial hours, or the start of the test set previously described. Following the application of LSTM technique, the anticipated usage pattern for the EV is established. This analysis pertains to the three months (i.e., Nov, Dec, and Jan). After identifying the charge-patterns for the EV, this information is integrated into the total building load. The results a considerable concurrence between the modeled and forecasted loads confirms the precision of the LSTM technique efforts implemented (see Fig. 17).
The prediction precision stands at approximately 93%, revealing that the predicted load often aligns well with the modeled load throughout the three months. Figure 18 showcases the modeled and predicted loads for the case study over a 2-day span. As electric vehicle charging needs are assessed and modeled every 2 days, Fig. 18 outlines the load profile for 48 h. The data indicate that EV charging is scheduled primarily within the two phases of simulating and predicting, with the simulation specifying charging times on the subsequent day between roughly 41 and 47 h. Notable discrepancies occurred during the 26th and 38th hours of this period, leading to erroneous charging instructions. Despite these errors, the predictions remained accurate for the other hours.
Figure 19 displays the ultimate energy balance, inclusive of EV charging loads. As illustrated in Fig. 14, the electricity load profile peaks twice during each of the year’s four periods: early morning and late evening. This pattern, exacerbated by the relatively cold climate of Tabriz, necessitates increased heating. According to Fig. 18, these peaks are more distinct in Jan, Feb, Mar, Oct, Nov, and Dec compared to the other months. In contrast, the solar unit’s production starts early, peaks midday, and extends into the evening. Furthermore, with heightened solar radiation in the middle months, the solar unit’s output intensifies during Apr, May, Jun, Jul, Aug, and Sep. This dynamic allows the district power system to accommodate the midday loads, including EV charging, and effectively leverage excess production through grid sales, energy storage, or deferred load consumption.
The performance of the LSTM-based model was evaluated on both the training and testing datasets. To provide a clearer understanding of our model’s predictive capability, Table 6 summarizes the key performance metrics. The training accuracy was found to be 91.2%, while the testing accuracy was approximately 93%, resulting in an overall accuracy close to 91.65%. Additionally, the model exhibited low error rates, with a MSE of 0.014 on the training set and 0.017 on the testing set, and corresponding Mean Absolute Error (MAE) values of 0.095 and 0.108, respectively. These results confirm the robustness of the proposed prediction approach.
Table 7 details the model’s performance over various intervals within the 46-hour period, showing an overall prediction accuracy of approximately 91.65%. The ranges provided for the modeled and predicted loads reflect the typical variations observed in our simulations, and the accuracy percentages have been estimated accordingly.
Limitations of the study and recommendations for future work
Limitations of the study
While the study effectively addressed energy demand fluctuations in a cold climate, the reliance on grid support during winter months highlighted limitations in renewable energy supply, particularly during periods of reduced solar-PV output. Expanding energy storage capacities or diversifying renewable sources may mitigate these challenges. The predictive framework relied on user behavior patterns, which vary significantly across households and urban areas. This variability limits the generalizability of findings to regions with contrasting lifestyles or socioeconomic factors. The study assumed an existing and functional EV charging infrastructure, which may not be readily available in all geographic locations, particularly in underdeveloped regions. Scaling the proposed model to such areas could be challenging.
The framework was validated using energy data from Tabriz, Iran. Its applicability to other regions with varying climates or urban layouts might require additional data calibration and local model adjustments. Despite the advanced integration of renewable energy and EV storage, the system relied on grid support during colder months, highlighting limitations in achieving complete energy independence from non-renewable sources. While the LSTM model demonstrated high accuracy in predicting loads, minor discrepancies in energy scheduling and demand predictions suggest room for improvement, particularly for real-time applications.
Recommendations for future work
-
i.
Future studies should explore higher-capacity energy storage systems, including advanced vehicle-to-home (V2H) technologies or battery upgrades, to reduce grid dependency during colder months.
-
ii.
Expanding the input dataset to include diverse climatic regions and urban scenarios would improve the scalability and applicability of the model to varied geographic areas.
-
iii.
Incorporating other renewable energy sources such as wind or bioenergy could complement solar-PV generation, especially during months with reduced sunlight.
-
iv.
Future research could employ more sophisticated behavioral modeling techniques to account for variability in user habits and to include broader social and demographic data.
-
v.
Simulating the potential cost savings achieved by integrating the machine learning model into existing communities to provide the deeper practical insights and expanding its applicability.
-
vi.
Developing more robust real-time optimization algorithms for energy balancing and scheduling could enhance the precision of load synchronization and better accommodate dynamic energy demands.
-
vii.
The framework should be tested on larger urban communities with diverse building types and energy profiles to evaluate its effectiveness for broader-scale smart grids and energy management systems.
-
viii.
Investigating resilient backup systems, such as hybrid renewable models (solar + wind or solar + biomass), could reduce reliance on grid systems during extreme cold weather events.
-
ix.
Extending the use of machine learning beyond LSTM models (e.g., transformer networks) might yield better prediction accuracy and adaptability to energy consumption fluctuations.
-
x.
Conducting detailed cost-benefit analyses to assess the economic scalability of implementing this framework in urban regions and cold climates, encouraging investments in the proposed technology.
By addressing these limitations and pursuing further research in these areas, the predictive framework can evolve to better serve cold-climate renewable energy integration and lead to a more sustainable urban energy future. The most commonly applied AI-algorithms for optimizing photovoltaic systems integrated with electric vehicle recharge systems across different continents is tabulated in Table 8. This table indicates future trends and potential strategies to increase efficiency in cold-climate regions.
Conclusion
This study introduced a pioneering predictive framework that integrated building-level energy demands with EV energy storage capabilities to harmonize intermittent solar-PV outputs, establishing a paradigm shift in renewable energy integration. It leveraged advanced LSTM models and applied them to two years of operational energy data, achieving precise predictions of energy demands—including EV charging—and solar-PV generation to enable real-time energy balancing. Empirical data from Tabriz, Iran—a cold-weather region—was utilized to validate the feasibility of vehicle-to-home technology, addressing unique challenges related to cold-climate renewable integration and urban energy scalability. Furthermore, the study thoroughly analyzed the influence of user behavior on energy consumption patterns, such as heating, cooling, EV charging, and household appliances, offering valuable insights into how individual preferences and habits shaped energy dynamics. Finally, by coordinating EV charging schedules with renewable energy outputs, the research delivered a novel and scalable model for next-generation smart grids, tailored for cold climates and urban sustainability. This work was considered innovative due to its integration of real-time energy dynamics, EV storage potential, and solar-PV generation, while addressing the impacts of climatic conditions, user behaviors, and urban scalability—domains that had remained underexplored in previous studies.
The findings revealed that heating requirements significantly outweigh cooling needs. Annual peak heating loads were over 2.8 times greater than cooling demands. Peak design loads for heating and cooling were modeled. These loads occurred in late December and early July, respectively. Daily energy consumption patterns were analyzed for cold and hot seasons. The results showcased consistent trends in mechanical cooling and heating demands. Energy production from solar units and overall community demand were evaluated. Solar generation during midyear months (spring and summer) sufficiently covered much of the community’s energy needs. Excess production during these periods could be utilized for EV charging or exported to the grid. However, in colder months (early and late parts of the year), reduced solar production necessitated higher reliance on the power grid to support heating and electricity loads.
A machine learning model using LSTM networks was employed to predict EV charging patterns. The model was tested over a three-month period (November, December, and January). With 7,000 epochs, it achieved over 93% accuracy on the test dataset. The predictions effectively identified EV charging needs during most hours. The modeled building loads aligned well with the predicted loads, particularly over two-day intervals. While minor scheduling errors occurred in a few hours, the overall performance of the LSTM approach was commendable. The energy profile analysis showed distinct electricity demand peaks during early mornings and late evenings throughout the year. These peaks were driven by increased heating needs during colder months. Conversely, solar energy production peaked midday, covering the midday loads effectively. During warmer months, opportunities arose for energy storage or grid exports due to surplus solar production.
In conclusion, the results demonstrate that a renewable energy-based system can meet local demands efficiently. Increased grid support is needed during colder months. However, during warmer months, solar energy can satisfy local needs, optimize excess production, and enhance EV charging schedules. Improved production-demand management policies can integrate these findings. This would help achieve better energy efficiency, economic benefits, and environmental outcomes. Future work should focus on integrating diverse renewable energy sources (e.g., wind and biomass) and enhancing energy storage systems (e.g., advanced V2H technologies) to reduce grid dependency during colder months. Additionally, expanding datasets to include varied climates and urban scenarios, alongside real-time optimization of energy balancing, could improve the model’s scalability and adaptability.
Data availability
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
References
Bhargavi, K. M. et al. A novel development of advanced control approach for battery-fed electric vehicle systems. Sci. Rep. 14 (1), 20194 (2024).
Hassan, M. Machine learning optimization for hybrid electric vehicle charging in renewable microgrids. Sci. Rep. 14 (1), 13973 (2024).
Nateghi, S. & Kaczmarczyk, J. Compatibility of integrated physical barriers and personal exhaust ventilation with air distribution systems to mitigate airborne infection risk. Sustainable Cities Soc. 103, 105282 (2024).
Wang, G. & Shao, Q. Design of a smart medical service quality evaluation system based on a hybrid multi-criteria decision model. Sci. Rep. 14 (1), 26407 (2024).
Tian, X. et al. Quantifying weather-induced unreliable public transportation service in cold regions under future climate model scenarios. Sustainable Cities Soc. 113, 105660 (2024).
Gopi, G. et al. Investigating the effect of lower body local radiant warming on occupant thermal comfort in battery electric vehicles during cold conditions. Sustainable Cities Soc. 111, 105535 (2024).
Omidkar, A. et al. Machine learning assisted techno-economic and life cycle assessment of organic solid waste upgrading under natural gas. Appl. Energy. 355, 122321 (2024).
Cao, Z. et al. A decentralized authentication scheme for smart factory based on blockchain. Sci. Rep. 14 (1), 24640 (2024).
Kuang, H. et al. Unraveling the effect of electricity price on electric vehicle charging behavior: A case study in Shenzhen, China. Sustainable Cities Soc. 115, 105836 (2024).
Calvo-Jurado, C. et al. Optimal location of electric vehicle charging stations using proximity diagrams. Sustainable Cities Soc. 113, 105719 (2024).
Li, N. et al. A novel EMD and causal convolutional network integrated with transformer for ultra short-term wind power forecasting. Int. J. Electr. Power Energy Syst. 154, 109470 (2023).
Abolghasemzadeh, H., Zekri, E. & Nasseri, M. Regional-scale energy-water nexus framework to assess the GHG emissions under climate change and development scenarios via system dynamics approach. Sustainable Cities Soc. 111, 105565 (2024).
Muthusamy, T. et al. Enhancing distribution system performance by optimizing electric vehicle charging station integration in smart grids using the honey Badger algorithm. Sci. Rep. 14 (1), 27341 (2024).
Shahzad, M. W. et al. Machine learning assisted prediction of solar to liquid fuel production: a case study. Process Saf. Environ. Prot. 184, 1119–1130 (2024).
Chen, W. et al. Evaluation of the livability of arid urban environments under global warming: A multi-parameter approach. Sustainable Cities Soc. 99, 104931 (2023).
Dong, C. et al. Drought-vulnerable vegetation increases exposure of disadvantaged populations to heatwaves under global warming: A case study from Los Angeles. Sustainable Cities Soc. 93, 104488 (2023).
Hu, F. et al. Research on the evolution of China’s photovoltaic technology innovation network from the perspective of patents. Energy Strategy Reviews. 51, 101309 (2024).
Liao, Z., Kally, J. & Ru, S. Probabilistic modeling of renewable energy sources in smart grids: A stochastic optimization perspective. Sustainable Cities Soc. 109, 105522 (2024).
Wang, H. et al. Sustainable energy transition in cities: A deep statistical prediction model for renewable energy sources management for low-carbon urban development. Sustainable Cities Soc. 107, 105434 (2024).
Liu, K. et al. Green shoots in uncertain times: Decoding the asymmetric nexus between monetary policy uncertainty and renewable energy. Energy Environ. 0958305X241310198 (2025).
Chandra Sahu, P. Impact and integration of electric vehicles on renewable energy based microgrid: frequency profile improvement by a-SCA optimized FO-Fuzzy PSS approach. Green. Energy Intell. Transp. 100191. (2024).
Xie, D. & Gou, Z. Dissipating surplus solar photovoltaics capacity from Net-Zero energy buildings to electric vehicle charging stations in nearby parking lots: A study in new York City. Energy Build. 303, 113818 (2024).
Mohammad, A., Zamora, R. & Lie, T. T. Transactive energy management of solar-based range anxious electric vehicle integrated parking lots. Sustainable Energy Grids Networks. 38, 101360 (2024).
Hai, T. et al. Techno-economic-environmental study and artificial intelligence-assisted optimization of a multigeneration power plant based on a gas turbine cycle along with a hydrogen liquefaction unit. Appl. Therm. Eng. 237, 121660 (2024).
Abou Houran, M. et al. Energy and exergy analysis of a novel solar-based system merged with power cycle. Appl. Therm. Eng. 240, 122080 (2024).
Liu, J. et al. Renewable energy design and optimization for a net-zero energy Building integrating electric vehicles and battery storage considering grid flexibility. Energy. Conv. Manag. 298, 117768 (2023).
Konečná, E., Teng, S. Y. & Máša, V. New insights into the potential of the gas microturbine in microgrids and industrial applications. Renew. Sustain. Energy Rev. 134, 110078 (2020).
Shahverdian, M. H., Sohani, A. & Sayyaadi, H. A 3E water energy nexus based optimum design for a hybrid PV-PEMFC electricity production systems for off-gird applications. Energy. Conv. Manag. 267, 115911 (2022).
ISO, I. 14040. Environmental management—life cycle assessment—principles and framework. 235–248. (2006).
Erdemir, D. & Dincer, I. Novel energy management options for charging stations of electric vehicles in buildings without increasing peak demand for sustainable cities. Sustainable Cities Soc. 111, 105552 (2024).
Li, Y., Wang, J. & Cao, Y. Multi-objective distributed robust cooperative optimization model of multiple integrated energy systems considering uncertainty of renewable energy and participation of electric vehicles. Sustainable Cities Soc. 104, 105308 (2024).
Huang, Z. et al. Resilience evaluation and enhancing for China’s electric vehicle supply chain in the presence of attacks: A complex network analysis approach. Comput. Ind. Eng. 195, 110416 (2024).
Wang, W., Xie, R. K. & Ding, L. Stability analysis of load frequency control systems with electric vehicle considering time-varying delay. IEEE Access (2024).
Saravanan, R. et al. A hybrid strategy for mitigating unbalance and improving voltage considering higher penetration of electric vehicles and distributed generation. Sustainable Cities Soc. 76, 103489 (2022).
Nykvist, B. & Nilsson, M. Rapidly falling costs of battery packs for electric vehicles. Nat. Clim. Change. 5 (4), 329–332 (2015).
Krumm, J. How People Use their Vehicles: Statistics from the 2009 National Household Travel Survey (SAE Technical Paper, 2012).
Jian, L. et al. A scenario of vehicle-to-grid implementation and its double-layer optimal charging strategy for minimizing load variance within regional smart grids. Energy. Conv. Manag. 78, 508–517 (2014).
Li, H., Bai, X. & Tan, W. Impacts of plug-in hybrid electric vehicles charging on distribution grid and smart charging. In IEEE International Conference on Power System Technology (POWERCON) (2012).
Tuttle, D. P. et al. Plug-in vehicle to home (V2H) duration and power output capability. In IEEE Transportation Electrification Conference and Expo (ITEC) (2013).
Charly, A. & Caulfield, B. Transport emission modelling based on a bottom-up approach to facilitate sustainable transport planning. Sustainable Futures. 9, 100435 (2025).
Richardson, I. et al. Domestic electricity use: A high-resolution energy demand model. Energy Build. 42 (10), 1878–1887 (2010).
Adiansyah, J. S., Agusdinata, D. B. & Putra, A. P. Environmental impacts of solar PV energy systems for small-island communities in Indonesia: A life cycle assessment approach. Energy. Sustain. Dev. 85, 101651 (2025).
Ayadi, B. et al. Multi-criteria/comparative analysis and multi-objective optimization of a hybrid solar/geothermal source system integrated with a Carnot battery. Case Stud. Therm. Eng. 104031, p (2024).
Li, M. et al. Technical and economic analysis of multi-energy complementary systems for net-zero energy consumption combining wind, solar, hydrogen, geothermal, and storage energy. Energy. Conv. Manag. 295, 117572 (2023).
Ahmed, A. et al. Assessment of the renewable energy generation towards net-zero energy buildings: A review. Energy Build. 256, 111755 (2022).
Rodríguez, F. et al. A novel methodology for day-ahead buildings energy demand forecasting to provide flexibility services in energy markets. Int. J. Electr. Power Energy Syst. 161, 110207 (2024).
Dong, X. et al. Hybrid model for robust and accurate forecasting Building electricity demand combining physical and data-driven methods. Energy 311, 133309 (2024).
Shaqour, A. et al. Electrical demand aggregation effects on the performance of deep learning-based short-term load forecasting of a residential Building. Energy AI. 8, 100141 (2022).
Sekhar, C. & Dahiya, R. Robust framework based on hybrid deep learning approach for short term load forecasting of Building electricity demand. Energy 268, 126660 (2023).
Pallonetto, F., Jin, C. & Mangina, E. Forecast electricity demand in commercial Building with machine learning models to enable demand response programs. Energy AI. 7, 100121 (2022).
Makaremi, S. A multi-output deep learning model for energy demand and Port availability forecasting in EV charging infrastructure. Energy 317, 134582 (2025).
Zhou, W. et al. A seasonal grey model for forecasting energy imports demand from information differences perspective. Appl. Math. Model. 140, 115907 (2025).
Tian, Z. et al. Typical daily scenario extraction method based on key features to promote Building renewable energy system optimization efficiency. Renew. Energy. 236, 121420 (2024).
Liu, K., Tang, J. & Xue, L. Multi-model real-time energy consumption anomaly detection for office buildings based on circuit classification. Energy Build. 332, 115406 (2025).
Aste, N., Manfren, M. & Marenzi, G. Building automation and control systems and performance optimization: A framework for analysis. Renew. Sustain. Energy Rev. 75, 313–330 (2017).
Talib, A. & Joe, J. Analyzing the overrated performance of model-based predictive control and energy saving strategies in Building energy management: A review. J. Building Eng. 101, 111909 (2025).
Liu, J. et al. Analysis of different neural network models based on variational mode decomposition and Dung beetle optimizer algorithm for the prediction of air-conditioning energy consumption in multifunctional complex large public buildings. Energy Build. 334, 115518 (2025).
Skomski, E. et al. Sequence-to-sequence neural networks for short-term electrical load forecasting in commercial office buildings. Energy Build. 226, 110350 (2020).
Serra, A. et al. Explainable district heating load forecasting by means of a reservoir computing deep learning architecture. Energy 318, 134641 (2025).
Runge, J. & Saloux, E. A comparison of prediction and forecasting artificial intelligence models to estimate the future energy demand in a district heating system. Energy 269, 126661 (2023).
Krishnamurthy, S. et al. Artificial intelligence-based forecasting models for integrated energy system management planning: an exploration of the prospects for South Africa. Energy Convers. Management: X. 24, 100772 (2024).
Climate and Average Weather Year Round https://weatherspark.com (2023).
Weather averages. https://www.holiday-weather.com (2023).
Catto Lucchino, E. et al. Modelling double skin façades (DSFs) in whole-building energy simulation tools: validation and inter-software comparison of a mechanically ventilated single-story DSF. Build. Environ. 199, 107906 (2021).
Fernandes Maciel, A. C. & Carvalho, M. T. Methodology used to investigate the energy savings of opaque ventilated façades in residential buildings in Brazil. MethodsX 8, 101227 (2021).
Abdel Hady, D. A. & Abd El-Hafeez, T. Predicting female pelvic Tilt and lumbar angle using machine learning in case of urinary incontinence and sexual dysfunction. Sci. Rep. 13 (1), 17940 (2023).
Hai, T. et al. An innovative biomass-driven multi-generation system equipped with PEM fuel cells/VCl cycle: Throughout assessment and optimal design via particle swarm algorithm. Int. J. Hydrogen Energy (2023).
Cahuantzi, R., Chen, X. & Güttel., S. A comparison of LSTM and GRU networks for learning symbolic sequences. In Science and Information Conference. (Springer, 2023).
Acknowledgements
The co-author, Ali Anqi, extends his appreciation to the Deanship of Research and Graduate Studies at King Khalid University for funding this work through Large Research Project under grant number RGP2/528/45.
Author information
Authors and Affiliations
Contributions
Tao Hai: Investigation, Writing – original draft, Formal analysis.Ali B. M. Ali: Visualization, Software, Writing – original draft.Diwakar Agarwal: Investigation, Software, Writing – review & editing.Ankit Punia: Conceptualization, Data curation, Validation, Writing – review & editing.Megha Jagga: Investigation, Methodology, Software, Writing – review & editing.Ali E. Anqi: Formal analysis, Investigation , Writing – review & editing.Mohsen Ahmed: Formal analysis, Investigation, Methodology, Software.Husam Rajab: Investigation, Methodology, Writing – review & editing.Narinderjit Singh Sawaran Singh: Data curation, Methodology, Investigation, Writing – review & editingMohammad Taghavi: Conceptualization, Methodology, Project administration, Writing – original draft, Software.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Hai, T., Ali, A.B.M., Agarwal, D. et al. Predictive optimization using long short-term memory for solar PV and EV integration in relatively cold climate energy systems with a regional case study. Sci Rep 15, 16414 (2025). https://doi.org/10.1038/s41598-025-01519-9
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-025-01519-9