Security and Privacy in Smart CitiesView this Special Issue
Research Article | Open Access
Franklin Leukam Lako, Paul Lajoie-Mazenc, Maryline Laurent, "Privacy-Preserving Publication of Time-Series Data in Smart Grid", Security and Communication Networks, vol. 2021, Article ID 6643566, 21 pages, 2021. https://doi.org/10.1155/2021/6643566
Privacy-Preserving Publication of Time-Series Data in Smart Grid
The collection of fine-grained consumptions of users in the smart grid enables energy suppliers and grid operators to propose new services (e.g., consumption forecasts and demand-response protocols) allowing to improve the efficiency and reliability of the grid. These services require the knowledge of aggregate consumption of users. However, an aggregate can be vulnerable to reidentification attacks which allow revealing the users’ individual consumption. Revealing an aggregate data is a key privacy concern. This paper focuses on publishing an aggregate of time-series data such as fine-grained consumptions, without indirectly disclosing individual consumptions. We propose novel algorithms which guarantee differential privacy, based on the discrete Fourier transform and the discrete wavelet transform. Experimental results using real data from the Irish Commission for Regulation of Utilities (CRU) demonstrate that our algorithms achieve better utility than previously proposed algorithms.
A smart city is a designation given to a city that incorporates information and communication technologies to enhance the quality and performance of urban services such as energy, transportation, and utilities in order to reduce resource consumption, wastage, and overall costs. The overarching aim of a smart city is to enhance the quality of living for its citizens through smart technology [1–3].
The smart grid is an important part of the smart city. Indeed, the smart grid allows greater penetration of highly variable renewable energy sources such as solar and wind power in the smart city.
The smart grid modernizes the traditional electricity grid by establishing a communication infrastructure in parallel to the energy delivery network. This infrastructure is used by the grid operators and suppliers to remotely collect fine-grained consumptions from household smart meters and to provide new energy services such as consumption forecasts or demand-response. These services are suitable for improving the efficiency and reliability of the grid, saving energy and, more generally, for optimizing energy usage. In particular, forecasting enables the supplier to predict future consumptions based on past aggregate data in order to improve the grid and retail operations and enhance energy trading , while demand-response (DR) aims to shift the users’ consumption from peak to off-peak periods in order to avoid consumption peaks in the smart city.
However, aggregates are vulnerable to reidentification attacks, such as set difference attacks  in which two aggregates that differ by a single consumer allow learning this individual consumption. Since the individual consumption data collected by smart meters reflect the use of all electric appliances by inhabitants in a household over time and enable to deduce the behaviors, activities, age, or preferences of the inhabitants [6–11], revealing an aggregate is a key privacy concern.
Differential privacy (DP)  allows publishing an aggregate data while guaranteeing that an attacker does not learn any individual inputs from the aggregate. However, the noise added by DP often leads to a loss of utility. Moreover, publishing time-series data such as users’ consumption, which are correlated, by using DP, results in more noise added than publishing a single aggregate for the same privacy guarantee. Thus, disclosing time-series data leads to more loss of utility. Utility can be improved by increasing the size of the aggregate. Eibl and Engel  showed that for real-world smart metering, the aggregation group size must be of the order of thousands of smart meters in order to have reasonable utility. This paper shows how to obtain good utility with a group size smaller than 600. We obtain a mean relative error lower than between the original data and the published one, which is considered practically suitable by energy experts for consumption forecasts.
The Laplace mechanism  is a popular mechanism to enable DP, by adding independent and identically distributed (IID) Laplace noise to each component of the time-series. However, adding IID noise for correlated time-series is not appropriate. In fact, an adversary can use refinement methods, such as filtering, to sanitize the IID noise and improve the probability of disclosing individual data [15, 16].
This paper focuses on disclosing an aggregate of users’ consumption data without learning individual data and proposes methods with improved utility. We summarize our contributions as follows: (i)We revisit the Fourier perturbation algorithm (FPA)  in order to correct some mistakes leading to poor users’ privacy protection. We show that, in order to ensure the desired budget of privacy , a factor must be added to the noise, where is the size of the time-series. However, this reduces the utility of FPA.(ii)We propose the “clamping Fourier perturbation algorithm (CFPA)” using the clamping mechanism proposed in , for reducing the sensitivity, and thus the noise introduced in FPA. This new algorithm is an improvement of the Fourier perturbation algorithm (FPA). Experimental results show a utility improvement by a factor more than 6.(iii)We also propose the “clamping wavelet perturbation algorithm” (CWPA), a similar adaptation of wavelet perturbation algorithm (WPA) , with a utility improvement by a factor 2.(iv)We compare FPA, CFPA, WPA, and CWPA by analyzing their relative errors on a real dataset, and we explain why CFPA obtains the best utility.
The remainder of this paper is structured as follows. Section 2 provides an overview of the literature, while Section 3 presents preliminaries. Section 4 correctly computes the sensitivity of DFT in order to make FPA -differentially private. Section 5 details our privacy-preserving publication techniques using clamping mechanism, DFT, and DWT. Section 6 reports our experimental results. Section 7 concludes the paper.
Table 1 lists the acronyms used in this paper.
2. Related Work
Demand-response protocols [20–23], and secure aggregation protocols [24–30] aim to protect the privacy of users while supporting energy services such as demand-response, smart metering, billing, or forecasting.
In this paper, we investigate tools enabling forecasting and demand-response. In particular, we are interested in publishing an aggregate of individual consumptions, while preserving privacy.
Differential privacy (DP), introduced by Dwork in 2006, guarantees that the publication of an aggregate does not indirectly reveal the individual data . Moreover, DP guarantees that two aggregates that differ by a single consumer are almost indistinguishable. DP has evolved overtime  and was adopted by organizations such as the US Census Bureau , Google , Apple , and Microsoft . The Laplace mechanism  is a popular mechanism that allows guaranteeing DP by adding a noise drawn from the Laplace distribution to the aggregate.
The Laplace mechanism takes as input two parameters: the privacy budget and the sensitivity of the function to publish (in our case, the sum of users’ consumption). Smaller values of lead to a better protection, but add a bigger noise to the aggregate.
Utility can be improved by increasing the size of the aggregate in order that the effect of noise is small enough that the result can be utilized. Eibl and Engel  showed that for real-world smart metering, the aggregation group size must be of the order of thousand smart meters in order to have reasonable utility. This paper shows how to obtain good utility with a group size smaller than a thousand.
DP is typically applied to static data, i.e., to a single query. In this paper, we consider time-series consumption, which is equivalent to multiple queries on correlated data. Applying the Laplace mechanism independently to each data point of the time-series is not appropriate. Indeed, an adversary can use refinement methods, such as filtering, to sanitize the Laplace noise and improve the probability disclosing individual data [15, 16]. Thus, the data points of the time-series are correlated. The composition theorem  states that the privacy budget of correlated queries adds up, i.e., setting the privacy budget for a single query to , the privacy budget of single queries (corresponding to a day profile with a time interval of 30 min) is . In order to guarantee a global privacy budget of , one solution is to set the privacy budget of each query to . Of course, this leads to more noise in the aggregate and a loss of utility.
One method to guarantee DP for correlated time-series data publishing consists in transforming the original correlated time-series into another representation while maintaining its major characteristics before adding the Laplace noise. Rastogi and Nath  proposed the Fourier perturbation algorithm (FPA) that combines discrete Fourier transform (DFT) with DP to support time-series of count queries while not disclosing any individual data and ensuring good utility. We note that the sensitivity of count queries is 1, and the global sensitivity is for a time-series of length . Ács et al.  proposed an optimization of the FPA allowing to release histograms, where the global sensitivity is 1. They show through experimental evaluation that their scheme improves the utility of the initial FPA by a factor 10. Lyu et al.  applied FPA to time-series consumptions and proposed wavelet perturbation algorithm (WPA) by replacing DFT by discrete wavelet transform (DWT). The authors show through experimental results that WPA ensures better utility than FPA.
We apply these approaches to time-series of consumption data and refine them by reducing the sensitivity of the queries in order to reduce the relative error of the final result.
3.1. System and Threat Model
The entities involved in this paper are as follows:(i)Trustworthy homes, which smart meter (SM) enables to collect their true individual time-series consumption.(ii)A honest aggregator, which collects users’ individual consumption, and which publishes an aggregate time-series consumption of users to a forecaster in a privacy-preserving way for the forecaster not to be able to deduce any individual consumption of users.(iii)A forecaster, which predicts future consumptions based on the aggregate consumption received in order to improve the grid and retail operations and enhance energy trading. The forecaster is considered honest-but-curious as it provides appropriate forecasts, but it may attempt to infer the users’ individual consumption from the aggregate in order to deduce the behaviors, activities, age, or preferences of the inhabitants.
Figure 1 depicts the system model. In a real scenario, the aggregator can be an energy distributor, and the forecaster can be a municipality that seeks to find out the total consumption of the inhabitants of the municipality.
Considering the case where the aggregator and the forecaster belong to two entities of the same energy provider, the publication of aggregate users’ consumption to forecasters in a privacy-preserving way reduces the risk of disclosing users’ individual consumption. Moreover, this avoids the need for forecasters to ask for explicit consent from customers in accordance with the GDPR  to process their personal data.
Let be the number of smart meters (SMs) in a district. Let be the time-series of energy consumptions collected by SM , where is the consumption at time slot () collected by SM (), with being the time period considered. Each time-series consumption is sent to an aggregator who computes the following aggregate:
To reveal to a forecaster without indirectly disclosing individual consumptions (), the aggregator can use differential privacy (DP).
3.2. Differential Privacy
Differential privacy is a framework introduced by Dwork allowing quantifying the privacy guarantees of a request on a database . This request can be the publication of a database, or a more precise one, such as “what is the sum of energy consumptions of users in this database?”.
A request on databases is said to be differentially private if this request makes two similar databases indistinguishable from looking only at the output of the request. Differential privacy relies on a parameter, noted , called the privacy budget. The formal definition of a differentially private algorithm is given as follows.
Definition 1 (differentially private). A request is differentially private if and only if for all databases differing by at most one record, and for all subsets ,
This definition can be applied not only to requests on databases but also to any function, by considering the domain of the function as a database format.
Dwork also proposes the Laplace mechanism, which allows making any (vectors of) real-valued function -differentially private . This mechanism relies on the notion of sensitivity of a function, which represents how a single record of the database can influence the output of the function.
Definition 2 (sensitivity). Let be a function; the sensitivity of is
This sensitivity is also called -sensitivity due to the norm used in its definition and is denoted by . Similarly, the -sensitivity used later and denoted by is computed using the norm (the norm and the norm of a vector are respectively equal to and ).
The Laplace mechanism consists of adding a random value to the original result of the query, where the random value follows the Laplace distribution, where the parameter depends on the chosen and on the sensitivity of the function, as follows.
Theorem 1 (Laplacian mechanism). For all functions , the algorithm is differentially private, where is the distribution of Laplace and is the sensitivity of .
DP introduces noise in order to guarantee privacy. This noise can decrease the utility of the function. We quantify this loss using mean relative estimation error (MRE), defined as follows.
Definition 3 (mean relative estimation error). The mean relative estimation error (MRE) between two vectors and of size is 2 (we add 1 to the denominator in order to avoid dividing by zero. This definition is also used in ).
Consider the aggregate defined in (1). Let be the maximum consumption in the domain. One naive solution to publish without revealing any individual consumption is to use the Laplace mechanism to add independent Laplace noise to each component of and to release the results: , where the sensitivity of the sum of time-series consumption is . However, this simple approach leads to excessive noise rendering the aggregate useless .
Example 1. Figures 2(a) and 2(b), respectively, show the aggregated consumption of 250 homes from December 30th, 2009, to January 5th, 2010, taken from the CER dataset , and its noisy version using the naively applied Laplace mechanism, with per day. Figure 2(a) shows two consumption peaks at 12 am and 6 pm which respectively correspond to lunch and dinner time. We also observe that in the night (from 12 pm to 6 am) the consumption decreases. Figure 2(b) shows that the noisy version is completely different from the original aggregate (Figure 2(a)). In this example, the MRE between the aggregate consumption and the noisy version is , which is not usable. Moreover, the noisy version has inconsistent values such as negative consumptions.
Rastogi and Nath  introduce the Fourier perturbation algorithm (FPA) and show that is an effective tool for reducing the noise introduced by the Laplace mechanism for time-series. Section 3.3 presents the FPA. However, there are some mistakes in this version relying on the estimation of the FPA sensitivity. These mistakes are presented in Section 4, along with the corrected FPA.
Table 2 lists the symbols used in the rest of the paper.
3.3. Fourier Perturbation Algorithm
Rastogi and Nath  show that FPA is differentially private. However, there are some mistakes in their proof of Theorem 4.1 of  which justified that FPA is -differentially private. These mistakes rely on the estimation of the FPA sensitivity and are presented in Section 4.
3.4. Wavelet Perturbation Algorithm
By replacing the DFT with the discrete Haar wavelet transform (DWT), Lyu et al.  proposed the wavelet perturbation algorithm (WPA) and showed that WPA guarantees better utility than DFT. Algorithm 2 describes WPA.
Figure 3 shows the same aggregated consumption presented in Example 1 and its noisy version using WPA (Algorithm 2) with Haar wavelet, per day and . In Figure 3, the MRE is however higher than (). In the noisy aggregate, the first peak of the morning is masked and the peak of the evening is truncated, as well as the trough of the night.
Theorem 2. Wavelet perturbation algorithm (WPA) is -differentially private.
Proof. DWT is orthonormal , i.e., has the same norm as , that is, . Furthermore, (because DWT coefficients of are set to 0). With the inequality of norm, . Then, . Thus, the noise introduced in Step 3 is justified and WPA guarantees differential privacy.
4. Correctly Estimating the Sensitivity of FPA
In , authors show that FPA, as described in Section 3, guarantees differential privacy. The authors estimated the sensitivity of DFT to be , while it should be , with being the size of the time-series and being the maximum consumption in the domain. Thus, for a given privacy budget , the utility of FPA is worse than presented in .
This section correctly computes the sensitivity of DFT, which allows to make render FPA differential private. Before that we recall the definition of DFT.
4.1. Discrete Fourier Transform (DFT)
Let be a time-series. DFT takes as input and returns a time-series of complex numbers such thatwhere . The inverse of the DFT is computed as follows:
This version of the DFT is normalized, that is, .
DFT can be defined in other ways, for instance, the , present in both the DFT and the inverse definitions above, can be replaced by a factor 1 in the DFT and in the inverse DFT. In that case, the DFT is not normalized.
In [17, 19, 36], the authors use the latter version of DFT, which is not normalized. However, the sensitivity computation relies on the equality , while it should be . Thus, the correct total privacy budget is instead of . This is the first mistake in this approach and can be resolved by using the normalized DFT.
Another error lies in the fact that the Laplacian mechanism is only applied to the real part of the Fourier coefficients, which are complex numbers. This mistake can be resolved by applying the Laplace mechanism to both real and imaginary parts of the Fourier coefficients.
The following section computes the sensitivity of the DFT, and thus of FPA, and takes into account those two errors.
4.2. Sensitivity of the DFT
Let be the function which takes a time-series as input and returns the first DFT coefficients of . This function can be seen as a , the function which returns the real and imaginary parts of the first Fourier coefficients. This function is a real-valued function, we can thus use the Laplace mechanism on it. First, we need to compute the -sensitivity of .
Lemma 1. Let be defined as follows:
We denote the -th coefficient of , with and . and respectively represent the real and imaginary parts of .
The -sensitivity of , , is when the DFT is normalized (respectively, when the DFT is not normalized), with as the maximum value in the dataset.
Proof. Let be defined as in Lemma 1.
This result is true when the DFT is normalized (2) as in our case. In [17, 19, 36], the L2 norm of Fourier coefficients equals to times the L2 norm of S (Parvesal’s theorem). This result is valid when the normalized DFT (2) is used as in our case. When the DFT is not normalized, as is the case in [17, 19, 36], the sensitivity of the first DFT coefficients should be instead of (). Thus, using the normalized DFT, the function then becomeswhich is DP, with , for all and .
For simplicity, in the following, we write instead of , meaning that two independent Laplace noises are added to the real and imaginary parts of .
Algorithm 3 shows the Fourier perturbation algorithm (FPA) revisited.
4.3. Differences between the Initial, yet Incorrect, FPA, and the Corrected FPA
For a budget of privacy , the differences between the initial incorrect FPA and the corrected one can be highlighted as follows:(1)The DFT used in the initial incorrect FPA  is not normalized, while it is normalized in the corrected FPA. Thus, a factor is missing in the Laplace noise in Algorithm 1.(2)In the initial incorrect FPA , Laplace noises are only added to the real part of the DFT coefficients, while they should be added to the real and imaginary parts of the DFT coefficients as in the corrected FPA (Algorithm 3). Thus, imaginary coefficients are not noised in Algorithm 1.
Figure 4 shows the same aggregated consumption presented in Example 1 and its noisy version using the corrected FPA (Algorithm 3) with per day and . Figure 4 shows that the corrected FPA obtains a large MRE (), making it useless. The noisy aggregate has negative consumptions and does not contain the peaks present in the original aggregate.
For the sake of simplicity, in the following sections, we use FPA to talk about the corrected version.
5. Clamping Transform Perturbation Algorithm
The intuition behind our approach, “Clamping transform perturbation algorithm,” lies in the perturbation error, caused by the Laplace mechanism, which depends on the sensitivity of the sum of consumptions. As such, by reducing the sensitivity, we expect to reduce the perturbation error.
To estimate the sensitivity of consumptions, we split our database of users into two almost equal parts: corresponding to the consumptions of the first half of users (a training dataset) and containing the second half of users’ consumptions (a validation dataset). Using , we compute the distribution of users’ consumptions in the frequency domain. We denote by the maximum magnitude (by ignoring outliers) of the first coefficients.
For example, using the Irish consumption database , the distribution of the individual consumption of the first half customers (from 1 to 1818) in the frequency domain is given in Figure 5. In Figure 5, the maximum magnitudes (rounded) of the 5 first coefficients are .
The database is used for testing our methodology. Let with for all be the users’ individual consumptions. To publish the sum of consumptions , our methodology, which can be applied to either the Fourier transform or to wavelet transforms, is described as follows:(1)For all individual consumptions (), compute the corresponding magnitude in the domain of the transform and keep the first coefficients denoted by .(2)If the modulus of coefficient is greater than (), replace with so that all coefficients have a modulus smaller than and their phase, if the coefficient is complex, is unchanged.(3)Compute the sum of coefficients .(4)Add a noise following the distribution of Laplace , depending on the sensitivity of the transform, to each coefficient of . The result is denoted by . We note that the Laplace noise is added to the real and imaginary parts of each coefficient when the DFT is used.(5)Pad the vector by zeroes and compute the inverse transform to obtain the noisy version of the consumption .
Section 5.1 presents an adaptation of this methodology using the discrete Fourier transform.
5.1. Clamping Fourier Perturbation Algorithm
This section describes the clamping Fourier perturbation algorithm (CFPA) detailed in Algorithm 4. This algorithm allows an aggregator to compute and publish an aggregate guaranteeing differential privacy.
CFPA takes as inputs the individual time-series consumptions of consumers, the maximum magnitudes of DFT coefficients of individual consumptions (computed over database ), the number of DFT coefficients to be considered, and the privacy budget , and it returns the noisy time-series sum of consumptions of consumers.
Step 1, called clamping, computes the first DFT coefficients of each individual time-series consumption. If the magnitude of a coefficient is greater than the maximum magnitude , then this coefficient is clamped and replaced by , in which magnitude is . Thus, for all individual consumptions , the maximum magnitude of the first DFT coefficients is , i.e., the final values of the coefficients have the same phase as the initial values, but their magnitudes are bounded by .
After computing the first DFT coefficients of each individual time-series consumption of consumers (), Step 2 consists in computing the sum of these coefficients using the Laplacian mechanism. The result is denoted by .
Finally, the noisy sum of consumptions is equal to the inverse of the noisy DFT coefficients padded with zeros.
Theorem 3. Algorithm CFPA is -differentially private.
Proof. To prove that Algorithm 4 is -differentially private, we need to prove that the sensitivity of the sum of DFT coefficients of users’ individual consumptions (resp. ) is (resp. ). This is done in Lemma 2.
Then, as a Laplacian noise is added to each component (), the resulting (resp. ) is -differentially private. Finally, the composition theorem  guarantees that any computation on the components of is -differentially private; thus, the inverse DFT of those coefficients is -DP.
Lemma 2. Let be the first DFT coefficients of the individual consumption of consumer (), obtained after the clamping mechanism. The sensitivity of the sum of each DFT coefficient () of consumers’ individual consumptions is .
Proof. Let . After the clamping, the magnitude of each DFT coefficient is smaller than for , and the sensitivity of the function defined by , with being equal to
For example, Figure 6 shows the same aggregated consumption presented in Example 1 and its noisy version using CFPA (Algorithm 4) with per day and . Figure 6 shows that CFPA obtains a good utility with an MRE equal to . This good utility of CFPA can be explained by the fact that Laplace noise added in CFPA depends on the amplitude of each coefficient, while in FPA, the same noise is added to every DFT coefficients, where is the maximum consumption in the dataset.
5.2. Clamping Wavelet Perturbation Algorithm
The clamping wavelet perturbation algorithm (CWPA), as presented in Algorithm 5, is obtained by replacing DFT with DWT in Algorithm 4. The computation of DWT is based on multiresolution analysis which determines the number of approximation coefficients (scaling functions) and detail coefficients (wavelet functions) . DWT takes as input a time-series of length a power of 2. If the input’s length is not a power of 2, we can pad it with zeroes .
Algorithm 5 takes as inputs the maximum magnitudes of the first DWT coefficients which are obtained in the training process on , by computing the distribution of DWT coefficients of individual consumptions.
We note that there are multiple DWTs, such as Haar, Daubechies, Symlets, and Coiflets. In this paper, we use Haar and Daubechies wavelets as shown in Section 6, because they give a low reconstruction error, as will be discussed in Section 6.1.
Theorem 4. The clamping wavelet perturbation algorithm (CWPA), Algorithm 5, is -differentially private.
Proof. The proof is similar to the one for Theorem 3. We need to prove that the sensitivity of the sum of DWT coefficients of users’ individual consumptions (resp. ) is (resp. ). This is done in Lemma 3.
Then, as a Laplacian noise is added to each component (), the resulting (resp. ) is -differentially private. Finally, the composition theorem  guarantees that any computation on the components is -differentially private; thus, the inverse DWT of those coefficients is -DP.
Lemma 3. Let be the first DWT coefficients of the individual consumption of consumer (), obtained after the clamping mechanism. The sensitivity of the sum of each DWT coefficient () of consumers’ individual consumptions is .
Proof. Let . After the clamping, the magnitude of each DWT coefficient is smaller than for , and the sensitivity of the function defined by is equal to
For example, Figure 7 shows the same aggregated consumption presented in Example 1 and its noisy version using CWPA (Algorithm 5) with Haar wavelet, per day and . However, Figure 3 shows that the MRE of CWPA is still higher than . We explain this result in Section 6.
6. Experimental Results
This section compares FPA, CFPA, WPA, and CWPA and explains through experimentations why CFPA achieves a better utility than other publication techniques. After presenting the raw results, we explain them by decomposing the mean relative error into a perturbation error, caused by the clamping mechanism and the Laplace mechanism, and a reconstruction error, due to ignoring coefficients of the transform. The analysis of the error is thus conducted in the next two Subsections 6.1 and 6.2. Section 6.1 analyzes the reconstruction error, while Section 6.2 analyzes the perturbation one. Conditions: the experiments rely on data originating from the Irish Commission for Energy Regulation (CER) . This dataset contains real time-series consumptions. The achieved results are valid for this very specific case, for Irish consumptions with an Irish weather being never too hot or too cold. The results show that the approach is good, but will probably have to be adapted for other datasets, i.e., by computing the maximum magnitudes of the first coefficients of the considered transform over a subpart of the dataset. Consumption data from the CER were collected every 30 minutes from 2009 to 2010 with the participation of more than Irish homes and businesses. This experiment only considers homes. We divided the database in two parts: , corresponding to the first half of consumers (1 to 1818), and , corresponding to the second half (1819 to 3639). is used to calibrate the algorithms by computing the maximum magnitudes of the first coefficients in the frequency domain, and is used to test the publication techniques FPA, CFPA, WPA, and CWPA. Notations: we note as the number of homes or smart meters considered in the district to compute the time-series of the sum of consumptions. For each day (48 time slots), we compute the sum of consumptions of 50 different districts of random homes, and we execute FPA, WPA, CFPA, and CWPA with privacy budget for each day and . The discrete wavelet transforms used here are Haar transform (which represents the same wavelet as Daubechies with order 1, noted db1), Daubechies with order 2, and Daubechies with order 3, respectively, noted db2 and db3. Raw results and analysis: Figures 8 and 9 show the distribution of the mean relative estimation error (MRE) according to the number of homes in the district ( from 50 to 450) and from 5 to 12 for the budget of privacy and , respectively. The boxes extend from the lower to upper quartile values of the MRE, with a line at the median and a triangle representing the mean. The whiskers extend from the box to show the range of the MRE. In order to make consumption forecasts, an MRE lower than 10% is required in practice by experts in the energy sector. In this section, an MRE of less than 10% is therefore considered useful.
In Figures 8 and 9, the first column corresponds to the comparison between the FPA and the CFPA. The other columns correspond to the comparison between the WPA and the CWPA using Haar wavelet with 2 approximation coefficients, Daubechies 2 (db2) with 5 approximation coefficients, and Daubechies 3 (db3) with 10 approximation coefficients, respectively.
Figures 8 and 9 show that CFPA has a better utility than FPA. For example, for (Figure 8), when and the number of homes , the MRE of CFPA is , while the MRE of FPA is . In that configuration, the MRE of CFPA is 6.25 times lower than that of FPA. Similarly, the CWPA obtains a better utility than the WPA. For example, for and the number of homes , the MRE of CWPA using Haar wavelet is , while the MRE of the WPA is . In that configuration, the MRE of CWPA is 2 times lower than that of WPA.
Generally, the larger the size of the district , the smaller the MRE is. Similarly, the larger the budget of privacy , the smaller the MRE is; Figure 9 () shows a better utility than Figure 8 (). However, Figures 8 and 9 show that WPA and CWPA using db3 are not useful for because, as shown in Section 6.1, the reconstruction error is high (between and ).
Figures 8 and 9 show that for larger , the MRE of WPA and CWPA using db3 is smaller. Moreover, in Figure 9, for and when the number of homes is higher than 250 and , CWPA using db3 has the median of MRE smaller than . The CWPA using Haar wavelet obtains the second best utility, with the median of MRE smaller than when is greater than 250, while the CFPA gets the best utility, with the median of MRE decreasing to when and .
However, the utility of FPA and WPA decreases when increases. This is caused by the perturbation error; indeed, the greater the , the greater the Laplacian noise added to each coefficient is. This noise is attenuated by the clamping as shown by the CFPA. Indeed, when goes from 5 to 8, the reconstruction error decreases and the clamping also decreases the perturbation error leading to the total error reduction. However, when goes from 8 to 12, although the reconstruction error decreases, clamping does not reduce the perturbation error sufficiently. This explains why the MRE of CFPA is a little bigger when compared to .
In Figures 8 and 9, we notice that the median of MRE of WPA and CWPA converge to a threshold and never goes below it. For example, for and , the median of MRE of WPA and CWPA using db2 converges to . This is caused by the reconstruction error.
6.1. Reconstruction Error
The reconstruction error is due to considering only the first transform coefficients, thus removing the precision brought by coefficients (). To measure this error, a first solution consists in computing the cumulative distribution function (CDF) of the coefficients as a first assessment of the impact of the transform coefficients and, then, to get confirmation through some experimental reconstruction error measurements. Intuitively, if the CDF of some coefficients is close to 1, it means that the coefficients after () have less impact on the reconstruction, and thus, when set to zero, lead to a smaller reconstruction error.
The CDF is computed for a district of 50 homes of several transformations: discrete Fourier transform (DFT), discrete wavelet transform (DWT) using Haar, and Daubechies 2 and Daubechies 3 wavelets. The closer to 1 the cumulative distribution function at is, the smaller the reconstruction error is. Figure 10 compares the cumulative distribution function of DFT and DWT with different wavelet transforms. This figure shows that DFT has a higher cumulative distribution than DWT for the considered range value of ().
In order to analyze this error more precisely, we define formally the reconstruction error below, and we then compute it experimentally.
Definition 4 (reconstruction error). Let be a sum of time-series consumptions and be the coefficients in the frequency domain of this time-series. We denote as the first coefficients padded with zeros and as the inverse of (in the time domain). The reconstruction error (RE) of is equal to the mean relative estimation error between and given by (we add 1 to the denominator in order to avoid the division by zero)
Figure 11 shows the reconstruction error for DFT and DWT with different wavelet transforms for a district of 50 and 450 homes. This figure shows that the DFT obtains the smallest relative error (lower than when is greater than 5) followed by Haar and Daubechies. We note that the reconstruction error of Daubechies 2 is higher than when , which leads to a total error higher than and justifies the relative error obtained in Figures 8 and 9.
According to the database from the Irish Commission for Energy Regulation (CER) , the discrete Fourier transform gets the smaller reconstruction error, followed respectively by Haar (which is the same as Daubechies 1) and Daubechies 2 and Daubechies 3 wavelets.
6.2. Perturbation Error
The perturbation error is caused by the Laplace mechanism, applied on the first transform coefficients. The higher the transform coefficients, the lower the impact of this perturbation in terms of relative error, and thus the lower the perturbation error.
We note that the amplitude of the Laplace noise introduced by the Laplace mechanism is different for CFPA and CWPA; it is times greater for CFPA than for CWPA. Indeed, for all , the parameter for the Laplace noise is for CFPA and for CWPA. Moreover, in the CFPA, coefficients (the real and imaginary parts of the DFT coefficients) are noisy while only coefficients are noisy in the CWPA.
For a district of 50 homes, we compute the distribution of the magnitude of DFT and DWT with Haar amd Daubechies 2 and 3 wavelets, and we compare their coefficient distribution median in Figure 12.
Figure 12 shows that the coefficient values vary according to the values of and the considered transforms. For instance, when is in the interval , Daubechies 3 obtains the highest magnitudes of coefficients, followed by Daubechies 2 and DFT.
In clamping perturbation algorithms (CFPA, CWPA), the clamping mechanism allows to add a noise proportional to the modulus of the coefficients of the considered transform (DFT, DWT). This reduces the impact of noise compared to perturbation algorithms (FPA, WPA); however, at the price of a perturbation error induced by the clamping of the coefficients. Formally, the perturbation error of clamping perturbation algorithms (CFPA, CWPA) is defined as follows:
Definition 5. Perturbation error for clamping perturbation algorithms (CFPA, CWPA).
Let be the individual time-series of energy consumptions of homes, with for . The sum of time-series consumptions is noted as . For all , we note as the result of the considered transform of the time-series consumption whose first coefficients have been clamped. We note as the maximum magnitude of the first coefficients of the considered transform. Let be the sum of coefficients of the considered transform by perturbing only the first coefficients, with (respectively ) for CFPA (respectively for CWPA), for .
Let be the inverse transform of . The perturbation error of equals to the mean relative estimation error (MRE) between and , given by(we add 1 to the denominator in order to avoid the division by zero). For CWPA, the Laplace noise must be replaced by for and the DFT by the DWT,
The perturbation error depends on the following parameters, ,