Joint Matrix Decomposition-Based Missing Data Completion in Low-Voltage Area

In-depth mining and analysis of electricity data in low-voltage area are essential for the further intelligent development of power grids. However, in the actual data collection and measurement of low-voltage area, there will be missing data, and complete electricity data cannot be obtained. To obtain complete power data, this paper proposes a low-voltage station area missing data complement model based on joint matrix decomposition. First, we analyse the characteristics of the low-pressure station data. -en, a model that comprehensively considers the characteristics of the low-voltage station area data is proposed, which includes three parts: the construction of a low-voltage station area data tensor, the joint matrix decomposition, and the completion of the missing data, and it is named LPZ. After that, the CIM learning algorithm proposed in this paper is used to iteratively solve the model to obtain the completed data. Finally, the method proposed in this paper is used to complement the two situations of random loss and all-day loss of real current data in a low-voltage station area and compared with the traditional complement method. -e experimental results show that this method is not only effective but also that the completion effect is better than that of other completion methods.


Introduction
In recent years, with the continuous advancement of intelligent power grid construction, in-depth mining and analysis of electricity data have become increasingly important [1,2]. Electricity data contain a large amount of electricity consumption data information. rough in-depth mining and analysis of electricity consumption data, various advanced applications, such as electricity demand and electricity price setting, can be realized to provide support for the safe and efficient operation of the power grid [3][4][5].
As an important part of the power grid, the low-voltage station area, in-depth mining, and analysis of its electricity data will become the key to further intelligentization of the power grid, which has important significance for the future [6].
To successfully realize the in-depth mining and analysis of the electricity data of the low-voltage station area, it is necessary to maintain the integrity of its electricity consumption data as much as possible. In the actual process of the low-voltage station area, the data are missing due to equipment damage, weather conditions and other reason, causing a sharp fall in the quality. For example, the data in the literature [7] have a missing rate of multiple attributes exceeding 50%, and there are missing data almost in every record. erefore, in the in-depth mining and analysis of electricity data, it is necessary to process the missing data with the known data [8,9].
At present, scholars at home and abroad have carried out some researches on the methods of completing missing data. Literature [10] attempted to complement the synchrophasor measurement data of the synchrophasor measuring device using the matrix filling method. However, as low-voltage station area power data have different characteristics from synchronized phasor measurement data, that is, the similarity of the power consumption data of each user is quite different, it is difficult to directly apply the matrix filling theory to achieve the repair effect. Literature [11] utilized an adaptive neuro-fuzzy inference system model to complement and optimize the missing power data based on the traditional single data completion method (such as interpolation). e aforementioned methods require a large amount of data for pretraining. us, a small sample size may lead to unsatisfactory effect of completion. Literature [12] uses the KNN completion algorithm to complete missing values. Although the KNN completion algorithm is simple, intuitive, and easy to implement without the need for prior knowledge, the accuracy of its completion depends on the average value of the neighboring sample data. Literature [13] based on the single-value missing data completion method of nonlocal averaging method proposed a multivalue missing data completion method using spatial neighbor BP (backpropagation) mapping to achieve higher precision data completion. However, this method does not consider the timing of the data to be completed. Literature [14] considered that in the actual system, a subset of the data may have stronger relevance, and proposed a new local tensor completion model. is model uses the stronger local correlation of the data to form and restore each subtensor with a lower level to achieve accurate data recovery. However, this method cannot achieve data completion when there is less correlation between the data. Literature [15] adopted the machine learning-based method to perform missing value completion. Although this type of method performs well in accuracy, it is necessary to learn the complete data sequence, and it is difficult to find the complete sequence training parameters in actual search.
Given the above problems, this paper proposes a lowvoltage station data completion method based on joint matrix decomposition based on the characteristics of the low-voltage station area electricity data. First, we analyse the characteristics of the low-pressure station data. en, a model that comprehensively considers the characteristics of the low-voltage station area data is proposed. e modified model includes three parts: the construction of a low-voltage station area data tensor, joint matrix decomposition, and completion of the missing data, and it is named LPZ. After that, the CIM learning algorithm proposed in this paper is used to iteratively solve the model to obtain the completed data. Finally, through the verification of real current data of a low-voltage station area, the effectiveness of the method proposed in this paper is obtained, and compared with the traditional complement method, the superiority of the method in this paper is obtained.

Analysis of the Characteristics of Electricity
Data in Low-Voltage Area e low-voltage station area electricity data mainly include the voltage, current, active power, reactive power, and other data of each user in the station area [16]. e data mainly have the following characteristics: (1) Periodicity. Generally, the power data of low-voltage area shows periodic changes over several consecutive working days; that is, on consecutive working days, the electricity consumption behavior of each user shows a similar periodic law. As shown in Figure 1, on different working days, the current curve of a user in the station area has a similar trend. (2) Sequentiality. User data all appear in the form of data streams, which are sequentially collected, transmitted, and stored at equal time intervals. e data analysed in this paper are based on a sampling interval of 30 minutes, and 48 points of data are collected a day. e data graph with the sampling interval as the time window is shown in Figure 2.
(3) Spatial Correlation. In the power system, different users are connected through the network topology of the station area, and the power load between different users has a certain correlation, especially when a high-power electrical appliance starts or malfunctions. e performance will be more obvious. erefore, it is necessary to consider the multiuser spatial correlation of the station area data to complete the missing data of multiple users.

Model Structure.
According to the analysis of the characteristics of low-voltage station area electricity data, we conclude that the low-voltage station area data contain three characteristics: periodicity, time series, and spatial correlation. erefore, we propose a model that comprehensively considers the data characteristics of the low-voltage station area to solve the problem of data completion in the lowvoltage station area and name it LPZ. Specifically, first, we design the organization of electricity data. e electricity consumption data sequence of all users in the low-voltage station area is organized into a tensor, which can not only mine potentially related information from different patterns but also ensure the original characteristics of the station area electricity data. Next, we propose a joint decomposition module [17] that extracts the day-time interval matrix and the user-time interval matrix from this tensor and then decomposes all the extracted matrices, that is, an original matrix is expressed in the form of the product of two lowdimensional matrices to form an expression of all users, days, and time intervals. Furthermore, to mine the characteristics of the temporality of the data, we added a local restriction to the joint decomposition module. e restriction condition we adopted here is to make the predicted value of the target value close to the predicted value of the adjacent time interval. e LPZ architecture is shown in Figure 3, including three parts: construction of a low-voltage station area data tensor, joint matrix decomposition, and missing data completion. Among them, the two decomposition modules in the joint decomposition matrix provide the characteristic expression of users, days, and time intervals by mining potential factors, and both decomposition modules are affected by local restrictions, which makes the model consider the period of low-voltage station data. It is also possible to 2 Mathematical Problems in Engineering    mine and utilize the temporality of data as well as spatial and spatial relevance.

Constructing the Data Tensor of the Low-Pressure Station
Area. Based on the characteristics of low-voltage station area electricity data, we designed the input of the model. First, we assume that the power consumption data of user i in time interval j on day k is c i,j,k ; then, the power consumption data sequence obtained by user i in chronological order is S i � < c i,0,0 , . . . , c i,j,0 , c i,0,1 , . . . , c i,J,1 , . . . , c i,J,K > , where J is the number of time intervals in a day and K represents the number of days. We fold it into K vectors, and each vector contains the electricity consumption data of the user at various time intervals in a day. en, these vectors are integrated to form a two-dimensional matrix form, as shown in equation: Performing a folding operation on the electricity consumption data sequence of I users can obtain I two-dimensional matrices. en, we integrate them into a threedimensional tensor (user, time interval, and day) and use it as input to the model. is input not only maintains the characteristics of the original data but also makes the tensor pattern closely related to the characteristics of the lowvoltage station area electricity data.

Joint Matrix Factorization.
Due to the regularity of people's activities, on a continuous working day, a user's electricity consumption data will generally show periodic changes. To model the periodicity of user electricity data, we extract the number of day-time interval matrix C i from the electricity data tensor C and learn the temporality from C i through matrix decomposition. en, hidden factors are introduced, and matrix C i is decomposed into two lowdimensional matrices P i ∈ R K×F and Q i ∈ R J×F , where F is the number of hidden factors. In addition, each day k is related to a vector p k ∈ R F . Similarly, each time interval j corresponds to a vector q j ∈ R F , where the similarity between the electricity consumption data of different days or different time intervals can be captured in a potentially lowdimensional space.
us, the predicted value c i,j,k of the power consumption data c i,j,k of user i in time interval j of day k is obtained, which is represented by the inner product p k · q j . At the same time, the electricity consumption data series of different users will also be correlated. erefore, we also decompose the user-time interval matrix C k to explore the spatial correlation of electricity consumption data. All users and time intervals are mapped to a low-dimensional space. In this latent space, S k ∈ R I×F represents all users, and T k ∈ R J×F represents all time intervals. Moreover, each user i corresponds to a vector s i ∈ R F , and each time interval j corresponds to a vector t j ∈ R F . us, the predicted value c i,j,k of the power consumption data c i,j,k of user i in time interval j of day k is obtained, which is expressed by the inner product s i · t j . To obtain more accurate prediction results, when predicting the missing low-voltage station data, we combine the two matrix decomposition modules to take periodicity and spatial correlation into account at the same time.
In addition, the electricity consumption data of a certain time interval have a strong correlation with the electricity consumption data of the surrounding time interval. erefore, we introduce local constraints into the joint matrix factorization process. In the process of decomposing the number of day-time intervals, we also need to minimize the difference between the predicted value of the target electricity consumption data and the mean value of the surrounding time interval, as shown in the following equation: where W is the window size, and ω � 1, 2, . . . , W.
Similarly, a local restriction is also added in the decomposition process of the user-time interval matrix, as shown in following equation: where W is the window size, and ω � 1, 2, . . . , W.
In summary, the low-voltage station area data contain three characteristics, namely, periodicity, time series, and spatial correlation. In addition, the collected data contain a large number of missing values, causing data sparsity problems. erefore, we design and use the joint matrix decomposition module to model the periodicity and spatial correlation, respectively. At the same time, we set local constraints based on the spatial correlation to restrict the joint decomposition module. In this way, the three features can work synergistically when completing missing values.

Completion of Missing Data.
rough joint matrix decomposition, we can obtain the hidden factor matrices P i and Q i of user i and the hidden factor matrices S k and T k of the number of days k. Finally, we obtain four-parameter tensors, namely, P ∈ R K×F×I , Q ∈ R J×F×I , S ∈ R I×F×K , and T ∈ R J×F×K . Using these factor tensors can realize the completion of the original incomplete matrix. Here, we use a simple regression method to combine the two partial results and use it as the output of the joint matrix factorization module. e weight β is set to control this combination process, where the weight β represents the periodic force, and (1 − β) represents the weight of the spatial correlation in the missing value prediction process.
is linear fitting process enables LPZ to reasonably weigh the characteristics of the low-voltage station area data, thereby obtaining a complete low-voltage station area electricity data tensor.
us, the prediction formula of the missing value shown in formula (4) is obtained: where P k,:,i ∈ R F is equivalent to p k ; Q j,:,i ∈ R F is equivalent to q j ; S i,:,k ∈ R F and s i are equivalent; and T j,:,k ∈ R F is equivalent to t j .

Objective Function and Parameter Learning.
We establish the model objective function by minimizing the square difference between the true value of the low-voltage station area electricity data and its estimated value. Given a low-voltage station area electricity data tensor C, this tensor contains a large number of missing values. Our model can mine multiple features of the low-voltage station area electricity data and generate one and the original tensor based on the known values in the tensor, completely estimating tensors with the same shape to realize the task of complementing low-pressure station area data. For simplicity, we set a binary mask M; this mask tensor corresponds to the original tensor, and its value is also determined by the value of the element at the corresponding position in the original tensor. In the masking tensor, the missing element in the original low-voltage station area electricity data tensor has a value of 1, and the observed element position is 0; that is, through the masking tensor M, we can clearly know the missing values in the original tensor, and the position of the observation value is formulated as the following equation: erefore, the missing value in the original matrix can be expressed as M ⊙ C, and the observed value can be expressed as (1 − M) ⊙ C. e objective function can be defined as the following formula: where ⊙ represents the point multiplication operation, ‖ · ‖ F represents the Frobenius norm, λ‖θ‖ 2 represents the regularization term to prevent overfitting, and θ represents all parameter tensors. According to the description in the previous two subsections, to consider the periodicity and spatial correlation of the low-voltage station area data at the same time, we designed a joint decomposition module and added local restrictive constraints in the decomposition process so that LPZ can consider the electricity data at the same time. Here, we use the linear fitting method to combine the local results of the two decomposition models to obtain the objective function shown in the following equations:  Mathematical Problems in Engineering It should be noted that in the completion process, due to the role of the masking tensor M, only observations are used to train the model. However, to simplify the objective function, in formulas (7) and (8), we omit the masking tensor. According to formula (1), we can find that in the original tensor, a known low-voltage station area electricity data element will affect the four-parameter tensors. In addition, the predicted value is not only the combination of the results of the two decomposition modules but also the constraint of local limitation; that is, the predicted value of the low-pressure station area data is affected by the real value related to it and the predicted value of the surrounding time interval at the same time. e matrix extracted from the original tensor has the problem of data sparsity, which can be solved by using nonnegative matrix factorization, and its nonnegativity ensures the interpretability of the learned parameter tensor.
After clarifying the objective function of LPZ, we will next introduce in detail how to estimate the parameters. Compared with the stochastic gradient descent method [18], the alternating least squares method is easier to adjust and highly parallelizable [19]. erefore, in this article, we refer to the alternating least squares method for parameter estimation. During the training process, the observations will be used to update the model parameters iteratively until the objective function converges. In one iteration, all samples in the original tensor will be traversed once, and at the same time, the four-parameter tensors will be updated with one sample each time. Here, a known element in the tensor is a training sample. e parameters to be trained are the four-parameter tensors of the model. Here, we separately calculate the objective function for each vector P k,:,i , Q j,:,i , S i,:,k , T j,:,k . e partial derivative and the result are shown in the following formulas: Among them, D (1) j,:,i and D (2) j,:,i are auxiliary variables. e tensor D (1) ∈ R J×F×I corresponds to Q. D (1) j,:,i ∈ R F is the difference between the expression of time interval j and the mean value of the surrounding time interval. Its formula is shown in (13). Similar to D (1) , the tensor D (2) is also used to describe the difference in time interval expression, and D (2) j,:,k ∈ R F . e difference is that D (2) ∈ R J×F×I corresponds to T, and the time interval expression used by D (2) j,:,k is generated based on spatial correlation. e formulaic representation is shown in (14).
where W is the window size, and ω � 1, 2, . . . , W, that is, the power data of a certain time interval will be affected by the time interval before and after it. e process of parameter update is iterative. Referring to the update process of the alternating least squares matrix decomposition, we set the gradient to 0 to derive the parameter update formula, as shown in the following equations: Specifically, in an iterative update, the tensors Q, S, and T are fixed first, and the row vector of the tensor P is updated according to the above formula. After updating of the P is completed, P, S, and T are fixed to update Q row by row. Next, S and T are updated separately in this update mode. Obviously, because for an update of a parameter tensor, the update between the row vectors does not affect each other, this process is highly parallelizable, which can greatly speed up the training speed of the model. In one iteration, the fourparameter tensors will be updated separately according to formulas (15)- (18) and continue until the objective function converges. It is worth noting that this update method does not guarantee the nonnegativity of the parameter tensors P, Q, S, and T. Because our objective function is continuous, its minimum value should be obtained at the point where the gradient is 0 or the point on the boundary. In this paper, a simple method is used to deal with negative values in the parameter tensor. If there is a value less than 0 in the parameter tensor, set it to 0.

Experiment and Analysis
For the validity of our model, we conducted a large number of experiments on a dataset of a certain station in a distribution network of a certain city in China.
e LPZ is compared with three current data complementation methods, and the experimental results show that LPZ can obtain better prediction results than the current complementation methods. In this section, we first introduce the dataset and experimental settings; second, we use different parameters to evaluate the LPZ model; and finally, we conduct comparative experiments and analyse the experimental results.

Dataset and Experimental Settings.
is section first introduces the dataset used in the experiment and then explains the experimental parameter settings and evaluation indicators.

Dataset.
For the dataset of this experiment, we will use the user current data of a certain station in the distribution network of a certain city in China. e station structure is shown in Figure 5. Here, VLV22 represents the cable model, and 4 × 70 represents 4-core 70 mm 2 . In the actual data collected automatically, the current data of a certain month are randomly selected as the data test set to construct the current tensor. e constructed current tensor contains a total of 142650 (317 × 180 × 25) elements, of which the number of nonzero elements is 1209011. We randomly selected 80% of the nonzero elements as the training set and the remaining 20% as the test set to prove the effectiveness of our proposed model.

Parameter Setting.
In this section, the parameter settings of the LPZ model are mainly discussed, and these default settings are obtained through parameter tuning. In the experiment, we set the default value of the number of hidden factors F to 15; that is, we use a 15-dimensional vector to represent users, time intervals, and days. e weight parameter β is used to control the combining process of the partial results of the two subdecomposition modules, and its default setting is 0.4. e default window size W is 4; that is, the current data of a time interval are affected by 4time intervals before and after it. In the local limit, λ 1 is used to control the influence of sequentiality, and the default value is 0.1. At the same time, for the regularization term coefficient λ, the default value is also set to 0.1.      [20,21]. Given a sparse low-voltage station area data tensor, N represents the total amount of missing data in this tensor, that is, the size of the test set in this experiment. e formula of the evaluation index is as follows: where c i,j,k represents the true value and c i,j,k represents the predicted value. To make the evaluation more convenient, the mask m i,j,k ∈ 0, 1 { }.

Experimental Results and Analysis.
We consider that in the case of random missing electricity data in low-voltage area and long-term missing data due to faults, this paper is verified by analysing the performance of the proposed method under different time granularities and different training set sizes and the results of long-term missing data completion. Based on the effectiveness of the proposed method and comparing the method in this article with three missing current data complementation methods, it is concluded that the method proposed in this article is better than other methods.

Random Missing Data Completion.
To verify the performance of our model, the time interval size was set to 5 minutes, 10 minutes, and 15 minutes, and the experimental results at different time granularities were obtained, as shown in Table 1. It can be seen from the table that as the time interval increases, the evaluation indicators (RMSE and MAE) of the proposed model show a downward trend, and the complement effect continues to improve. is is because as the time interval increases when predicting missing values, more users' power consumption conditions are taken into account, and the prediction effect will be better.
In addition, we also changed the size of the training set for experiments. Taking Δt � 15 minutes as an example, we randomly selected 30%, 50%, 70%, and 90% of the original training set as the new training set for experimentation. e experimental results are shown in Table 2. It can be seen from the table that the complete performance of the proposed model increases with the increase of the training set.
is is because the larger the training set is, the more the available samples can be used to mine user current data information, thereby obtaining more information and leading to accurate completion results. erefore, the method in this paper can effectively complete data completion in practice.

Completion of Missing Data throughout the Day.
A serious failure may occur during the collection or transmission of the power data by the smart meter, which cannot be recovered in a short time, and the user power data may be lost for a whole day [22]. is paper verifies the effectiveness of the proposed method by randomly discarding current data for several days. Figure 6(a) shows the actual data and completion results when a user's data are missing for 7 days throughout the day. It can be seen from the figure that the two curves basically overlap, indicating that the completion effect is better. Figure 6(b) is the area chart of the difference between the complement value and the actual value when the entire day is missing for 7 days. It can be seen from the figure that the missing data can still be prepared for the missing data in the entire day. Table 3 shows the performance data of this method under different missing days. It can be seen from the table that the changes in RMSE and MAE increase with the increase in missing days. When the number of missing days is less than 12 days, both RMSE and MAE are relatively small, indicating that the method proposed in this paper can compensate for the missing days. e entirety is still valid, and the fewer the missing days there are, the better the completion effect. In practice, the missing data will generally be repaired within a week, and the lack of more days rarely happens. erefore, the method in this article is also more applicable in practice.

Experimental Comparison.
e method in this article is compared with three missing current data completion methods (cubic spline interpolation [23], Kalman filtering [24], and tensor completion [25]). Figure 7 shows that the 31-day use of the dataset in the station area is the original complete data. e average absolute error and root mean square error trend are set at 40%-100%. It can be seen from the figure that the completion errors of all methods decrease with the increase of the dataset used. In addition, the accuracy of the station data completion of different methods is also different. e completion error curves (RMSE and MAE) of the three methods of Kalman filtering, cubic interpolation, and tensor completion are all above the joint matrix decomposition completion error curve. at is, when the joint matrix factorization and completion method has the same dataset size, its complete accuracy is higher than that of the other three methods. It is worth noting that the two types of errors are complemented by the joint matrix factorization method; when the dataset size is 50% of the original complete dataset, the error is only approximately equal to 10% of the error of other methods, indicating that the joint matrix factorization method is complementary. Compared with other methods, the whole method is more suitable for the completion of high-deficiency cases. Figure 8 shows the variation trend of the root mean square error and the mean absolute error of the 31-day data of randomly missing all days in the station area from 1 to 12 days. It can be seen from the figure that the errors of all-day missing data completion of all the completion methods Mathematical Problems in Engineering 9 increase with the increase of the number of missing days, and the two error curves of the joint matrix decomposition completion are both below those of cubic interpolation, Kalman filtering, and tensor compensation. e full bottom, that is, the precision, of joint matrix factorization is higher than that of other methods. rough the comparison, it can be seen that the joint matrix factorization completion method has better      be seen that the optimal value of RMSE is obtained when F � 15.
In order to explore the influence of the periodic weight parameter β on the model, the value of β is gradually changed from 0 to 1, while the step size is 0.1. e experimental results are shown in Figure 10. A larger value of β contributes to stronger influence of the relationship between the day and the time interval in the model at this time and better performance of the model. erefore, as β increases, RMSE and MAE gradually become smaller. However, when the value of β exceeds 0.4, the performance of the model begins to gradually decline. is is because the relationship between the day and the time interval is overemphasized in the forecasting process, while the relationship between the user and the time interval is ignored. Here, it is worth noting that β � 0 means that only periodicity plays a role; when β � 1, only spatial correlation is used. From Figure 10, we can find that the performance of LPZ can be significantly improved by considering both periodicity and spatial correlation.
In addition, the value of the window size W is changed to observe its influence on the model performance. e experimental results are shown in Figure 11. In general, the performance of the model will be improved as W increases, because increasing W means that more samples can be used to learn temporality. However, RMSE and MAE begin to gradually decrease, when W is greater than 4.
is phenomenon is caused by the characteristics of timing, that is, the correlation between low-voltage station data at different time intervals will be weakened as the distance increases. erefore, the time span should be selected appropriately to predict the low-pressure station data at a certain time interval. Too large or too small time granularity of the division will affect the accuracy of the model's prediction results. Finally, the performance of the model is analysed under different local restriction weights. As shown in Figure 12, the model performs obviously worse at λ 1 � 0 than λ 1 � 0.1, because no local restriction is added to the decomposition module at λ 1 � 0. is shows that introduction of the time dependency of the relative travel time to the model can improve the performance of the model. When λ 1 is greater than 0.1, the model evaluation index increases with the continuous increase of λ 1 . is indicates that we cannot pay too much attention to the timing. It can be seen from Figures 11 and 12 that simultaneous consideration of the periodicity, spatial correlation, and timing of low-voltage station data can improve the performance of LPZ in the task of missing value completion.

Conclusions
is paper proposes a model that jointly considers the periodicity, time series, and spatial correlation of the electricity data in the low-voltage station area for the problem of the lack of supplementary power consumption data in the low-voltage station area. e model proposed in this paper can reasonably estimate unknown data based on the observation value of limited low-voltage station area electricity data. Aiming at the characteristics of the electricity data in the low-voltage station area, we fold and stack the electricity data sequence into a three-dimensional tensor form and use it as the input of the joint matrix decomposition module. In the decomposition module, we not only model the periodicity and spatial correlation but also add local restrictions to make it subject to timing constraints. To verify the effectiveness of the model, we conducted many experiments on a real dataset and compared LPZ with traditional completion methods (cubic interpolation, Kalman filtering, and tensor completion methods). Experiments show that LPZ can not only complement the missing power data but also that the effect of the complement is better than that of traditional complement methods.
To sum up, the completion method based on joint matrix decomposition proposed in this paper is not only suitable to solve the problem of data missing in low-voltage stations but also other data missing problems. With a wide range of application prospects, this method has the advantage of being less affected by the length of the missing data and the location of the missing data. To a certain extent, improving the accuracy of data completion can contribute to higher accuracy of data mining and analysis. Data completion is essential for data mining and analysis and is also of practical value for load forecasting in the power grid and even for power generation forecasting such as photovoltaic power generation and wind power generation.

Data Availability
e experimental data are obtained by Python simulation, and the experimental result diagram is obtained by MATLAB.