## 2 Materials and Methods
### Data Processing and Equations  
PMC households were equipped with smart meters, which measured the electricity and gas consumption and the production of diverse appliances [33]. Data was stored on a server in the form of cumulative and instantaneous values. Before further processing, the data quality of \(\sim\)80% of the data was assessed for most of the households for the instantaneous consumption, and values were cross-checked with cumulative values. For the missing 20%, derivatives of cumulative values were employed to fill subsequently missing instantaneous values of more than 15 min to boost the data quality. We excluded only one household with heat pump because of the significantly low data quality, around 50% overall across the year. The power data includes the losses. We processed the 29 variables that were measured for the whole year at a 5-min resolution, using MatLab (2017b). To summarize, these variables consisted of energy delivery and purchase according to two tariffs (shown above in \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**PMC Households**} & \multicolumn{2}{c}{**The Netherlands**} \\ \hline
**Household Size** & **Number of Households** & **Distribution (\%)** & **Number of Households** & **Distribution (\%)** \\ \hline
1 person & 2 & 9\% & 2,761,764 & 37 \\
2 persons & 5 & 22\% & 2,455,421 & 33 \\
3 persons & 2 & 9\% & 909,274 & 12 \\
4 persons & 7 & 31\% & 971,486 & 13 \\
5 persons & 2 & 9\% & 414,879 & 6 \\ Unknown & 4 & 18\% & - & - \\ Total & 22 & 100\% & 7,512,824 & 100\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Number of residents per household in PowerMatching City (PMC) vs. the Netherlands [adapted from [24]]. Section 2.3), PV system power production and \(\upmu\)-CHP power production, the ambient temperature, the status of smart appliances, and several other variables. Table 3 summarizes the equations that have been used to determine energy indicators on the basis of this data set, in which E stands for energy, P for power, t for time, n for number of appliances, m for number of energy sources, n.r. for normal rate, and l.r. for low rate. In this Table 3, to analyze the load flexibility, equations for the status of smart appliances are mentioned in at last three columns, in which S is a logical array of activation time and F is a logical array of flexibility time. In most of the cases, the consumption of the smart appliances varies significantly with the setting of the program which is used to run them, and their specific consumption curve over time. Hence, the most precise way to determine the power consumption is obviously to measure the consumption of the appliance directly. The power consumption data of the heat pumps helped us to directly obtain this information, processed as in the last row in Table 3.  
High-potential flexible loads in this study were dishwashers and washing machines. The power consumption was not measured directly for these two appliances because only smart appliances' activation times (S) were given in the data. To accurately predict the electricity consumption just by activation parameters, two parameters have to be known: the consumption profiles of all use modes that are possible for the specific model of the appliance and its various program (use) cycle times. Moreover, the cycle time of the different programs or combinations of programs of the appliances should not overlap in the time resolution given (here, 5 min). Otherwise, a running program has to be coded as well. Because we did not have information about the specifications of the activated program or the specific consumption profiles and cycle times, we chose to proceed with average values of power consumption within the data set and to consider average cycles. Moreover, the efficiency and energy consumption of the appliances in 2012 are not same as nowadays. A medium-potential flexible load in this study were heat pumps, as the temperature inside the house had to be kept within the temperature range that users indicated.