Evaluating the effects of the COVID-19 pandemic on electricity consumption patterns in the residential, public, commercial and industrial sectors in Sweden

results show that working from home during the pandemic has led to an increase in the residential sector ’ s total consumption and changes in its consumption patterns, whereas there were only slight decreases in the industrial sector and relatively few changes in the public and commercial sectors. We discuss the reasons for these changes, the effects that these changes will have on expected future electricity consumption patterns, as well as the effects on potential demand flexibility in a future where working from home has become the new norm.

The COVID-19 pandemic has had drastic effects on societies around the world.Due to restrictions or recommendations, companies, industries and residents experienced changes in their routines and many people shifted to working from home.This led to alterations in electricity consumption between sectors and changes in daily patterns.Understanding how various properties and features of load patterns in the electricity network were affected is important for forecasting the network's ability to respond to sudden changes and shocks, and helping system operators improve network management and operation.In this study, we quantify the extent to which the COVID-19 pandemic has led to shifts in the electricity consumption patterns of different sectors in Sweden.The results show that working from home during the pandemic has led to an increase in the residential sector's total consumption and changes in its consumption patterns, whereas there were only slight decreases in the industrial sector and relatively few changes in the public and commercial sectors.We discuss the reasons for these changes, the effects that these changes will have on expected future electricity consumption patterns, as well as the effects on potential demand flexibility in a future where working from home has become the new norm.

Introduction
The recent COVID-19 pandemic has had enormous impacts on the way we live our daily lives.Besides the direct impacts of the spreading of the SARS-CoV-2 virus, the presence of the pandemic has led to an upheaval in digitalization and changes in the habits of billions of people worldwide.Based on national restrictions and regulations, large parts of the population in various countries started working from home.Meetings and conferences were moved from physical rooms to digital ones, and even education was performed digitally in many countries.This shift also had a substantial effect on the electricity consumption in buildings [1].Whereas large industries saw considerable reductions in electricity consumption [2,3], with total consumption respectively decreasing in countries with a high proportion of industrial areas [4][5][6], the electricity consumption within residential buildings may have increased [7].
One development may be shifts and changes in consumption patterns within a sector, the most likely being the residential sector which was perhaps subject to the most acute change.One may expect electricity consumption in homes to have increased, given that a considerable range of activities and their respective electricity consumption (coffee machines, computers, lighting) have moved from the office to the home environment [1].Parallel to this increase, consumption patterns may also change due to shifts in the timing of certain activities, with more people potentially using household appliances such as washing machines and tumble dryers during daytime while working from home [8].This could lead to the "flattening" of load curves, as observed in Berezvai, et al. [9], an effect also detected and described as a form of peak shaving in Bento, et al. [10].Another study which looks at 7000 dwellings in Warsaw found that despite an increase in daily electricity demand, peak loads remained "unchanged" [11], pointing towards a lower load factor and better grid utilization.
Another development may be shifts and changes in electricity consumption across sectors.One study detected growth in residential demand but a "drastic decline" in the share of other industrial and commercial sectors [12].A similar divide was observed by García et al., with an increase in residential customers' usage and a decrease in "non-residential" customers' usage [13].A Chilean study looking at the electricity demand of different consumer types found that demand of residential users had increased while demand in sectors like manufacturing, construction and hotels and restaurants decreased drastically [14].Another study looking at the impact of the pandemic on countries in Latin America and the Caribbean finds that a regional level, Chile, along with Uruguay were the least impacted when it comes to electricity consumption, when compared with countries like Peru and Bolivia [15].Sectoral differences were apparent in other studies where energy consumption in schools and education facilities are reported to have decreased under the effects of the pandemic [16,17] while energy consumption in "administration and office buildings" seems to have remained unchanged [16].One of the authors' conclusions was that "energy consumption in buildings is not always linked to the level of occupancy of the building", a finding which was echoed in a similar study based in the UK [18].
The effect on the electricity consumption was largest in countries with strong lockdown measures [19,20].In countries with strong lockdown measures, it is clear that the temporal variability in electricity consumption is strongly associated with the strength of the lockdown measures [6,21,22].Spatial variability exists not only between countries but also within countries, depending on the share of manufacturing and heavy industry, as well as the prevalence of infections in different regions [23].Werth, et al. [24] investigate the impact of governmental restrictions on demand in 16 European countries.They report a "remarkable load drop across Europe" with the exceptions of Scandinavia and Switzerland, a finding which is supported by Bompard, et al. [25].Werth et al. [24] speculate that one reason behind these anomalies may be the "mildness of confinement restrictions", as was the case of Sweden, but also contemplate the possibility of changes in residential, industrial and commercial loads that "canceled out upon aggregation."This paper seeks to weigh in on these possibilities and does so through focusing on the case of a Swedish distribution system.
Despite its less strict lockdown measures, Sweden also experienced a transition to a larger prevalence of remote work.Studies suggest that this transition to teleworking is expected to last even after the pandemic has ended [8].The amount of electricity that is consumed, the magnitude and timing of peaks in the network and the location at which electricity is consumed are all properties of high importance to the electricity sector.Firstly, it is important to be aware of changes in electricity demand and changes in the flexibility of electricity consumers to adapt to changes in the production-consumption balance.Secondly, peaks in energy consumption may push the limits of the network's load capacity, testing the infrastructure and presenting a challenge to system operators.A good understanding of changes in peak consumption is required to make sure the network infrastructure is built for the future, and to adapt campaigns for demand flexibility according to the timing of peaks.Thirdly, the location at which energy is consumed is of importance as well.With a shift between sectors, there is also a shift between buildings in which energy is consumed.This puts new requirements on for example fuse size and infrastructure.The changes needed to meet current and future demands also allow us to prepare for a more sustainable energy transition, a view echoed by Hoang, et al. [26].Several studies suggest that with a reduction of the total energy consumption, the share of renewable energy consumption increases [27,28].Monzon-Chavarrias, et al. [29] argue for the retrofitting of residential buildings, where the largest increase in electricity consumption currently occurs.
To prepare for this sustainable energy transition, affected by the upheaval caused by the COVID-19 pandemic, it is important that we gain a better understanding of the changes in electricity consumption caused by the pandemic.This study contributes to a literature that seeks "a better understanding of how electricity systems respond to large shocks", which has been argued to be "critical to maintaining grid reliability and building resilience to adverse events" and can provide insight to utilities in their planning and forecasting [30].The objective of this study is to fill this knowledge gap by a quantitative analysis of electricity consumption data, comparing electricity consumption patterns before and during the pandemic in Sweden, one of Werth et al.'s [24] "anomalies".To account for other potential differences in electricity consumption, e.g.caused by temperature differences between the pre-pandemic and pandemic period, we built a prediction model trained on pre-pandemic data, to predict what the electricity consumption patterns during the pandemic period would have looked like if there was no pandemic.
V. van Zoest et al.

Data
The data for this study is supplied by the electricity distribution system operator (DSO) Ellevio AB, one of the largest DSOs in Sweden.We were granted access to anonymized hourly electricity meter data from a neighbourhood in the capital city of Stockholm.The neighbourhood was selected for this study by the DSO, based on its representativeness of the entire Stockholm area in terms of a mixture in "types" of customers from the residential, public, commercial and industrial sector, and inhabitants from different socioeconomic classes in both apartments and detached/terraced houses.In total, we received hourly data from 14,843 unique electricity meters for the period January 2019 to December 2021.

Data pre-processing
We only used data from customers for which data was available in each of the three years 2019-2021 and for which metadata was available, which reduced the dataset to 10,833 unique electricity meters.Furthermore, we cleaned the data from electricity meters for which the incoming voltage was more than 400 V, to include only standard customers and to avoid outliers.Data from production meters was also removed, as well as customers that did not belong to any of the sectors included in this study.After cleaning, the dataset consisted of 9811 unique electricity meters.New electricity meters were installed during the first half of 2019, before which no hourly data, or for many customers no data at all, was stored.Therefore, we could only make use of data starting from July 11, 2019.Thus, we defined two periods, similar in length and season: a pre-pandemic period from July 11, 2019 to February 28, 2020, and a pandemic period from July 11, 2020 to February 28, 2021.Even though the pandemic started earlier (March 2020) and lasted longer, we selected this shorter period so that the two periods would be comparable.Furthermore, we deleted periods where more than 50% of the customers had missing data.As we are using hourly data for the 9811 customers, in total we have approximately 60 million observations available in each of the two periods, pre-pandemic and pandemic (including smaller periods of missing data for individual customers).These data were generalized by taking the hourly average electricity consumption (kWh) per sector, where each customer was grouped in either the residential, public, commercial or industrial sector based on their category.The majority of the customers are in the residential sector, with 9459 unique electricity meters, of which 6807 apartments and 2652 detached/terraced houses.The public sector includes 138 customers, mostly in healthcare but also sport facilities, social services, schools, and post and telecom.The commercial sector consists of 163 customers, which includes shops, hotels and restaurants.The industrial sector includes 51 customers, mostly from the construction and manufacturing industry.

Model formulation
We built a prediction model to evaluate what the electricity consumption patterns during the pandemic period would have looked like if there were no pandemic, an approach similar to that carried out by Sánchez-Úbeda, et al. [15].We used the pre-pandemic period data for training the model.A separate model was trained for each season to avoid issues with multimodality caused by the heating season.We divided the data into three seasons: winter (December to February), summer (July and August), and autumn (September to November).No data for spring was available in the pre-pandemic period, so these were left out of the analyses.For the winter months, the following model was used: where ŷt,c is the predicted average hourly consumption of all customers in sector c at hourly timestamp t, βc are the estimated regression coefficients of the covariates for sector c, and the covariates for each timestamp t include temperature V ≤15,t and V >15,t (split into temperatures ≤15 • C and >15 All beta coefficients in the model are estimated using Ordinary Least Squares (OLS).The estimated beta coefficients are then used to predict the hourly average electricity consumption in each sector for the pandemic period.The predicted hourly average electricity consumption is compared to the actual hourly average electricity consumption during the pandemic, to evaluate the effects of the pandemic on each sector's electricity consumption pattern: where y t,c is the actual electricity consumption averaged over all customers in sector c at time stamp t.Note that the differences between the pandemic consumption and the consumption predicted as if there were no pandemic, noted Δ y,t,c , are already corrected for differences in temperature between the pre-pandemic and pandemic periods, as we included temperature in our prediction model.The total electricity consumption varies over time as the number of customers for which data is available at each time stamp, may vary over time.Therefore, we estimated the total consumption in the area at each time stamp t as: where C c is the total number of customers in the area in sector c.The predicted total electricity consumption during the pandemic, predicted as if there was no pandemic, is then calculated as: for comparison between the actual total consumption and the predicted consumption if there had been no pandemic: based on pre-pandemic data corrected for differences in temperature between the periods.For ease of visualization and interpretability, we average ŷt,c , y t,c , Ŷt,c , Y t,c , Δ y,t,c and Δ Y,t,c over all weeks in the dataset, such that we have one average hourly electricity consumption value, averaged over all weeks, for each hour of the day, day of the week and sector.

Model performance evaluation
Our model is used to forecast the hourly average electricity consumption in each sector in the pandemic period, assuming there was no pandemic, with the aim to compare the real consumption during the pandemic with the situation in which there would have not been a pandemic.To validate our model, we avoid using the pandemic data.Instead, we use 10-fold cross-validation on the pre-pandemic data to evaluate the performance of our prediction model.The RMSE is then calculated over the combined set of predicted values for each validation set with time stamps t ∈ (1…T), separated by sector, so we have one RMSE c value for each sector c: where T is the total number of time stamps.As the unit of RMSE is equal to the unit of the measurements (kWh), the interpretation of the results in terms of model accuracy is dependent on the RMSE in relation to the actual consumption.As the consumption level varies strongly between seasons and sectors, this makes the RMSE values less useful for comparing model performance between seasons and sectors.Therefore, we also use the Mean Absolute Percentage Error (MAPE), defined as: for each sector c.

Results
Table 1 shows the summary statistics after averaging the individual customer data per sector.The mean consumption thus relates to the mean hourly consumption of an average customer in each sector, and the standard deviation shows the variability of the average customer's consumption over the time period.
Tables 2 and 3 show the cross-validation results of model (1) for the winter period (December to February) and model (2) for the summer (July and August) and autumn period (September to November), as well as the cross-validation results after combining the results of the models of the three periods.Table 2 shows the results of the RMSE from Eq. ( 7).As can be derived from the table, the RMSE values are lowest for the residential sector, in line with low consumption averages, and highest in the public sector, in line with the highest consumption averages.The RMSE values are highest in winter, when the actual consumption is also highest due to heating.Table 3 shows the results of MAPE from Eq. ( 8), which accounts for the actual consumption averages and thus provides a better comparison between the different models.Here we see that most errors are around 5%, with higher errors (around 10%) for the industrial sector, due to the smaller number of customers in this sector.
Figs. 1-4 show the average weekly electricity consumption pattern during the pandemic period for which data is available, i.e.July 11, 2020 to February 28, 2021, for the different sectors.For visualization purposes and ease of interpretation, the predictions of the pandemic period were averaged to an aggregated weekly pattern.The actual averages are shown as well as the predictions based on the pre-pandemic data, i.e. what the electricity consumption would have looked like if there had been no pandemic.Consequently, the difference between the actual and predicted consumption can thus be interpreted as the difference caused by the effect of the pandemic.Fig. 5 shows the total electricity consumption in the entire area.The average weekly pattern of the actual total consumption is included following Eq.( 4).The average weekly pattern of the predicted total consumption, as if there were no pandemic, is based on Eq. ( 5).The difference (Eq.( 6)) can be interpreted as the difference caused by the effect of the pandemic.

Discussion
Within the residential sector, the largest peak in electricity consumption occurs during the evenings, with relatively stable consumption during the rest of the day and a strong dip during the night.In the weekends, consumption is slightly higher throughout the day.Electricity consumption increased during the pandemic, as expected given the recommendations to work from home as much as possible.We see an increase in electricity consumption starting one hour earlier compared to the non-pandemic predictions, and a small but clear peak around lunch time, when people cook lunch at home rather than heating up food at work or going to a restaurant for lunch.The evening peak also starts earlier, indicating that people likely started cooking earlier when working from home, since they do not have to take the time to travel home first.As expected, nighttime consumption was similar to what it was in the pre-pandemic period.
The electricity consumption pattern in the industrial sector has a clear peak every weekday during daytime, under regular working hours, while the consumption is low during nights and weekends.In the industrial sector, the electricity consumption went down during the pandemic.Even though there was never a complete lockdown in Sweden during the COVID-19 pandemic, some non-vital industries closed down to minimize spread of infection amongst their employees.This has likely caused a small decrease in consumption during the pandemic as was the case in the studies reviewed earlier looking at industrial sectors in Turkey [2] and Japan [3].
The electricity consumption pattern in the commercial sector is characterized by a similar pattern seven days a week, without large differences between weekdays and weekends, and a relatively stable pattern throughout the day, only dipping during the nights.The    The electricity consumption pattern in the public sector looks quite similar to that of the industrial sector, with one clear peak on weekdays during working hours, and low consumption during nights and weekends.The electricity consumption within the public sector seems not to have been strongly influenced by the pandemic, as schools and healthcare facilities stayed open.Only during the weekends, the electricity consumption was slightly lower during the pandemic than what would have been expected if there had been no pandemic, likely due to sports facilities and other recreational facilities that were closed during the pandemic.
The results show an increase in total electricity consumption when people are working from home.This is expected, as many businesses provide the opportunity to work from home but still keep their offices heated, lights and coffee machines on, for those who want to work in the office.This suggests that decreased occupancy in administrative/office buildings does not lead to a proportional decrease in electricity consumption, corroborating the findings of earlier studies [16,18].Simultaneously, residential consumption increased due to people working from home, and using their heating, lights and computers at home, as well as cooking lunch at home.Despite the relatively low energy consumption of individual residents compared to industrial consumers, the   This reflects the large potential for load shifting and electricityreducing measures in the residential sector.However, as was the case with Bielecki, et al. [11], we do not see a flattening of the consumption curvedespite the possibility that people could be more flexible in shifting their electricity consumption to off-peak hours by doing their laundry during the working day rather than in the evenings, we see that the evening peak only increased during the pandemic.Likely people their own habits as they were not encouraged to shift loads, but the potential is expected to exist.The overall outcome of increased residential consumption and decreased consumption of other sectors is similar to what was seen in García et al. [13].Even though the total consumption went up when people worked from home, we can expect future scenarios in which total consumption decreases when people work from home.This becomes particularly important with the proliferation of electric cars, where working from home could reduce the need to constantly charge, thereby reducing electricity consumption.
Regarding Werth et al.'s [24] question concerning the Swedish anomaly and whether different impacts of the pandemic can be attributed to less stringent measures or to sectoral changes "cancelling out", the results of this study suggest the latter is more likely the dynamic at play.In their sample, Sweden was the country with the least stringent measures, yet as was seen here, there were certainly changes in consumption patterns with a sharp increase in the residential sector, suggesting that people did in fact follow the advice of authorities to work from home even if it was applied less stringently.It should be noted that Werth et al. [24] look at the entire transmission system while we take the smaller case of a single distribution system.Nevertheless, this case is evidence of the fact that there were still considerable effects on consumption despite less stringent measures.Concurrently, we see that there were changes of different magnitudes and directions in the different sectors, which make it plausible that these sectoral differences can "cancel out" and create the illusion of little to no change when looked at from an aggregate level.In our case we actually see that the increase in residential consumption actually outweighed decreases in the other sectors.
With cross-validation errors around 5%, we consider our model to perform well, especially given the challenge to model hourly electricity consumption patterns one year ahead in time.We considered different model options before we selected the current model as presented in Eqs.
(1) and ( 2).Interestingly, a classical multiple linear regression model, with parameters estimated using Ordinary Least Squares, outperformed other methods such as Random Forests, XGBoost and Gamma-GLM.The poorer performance of tree-based methods is likely due to the imbalance in the different sample sizes, ranging from 51 smart meters in the industrial sector to 9459 customers in the residential sector, where the sample sizes in smaller sectors were too small for the tree-based methods to perform well.The Gamma-GLM model was expected to perform better than our multiple linear regression model with OLS, but was likely outperformed due to the bias-variance trade-off.A model based on temporal autocorrelation lags, such as (S)ARIMA(X), did not improve model performance due to the fact that predictions were made a year in advance, with no "true" values available for the scenario "as if there were no pandemic" to iteratively update the model with new data.
We note some minor limitations to this study.Unfortunately, we did not have links between the identifiers of production meters and the identifiers of consumption meters.We removed the production meters from the dataset, but we do not know which consumers also produce their own electricity.So, it is possible that for some prosumers, the consumption measured by the meter is biased due to own production.However, since we are interested in the differences between the years, and the number of producers is relatively small, we expect the influence on the results to be minimal.
In the plots in Figs. 1 to 5, we consider a prediction interval around the predictions.At time stamps at which the actual electricity consumption is outside of the prediction interval, we consider the pandemic to have had a significant impact on the electricity consumption.It should be noted that these plots show an average weekly pattern, averaged over the approximately 34 weeks in the pandemic, and the patterns in individual weeks could be different.However, paired t-tests comparing the actual and predicted electricity consumptions for each hour, accounted for repeated testing using the Benjamini-Hochberg method [31], showed very similar results with p-values <0.05 for most of the time stamps where the actual consumption was outside of the prediction interval, and p-values >0.05 for most of the time stamps where the actual consumption overlapped with the prediction interval.
In this study we aim not to only look at the past, but also discuss how the pandemic will affect our "new normal" in terms of electricity consumption.In a follow-up study, we are planning to use surveys and interviews to get a better understanding of intentions, in order to predict what a new normal could look like in terms of energy consumption.Simultaneously, we are currently experiencing changes in electricity consumption due to the energy crisis induced by Russia's invasion in Ukraine, which is expected to change our "new normal" again.

Conclusions
This study focused on the effects of the COVID-19 pandemic on hourly electricity consumption patterns in the residential, industrial, commercial and public sectors, using data from 9811 smart meters in a neighbourhood in Stockholm, Sweden.A multiple linear regression model, with parameters estimated using OLS, allowed us to predict hourly electricity consumption a year ahead in time with a high accuracy.This model was used to predict what the electricity consumption would have looked like during the pandemic if there had been no pandemicallowing us to compare these predictions with the actual consumption and deriving the effects of the pandemic on our electricity consumption patterns.We found an increase in residential electricity consumption during the pandemic, and a decrease in electricity consumption in the industrial sector.Except for a decrease in electricity consumption during weekends in the public sector, the electricity consumption in both the public sector and commercial sector remained largely unaffected by the pandemic.A substantial increase in the total electricity consumption shows the cumulative effect of the large number of households, which together are responsible for a major part of the electricity consumption, and where electricity consumption increased mostly due to people working from home.These results can form the basis for further studies predicting the future consumption patterns in a "new normal" where teleworking becomes part of our societal norms and values.Furthermore, the results of this study suggest that a simultaneous behavior change in a large number of households can significantly impact the total electricity consumption.Whereas this study focused on the effect of the pandemic, where we see an increase in the total electricity consumption due to teleworking, other changes in behavior might lead to an electricity consumption decrease or more flexible energy demand [32].Future studies could identify the impact individual households can have in contributing to the energy transition.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

•
Multilinear regression model for forecasting electricity consumption patterns.• Increase in total electricity consumption related to COVID-19 pandemic in Sweden.• Working from home causes a shift in electricity consumption to the residential sector.• Customers in residential sector have low consumption but highest cumulative effect.
commercial sector remained relatively unchanged by the pandemic.Since there was no complete lockdown in Sweden, most shops kept open like usual.Restaurants served less guests to keep a larger distance between tables, and hotels had less guests due to a decrease in tourism, but as they kept open, their electricity consumption levels stayed similar.

Fig. 5 .
Fig. 5. Average weekly electricity consumption pattern, pandemic period 11 July 2020 to 28 February 2021, for the total electricity hourly consumption in the neighborhood.
• C to account for non-linearity), month M t ∈ {July, August, September, October, November, December, January, February}, day of the week D t ∈ {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday} and hour of the day H t ∈ {1…24}, and their interaction effect D t H t .Note that the categorical variables (month, day of the week, hour of the day, and interaction between day of the week and hour of the day), were one-hot encoded to dummy variables and thus strongly increase the number of estimated regression coefficients.For summer months and autumn months, the duration that the sun was up during the day, in number of minutes between sunrise and sunset, was added to the models as a new variable S t with estimated regression coefficient βS,c :

Table 1
Summary statistics for the averaged electricity consumption data per sector, and the total hourly electricity consumption (kWh).Pre-pandemic period includes data from 11 July 2019 to 28 February 2020; pandemic period includes data from 11 July 2020 to 28 February 2021.

Table 2
RMSE (kWh) results of the cross-validation of the prediction model during the pre-pandemic period.

Table 3
MAPE (%) results of the cross-validation of the prediction model during the prepandemic period.