Latest Updates
- Minor changes in control strategy.
- Recommend the coefficient of nominal variation for measuring dispersion of activities during a given time interval.
- Write more about Energy System Configuration.
- Add a new reference (Iversen et al. 2016).
- Write more about control strategy.
- Write more about the advantages of this bottom-up simulation technique in the introduction.
- Time use survey is explained in more detail.
- Subsection for how to build simulators is elaborated in more detail.
- Appendix is finished. Simplified activity coding list is provided.
- Data folder
UK-TUS-15-0616is uploaded in google drive. Note that you should always use the latest data sets.
1 Introduction
This is one of the topics that you can choose as the final assignment of course stochastic simulation at Technical University of Denmark.
The world needs a 100% solar energy system to reduce carbon emission and promote modern power systems in rural areas. To satisfy electricity consumption as much as possible while reducing cost is the main task when designing such systems.
With power grids and other kinds of power generators neglected, only three kinds of devices are considered:
- Residential loads: composition of residents.
- Solar panels: capacity, power outputs at different radiation levels.
- Batteries: capacitiy, charging/discharing efficiencies, charging/discharing speeds.
The supply and demand for electricity must be balanced all the time. Residential loads are not controllable, so you have to describe and simulate them under different circumstances. Without network constraints from power grids, it is sufficient to focus on one aggregated time series, representing the total demand from all considered residents. It is assumed that the shortage of electricity supply can be eased by importing from somewhere else, while surplus has to be curtailed if batteries are full. These amounts (shortage and surplus) indicate the robustness of the energy system to stochastic loads and generations.
There are three ways to model synthetic electricity loads. One is to build statistical models, and multi-variate models are usually needed. The second one is to build individual level models and get the synthetic loads by aggregation. The last one is to build discrete-state models first according to the underlying agents, like humans or electrical appliances (Richardson et al. 2010). States of every agent are simulated accordingly. Then, the load series can be calculated using their relationship between the simulated discrete states. Finally, synthetic loads aggregate all these series. This method is called “bottom-up” simulation, and it can be illustrated by the following example where loads of a 3-person family are simulated. (Widén and Wäckelgård 2010)
Discrete state \(A(k, i)\) for household member \(i\) at time step \(k\) is simulated first according to its corresponding inhomogeneous Markov chain (IMC). For example, activities of a child can be simulated according to the IMC modelled for the children population. Then the electricity consumption of this family during time step \(k\) can be calculated by \(P(k, 1, A(k, 1)) + P(k, 2, A(k, 2)) + P(k, 3, A(k, 3))\).
The advantage of this “bottom-up” approach is that there are underlying patterns in activity simulators and a2p parameters. That is, they have physical interpretations. Besides, they can be easily applied in the context with different external factors.
a2p parameters are given in the appendix. Techniques in the course can be used to build and run activity simulators. The data for discrete activities are introduced in the following subsection. Last two lectures and book (Ross 2012) can help you understand the concept of a complete simulation project.
1.1 Time Use Survey
A time-use survey is a statistical survey which aims to report data on how, on average, people spend their time. (Wikipedia contributors 2020)
Time use survey data can be used in areas including social life, work-life balance, family, gender, and economics. Transitions between discrete states can be investigated using time use survey data.
For this project, UK Time Use Survey 2014-15 is used. The slightly modified data sets are provided in UK-TUS-15. There are four data files, activity.csv, activity_short.csv (first 500 rows), household.csv, and individual.csv.
There are columns serial (which household), pnum (which individual in the household), t_start (starting time of the activity), eptime (duration of this activity in minutes), whatdoing (which activity), whatdoing_exact (which activity exactly) and WhereWhen (the location of the activity) in activity.csv file. Rows 1, 120, 250, 300, 450 are printed.
| serial | pnum | t_start | eptime | whatdoing_exact | WhereWhen | whatdoing |
|---|---|---|---|---|---|---|
| 11011202 | 1 | 2014-12-11 03:00:00 | 110 | 110 | 11 | 0 |
| 11011202 | 4 | 2014-12-14 03:00:00 | 300 | 110 | 11 | 0 |
| 11011203 | 1 | 2014-12-08 23:10:00 | 230 | 110 | 11 | 0 |
| 11011207 | 1 | 2014-12-06 09:00:00 | 10 | 9360 | 36 | 9 |
| 11011209 | 2 | 2014-12-03 06:40:00 | 10 | 1110 | 13 | 1 |
Activities are recorded every 10 minutes, so they may vary in high frequency. Usually, IMCs with 1-hour resolutions are used in literature. You can try IMCs with varying resolutions. For example, at night, people tend to sleep, so hourly IMC is enough to capture the variations, while 10-minutes IMCs may be needed at dawn and dusk.
The information about households and individuals can be found in household.csv, and individual.csv respectively. Variables like sex, age, deconact (see appendix), etc are not necessary for you to build a simple activity simulator, but you are encouraged to make your simulator more precise based on these parameters. For example, you can build two simulators for adult and children respectively because they have different activity patterns. Then, you can assume there are more working adults in your system, and the loads will look different during the daytime. More detailed explanations of these data sets can be found in the appendix.
1.2 Coefficient of Nominal Variation
The similarity in activities during a given time interval between different individuals can be described by coefficient of nominal variation (CNV): (Kvålseth 2011) \[ \begin{aligned} IQV &= \left(\frac{n}{n-1}\right)\left(1-\sum_{i=1}^{n} p_{i}^{2}\right) \\ CNV &= 1 - \sqrt{1 - IQV} \end{aligned} \] where the categorical variable has \(n\) categories and the probability distribution \(P_{n}=\left(p_{1}, \ldots, p_{n}\right)\). \(p_{i} \geq 0\) for \(i=1, \ldots, n\) and \(\sum_{i=1}^{n} p_{i}=1\).
Further analysis of categorical time series with nominal ranges can be found in part 2 of the book (Weiß 2018), though non-stationary cases are not discussed in detail and the non-homogeneous Markov chain technique is not considered.
2 Tasks
The project can be divided into four parts.
2.1 Data Preparation
You have to select a location for the energy system yourself.
- Location.
- Corresponding meteorological data.
- Number and features of individuals living there.
- Parameters of your solar panels and betteries.
Based on your choice, you have to find direct solar radiation data. In this project, we assume that the power outputs of solar panels depend on direct solar radiations only. Panel tilts and solar tracking functions are not considered. So it is easy for you to convert solar radiations to power outputs.
2.2 Build Activity Simulators for Individuals
- Decide the number of activity simulators. For example, one for adults, and one for children. Activities in summer may be different from those in winter.
- Divide
activity.csvto training sets and validation sets. - Calibrate IMC using the training sets.
- Validate the model using the validation sets.
For example, there are 41 activity series on Dec 11, 2014. Their activities can be visualised by the following figure. For example, nearly all of them slept at night. Some of them did some outdoor activity at dawn or dusk.
The maximum-likelihood estimator of time-invariant transition probability can be used. You can find more detailed discussion and advanced techniques in (Iversen et al. 2016).
Once the IMC is built, it can be used to simulate the daily activity of an individual. That is, though the simulator is calibrated based on multiple individuals, its realisation can represent the activity of a single person. For example, a 72 hours simulated activity series of a working male can be visualised by the following figure from (Muratori et al. 2013). Note that its activity coding is different from that used in this project.
2.3 Formulate System Control Strategy
The strategy for charging and discharging of batteries must be defined before simulations. Note that because solar energy generations and electricity loads are stochastic, you can not know future power outputs for sure. Particularly, you cannot use your activity simulators in your forecast. Because in this project, the actual realisation of electricity consumption is obtained from your simulators. If you use their forcasts, you will always assume implicitly that you know future consumption for sure. In practice, with actual realisation, you can formulate a time-variant Markov decision process and evaluate your simulator and strategy at the same time.
To forecast and make decisions, you have to build another statistical model based on your simulated historical data, which is not required in this project, but you are welcome to try if you have enough time for other tasks. Static strategies (like charge with extra power during the day and discharge during the night) or feedback strategies are enough.
Demand side management is not considered in this project. That is, residents cannot respond to control signals. It is hard to simulate response because there is no real-world realisation of responses in simulation.
2.4 Energy System Configuration
With electricity loads model validated and control strategies formulated, you should design a program to simulate system operations and return suggest system configurations. The total simulation length should be one year (365 days). You should analyse the average performance of proposed system configurations based on multiple simualtion runs. The computation time can be reduced by considering typical days and extreme days in different seasons only, but you have to analyse your meteorological data set first.
It is not necessary to provide optimal results, because this is a linear optimisation problem in essence.
Your program must provide a detailed analysis of the returned configuration. For example, the amounts of shortage and surplus, the capacity factor of solar panels and average storage levels of batteries. The time and frequency of shortage and surplus plays an important role as well. A better configuration is expected to be robust to different weathers. Multiple results can be returned, and you should compare them and comment.
3 Expected Output
- Activity Simulators based on Inhomogeneous Markov Chains: You must validate your simulators based on data in
activity.csvbecause there is no other data set that can be used to validate. - 100% Solar Energy System Design Program: Simulation program should be able to assess the performance of your system with different configurations.
Appendix
The time use survey data is simplified in many ways:
- Only primary activities are considered.
- Other participants in the activity are ignored. For example, in the original data, respondents will specify their companions in the outdoor activity. You just have to consider the individual alone in every activity.
Detailed coding list is given by activity-code-2.pdf along with data sets. The following simplified activity coding list should be used in this project:
| code | activity | a2p |
|---|---|---|
| 0 | personal-care | 0.01 |
| 1 | employment | 4.00 |
| 2 | study | 3.00 |
| 3 | household-care | 2.00 |
| 4 | volunteer-work | 3.50 |
| 5 | entertainment | 5.00 |
| 6 | outdoor-activity | 1.00 |
| 7 | hobbies | 2.50 |
| 8 | media | 5.50 |
| 9 | travel | 1.50 |
For example, the first row can be interpreted as when the individual is “personal-caring” in that period, the whatdoing value in activity.csv will be 0, and the electricity demand rate will be 0.01 kilowatt. Note that “kilowatt”, a power unit, is the unit of a2p. If the length of that period is 10 hours, the total electricity demand is 0.1 kilowatt-hour.
Note that these a2p parameters are chosen arbitrarily because there is no corresponding data set recording their electricity consumption during that time and no research with similar activity coding.
Coding of column dhhtype in household.csv and column deconact in individual.csv is:
Reference
UK-TUS-15 data sets, https://drive.google.com/drive/folders/1I0LBnw22jDLQIAqmA9ICLRLRXCpX8Wx1?usp=sharing
Gershuny, J., Sullivan, O. (2017). United Kingdom Time Use Survey, 2014-2015. [data collection]. UK Data Service. SN: 8128, http://doi.org/10.5255/UKDA-SN-8128-1
Iversen, Emil Banning, Jan K Møller, Juan Miguel Morales, and Henrik Madsen. 2016. “Inhomogeneous Markov Models for Describing Driving Patterns.” IEEE Transactions on Smart Grid 8 (2): 581–88.
Kvålseth, Tarald O. 2011. “Variation for Categorical Variables.” In International Encyclopedia of Statistical Science, edited by Miodrag Lovric, 1642–5. Berlin, Heidelberg: Springer Berlin Heidelberg. https://doi.org/10.1007/978-3-642-04898-2_608.
Muratori, Matteo, Matthew C Roberts, Ramteen Sioshansi, Vincenzo Marano, and Giorgio Rizzoni. 2013. “A Highly Resolved Modeling Technique to Simulate Residential Power Demand.” Applied Energy 107: 465–73.
Richardson, Ian, Murray Thomson, David Infield, and Conor Clifford. 2010. “Domestic Electricity Use: A High-Resolution Energy Demand Model.” Energy and Buildings 42 (10): 1878–87.
Ross, Sheldon M. 2012. Simulation. Academic Press.
Weiß, Christian H. 2018. An Introduction to Discrete-Valued Time Series. John Wiley & Sons.
Widén, Joakim, and Ewa Wäckelgård. 2010. “A High-Resolution Stochastic Model of Domestic Activity Patterns and Electricity Demand.” Applied Energy 87 (6): 1880–92.
Wikipedia contributors. 2020. “Time-Use Survey — Wikipedia, the Free Encyclopedia.” https://en.wikipedia.org/w/index.php?title=Time-use_survey&oldid=951862519.