Occupant behavior has been identified as having a significant impact on household energy consumption [12]. Therefore, there has been an increasing research interest in the field of behavioral modelling over the last years with the aim to explain dynamics in residential energy demand based on energy related activities [13,14]. A large number of studies focus on the modelling of activity sequences of single households or individuals with the objective to describe occupant behavior on an aggregated level for socio-demographic differentiated groups [10,17,6,1]. Time use data (TUD) are used as a data basis, which provide information on the temporal course of occupant activities over single days and are available for various countries in the form of population representative samples [4]. Based on occupant behavior, different approaches were developed that connect occupant activities with electrical household appliances and thus generate synthetic electricity demand profiles [18]. The aim of these studies is to gain a deeper understanding of household electricity demand in order to e.g. be able to evaluate device-specific efficiency measures, time-dependent electricity tariffs or load shift potentials. In the course of the decarbonisation of domestic heat demand, it is expected that a large part of the heat will be generated by electricity (e.g. through heat pumps). In order to decarbonise the mobility sector, the aim is to increase the amount of electric vehicles in e.g. Germany from 53,861 in 2018 to 6,000,000 by 2030 [7,2]. Due to the mentioned developments, fundamental characteristics will change in the course of energy demand in the household sector. Furthermore, the introduction of stationary and mobile electricity storage systems as well as stationary heat storage systems enable the storage of energy over periods of single days and therefore open up flexibility potentials in the residential sector, which can support the integration of fluctuating renewable energies. To evaluate these flexibility potentials, data are required that contain information about the mobility behavior of individuals over several days and about their energy relevant at home activities. TUD only provide information on activity patterns of two or three individual days, therefore longer-term dependencies in behavior that extend over several days are not captured in existing TUD based models [13]. The objective of this study is to develop an approach which captures long-term dependencies in behavior in order to be able to provide high quality mobility and activity data of individuals to the general public. Therefore, the paper is structured as follows. Section 2 provides an overview of the literature in the field of categorical (activity) sequence modelling. Section 3 explains the methodology introduced to capture long-term dependencies in occupancy behavior, before Section 4 presents and discusses the results. The conclusion can be found in Section 5. Activity schedules are categorical time series in which the state space is defined on the basis of the possible activity states that a person can be in. The most commonly used approaches to model activity sequences is to describe them as Markov chains. [10] developed an approach which uses a first order Markov chain and distinguishes between the states 'active at home' and 'not active at home' for each person of a household. First order Markov models are adequately suited to describe processes that full fill the Markov property, which refers to the memorylessness of a stochastic process. This means that the transition to a subsequent state depends only on the current state and is independent of previously observed states. It is obvious that residential activity schedules represent more complex processes and therefore cannot easily be represented by a first order Markov model. To overcome this problem, a variety of more complex Markov models have been presented in recent years (semi-Markov [17], higher order [6], variable memory length [8]). However, two serious remain with higher-order Markov chains. The number of free parameters in the model increases exponentially with the order of the model and the collection of all possible full high-order Markov chain models is limited and completely stratified. Due to these issues, Markov models are not used in this study. Social practice theory literature points out that in order to understand people's daily/weekly activity schedules these should be treated as a whole [11,14]. As a result, model approaches are required whose memory mechanisms enables complex relationships in human behavior to be recorded as comprehensively as possible. Attention based neural networks represent the state of the art in the rapidly developing field of natural language processing (NLP) over the past years [15,3]. In these networks language is interpreted as categorical sequences in which letters or words represent states. attention based models have shown that they can learn complex long-term dependencies in language and are therefore promising for the application in this study. The autoregressive model tries to capture the stochasticity in mobility behavior and to generate, step by step, synthetic mobility schedules that have identical properties as the empirical data. Mobility state information is provided as input in 10-minute resolution, with six mobility states being distinguished from one another (see Figure 3). In contrast to recurrent models (e.g. LSTM models), the temporal relationships in time series must be learned from scratch. To make this easier, timestamp information is provided to the model in the form of sinusoidal position encoding [15] as well as weekday embeddings (see Figure 4). Weekday embeddings are multi-dimensional representations of the weekdays in a continuous space, which are learned during the training process. In this way, daily and weekly rhythms in behavior and differences in behavior on work and weekend days can be learned more easily. Since the socio-demographic composition of both data sets differ and in order to be able to generate socio-demographically differentiated activity schedules, information about the age and occupation type is provided in the form of seven age classes and seven occupation classes. After all time-step-specific information are concatenated, they flow into the main part of the attention based autoregressive model, which is shown in Figure 5. By using the self-attention mechanism, all dependencies between the 1008 10-minute time steps are learned during the training process.
The use of the look-ahead mask ensures that only information from previous time steps is used when predicting the mobility state of the next time step. The imputation model enriches the "at home" state in the generated mobility schedules by distinguishing between ten different energy relevant at home activities (see in Figure 3). During the training process TUD are used which provide activity information about maximum three weekdays (from 4 am to 4 am) for each individual (see Figure 4). In contrast to the autoregressive model, no look-ahead mask is used in the imputation model, since the model is supposed to use information about future mobility states while predicting current at home states. Therefore, only future at home states are masked during the training process, so that the attention matrix calculates all dependencies between the unknown at home state under consideration and all mobility states as well as all known (previous) energy relevant at home states. By using all three days per individual in one sample during the training process, the model is able to learn day-to-day dependencies between at home activities (e.g. people go to bed or eat at similar times on consecutive days). During the prediction process, the entire weekly mobility plan is given as input and the at home activities are enriched chronologically. Both models are trained using the cross entropy loss function and the Adam optimizer. The datasets are split up into training data (9-fold cross validation (80 % training, 10 % validation)) and test data (10 %). The generated mobility and activity schedules are constantly evaluated on an individual and aggregated level by calculating the aggregated state probability, the distribution of state durations, the autocorrelation, the amount of weekly activities for each state and the distribution of the hamming distance between all working days over all generated samples. The model configurations used for the results in Figure 2 can be found in Table 1 (model no. 3) and Table 2 (model no. 4). As a reference model for the autoregressive mobility schedule generation, a 1st order Markov model is used. The 1st order Markov model characteristics are representative for the models presented in section 2, since marginal changes in the metrics can be achieved by using more complex Markov chains, but the basic problems remain (no long-term memory). From the visualization of the distribution of the hamming distances between the five working days of the week, it can be seen that the attention based models depict similar behavior between the days well, in contrast to the Markov model, in which working days of individuals are not as similar as in the empirical data. In the course of the autocorrelation of the driving car state (Figure 2 b.) a peak can be seen after 144 10-minute intervals (24 hours). This peak can be explained by daily rhythms in the commuting behavior of car drivers. From the distribution of the Hamming distance and the 25/75% quantiles of the autocorrelation, it can be seen that both the diversity between individuals and the average mobility behavior are captured by the model. The described day to day dependencies can also be recognized in the exemplary activity plan in Figure 2 c. The person under consideration leaves home during working days at around the same time and sleeps a bit longer on the weekend. In Tables 1 and2, error values are given for the various metrics in comparison to the empirical data. In contrast to Markov models, which, based on their structure, meet aggregate state probabilities and the average number of weekly activities well, the attention based models reflect intrapersonal dependencies significantly better, which can be seen by the lower errors in the duration of the states, the autocorrelation and the Hamming distance. The errors of the attention-based model in the aggregated state probabilities are, as can be seen from Table 1 and Table 2, slightly higher than those of the Markov model, in which the error tends to zero with increasing sample size. However, the average error in the aggregated state probability over all socio-demographic groups between the generated data and the empirical mobility data is more than two times lower than the error that arises when comparing the overlapping states of the two input data sets. It can be concluded that the approach presented enables to combine the advantages of weekly mobility data with a large sample size with the advantages of high-resolution activity data of individual days, thus creating a new data basis which can be used for further analyses of human occupancy and mobility behavior. Over the past years, more and more models have been published that aim to capture relationships in human residential behavior. Most of these models are different Markov variants or regression models that have a strong assumption bias and are therefore unable to capture complex long-term dependencies and the diversity in occupant behavior. This work shows that attention based models are able to capture complex long-term dependencies in occupancy behavior and at the same time adequately depict the diversity in behavior across the entire population and different socio-demographic groups. By combining an autoregressive generative model with an imputation model, the advantages of two data sets are combined and new data are generated which are beneficial for multiple use cases (e.g. generation of consistent household energy demand profiles). The two step approach generates synthetic activity schedules that have similar statistical properties as the empirical collected schedules and do not contain direct information about single individuals. Therefore, the presented approach forms the basis to make data on occupant behavior freely available, so that further investigations based on the synthetic data can be carried out without a large data application effort. In future work it is planned to take interpersonal dependencies into account in order to be able to generate entire household behavior profiles. In 2017, the residential sector accounted for 27% of European final energy consumption (mobility excluded) and therefore takes a key role in achieving European climate targets [5].
Approximately 64% of the residential final energy demand can be attributed to space heating demand, 15% to domestic hot water demand and 20% to the demand for lighting, cooking and appliances [5]. In the course of the decarbonisation of domestic heat demand, it is expected that a large part of the heat will be generated by electricity (e.g. through heat pumps). In order to decarbonise the mobility sector, the aim is to increase the amount of electric vehicles in Germany from 53,861 in 2018 to 6,000,000 by 2030 [7,2]. Due to the mentioned developments and an expected further increase in photovoltaic battery systems in the residential sector, fundamental characteristics will change in the course of energy demand in the household sector. Therefore, residential neighbourhoods are gaining increased attention by policy makers. In order to establish targeted policy interventions for different households, which allow an optimal integration of low carbon technologies and open up flexibility options on the demand side, fundamental factors influencing the structure of energy demand must be understood. The diversity and differences in electricity and heat consumption between different households/buildings is a major obstacle to understanding future energy consumption. When providing behavioral data, ethical aspects such as data privacy must be taken into account at all times. The data sets used in this work do not allow any conclusions to be drawn back to individuals. However, before the synthetic data are made available online, differential privacy of the models must be ensured. The data set provided by this work can support energy system planners, for example in predicting future load peaks due to high electrical demand at certain times. Furthermore, politicians can be supported in the introduction of variable electricity tariffs so that they do not favor or disadvantage different socio-demographic groups.Based on the behavior of different socio-demographic groups, the data could be used in the marketing sector to target specific groups that increasingly watch television at certain times. When using synthetic data, it must also be taken into account that models always lead to errors and that the synthetic data therefore differ from the empirically collected data, which are also subject to certain biases. This study particularly points out that the two basic data sets differ relatively strongly in terms of the composition of the socio-demographic groups. This is taken into account when generating the synthetic data by using socio-demographic factors age and occupation status while merging the datasets. Information about the weekly mobility behavior is taken from the German Mobility Panel (MOP) which collects information about each travel activity of about 1,500 to 3,100 individuals since 1994 every year [16,19]. In this study 26,610 weekly mobility schedules from the years 2001 till 2017 together with their associated socio-demographic information (age, occupation) are used as input. Information about energy relevant at home activities is taken from the Harmonized European Time Use Survey [9,4]. Activity diaries and socio-demographic information of 11,921 individuals out of 5,443 households are used to train the imputation model. Most of the participants provide diaries on two weekdays and one weekend-day in 10-minute resolution. Figure 3 shows the temporal course of the aggregated state probability over the entire dataset population and an exemplary mobility and activity schedule.