# A Two-Stage Household Electricity Demand Estimation Approach Based on Edge Deep Sparse Coding
## 1 Introduction
In this algorithm, the load curve can be represented as a superposition of several typical modes. In our previous study, an efficient edge sparse coding approach was proposed based on the K-SVD algorithm for extracting hidden behavior patterns from load datasets prior to load estimation to reduce communication, storage, and computation demands. Deep learning has been applied in different industries, including smart grids. Designing deep learning structures for household load profile forecasting applications remains an open research issue in smart meter data analytics [26]. Theoretically, deep learning belongs to a type of special artificial neural network and focuses on extracting high-level features by applying appropriate nonlinear functions to hidden nodes to learn weights or filters in a greedy multi-layer [27]. However, features used for input data preprocessing in [26] were simply related to the sequence of energy consumptions and date, which may not reflect the user's usage pattern effectively. In the current study, a two-stage household electricity demand estimation approach based on edge deep sparse coding was proposed by combining the concepts of deep learning and sparse coding. In the first stage, a 3-layer non-negative K-SVD algorithm with several representative household appliance load data was implemented to extract deep usage behavior patterns (DUBPs) as the input of the load forecasting. The load forecasting model based on long short-term memory (LSTM) was used in the second stage to realize accurate forecasting of household electricity demand. An edge sparse coding architecture to address the data deluge issue was also proposed, which most studies on load forecasting, including [26], did not consider. The deep K-SVD algorithm can be completed in the edge nodes and extracted UUBPs and the coefficient matrix can be uploaded to the cloud computing center for further load forecasting and storage. From the preceding analysis, the contributions of this study were as follows. 1. A deep non-negative K-SVD algorithm, with an initial dictionary that consists of household electricity load, was proposed. This algorithm can extract deeper and more valid usage patterns that are conducive to the analysis and estimation of consumer behavior. 2. An edge sparse coding architecture was proposed to address the data deluge issue. In this architecture, deep sparse coding was completed in the edge nodes and then UUBPs or the coefficient matrix were uploaded to the cloud computing center for storage and estimation. This scheme considerably reduced the amount of data and effectively alleviated the communication and storage burden of the data link. 3. A novel two-stage estimation method for short-term household electricity consumption based on a LSTM network was proposed. Actual meter data were used for verification and simulation, and the results indicated that the proposed method achieved the best overall performance. It provided a considerable and stable improvement in load forecasting accuracy. The remainder of this paper has been organized as follows. Section 2 briefly introduced the rationale for applying the deep K-SVD algorithm to usage pattern extraction and data pretreatment. Section 3 presented the two-stage household electricity demand estimation approach based on the deep K-SVD algorithm with household appliance data and LSTM. The edge sparse coding architecture was also designed for different calculation and storage capacities of edge nodes. Section 4 described the implementation of the experiment and case study using actual AMI data and compared the performance of the proposed approach with previous state-of-the-art methods, namely, autoregressive integrated moving average (ARIMA), multilayer perceptron (MLP), LSTM, LSTM with normal K-SVD, LSTM with 3-layer deep K-SVD algorithm and algorithm proposed in [23]. Finally, conclusions have been drawn in Section 5.