This study examines how integrating demand-side flexibility into the planning stage of residential photovoltaic (PV)–battery systems influences optimal system sizing and operational performance.
A combined planning–operation optimisation framework is developed in which household electricity demand is decomposed into fixed and flexible components. The model simultaneously determines optimal PV capacity, battery size, and the scheduling of flexible loads. Twelve demand-flexibility scenarios are analysed based on different allowable load-shifting windows to evaluate how flexible demand affects system sizing and energy management.
Results show that incorporating flexibility systematically shifts demand toward solar generation periods, improving PV self-consumption and reducing reliance on battery storage. Battery capacity decreases by up to 33%, while PV capacity increases modestly by approximately 2.7%. Compared with a two-stage benchmark model, the proposed approach reduces total system cost by an average of 7%, with improvements reaching up to 9% at higher flexibility levels.
The model assumes deterministic demand and PV generation over a 20-year horizon. Future research should incorporate stochastic modelling and extend the analysis to diverse climatic and socio-economic contexts.
The results provide actionable insights for homeowners and energy planners by showing that incorporating demand flexibility can reduce storage requirements and improve investment efficiency.
Unlike conventional approaches that treat demand flexibility only at the operational stage, this study integrates flexibility directly into system planning. The findings demonstrate that co-optimising system sizing and demand scheduling yields more cost-efficient and technically effective PV–battery configurations.
1. Introduction
Solar photovoltaic (PV) adoption has seen a dramatic rise in recent years, with global capacity growing from 6.6 GW in 2006 to over 600 GW by 2024. In that year alone, PV accounted for 81% of all new renewable energy capacity additions worldwide (Walburga Hemetsberger and Schmela, 2025). This growth has been largely driven by individual homeowners investing in rooftop PV paired with battery energy storage systems, rather than by utility-scale developments (Gernaat et al., 2020; IEA-PVPS, 2025). PV-Battery systems are increasingly recognized as effective solutions for reducing electricity costs, improving energy self-sufficiency, and enhancing local and grid-level resilience (Luthander et al., 2015).
The technical and economic performance of PV-Battery systems, however, is highly dependent on the optimal sizing of system components and their operational strategies (Motamedisedeh et al., 2025). Oversized systems may lead to excessive investment costs, while undersized systems may fail to meet energy demands or achieve meaningful cost savings (Motamedisedeh et al., 2025). Properly sizing PV systems ensures that households generate sufficient clean energy to meet their needs while minimizing excess generation that could be wasted or left unused (Cervone et al., 2016; Pena-Bello et al., 2019). Likewise, appropriately sized batteries enhance energy utilisation by storing surplus PV generation for use during periods of low solar output, thereby increasing the self-consumption ratio and reducing grid dependency (Kaewnukultorn et al., 2024; Pena-Bello et al., 2019).
A critical factor in determining the optimal PV-Battery configuration is the household electricity demand profile, including both its magnitude and temporal distribution. Households with high evening and nighttime loads typically require larger battery capacities compared to households whose demand aligns more closely with daytime PV generation (Hayat et al., 2017; Maturo et al., 2025; Motamedisedeh et al., 2025). Traditional sizing models often assume static, inflexible demand patterns, neglecting the dynamic nature of modern residential electricity consumption (Sadineni et al., 2012). However, recent research highlights that household demand can be effectively partitioned into fixed and controllable components (Duman et al., 2022). Fixed loads consist of essential, non-shiftable appliances, while controllable loads include flexible appliances that can be scheduled based on user preferences and demand response strategies (Beaudin and Zareipour, 2015).
Integrating controllable demand into PV-Battery system operation has been shown to significantly improve economic and operational outcomes. By optimally scheduling flexible loads in alignment with PV generation profiles, household energy consumption can be shifted to periods of high solar output, reducing grid imports and peak load stress (Sadineni et al., 2012).
Despite the extensive literature on scheduling the controllable portion of demand during the system operation phase for a predetermined system size under demand response programs (Navesi et al., 2025; Sheng et al., 2021). This aspect is often neglected in the planning phase when determining the optimal system configuration (Liu et al., 2023). This separation prevents a full representation of the interaction between component sizing and the operation of flexible demand (Krien et al., 2020). As a result, prior models may underestimate the full benefits that emerge when controllable demand is integrated directly into the system design process.
To bridge these gaps, this study introduces a unified planning framework that explicitly incorporates demand flexibility into the PV–battery sizing problem. Instead of representing total household demand as a fixed parameter in the planning phase, this study models demand as a composition of components with distinct operational characteristics. In this framework, household electricity demand is differentiated into fixed and flexible portions, allowing the planning process to explicitly account for load variability and shiftability. While fixed demand must be satisfied at its original time, flexible demand can be rescheduled within a defined temporal range. The optimal timing of this rescheduling is determined endogenously by the optimization model, ensuring that load shifting decisions are fully aligned with system design and solar generation patterns. A key feature of the model is the introduction of a time-shifting window parameter (K), which specifies the maximum allowable delay for flexible demand. By analyzing a set of scenarios with varying flexibility levels (K = 1–12), the study systematically evaluates how different degrees of load flexibility influence optimal PV capacity, battery sizing, system cost, and self-consumption performance. This integrated formulation provides a direct and consistent way to capture the interaction between investment decisions and operational strategies, which is typically overlooked in conventional methods. As a result, the proposed approach offers a more realistic and economically efficient basis for residential PV–battery system design, improving both planning accuracy and practical applicability compared to existing models. The study considers six residential households with distinct load profiles as case studies, providing practical insights into how variability in household demand affects system design and performance. This multi-home analysis captures the influence of different consumption behaviours on optimal sizing, self-consumption, and self-sufficiency, under different scenarios for flexible hours, which has rarely been addressed in previous research.
The main contributions of this research are as follows:
A linear programming model is developed that optimizes PV–battery sizing while scheduling flexible loads, capturing the interaction between system components and demand flexibility for a realistic representation of residential energy behaviour.
The impact of demand flexibility is systematically evaluated by analysing how varying time-shifting windows affect optimal PV capacity, battery requirements, and the balance between storage and direct solar usage.
The study demonstrates a clear connection between load flexibility and system performance, assessing both economic metrics and technical indicators such as self-consumption and self-sufficiency ratios.
A multi-house case study with six residential load profiles illustrates the model’s applicability across diverse consumption patterns, showing how household-specific demand shapes the benefits of demand flexibility.
The remainder of this paper is organized as follows: Section 2 presents a literature review, and Section 3 presents the proposed mathematical model, followed by the data collection in Section 4, and the results of applying the model to real-world data in Section 5. Finally, Section 6 discusses the study’s limitations and outlines directions for future work.
2. Literature review
The rapid adoption of residential PV systems paired with battery energy storage has motivated extensive research on optimal sizing and operational strategies to maximize economic and technical benefits (Veronese et al., 2021). Early studies primarily focused on optimization models for system design, aiming to determine the optimal size of PV and battery systems based on techno-economic criteria. Widely used tools such as Hybrid Optimization of Multiple Energy Resources (HOMER) (Singh et al., 2017) and Hybrid Optimization using Genetic Algorithms (HOGA) (Shamachurn, 2021) provide techno-economic evaluation using indicators like net present cost (NPC) and cost of energy (COE). HOMER has been used to minimize COE for grid-connected homes in India (Singh et al., 2017), while HOGA has been applied to reduce NPC for households in France (Shamachurn, 2021). Although user-friendly, these tools face well-documented limitations, including difficulty in modelling complex operational constraints, limited ability to incorporate high-resolution time-series data, and an inability to accurately represent flexible residential loads.
To overcome these limitations, more advanced optimization approaches, particularly mixed-integer linear programming (MILP) and heuristic optimization approaches, have been developed to enable more detailed system modelling. MILP models have been used to maximize return on investment in Australian households (Mulleriyawage and Shen, 2020) and to optimize standalone hybrid systems to minimize cost and loss-of-power-supply probability (Taslimi et al., 2021). While MILP offers greater modelling precision by capturing battery degradation, charge/discharge limits, and operational constraints, it often comes with high computational cost, motivating simplifications such as continuous approximations of discrete PV and battery units using linear programming (Habibi Khalaj et al., 2018).
Beyond system sizing, a second stream of research has focused on reducing household energy costs through optimal scheduling of energy flows in already installed PV–battery systems (Lu et al., 2024). In these studies, the availability of battery storage provides the opportunity to store excess PV generation during daylight hours and discharge it during periods of low generation or high demand, thereby improving self-consumption and reducing grid dependency (Motamedisedeh et al., 2025). This operational optimisation is often implemented through Home Energy Management Systems (HEMS), which coordinate real-time energy flows between PV generation, storage, and household appliances. Home Energy Management System technologies enable automated scheduling strategies that align consumption with generation and price signals (Kanakadhurga and Prabaharan, 2024; Pflaum et al., 2017), as illustrated in Figure 1.
The diagram illustrates the architecture of a home energy management system. It is divided into three main sections. The top section, labeled Energy & Supply Side, includes icons representing the main grid, renewable energy, and battery storage. The middle section, labeled Management & Control, shows an icon of a laptop and a user icon, indicating the interaction between the management system and the user. The bottom section, labeled Home Appliances, displays various icons of household appliances such as refrigerators, air conditioners, washing machines, and more. Arrows indicate the flow of information and control between these sections.Home energy management system (HEMS) architecture
The diagram illustrates the architecture of a home energy management system. It is divided into three main sections. The top section, labeled Energy & Supply Side, includes icons representing the main grid, renewable energy, and battery storage. The middle section, labeled Management & Control, shows an icon of a laptop and a user icon, indicating the interaction between the management system and the user. The bottom section, labeled Home Appliances, displays various icons of household appliances such as refrigerators, air conditioners, washing machines, and more. Arrows indicate the flow of information and control between these sections.Home energy management system (HEMS) architecture
Building on these modelling advances, recent studies have extended operational optimisation to the demand side by incorporating demand response (DR) and load flexibility (Tomrukcu et al., 2024). Flexible loads such as electric vehicle charging, dishwashers, and water heaters can be shifted in time to better align with PV generation or lower electricity prices, thereby improving system efficiency (Liu et al., 2023). This has highlighted that not only supply-side decisions (PV and battery sizing), but also demand-side characteristics—such as load timing, magnitude, and flexibility play a critical role in system performance (Motamedisedeh et al., 2025).
However, despite these advances, a key limitation in the existing literature is that demand flexibility is predominantly treated as an operational feature applied after the system configuration has already been determined. Many studies adopt two-stage optimisation frameworks, where PV and battery sizes are first optimised, and flexible loads are scheduled in a second stage (Duman et al., 2022; Karimianfard, 2025). While such approaches are computationally efficient, they fail to capture the interaction between system sizing and demand flexibility, potentially leading to suboptimal system configurations (Schwabeneder et al., 2019).
Therefore, a clear research gap exists: the flexibility feature of household demand is typically neglected in the planning stage and is instead incorporated only during the operational phase. As a result, system design decisions are made based on fixed demand assumptions, and the potential impact of demand flexibility on optimal PV and battery sizing is not fully captured. This separation limits the ability to achieve truly optimal system configurations.
To address this gap, this study integrates demand-side flexibility directly into the system planning phase. Unlike conventional approaches, the proposed model simultaneously determines optimal PV capacity, battery size, and the scheduling of flexible demand within a single optimisation framework. This allows the model to capture the interactions between generation, storage, and flexible consumption, leading to a more realistic and economically efficient system design.
Furthermore, this study systematically evaluates multiple flexibility scenarios, enabling a comprehensive assessment of how varying levels of demand flexibility influence system configuration, cost, and performance. By combining generation-side and demand-side flexibility within a unified framework, the proposed approach advances existing literature and provides new insights into the co-optimization of residential energy systems.
3. Methodology
The system configuration in this research is provided in Figure 2 including grid-connected load on AC bus with PV and battery on DC bus and a converter to convert buses.
The diagram illustrates a residential PV battery system configuration. It includes a solar panel, a battery, a house, and a power grid. The solar panel generates power, which flows to the battery and the house. The battery can store excess power and discharge it when needed. The house has both fixed and flexible demand for power. The power grid supplies additional power when necessary. The diagram shows the flow of power between these components, including the points where power is generated, stored, consumed, and exchanged with the grid.Residential PV–battery system configuration
The diagram illustrates a residential PV battery system configuration. It includes a solar panel, a battery, a house, and a power grid. The solar panel generates power, which flows to the battery and the house. The battery can store excess power and discharge it when needed. The house has both fixed and flexible demand for power. The power grid supplies additional power when necessary. The diagram shows the flow of power between these components, including the points where power is generated, stored, consumed, and exchanged with the grid.Residential PV–battery system configuration
To determine the optimal system configuration, a linear optimization model based on (Motamedisedeh et al., 2026a) is employed with the objective of maximizing the system’s Net Present Value (NPV), subject to a set of technical constraints. The model includes two types of decision variables: (1) sizing variables for energy components such as PV capacity and battery storage, and (2) scheduling variables for the flexible portion of demand.
Based on the abbreviations presented in Table 1, let the installed PV capacity at the initial time be denoted as A (in kW), with a unit cost of per kW. Since the PV system is assumed to be fully installed at the beginning of the planning horizon, its investment occurs at y = 0, and therefore its present value is given by as S1.
Abbreviations and nomenclature
| Symbols | Acronyms | Symbols | Acronyms |
|---|---|---|---|
| A. Indices | Stand-by losses of the battery | ||
| Index of year | bd | Battery yearly degradation rate | |
| Index of day | Price of electricity in hour of day of year y | ||
| Index of hour | Cost of electricity in hour of day of year y | ||
| B. Sets | Maximum/minimum capacity of the inverter unit | ||
| Set of hours at each day of the scheduling horizon | Maximum allowable power import from the grid | ||
| Set of days in each year | Maximum allowable power export to the grid | ||
| Set of years | Maximum/minimum charging rate for battery | ||
| C. Parameters | Efficiency of inverter/battery | ||
| Yearly interest rate | D. Variables | ||
| Maximum allowable number of PV panels | A | Number of PV panels with power generation | |
| Maximum allowable number of batteries | Number of batteries with the capacity of in year y | ||
| Lifetime of PV panels | Total usable storage capacity of the batteries in year y | ||
| Lifetime of battery | Battery state of charge at each time | ||
| Price of PV panel with power generation | Import electricity from the grid in hour of day of year y | ||
| Price of battery with the capacity of in year y | Export electricity to the grid in hour of day of year y | ||
| Annual maintenance cost per kilowatt of PV. | Dumped power in hour of day of year y | ||
| Annual maintenance cost per kilowatt of Battery | Battery Charging in hour of day d of year y | ||
| Forecasted power generation by each PV unit | Total PV generation in hour of day of year y | ||
| Forecast electric load in hour of day of year y | Inverter input in hour of day of year y | ||
| Capacity of battery | Inverter output in hour of day of year y | ||
| Minimum energy level of battery | Battery charging in hour of day d of year y | ||
| Initial energy level of battery in | Battery discharging in hour of day d of year y | ||
| Symbols | Acronyms | Symbols | Acronyms |
|---|---|---|---|
| A. Indices | Stand-by losses of the battery | ||
| Index of year | bd | Battery yearly degradation rate | |
| Index of day | Price of electricity in hour | ||
| Index of hour | Cost of electricity in hour | ||
| B. Sets | Maximum/minimum capacity of the inverter unit | ||
| Set of hours at each day of the scheduling horizon | Maximum allowable power import from the grid | ||
| Set of days in each year | Maximum allowable power export to the grid | ||
| Set of years | Maximum/minimum charging rate for battery | ||
| C. Parameters | Efficiency of inverter/battery | ||
| Yearly interest rate | D. Variables | ||
| Maximum allowable number of PV panels | A | Number of PV panels with power generation | |
| Maximum allowable number of batteries | Number of batteries with the capacity of | ||
| Lifetime of PV panels | Total usable storage capacity of the batteries in year y | ||
| Lifetime of battery | Battery state of charge at each time | ||
| Price of PV panel with power generation | Import electricity from the grid in hour | ||
| Price of battery with the capacity of | Export electricity to the grid in hour | ||
| Annual maintenance cost per kilowatt of PV. | Dumped power in hour | ||
| Annual maintenance cost per kilowatt of Battery | Battery Charging in hour | ||
| Forecasted power generation by each PV unit | Total PV generation in hour | ||
| Forecast electric load in hour | Inverter input in hour | ||
| Capacity of battery | Inverter output in hour | ||
| Minimum energy level of battery | Battery charging in hour | ||
| Initial energy level of battery in | Battery discharging in hour | ||
In contrast, battery storage investments are assumed to occur dynamically over the planning horizon due to degradation, replacement, or capacity expansion requirements. Let (kW) denote the battery capacity investment in year y, with a corresponding unit cost . Accordingly, the battery investment cost at year y is calculated by . By considering the interest rate as i, the present value of investment on battery at year y is calculated by as S2.
Accordingly, the total investment cost is .
Similarly, maintenance costs are incurred annually and therefore must also be discounted. Denoting PV and battery maintenance costs in year y as and , the present value of maintenance costs is calculated using Equation (1). In this equation, represents the total available battery storage capacity in year y, which will be further explained in the constraint section.
By considering the import and export electricity prices at any time in study horizon by and for year y, day d, and hour t, and the corresponding imported and exported energy amounts, represented by and , the net present cost of imported energy and the benefit from exported energy can be calculated using Equations (2).
So, the objective function, equal to maximizing the NPV of the investment cash flow, is calculated by the sum of equations (1) – (4) as presented in equation (3), and subject to the following constrains.
3.1 Power balance
In an energy system, maintaining energy balance at all times is essential, ensuring that the total energy input equals the total energy output at every time step. Accordingly, the relationships illustrated in Figure 3 represent the power flow dynamics at different points in the system.
The image contains multiple line graphs depicting household electricity demand profiles over the seasons. Each graph shows fixed and flexible demand patterns for different households and times of the year. The horizontal axis represents the hour of the day, ranging from 0 to 24 hours. The vertical axis represents the electricity demand in kilowatt-hours (kWh). The graphs are organized in a grid with rows labeled 1 to 6 and columns labeled Spring, Summer, Autumn, and Winter. Each cell in the grid contains a line graph comparing fixed (red line) and flexible (green line) electricity demand for a specific household and season. The trends and patterns vary across different households and seasons, showing how electricity demand fluctuates throughout the day and across different times of the year.Household electricity demand profiles over the seasons (horizontal axies is Hour)
The image contains multiple line graphs depicting household electricity demand profiles over the seasons. Each graph shows fixed and flexible demand patterns for different households and times of the year. The horizontal axis represents the hour of the day, ranging from 0 to 24 hours. The vertical axis represents the electricity demand in kilowatt-hours (kWh). The graphs are organized in a grid with rows labeled 1 to 6 and columns labeled Spring, Summer, Autumn, and Winter. Each cell in the grid contains a line graph comparing fixed (red line) and flexible (green line) electricity demand for a specific household and season. The trends and patterns vary across different households and seasons, showing how electricity demand fluctuates throughout the day and across different times of the year.Household electricity demand profiles over the seasons (horizontal axies is Hour)
At Point (a), demand is satisfied by grid import and local supply, minus exported energy (Equation 4).
At Point (b), inverter input equals PV generation plus battery discharge minus charging (Equation 5).
At Point (c), inverter output accounts for efficiency losses and curtailment (Equation 6).
3.2 PV generation constraints
The generated power is constrained and directly proportional to the installed capacity. So, the constraint governing the total power output of all PV units stipulates that, at any given time, the total generation equals the number of installed PV units multiplied by the power produced by a single 1 kW unit at that time, as expressed in Equation (7).
3.3 Battery degrading constraints
The total available battery capacity in each year is determined by the cumulative capacity of all batteries installed in previous years that have not yet exceeded their specified lifetime. By considering the annual degradation rate of the battery, denoted as bd, this calculation accounts for capacity loss over time, as expressed in Equation (8).
3.4 Battery operation
The state of charge (SOC) tracks stored energy over time. It increases with charging, decreases with discharging, and accounts for self-discharge losses (Equation 9).
3.5 Boundary constrains
Additionally, the boundary constraints for the decision variables are defined in Equations (10) to (17).
The minimum and maximum bounds of inventory at any given time step are defined by Equation (10). The maximum amount of power that can be imported from the grid at any given time step is defined by Equation (11).
Equation (12) presents the maximum amount of power that can be exported to the grid at any given time step, and the upper limit on battery charging power and discharging, proportional to the installed battery capacity in year y, is defined by Equations (13) and (14).
The allowable range for the battery’s state of charge, as a function of the total installed battery capacity, is defined by Equation (15), and the maximum permitted installed PV and battery capacity is specified by Equations (16) and (17).
3.6 Flexible demand
In previous models, demand is fixed and must be fully satisfied as given Ly,d,t. In this study, demand is divided into two parts: fixed () and flexible
Fixed demand must be supplied at its original time.
Flexible demand can be shifted within a time window (0 to K hours).
The flexible demand at time t is redistributed using a scheduling variable , which represents the amount of shifted load. To model the relation of and , another variable like , which k is equal to 0 to K (maximum flexibility hour), is defined, which is going to split the demand of time t, into k parts, indicating the k previous times using equation (18) .
The relation of W and X at any time can be defined by equation (19) , which t′ = t + k, d′ = d, and y′ = y. However, if t + k > 24, and d < 365, then t′ = t + k-24, d′ = d+1, and y′ = y. In another case, if t + k > 24 and d = 365, then t′ = t + k−24, d′ = 1, and y′ = y+1.
Finally, as the total demand consists of two components: a fixed (non-shiftable) portion and a flexible portion, whose optimal timing is determined by . The total demand at each time step is defined in Equation (20).
So, the constraints 18 to 20 should be considered in the model to determine the optimum scheduling of the flexible part of the demand.
4. Data collection
To evaluate the performance of the proposed model, it is applied to real-world data collected from Queensland (QLD), Australia. The dataset used in this study was related to six residential households located in QLD, identified by ID equal 1 to 6. The houses are equipped with common electrical appliances such as a microwave oven, reverse-cycle air conditioning system, and a washing machine. The data were originally recorded using smart metering systems with a 5-min temporal resolution over a continuous monitoring period of one full year (March 2024 to February 2025). For modelling purposes, the raw data were aggregated to hourly time steps using Power Query (Motamedisedeh, 2024, 2025), to balance computational tractability and temporal resolution.
From the collected dataset, the electricity consumption associated with the hot water system is identified and considered as flexible demand, as supported by existing studies (Beaudin and Zareipour, 2015), due to its inherent thermal storage capability, which allows its operation to be shifted within a certain time window without significantly affecting user comfort. In contrast, the remaining household electricity consumption is treated as fixed demand, as it is either time-dependent (e.g. cooking) or subject to comfort constraints (e.g. air conditioning), making it less suitable for temporal shifting within the scope of this study (Beaudin and Zareipour, 2015). It should be noted that this classification is influenced by the limitations of the available dataset. Specifically, detailed appliance-level disaggregation is limited, and therefore, only the hot water load could be reliably identified and modelled as flexible demand.
The details of the fixed and flexible demand of each house are provided in Table 2, and the demand profile (distribution) over different seasons is presented in Figure 3.
Details of demand in case studies
| House ID | AVG of daily demand | AVG of daily fixed demand | AVG of daily flexible demand | Flexible to fixed ratio | Fixed demand (%) (6 AM–6 PM) | Flexible demand (%) (6 AM–6 PM) |
|---|---|---|---|---|---|---|
| ID-1 | 32.4 | 23.6 | 8.8 | 40% | 52% | 53% |
| ID-2 | 5 | 3.2 | 1.8 | 60% | 49% | 48% |
| ID-3 | 8.1 | 5.6 | 2.5 | 50% | 58% | 55% |
| ID-4 | 12.6 | 9.1 | 3.5 | 40% | 64% | 69% |
| ID-5 | 8 | 5.5 | 2.5 | 50% | 48% | 44% |
| ID-6 | 12.1 | 8.7 | 3.4 | 40% | 50% | 49% |
| House ID | AVG of daily demand | AVG of daily fixed demand | AVG of daily flexible demand | Flexible to fixed ratio | Fixed demand (%) | Flexible demand (%) |
|---|---|---|---|---|---|---|
| ID-1 | 32.4 | 23.6 | 8.8 | 40% | 52% | 53% |
| ID-2 | 5 | 3.2 | 1.8 | 60% | 49% | 48% |
| ID-3 | 8.1 | 5.6 | 2.5 | 50% | 58% | 55% |
| ID-4 | 12.6 | 9.1 | 3.5 | 40% | 64% | 69% |
| ID-5 | 8 | 5.5 | 2.5 | 50% | 48% | 44% |
| ID-6 | 12.1 | 8.7 | 3.4 | 40% | 50% | 49% |
As presented, each house comes with a different load pattern. House 1 exhibits relatively high fixed demand compared to other houses, with values starting moderately in the early hours and peaking in the late hours, particularly in season 4, where the maximum fixed demand reaches around 1.7. Season 2 shows the lowest fixed demand overall, while season 3 remains slightly lower than season 1. Flexible demand for this house is consistently lower than fixed demand, ranging from approximately 0.18 to 0.56. Notably, flexible demand tends to increase during periods of higher fixed demand, indicating potential for load shifting, especially in late hours of the day.
House 2 has the lowest overall demand among all six houses, with fixed demand ranging roughly from 0.06 to 0.51 across seasons. The peaks are small and occur mostly during mid-day and evening periods. Flexible demand is also low, generally between 0.04 and 0.18, and roughly proportional to fixed demand. The limited amplitude and low variability suggest that this house has a small capacity for shifting flexible loads.
House 3 demonstrates moderate fixed demand with clear daytime peaks, ranging from around 0.18 to 0.52. Fixed demand increases gradually through the morning and reaches its highest points during mid-day in most seasons. Flexible demand is lower, between 0.06 and 0.20, but it shows a slight increase during the day, particularly in season 4, suggesting some potential for load shifting in this house. Overall, House 3 shows more balanced daily demand patterns compared to House 1.
House 4 shows pronounced mid-day fixed demand peaks, starting low in the morning and rising sharply during mid-day, especially in season 1, where fixed demand reaches up to 0.8. Season 2 shows more moderate peaks, while season 4 again shows late-hour increases. Flexible demand starts low in the early hours but rises sharply alongside fixed demand, reaching 0.5 in peak hours for some seasons. This indicates a high potential for load shifting, particularly during mid-day and evening periods.
House 5 maintains a moderate fixed demand, ranging from approximately 0.11 to 0.57, with smaller and more distributed peaks compared to houses 1 and 4. Season 3 shows the highest fixed demand peaks. Flexible demand follows a similar trend, generally lower than fixed load but rising slightly during mid-day, particularly in season 3, suggesting moderate potential for demand flexibility.
House 6 demonstrates moderate to high fixed demand, ranging from 0.22 to 0.53, with daily peaks occurring mid-day to evening. Season 4 shows the highest late-hour peaks. Flexible demand ranges between 0.09 and 0.20, generally following fixed demand patterns but slightly lagging, indicating some capacity for load shifting. Compared to other houses, House 6 has consistent daily peaks across seasons, making it suitable for demand management interventions.
Additionally, the corresponding PV generation distribution is presented in Figure 4. The PV generation data are obtained from the same geographical location and are based on real measurements recorded at a 5-min temporal resolution over a full year (March 2024 to February 2025). These data inherently capture the variability in solar output due to changing weather conditions, including daily and seasonal fluctuations in solar irradiance. For consistency with the demand data and to ensure computational efficiency, the PV generation profiles are aggregated to hourly time steps and assumed to be representative of typical annual generation patterns over the planning horizon.
A line graph showing average hourly photovoltaic generation across different seasons. The x-axis represents the hours of the day from 0 to 22, and the y-axis represents the energy generation in kilowatt-hours, ranging from 0 to 0.5 kilowatt-hours. The graph includes four lines representing different seasons: Spring, Winter, Autumn, and Summer. Each line shows the variation in energy generation throughout the day. Spring is represented by a red solid line, Winter by a purple dashed line, Autumn by a blue dashed line, and Summer by a green dashed line. The data points indicate the energy generation at each hour, with all values approximated.Average of hourly PV generation
A line graph showing average hourly photovoltaic generation across different seasons. The x-axis represents the hours of the day from 0 to 22, and the y-axis represents the energy generation in kilowatt-hours, ranging from 0 to 0.5 kilowatt-hours. The graph includes four lines representing different seasons: Spring, Winter, Autumn, and Summer. Each line shows the variation in energy generation throughout the day. Spring is represented by a red solid line, Winter by a purple dashed line, Autumn by a blue dashed line, and Summer by a green dashed line. The data points indicate the energy generation at each hour, with all values approximated.Average of hourly PV generation
To execute the optimization model, all relevant input parameters were defined based on realistic and commonly accepted values, as summarized in Table 3. These parameters include technical specifications, cost assumptions, and operational limits for the PV system and battery storage.
Model parameters Motamedisedeh et al. (2026b)
| Parameter | Value | Parameter | Value | Parameter | Value |
|---|---|---|---|---|---|
| [1,2..20] | 20 | 1 | |||
| [1,2..365] | 10 | 30% | |||
| [1,2..24] | 10 | 75% | |||
| 5% | 0 | 5% | |||
| 20 | 5 | 3% | |||
| 10 | 95% | 95% |
| Parameter | Value | Parameter | Value | Parameter | Value |
|---|---|---|---|---|---|
| [1,2..20] | 20 | 1 | |||
| [1,2..365] | 10 | 30% | |||
| [1,2..24] | 10 | 75% | |||
| 5% | 0 | 5% | |||
| 20 | 5 | 3% | |||
| 10 | 95% | 95% |
5. Result and discussion
This section presents and analyses the outcomes of the proposed optimisation model, with a focus on evaluating the role of demand-side flexibility in residential PV–battery system planning. The discussion is structured into five main parts. First, the impact of demand flexibility on system sizing is examined, highlighting how varying flexibility levels influence optimal PV and battery capacities. Second, the effect of flexibility on demand scheduling is analysed to demonstrate how load shifting improves alignment with PV generation. Third, a sensitivity analysis is conducted to assess the robustness of the proposed model under uncertainty in demand and PV generation. Fourth, the results are benchmarked against a conventional two-stage optimisation approach to validate the novelty and quantify the performance improvements achieved by the proposed integrated framework. Finally, the practical implications and real-world applicability of demand flexibility are presented in the last subsection.
5.1 Impact of demand flexibility on system sizing
The optimization model was executed by varying the allowable load shifting window from 1 h to 12 h, thereby simulating different levels of temporal flexibility in managing the building’s energy demand. In each scenario, a hybrid energy system consisting of PV panels and battery storage was evaluated to meet the adjusted demand profile. For example, when k = 4, it indicates that the flexible portion of demand at any given time can be rescheduled to occur up to 4 h earlier than its original time slot.
Table 4 and Figure 5 present the optimal configuration results for PV-battery systems across different residential house IDs (ID = 1 to ID = 6) under varying flexibility levels, denoted by K (in hours). The optimum PV-battery configurations for different houses reveal a strong dependence on both the magnitude of demand and the flexibility characteristics of each house. House 1, which has the highest overall demand, naturally requires the largest battery capacity, starting at 3.71 kWh for k = 1. As k increases to 12, the required battery size decreases to 2.49 kWh, representing a 33% reduction. This reduction is consistent with findings in demand-integrated sizing studies such as (Duman et al., 2022; Karimianfard, 2025), where higher flexibility reduces storage dependency by shifting demand into solar-rich periods. This decrease highlights the impact of aggregation, where transferring demand to solar generation hours across multiple points reduces the need for oversized storage. Meanwhile, the PV capacity slightly increases from 16.11 kW to 17.27 kW to ensure sufficient coverage of the total energy demand.
Optimum configuration
| K | ID = 1 | ID = 2 | ID = 3 | ID = 4 | ID = 5 | ID = 6 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Battery | PV | Battery | PV | Battery | PV | Battery | PV | Battery | PV | Battery | PV | |
| 1 | 3.71 | 16.11 | 1.25 | 10.77 | 1.72 | 11.45 | 2.15 | 12.27 | 1.84 | 11.31 | 3.12 | 12 |
| 2 | 3.44 | 16.27 | 1.22 | 10.84 | 1.66 | 11.54 | 2.06 | 12.29 | 1.76 | 11.33 | 2.95 | 12.03 |
| 3 | 3.34 | 16.49 | 1.17 | 10.89 | 1.59 | 11.59 | 1.99 | 12.33 | 1.69 | 11.36 | 2.8 | 12.05 |
| 4 | 3.26 | 16.69 | 1.13 | 10.91 | 1.53 | 11.59 | 1.92 | 12.38 | 1.6 | 11.4 | 2.73 | 12.14 |
| 5 | 3.13 | 16.83 | 1.09 | 10.94 | 1.48 | 11.66 | 1.86 | 12.41 | 1.5 | 11.45 | 2.6 | 12.17 |
| 6 | 2.91 | 16.9 | 1.05 | 10.98 | 1.43 | 11.68 | 1.81 | 12.41 | 1.42 | 11.42 | 2.48 | 12.26 |
| 7 | 2.74 | 16.97 | 1.01 | 11 | 1.38 | 11.69 | 1.76 | 12.43 | 1.34 | 11.45 | 2.4 | 12.32 |
| 8 | 2.54 | 16.94 | 0.98 | 11.03 | 1.34 | 11.72 | 1.72 | 12.45 | 1.28 | 11.47 | 2.29 | 12.31 |
| 9 | 2.48 | 17.02 | 0.96 | 11.09 | 1.29 | 11.75 | 1.68 | 12.45 | 1.21 | 11.51 | 2.27 | 12.39 |
| 10 | 2.5 | 17.12 | 0.95 | 11.11 | 1.25 | 11.77 | 1.66 | 12.48 | 1.16 | 11.58 | 2.26 | 12.46 |
| 11 | 2.48 | 17.17 | 0.94 | 11.11 | 1.23 | 11.79 | 1.63 | 12.48 | 1.14 | 11.58 | 2.22 | 12.51 |
| 12 | 2.49 | 17.27 | 0.93 | 11.13 | 1.22 | 11.81 | 1.62 | 12.49 | 1.13 | 11.6 | 2.19 | 12.5 |
| K | ID = 1 | ID = 2 | ID = 3 | ID = 4 | ID = 5 | ID = 6 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Battery | PV | Battery | PV | Battery | PV | Battery | PV | Battery | PV | Battery | PV | |
| 1 | 3.71 | 16.11 | 1.25 | 10.77 | 1.72 | 11.45 | 2.15 | 12.27 | 1.84 | 11.31 | 3.12 | 12 |
| 2 | 3.44 | 16.27 | 1.22 | 10.84 | 1.66 | 11.54 | 2.06 | 12.29 | 1.76 | 11.33 | 2.95 | 12.03 |
| 3 | 3.34 | 16.49 | 1.17 | 10.89 | 1.59 | 11.59 | 1.99 | 12.33 | 1.69 | 11.36 | 2.8 | 12.05 |
| 4 | 3.26 | 16.69 | 1.13 | 10.91 | 1.53 | 11.59 | 1.92 | 12.38 | 1.6 | 11.4 | 2.73 | 12.14 |
| 5 | 3.13 | 16.83 | 1.09 | 10.94 | 1.48 | 11.66 | 1.86 | 12.41 | 1.5 | 11.45 | 2.6 | 12.17 |
| 6 | 2.91 | 16.9 | 1.05 | 10.98 | 1.43 | 11.68 | 1.81 | 12.41 | 1.42 | 11.42 | 2.48 | 12.26 |
| 7 | 2.74 | 16.97 | 1.01 | 11 | 1.38 | 11.69 | 1.76 | 12.43 | 1.34 | 11.45 | 2.4 | 12.32 |
| 8 | 2.54 | 16.94 | 0.98 | 11.03 | 1.34 | 11.72 | 1.72 | 12.45 | 1.28 | 11.47 | 2.29 | 12.31 |
| 9 | 2.48 | 17.02 | 0.96 | 11.09 | 1.29 | 11.75 | 1.68 | 12.45 | 1.21 | 11.51 | 2.27 | 12.39 |
| 10 | 2.5 | 17.12 | 0.95 | 11.11 | 1.25 | 11.77 | 1.66 | 12.48 | 1.16 | 11.58 | 2.26 | 12.46 |
| 11 | 2.48 | 17.17 | 0.94 | 11.11 | 1.23 | 11.79 | 1.63 | 12.48 | 1.14 | 11.58 | 2.22 | 12.51 |
| 12 | 2.49 | 17.27 | 0.93 | 11.13 | 1.22 | 11.81 | 1.62 | 12.49 | 1.13 | 11.6 | 2.19 | 12.5 |
Six line graphs depict optimal PV and battery sizing under different flexibility levels for six houses. Each graph shows the relationship between battery size in kilowatts (kW) and PV size in kilowatts (kW) as a function of flexibility level (K). Optimal PV and battery sizing under different flexibility levels (K)
Six line graphs depict optimal PV and battery sizing under different flexibility levels for six houses. Each graph shows the relationship between battery size in kilowatts (kW) and PV size in kilowatts (kW) as a function of flexibility level (K). Optimal PV and battery sizing under different flexibility levels (K)
House 5, in contrast, has a demand roughly one-fourth of House 1, but a significant portion of its load is flexible, around 50% of total demand, with 56% of that flexibility occurring outside solar generation hours. This timing of flexible demand allows for a decrease in battery size, from 1.84 kWh to 1.13 kWh, reflecting the smoothing effect of aggregation and the ability to shift flexible loads to periods with lower PV availability.
Houses with lower demand and moderate flexibility, such as House 2 and House 3, show similar patterns but with smaller absolute changes. House 2 starts with a battery of 1.25 kWh, decreasing to 0.93 kWh, and PV increases modestly from 10.77 kW to 11.13 kW. House 3 exhibits a reduction in battery size from 1.72 kWh to 1.22 kWh, with a slight PV increase from 11.45 kW to 11.81 kW.
House 4 and House 6, with medium-to-high demand and varying flexibility patterns, further highlight the interaction between demand magnitude and load flexibility. For House 4, battery size decreases from 2.15 kWh to 1.62 kWh, while PV increases slightly from 12.27 kW to 12.49 kW. House 6 experiences a similar battery reduction from 3.12 kWh to 2.19 kWh, while PV remains relatively stable around 12–12.5 kW, reflecting that flexibility during solar hours allows the system to utilize PV generation efficiently, reducing storage requirements without significantly affecting PV sizing.
Overall, the analysis demonstrates several clear trends. Battery sizing consistently decreases with increasing k due to aggregation smoothing peak demand, with reductions ranging from 25% to 33% depending on house demand and flexibility characteristics. PV sizing generally increases slightly to accommodate the total energy demand for aggregated loads, but can decrease in houses with high flexible loads outside solar production periods.
5.2 Effect of flexibility on demand scheduling
This subsection examines how increasing demand flexibility influences the scheduling of household energy consumption.
Figure 6 illustrates the optimized scheduling of flexible demand for each house at flexibility levels K = 4, K = 8, and K = 12. As shown, increasing the value of K results in a greater portion of flexible demand being shifted to daytime hours when PV generation is available. This shift becomes more pronounced as K increases from 4 to 8 and then to 12, allowing the model to better align energy consumption with solar energy production. By concentrating more of the flexible loads during periods of peak solar output, the system reduces reliance on battery storage and grid electricity, thereby enhancing self-consumption and improving overall system efficiency.
Six line graphs compare flexible demand scheduling across different flexibility levels (K) for six different houses. Each graph has a y-axis representing a probability value and an x-axis representing time in hours from 0 to 24. The graphs show data for flexibility levels K = 4, K = 8, and K = 12, along with a flexible demand baseline. The shaded area in each graph highlights a specific time period. The graphs illustrate how demand varies throughout the day for each house and flexibility level. All values are approximated.Optimised flexible demand scheduling across flexibility levels (K)
Six line graphs compare flexible demand scheduling across different flexibility levels (K) for six different houses. Each graph has a y-axis representing a probability value and an x-axis representing time in hours from 0 to 24. The graphs show data for flexibility levels K = 4, K = 8, and K = 12, along with a flexible demand baseline. The shaded area in each graph highlights a specific time period. The graphs illustrate how demand varies throughout the day for each house and flexibility level. All values are approximated.Optimised flexible demand scheduling across flexibility levels (K)
The results reveal a consistent and strong trend: as the level of flexibility increases, a greater share of the flexible demand is successfully shifted into the PV generation window.
For all households, the original (unoptimized) demand profiles show that 53%–76% of flexible consumption naturally occurs within the 6 AM–6 PM range. House 4 stands out with the highest original alignment (76%), indicating a demand pattern already well-matched with solar production. Conversely, House 5 has the lowest original share (53%), suggesting significant potential for optimization.
As flexibility increases to K = 4, all households exhibit a noticeable improvement. House 1’s PV-aligned demand rises from 59% to 75%, and House 2 improves from 54% to 70%. The trend continues as K increases further. At K = 8, average alignment across all homes surpasses 84%, and by K = 12, the values range from 92% to 95%, with an average of 93.5%. These shifts highlight the model’s ability to intelligently reschedule demand to coincide with PV availability.
Table 5 presents the proportion of flexible demand that occurs during the daytime period (6 AM–6 PM) for six different households under varying levels of flexibility (Original, K = 4, K = 8, and K = 12).
Proportion of flexible demand occurring during daytime hours
| House ID | Original demand | K | ||
|---|---|---|---|---|
| 4 | 8 | 12 | ||
| 1 | 59% | 75% | 88% | 95% |
| 2 | 54% | 70% | 83% | 93% |
| 3 | 63% | 72% | 84% | 93% |
| 4 | 76% | 85% | 90% | 94% |
| 5 | 53% | 65% | 79% | 92% |
| 6 | 56% | 70% | 83% | 94% |
| House ID | Original demand | K | ||
|---|---|---|---|---|
| 4 | 8 | 12 | ||
| 1 | 59% | 75% | 88% | 95% |
| 2 | 54% | 70% | 83% | 93% |
| 3 | 63% | 72% | 84% | 93% |
| 4 | 76% | 85% | 90% | 94% |
| 5 | 53% | 65% | 79% | 92% |
| 6 | 56% | 70% | 83% | 94% |
Households that initially had poor alignment, such as Houses 2, 5, and 6, show the most dramatic improvements. House 5, for instance, increases its PV-hour consumption share from just 53%–92%, a 39-percentage point gain. In contrast, House 4, which already had a high original alignment (76%), exhibits a smaller but still meaningful improvement to 94% under full flexibility.
For the other system parameters, their trends remain relatively stable across different values of K. The overall patterns for these variables for house ID equal to 1, are illustrated in Figure 7 as an example.
The image contains eight separate line graphs, each representing different parameters of a model over a 24-hour period. The graphs are labeled as P_S, P_h, P_in, P_en, P_ch, P_dch, E, and P_dump. Each graph has time on the x-axis, ranging from 0 to 24 hours, and different parameters on the y-axis. P_S and P_h show a peak around midday and decline towards the evening. P_in has a sharp drop around midday and rises again in the evening. P_en shows a steady increase during the day and decreases in the evening. P_ch and P_dch have notable peaks in the late afternoon. E shows a gradual increase during the day and a sharp decline in the evening. P_dump has two distinct peaks during the day. All values are approximated.Other parameters of the model
The image contains eight separate line graphs, each representing different parameters of a model over a 24-hour period. The graphs are labeled as P_S, P_h, P_in, P_en, P_ch, P_dch, E, and P_dump. Each graph has time on the x-axis, ranging from 0 to 24 hours, and different parameters on the y-axis. P_S and P_h show a peak around midday and decline towards the evening. P_in has a sharp drop around midday and rises again in the evening. P_en shows a steady increase during the day and decreases in the evening. P_ch and P_dch have notable peaks in the late afternoon. E shows a gradual increase during the day and a sharp decline in the evening. P_dump has two distinct peaks during the day. All values are approximated.Other parameters of the model
5.3 Sensitivity analysis
In this study, both PV generation and household demand are treated as deterministic inputs, where the collected hourly data from the first year are assumed to be representative and are repeated over the entire 20-year planning horizon. While this assumption enables tractable optimisation, it does not capture the inherent uncertainty in real-world conditions. In practice, both demand and PV generation are subject to variability, as their magnitude and timing of occurrence may change over time due to factors such as climatic fluctuations, household behavioural changes, appliance upgrades, and broader electrification trends.
To partially address this limitation and assess the robustness of the proposed model, a sensitivity analysis is conducted focusing on variations in both the magnitude and timing of key inputs. For magnitude uncertainty, a parameter is introduced to represent proportional changes in demand (increased randomly up to i%) and PV generation (reduced randomly up to i%) levels. This parameter is varied from 3% to 15% in increments of 3%, allowing the evaluation of system performance under different scaling conditions.
In addition, to examine the impact of temporal uncertainty, the parameter h is defined, and the timing of energy demand is shifted by h, starting from 1 to 5 h. This approach captures potential misalignment between assumed and actual consumption patterns, which may arise due to changes in household behaviour or daily usage schedules.
The sensitivity analysis is conducted for House ID 1 (highest demand) and House ID 2 (lowest demand) using the optimal system configuration obtained for a flexibility window of . The results are compared against a baseline scenario with no demand flexibility (). A Monte Carlo simulation approach is employed, with 100 iterations performed for each combination of demand shift () and magnitude variation () for each household.
In each simulation iteration, the hourly demand over the 20-year planning horizon is randomly increased by up to , while the hourly PV generation is randomly reduced by up to to reflect uncertainty in both consumption and solar output. Subsequently, the modified demand profile is shifted forward by hours. Using these adjusted demand and generation profiles, the COE is calculated for both scenarios: (1) the optimal system configuration under demand flexibility (), and (2) the baseline system without flexibility (). The COE is defined as . For each scenario, the average ratio of COE across all Monte Carlo iterations is computed and presented in Figure 8, where blue cells mean lower COE and red colour means higher COE.
A heat map representing the sensitivity analysis results for two houses with different COE values. The heat map is divided into two main sections: one for House ID 1 and one for House ID 2. Each section is further divided into two sub-sections based on COE values, k = 6 and k = 0. The x-axis represents the variable h with values ranging from 1 to 5, and the y-axis represents the variable i with values ranging from 3 percent to 15 percent. The color scale ranges from blue to red, indicating lower to higher values respectively. For House ID 2 with COE in k = 0, the heat map shows a gradient from red at the top to blue at the bottom, indicating higher values at higher i and lower values at lower i. Result of sensitivity analysis
A heat map representing the sensitivity analysis results for two houses with different COE values. The heat map is divided into two main sections: one for House ID 1 and one for House ID 2. Each section is further divided into two sub-sections based on COE values, k = 6 and k = 0. The x-axis represents the variable h with values ranging from 1 to 5, and the y-axis represents the variable i with values ranging from 3 percent to 15 percent. The color scale ranges from blue to red, indicating lower to higher values respectively. For House ID 2 with COE in k = 0, the heat map shows a gradient from red at the top to blue at the bottom, indicating higher values at higher i and lower values at lower i. Result of sensitivity analysis
As presented, the COE is influenced by both the magnitude variation parameter () and the temporal shift parameter (). However, the results clearly demonstrate that incorporating demand flexibility in the model () leads to a more robust system performance compared to the baseline scenario without flexibility (). This robustness is particularly evident under variations in input parameters, indicating that the flexible framework is better able to adapt to uncertainty.
More specifically, the model shows greater resilience to temporal shifts () than to magnitude variations (), as the inclusion of demand flexibility allows the system to adjust load scheduling in response to changes in demand timing. This highlights the importance of explicitly incorporating flexibility into the planning stage.
For Household ID 1, which represents a high-demand case, increasing both and leads to an overall increase in COE for both scenarios ( and ). However, the sensitivity to magnitude variation () is more pronounced, reflecting the strong impact of increased demand and reduced PV generation on system costs. Importantly, across all scenarios, the COE for the flexible case () remains consistently lower than the baseline case (), demonstrating the economic benefit of incorporating demand flexibility even under uncertainty.
For Household ID 2, which represents a low-demand case, a similar trend is observed with respect to : increasing magnitude variation leads to higher COE values, and again, the flexible scenario () consistently outperforms the non-flexible case (). However, a different pattern emerges with respect to temporal shifts (). As increases, the COE decreases for both scenarios. This behaviour can be explained by the fact that shifting the demand profile forward in time results in a greater proportion of energy consumption occurring during daylight hours, thereby increasing the direct utilisation of PV generation and reducing reliance on grid imports and battery discharge.
This effect is particularly noticeable in low-demand households, where even modest shifts in demand timing can significantly improve the alignment between load and PV generation. As a result, the benefits of temporal alignment partially offset the negative impacts of uncertainty, leading to reduced COE values as increases.
5.4 Comparison with two-stage approach
To further evaluate the novelty of the proposed integrated approach, the results are compared with a two-stage optimisation framework adapted from (Duman et al., 2022), using the same household data and parameter settings for House ID 1. The comparison presented in Table 6, shows that the proposed model consistently achieves lower total system costs across all flexibility levels. Specifically, the net present cost is reduced by approximately 5% at low flexibility levels (K = 1) and up to 9% at higher flexibility levels (K = 12), with an average reduction of around 7%. Moreover, the cost advantage increases as flexibility grows, indicating that the integrated formulation is more effective in capturing the interaction between system sizing and demand scheduling than conventional two-stage approaches.
Net present cost in thousands $
| Model | K = | AVG | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ||
| Proposed Model | 20.1 | 19.9 | 19.7 | 19.5 | 19.3 | 19.2 | 19.1 | 18.9 | 18.6 | 18.5 | 18.3 | 18.3 | 19.1 |
| Duman et al. (2022) | 21.1 | 21 | 20.9 | 20.8 | 20.7 | 20.7 | 20.6 | 20.4 | 20.3 | 20.3 | 20.2 | 20.2 | 20.6 |
| Difference % | 5% | 5% | 6% | 6% | 7% | 7% | 7% | 7% | 8% | 9% | 9% | 9% | 7% |
| Model | K = | AVG | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ||
| Proposed Model | 20.1 | 19.9 | 19.7 | 19.5 | 19.3 | 19.2 | 19.1 | 18.9 | 18.6 | 18.5 | 18.3 | 18.3 | 19.1 |
| 21.1 | 21 | 20.9 | 20.8 | 20.7 | 20.7 | 20.6 | 20.4 | 20.3 | 20.3 | 20.2 | 20.2 | 20.6 | |
| Difference % | 5% | 5% | 6% | 6% | 7% | 7% | 7% | 7% | 8% | 9% | 9% | 9% | 7% |
This improvement can be attributed to the fact that, in two-stage models, system sizing decisions are made without fully accounting for the potential of demand shifting, leading to conservative designs with larger battery capacities. In contrast, the proposed model co-optimises sizing and scheduling simultaneously, allowing flexibility to directly influence investment decisions. As a result, the model avoids over-sizing storage and achieves more cost-efficient system configurations.
5.5 Practical implications and real-world applicability of demand flexibility
This subsection discusses the practical implications of the proposed integrated optimisation framework and clarifies the conditions required for its real-world implementation. While the results demonstrate that incorporating demand-side flexibility into the planning stage significantly reduces battery capacity requirements and overall system cost, translating these findings into practice requires careful consideration of operational, behavioural, and infrastructural constraints.
From a practical perspective, the results indicate that co-optimising demand flexibility with PV–battery sizing can reduce storage requirements by up to 33% and lower total system costs by up to 9% compared to conventional approaches. This has direct implications for homeowners and system designers, as it suggests that appropriately managed demand flexibility can defer or reduce battery investment while maintaining energy reliability. For residential installers and energy planners, the findings provide a quantitative basis for promoting flexibility-enabled system designs rather than oversizing storage under conservative demand assumptions.
However, the implementation of the proposed framework in real residential environments depends on the availability of enabling technologies. In particular, the model assumes perfect execution of flexible load scheduling, which in practice would require automated Home Energy Management Systems (HEMS) capable of real-time coordination between PV generation, battery storage, and household appliances. Without such automation, achieving the level of flexibility assumed in the optimisation would depend on significant behavioural participation from users, which may not be consistently achievable.
In addition, the effectiveness of the proposed approach is influenced by regional and climatic conditions. The case study is based on residential data from Queensland, Australia, which features relatively high solar availability. While the methodological framework is generalisable, the quantitative benefits of flexibility may vary in regions with different solar profiles or tariff structures. This highlights the need for future work to validate the model across multiple geographic contexts to improve policy relevance.
From a policy perspective, the results suggest that encouraging the adoption of smart meters, dynamic pricing schemes, and automated demand response technologies could significantly enhance the economic viability of residential PV–battery systems. In particular, policies that support the deployment of smart appliances and interoperable HEMS platforms would directly enable the level of demand flexibility assumed in this study.
6. Limitations and future work
Despite the contributions of this study in integrating demand flexibility into the planning of residential PV–battery systems, several limitations should be acknowledged to properly contextualise the findings.
First, although the proposed framework captures the interaction between PV generation, battery storage, and flexible demand, the study adopts a deterministic formulation for both demand and solar generation over the entire planning horizon. This assumption simplifies the optimisation process but does not explicitly account for uncertainties in weather conditions, household behaviour, or future demand evolution. As a result, the derived optimal system configurations should be interpreted as conditionally optimal under assumed profiles rather than fully robust solutions under stochastic conditions.
Second, the analysis is based on a limited dataset of six residential households within a single high-irradiance region. While these case studies provide valuable insights into heterogeneous consumption behaviours and allow comparative assessment across profiles, the geographic and sample scope constrains the generalisability of the results. Performance outcomes such as optimal PV and battery sizing may differ in regions with lower solar resources, different tariff structures, or alternative demand characteristics.
Third, while sensitivity to flexibility levels is analysed, a more systematic sensitivity analysis of key economic and technical parameters (such as battery cost trajectories, discount rate, and electricity tariffs) is not included in this study and could further enhance the robustness of the conclusions.
Future work can address these limitations by extending the model to a stochastic or robust optimisation framework that explicitly incorporates uncertainty in solar generation and demand. In addition, expanding the dataset to include households from diverse climatic and socio-economic regions would improve the generalisability of the findings and would further strengthen the practical applicability and policy relevance of the proposed method. Beyond these extensions, the proposed framework can be further developed to incorporate emerging residential energy components, such as electric vehicle (EV) charging and community-scale energy sharing mechanisms.
7. Conclusion
This study demonstrates how incorporating demand flexibility into residential PV–battery planning can substantially reshape electricity consumption patterns and enhance system performance. As the allowable shifting window (K) increases from 1 to 12 h, the model progressively reallocates flexible demand toward periods of high solar generation, reducing dependence on grid electricity and evening battery discharge.
At low flexibility levels (K = 1–3), only modest changes occur, with demand remaining close to the original profile. Nevertheless, even limited flexibility allows the model to curb early evening consumption, signalling an immediate sensitivity to PV availability. A more pronounced transition emerges at K = 4, where approximately 60% of post-6:00 PM flexible demand is shifted into daylight hours, marking the onset of substantial load reshaping.
For moderate flexibility (K = 5–9), the system capitalizes more effectively on midday solar output. By K = 6, over 70% of flexible evening consumption is reassigned to early afternoon periods, and by K = 9, late-evening loads (9:00–11:00 PM) are almost eliminated. During this range, the 10:00 AM–2:00 PM interval becomes the dominant concentration point for flexible demand, reflecting strong alignment with peak PV generation.
The sensitivity analysis further confirms the robustness of these findings under uncertainty. When variations in both demand and PV generation magnitude (parameter 1) and temporal shifts in demand profiles (parameter h) are introduced using Monte Carlo simulation, the results show that the flexible configuration (K = 6) consistently outperforms the non-flexible case (K = 0). Although COE increases under higher uncertainty levels, the flexible system maintains a lower cost across all scenarios, demonstrating improved economic resilience. The analysis also shows that the model is more sensitive to magnitude variations than temporal shifts; however, demand flexibility significantly mitigates the impact of timing uncertainty by enabling realignment of consumption with PV availability.
The comparison with a two-stage optimisation approach further highlights the contribution of the proposed model. Using identical household data for House ID 1, the integrated framework consistently achieves lower net present costs across all flexibility levels compared to the two-stage method of Duman et al. (2022). The cost reduction ranges from approximately 5% at low flexibility (K = 1) to about 9% at high flexibility (K = 12), with an average improvement of around 7%. Importantly, the performance gap increases as flexibility rises, indicating that the proposed model better captures the interaction between system sizing and demand scheduling.
Ethic
No human participants or animals were directly involved in this study; the research is based on anonymised household energy data, and formal ethics approval was not required in accordance with applicable guidelines.
AI disclosure
We acknowledge the use of AI-based tools, including ChatGPT and Grammarly, solely for language refinement, grammar correction, and improving readability in the manuscript; all research design, analysis, and results were developed entirely by the authors.

