Nonlinear Load Harmonic Prediction Method Based on Power Distribution Internet of Things

A large number of nonlinear loads have an impact on the stable operation of the power system. To solve this problem, this article proposes a nonlinear load harmonic predictionmethod based on the architecture of Power Distribution Internet of)ings. Firstly, this method integrates the characteristics of edge computing technology and Power Distribution Internet of )ings technology and proposes a Power Distribution Internet of )ings framework applied to nonlinear load harmonic prediction, which provides top-level design for subsequent harmonic prediction methods of Power Distribution Internet of )ings; then, considering the electrical characteristics of the typical nonlinear load, the mathematical model of nonlinear load data is constructed based on the harmonic coupling admittance matrix model on the edge side. At the same time, a nonlinear load harmonic prediction model based on dynamic time warping and long-term and short-term memory network (DTW-LSTM) is established in the cloud computing center to realize high accuracy and high real-time prediction and analysis of nonlinear load harmonics. Finally, the simulation results based on the general data set show that the MAE evaluation index of the proposed method is less than 5% in the experimental group, which shows good generalization ability, and has some advantages over the current method in operation efficiency.


Introduction
With the rapid development of electrical technology and the electronic manufacturing industry, power electronic rectifying devices with nonlinear characteristics have been widely used in household appliances [1][2][3], such as energy-saving lamps, battery car chargers, and other electrical appliances, the harmonic distortion rate can reach more than 100%, and the harmonic distortion rate of the low-voltage side of the residential distribution network is nearly 20%, which makes the residential load become a new type of harmonic source [4].
As a small power nonlinear load, household appliances have the characteristics of large number and wide distribution and are an important harmonic component in residential distribution network [5][6][7]. e measured data show that the total demand distortion coefficient of harmonic current on some residential distribution feeders can reach 12%, which makes the residential load become a very important harmonic source [8]. e harmonics generated by harmonic source will lead to the increase of harmonic loss in the residential distribution network, overload of transformer and neutral line, increase of failure probability of electronic equipment, and other problems, which will cause great difficulties in power quality evaluation and stable operation of distribution network [9][10][11]. erefore, in order to ensure the sustainable and stable energy supply of distribution network side, it is necessary and urgent to study an efficient and reliable nonlinear load harmonic prediction method. e traditional load harmonic prediction method adopts a linear modeling method, but it ignores the nonlinear and time-varying characteristics of the actual load [12,13] and can not describe the nonlinear load harmonic variation law, which makes the prediction result deviate greatly.
anks to the continuous promotion and development of the Power Distribution Internet of ings, edge computing technology has made good progress in distribution network situation awareness and operation control [14][15][16]. In the Power Distribution Internet of ings, the distribution cloud master station can decentralize certain computing power to the edge side intelligent distribution terminal [17], realizing the preliminary processing of user state data at the edge side; in the distribution cloud master station, based on big data technology and artificial intelligence technology [18,19], through iterative training and learning of multilayer network model, accurate state analysis and decision control of power system can be realized. erefore, the combination of Power Distribution Internet of ings and artificial intelligence technology can effectively improve the performance of harmonic prediction and analysis for nonlinear load in the distribution system.

Related Work
Nonlinear load is an unstable source in power grid; when a large number of harmonic currents are injected into the power grid, it will cause voltage flicker, frequency fluctuation, three-phase voltage, and current imbalance, which seriously affect the transmission efficiency and the operation safety of equipment [20,21]. Scientific and reasonable prediction and analysis of nonlinear load harmonics can effectively help power companies to formulate corresponding effective transmission strategies and ensure the stable and efficient operation of the distribution system [22]. At present, academic and industrial circles have given full attention to nonlinear load harmonic prediction.
Traditional harmonic load forecasting is mainly based on the circuit structure and electrical parameters of power load for mathematical modeling and analysis, such as the equivalent circuit analysis method [23,24]. e equivalent circuit modeling and analysis method is mainly used to solve the analytical relationship between harmonic voltage and harmonic current by determining the simplified equivalent circuit of load and then deduce the equivalent harmonic model of load. However, it should be noted that the user load in the actual scene has the characteristics of diversity and complexity, so the power supply circuit structure is complex, which makes the equivalent circuit difficult to obtain and the circuit parameters difficult to estimate. ese problems also lead to difficulties in modeling and low prediction accuracy in circuit analysis.
As a product of artificial intelligence technology, big data analysis technology plays a certain role in applying big data decision-making processing, such as power grid operation status monitoring and power transmission and distribution control [25]. Meanwhile, for the distribution network nonlinear load harmonic prediction, its essence is also for the power grid to collect big data to realize calculation and analysis, so some researchers have carried out some research.
In [26], considering the time series characteristics of power grid data, a new method of power grid harmonic prediction and analysis based on long-term and short-term memory network model is proposed. rough multilevel network training and fitting learning of power grid state data, the efficient analysis of power quality is realized. In [27], the load current harmonics injected into the microgrid are predicted based on the Nonlinear AutoRegressive neural networks with eXogenous input (NARX), and the current harmonics caused by the nonlinear load are identified and isolated by the network training and learning of the measured grid data. In [28], a load harmonic analysis method based on a data-driven neural network is proposed. rough the analysis and modeling of load data in the time domain and frequency domain, it can effectively realize the research and analysis of nonlinear load long-term forecasting. In [29], in order to solve the problem of low load forecasting accuracy caused by the nonlinear characteristics of power load, an improved support vector machine model based on empirical mode decomposition and genetic algorithm is proposed to realize accurate load forecasting.
In view of the existing load forecasting research work, this article proposes a nonlinear load harmonic forecasting method based on the Power Distribution Internet of ings architecture. e main contents of this article are as follows: (1) e traditional centralized computing mode of distribution network with the main station as the core has the problem of low efficiency. is article constructs a "cloud, edge, end" three-tier architecture of Power Distribution Internet of ings combined with edge computing technology. Based on the demand of power consumption behavior analysis, the load harmonic prediction analysis framework in the Power Distribution Internet of ings is further proposed, and the data transmission, data processing, and task control mechanisms in the proposed prediction framework are sorted out in turn, which provides complete framework support for the subsequent nonlinear load harmonic prediction method based on deep learning network.
(2) In order to improve the real-time performance and accuracy of nonlinear load forecasting analysis in the distribution system, the harmonic coupling admittance matrix model based on measured data is used to build a mathematical model of user side load at the edge of Power Distribution Internet of ings to solve the problem of difficult modeling caused by complex electrical structure and parameters. Based on dynamic time warping and long-term and shortterm memory network (DTW-LSTM) deep learning network model in the cloud side, the nonlinear load harmonic prediction and analysis can be realized, which can reduce the number of load prediction models to be constructed, make the prediction model have strong generalization ability, and realize the high-precision and low delay prediction of nonlinear load harmonic in the distribution system. e rest of this article is organized as follows. e third section introduces the collaborative architecture of distribution system, including the edge computing architecture of 2 Scientific Programming Power Distribution Internet of ings and the nonlinear load harmonic prediction architecture. In the fourth section, the nonlinear load harmonic prediction method based on deep learning is introduced, including the mathematical modeling of nonlinear load harmonic electrical characteristics on the edge side and the load harmonic prediction method based on DTW-LSTM network model on the cloud side. e fifth section introduces the simulation analysis of the feasibility of the proposed method based on the EUNITE network dataset. e sixth section is the conclusion of this article.

Edge Computing Architecture of Power Distribution Internet of ings.
anks to the concept and technology of edge computing, Power Distribution Internet of ings with "cloud, edge and terminal" three-tier architecture is constructed, as shown in Figure 1.
Among them, "cloud" refers to the cloud-based power distribution master station platform, that is, the distribution cloud master station, which has a variety of global decisionmaking services deployed on the cloud. "Edge" refers to the edge power distribution device, which is close to the end side equipment or data source, and provides edge intelligent services nearby. ere are many microapplications deployed in it (based on the intelligent terminal, the application program that realizes specific business functions through independent development of software, imitating the concept of smartphone). "Terminal" is the main body of state aware and executive control in the Power Distribution Internet of ings architecture, which can monitor, collect, and perceive the basic data such as the operation environment, equipment status, and electrical quantity information of distribution equipment.
Edge computing technology is the core link of the threetier architecture of power distribution networking. It is an open platform between data collection, computation, and application integration between intelligent terminal and distribution cloud master station. It is the carrier and key link of "intelligent terminal self-organization and terminal cloud self coordination." With "edge cloud collaboration and edge intelligence" as the core feature, "edge cloud and cloud gateway" as the main landing form, and "software micro application" as the implementation mode, cloud computing is the extension and evolution of the sink node outside the data center, with the functions of collection, communication, calculation, analysis, and control. rough the deployment of microapplications in the edge power distribution device, we can flexibly upgrade and expand the terminal distribution business functions, make full use of the edge computing architecture advantages of local computing, develop highvalue microapplications, and reflect the application value of the distribution Internet of things.
Referring to the functional architecture of industrial Internet platform, in order to better serve the power distribution industry, the edge layer is further designed into three layers: Edge Computing Infrastructure as a Service (EC-IaaS), Edge Computing Software as a Service (EC-SaaS), and Edge Computing Platform as a Service (EC-PaaS), and the edge power distribution device is taken as the platform carrier.
EC-IaaS layer is the platform layer, which is the basic open platform of edge computing nodes, including hardware platform, operating system, container open platform, communication open platform, and AI engine. It provides unified computing, storage, communication, and system service capabilities for edge intelligent distribution business.
EC-PaaS layer is the software layer, which provides a backplane for all kinds of software operation, realizes data interaction and management, and supports application management monitoring, microapplication services, messages and events, data storage, and management software. At the same time, in order to meet the technical requirements of the "plug and play" of distribution network equipment, the plug and play service is used as the software layer to provide the basis for other applications.
EC-SaaS layer is the application layer, which is a microapplication service developed and deployed according to the demand of the distribution business. It is a specific way to implement the edge computing technology of distribution network. rough data collection or data cloud, end-to-end collaboration meets the operation and maintenance and power demand and provides data agent services for data interaction. e edge power distribution device on the edge side mainly consists of two functional layers, namely, the management layer and the security layer. e management layer of the edge power distribution device is responsible for supporting remote and local software upgrade, user setting, password policy configuration, log audit configuration, management configuration of the edge computing node, and supporting system status monitoring and query. e security layer is responsible for controlling the access rights of system users, controlling the local or remote access of data, and verifying the legitimacy and integrity of the data source of the update package during software upgrade.

Nonlinear Load Harmonic Prediction Framework.
Based on the analysis of the network characteristics of the current distribution network, we can see that the amount of power distribution equipment is quantified, and the distribution monitoring data is also high-dimensional.
is requires efficient edge devices to realize data preprocessing before uploading to the cloud, which can ensure real-time and efficient analysis of power consumption behavior in the cloud, so as to support the steady-state operation of the increasingly large Internet of ings. is coincides with the analysis concept of "cloud, edge, end" architecture of Power Distribution Internet of ings proposed in the previous content. e specific network model architecture of nonlinear load harmonic prediction analysis framework is shown in Figure 2. e load forecasting model of Power Distribution Internet of ings is divided into three layers: distribution Infrastructure layer on the terminal side, intelligent distribution equipment layer on the edge side, and distribution cloud master station.
Among them, the network terminal side of the Power Distribution Internet of ings includes the power consumption equipment and monitoring equipment in the distribution network, which mainly involves the collection and transmission of sensing data and load data near the user side. e network edge side of Power Distribution Internet of ings is set as the edge network facilities of smart grid, such as smart substation, which carries out centralized preprocessing for the data uploaded by power terminal equipment. e cloud is the data center, which can carry out large-scale load harmonic prediction and analysis in its intelligent algorithm to support the steady-state operation of an intelligent distribution network.
In order to better support the harmonic prediction of nonlinear load in the distribution network, this article will elaborate and analyze three mechanisms of distribution network data transmission, data processing, and task control: (1) Data transmission mechanism: data transmission mainly focuses on data acquisition and screening of load forecasting. A large number of IoT sensing devices are deployed in the power distribution IoT system [30]. erefore, these sensing devices can transmit the temperature, humidity, weather conditions, and other data to the edge power distribution device to achieve multitime and multistate load data recording. e essence of an edge power distribution device is an edge computing node, which not only undertakes the function of collecting sensing data but also can sense and classify the content of data. e edge power distribution device transmits the processed data and the data that need to be transferred to the cloud side to the distribution cloud master station and realizes the task of big data storage and data operation on the cloud side. At the same time, the distribution cloud master station will also transmit the historical data needed by the edge side calculation to the edge power distribution device.
(2) Data processing mechanism: data processing mainly studies the data processing of load forecasting in the Power Distribution Internet of things under the cloud side architecture. e direct prediction of the load at any time will cause the number of neurons in the hidden layer to be too large, resulting in reduced computation efficiency. erefore, a short-term load forecasting method based on deep learning is proposed. In the edge computing environment, the data processing tasks with low energy consumption and high delay requirements are deployed on the edge side of the Power Distribution Internet of ings (such as mathematical modeling of load electrical characteristics), and the data processing tasks with high energy consumption and low delay requirements are deployed on the cloud side of the main station (such as load forecasting and analysis behavior). Based on the cloud edge collaborative processing method, the computing tasks are distributed to the edge power distribution device, which can not only reduce the data transmission but also make the edge power distribution device closer to renewable energy, which can achieve more efficient and accurate load forecasting analysis.
(3) Task control mechanism: task control mainly focuses on the scene of load forecasting task of edge power distribution devices and distribution cloud master station in the Power Distribution Internet of ings. By scheduling the load forecasting tasks, the delay and power consumption of the forecasting system can be reduced to improve the performance of the forecasting system.

Nonlinear Load Harmonic Prediction Method Based on Deep Learning
In order to achieve high accuracy harmonic prediction for user's nonlinear load, firstly, based on the admittance matrix model, the mathematical model of harmonic electrical characteristics of nonlinear load is established at the edge side. en, based on the harmonic prediction architecture of Power Distribution Internet of ings, the deep learning algorithm is used to achieve efficient prediction and analysis of user's load harmonic at the cloud side.

Modeling of Harmonic Electrical Characteristics of Edge
Side Nonlinear Load

Harmonic Characteristic Analysis of Nonlinear Load.
In order to study the harmonic generation of nonlinear loads of household appliances, the data of 21 loads and 28 different operation modes are measured, as shown in Table 1.
In order to classify the measured household loads, total harmonic current distortion (ITHD) and rate of harmonic decay (RHD) are used as the measurement indexes. e calculation formula of RHD is as follows: where I h is the h-th harmonic current amplitude; I 1 is the fundamental current amplitude; h RHD is the harmonic attenuation rate of the h-th harmonic. Due to the variety and irregularity of current waveforms of household nonlinear load, this article obtains the RHD of each load based on the measured data of load. e load of household appliances is further classified as follows: (1) power electronic household load with singlephase rectifier bridge (RHD is 0.32 ∼ 0.8, current waveform is generally spike pulse shape); (2) the current waveform does not have typical characteristics (RHD is 0.8 ∼ 1.2, the current waveform does not have typical characteristics); (3) the motor household load supplied by single-phase rectifier bridge (RHD is 1.2 ∼ 2.73, current waveform is similar to triangle wave). For multistate nonlinear load, each state can be modeled according to the actual data.

Mathematical
Model. Based on the above analysis, it can be seen that different types of nonlinear household loads have large differences, and it is difficult to model the nonlinear load data by using the circuit model analysis method because of the complex electrical structure and the difficulty in unifying the parameters.
In the past, the constant current source model was used to simplify the influence of the supply voltage on the load harmonic current so that the spectrum of the harmonic source cannot follow the change of the supply voltage. erefore, the harmonic load sensitive to the supply voltage will produce large errors, especially the load of household appliances with rectifier and inverter. e higher the distortion rate of harmonic current is, the more serious the load is affected by the distortion of the supply voltage. erefore, in order to accurately evaluate harmonics, a harmonic coupled admittance matrix (HCAM) model is proposed, which can consider the influence of supply voltage fluctuation and harmonic distortion.
Compared with the traditional constant current source model or Norton model, the HCAM model can reflect the harmonic generation of load more accurately. e specific form of the HCAM model is shown in  Scientific Programming where _ I i and _ V j are the phasor values of the i-th harmonic current and the j-th harmonic voltage, respectively; Y ij represents the contribution of the j-th harmonic voltage to the i-th harmonic current; i � 1, 2, . . . , H, j � 1, 2, . . . , H and the highest harmonic is H.
HCAM model can accurately represent the harmonic coupling characteristics of nonlinear load, but the structure and parameters of the load equivalent circuit need to be known for modeling. However, most uncertain load equivalent circuit structures are complex and parameters are unknown, so the model elements of the harmonic coupling matrix can be estimated by using measured power consumption data.
In the process of establishing the model, it is found that because the Y matrix is the full rank matrix, and there are many model elements and multiple collinearity, which leads to matrix ill-conditioned phenomenon in the process of solving element parameters. In order to overcome this problem, based on the amplitude characteristics of matrix elements, it is found that the coupling between harmonic voltage and current with the same harmonic number and adjacent ones is the strongest. erefore, it is proposed to consider only the first column elements of Y matrix, the main diagonal elements, and the adjacent elements of the same row of main diagonal elements, as shown in the following formula: Among them, the first column element is the interaction between fundamental voltage and each harmonic current, and the main diagonal element is the interaction between each harmonic voltage and the same harmonic current or two adjacent harmonic currents. Equation (3) can be further divided into the effect of fundamental voltage and the effect of each harmonic voltage. As shown in equation (4), it is the proposed nonlinear load harmonic coupling dominant component model.
e current source represents the interaction between the fundamental voltage and the h-th harmonic current. Using the measured voltage and current of load, the current source and Y matrix elements in the model are obtained. For the fundamental parameters, by taking the load voltage and current at multiple times, we can get the following results: where t 1 , t 2 , . . . , t m is the different voltage and current data of m groups. e third harmonic parameters in the model can be calculated according to e calculation of the h ′ (5 ≤ h ′ ≤ (H − 2))-th harmonic parameter can be obtained by e highest order harmonic parameters can be obtained by 6 Scientific Programming In combination with equations (5) to (8), the h-th (1 ≤ h ≤ H) harmonic parameters are obtained by using the least square method: e load harmonic current calculated by harmonic coupling dominant component model can vary with the fluctuation of supply voltage, and the influence of supply voltage fluctuation and distortion on load harmonic current is considered; Moreover, the HCAM model intuitively reflects the coupling effect between harmonic voltage and harmonic current and more accurately reflects the harmonic generation characteristics of load, which can be used for the aggregation analysis of harmonic current when multiple harmonic source loads work together.
At the same time, the constant power model of linear and nonlinear load is established under the fundamental frequency by using the multiplier principle.
In this article, the exponential model is used to calculate the fundamental power, as shown in where P is the load active power when the voltage is V; P 0 is the rated active power of the load; V 0 is the rated voltage amplitude of the system; Z p , I p , andP p are the constant parameter to be solved. Considering the influence of harmonic voltage variation and the coupling relationship between voltage and current on power, based on the above harmonic model and equation (10), the real-time harmonic power of residential load can be obtained as follows: where U h (t), I h (t), and φ h (t), respectively, represent the hth harmonic voltage, harmonic current, and phase angle difference between harmonic voltage and current of load at time t and H represents the highest harmonic considered.

Nonlinear Load Harmonic Prediction Based on Deep
Learning in Cloud Side. Due to certain time series characteristics of power consumption data in the distribution network, in order to better mine the characteristics of nonlinear load data in the distribution system, this article uses the improved long-term and short-term memory neural network based on dynamic time warping to train and learn the load electrical characteristics data in the cloud side of Power Distribution Internet of ings and then realizes accurate and efficient nonlinear load harmonic prediction.

Dynamic Time Warping.
Dynamic time warping (DTW) is a method to measure the similarity of two time series with different lengths [31]. DTW algorithm can ensure that when a peak value of the curve moves forward for a small period, it can still effectively find its similarity through the extension of time dimension, thus reducing the number of load forecasting models to be constructed.
Assume that the load electrical characteristic series of two users are, respectively, X and Y, where X � x 1 , x 2 , . . . , x N }, Y � y 1 , y 2 , . . . , y N . Define the regular path matrix M [24 * 24], matrix element (m, n) represents the distance between x m and y n , and the value of matrix element (m, n) is e total cost of dynamic regularization between load series X and Y is as follows: Definition 1. Dynamic regularization path sequence P � (p 1 , p 2 , . . . , p k ), where p k � (m k , n k ) and max(m, n) ≤ K < m + n − 1.
Definition 2. Dynamic time warping distance of X and Y.
where P * � arg min c p (X, Y) takes the weekly average DTW distance of two users as the clustering distance in the lower clustering algorithm, then where X t and Y t , respectively, represent the load curve of the two users on day t. Given a series of user daily load curves X and the number of clusters D, users are clustered into class D according to the DTW distance of load curve, and class d, belonging function C d , and cluster center λ d are obtained to minimize sum S c within the cluster.
en, the same type of user data is pooled to establish a unified load forecasting model, which is helpful to enhance the generalization ability of the model and improve the Scientific Programming 7 accuracy of the forecasting model. e specific steps of pooling method are as follows: Firstly, the ID tag is added to the user in the form of virtual variable; then the user data is divided into training set R and test set T; finally, all the training data are merged to build the training pool, and the test pool is built through the same process.

Long-Term and Short-Term Memory Neural Network.
e cloud side uses long-term and short-term memory (LSTM) model to predict the user's load for the new user data set after preprocessing. e internal structure of the LSTM neural network is shown in Figure 3. In order to establish time connection, LSTM defines and maintains an internal memory unit state cell state C t in the whole cycle, and then updates, maintains, or deletes the information in the cell state through three gate structures: forgetting gate f t , input gate i t , and output gate o t . e forward calculation process is as follows: where C t and C t−1 represent the cell state of the current time and the previous time, respectively, and C t represents the candidate state of the input; f t , i t , and o t , respectively, represent forgetting gate, input gate, and output gate; W f , W i , W c , W o , b f , b i , b c , and b o represent Sigmoid and hyperbolic tangent activation functions, respectively. Firstly, the coefficients of the forgetting gate, the input gate h t−1 , and the output gate x t are calculated by the above formula; and the candidate states of the current neuron C t are obtained by the formula of the last hidden layer output h t−1 and the current output x t ; then, the proportion of the last hidden layer output C t−1 and the current hidden layer output C t in the current cell state is determined by the forgetting gate and the input gate and the output value of the current hidden layer h t is calculated by the formula. e harmonic prediction model based on LSTM is trained by time backpropagation algorithm. e error term between the output value of each LSTM neuron and the real value is calculated. According to the corresponding error term, the gradient of each weight is calculated, and the weight is updated by the gradient optimization algorithm.
Due to the periodicity of power load data, the historical load data of the day before the load forecasting day, the week before the load forecasting day, and the month before the load forecasting day are weighted by a fully connected network and then used as the training dataset T of LSTM forecasting network.
In the test part, the test load curve is sent to the trained LSTM network. Suppose that the load curve data set after data cleaning is Ψ1, and the test households are listed in the en, we need to determine the network configuration parameters of LSTM, using L and H to represent the network depth (number of layers) and the number of hidden units, respectively. rough these parameters, the LSTM prediction network is initialized, and the network configuration parameters are established, i.e., network depth L, number of hidden layers H, and batch size C. en, after the network is started, the program runs the training iteration period until the network is well trained.
In each training cycle, the training data are randomly selected from the training data pool and then input to the feedforward neural network for network training. Each training batch consists of two matrices with a fixed size, namely, input matrix with C × I size and output matrix with C × O size. e time cost and iteration times of the training process depend on the size of the feedback data sequence J, the optimization method selected, the size of the network (M, I), and the size of the training batch C. In order to achieve a good balance between training efficiency and efficacy, the training batch size C is variable in the training process.
e specific flowchart of the distribution network nonlinear load harmonic prediction method based on the DTW-LSTM algorithm is shown in Figure 4.

Simulations and Results
In order to verify the feasibility and practicability of the proposed method, the simulation hardware environment is Lenovo Xiaoxin pro14, Intel Core i5 1135g7 four-core/eightthread processor, 16 GB memory, NVIDIA Geforce mx450 independent graphics card; the software environment is Chinese Windows 10, English Microsoft Visual Studio 2012.
In this article, Caffe deep learning framework is used to test the open dataset of EUNITE network. EUNITE network dataset is the real power load data with sampling interval of 15 minutes, that is, 96 sampling points per day, a total of 28800 load points. e sampling time was from August 1, 2016, to August 7, 2016. e EUNITE network dataset is divided into training sample set and test sample set in the ratio of 3 : 1.
Before the algorithm test, this article preprocesses the load data to ensure the quality of the data, uses the mean value to make up the missing value, and judges the abnormal value. At the same time, in the process of training, this article uses the Adam method to update the parameters. In order to prevent the model from overfitting, the dropout value is set to 0.5. Set the value of the maximum time step N max to 30.

Evaluation Index.
Because the improved LSTM deep learning network harmonic prediction model is essentially a regression model, root mean square error (RMSE) and mean absolute error (MAE) are selected as the performance evaluation indexes based on the characteristics of the model. Among them, RMSE and MAE indicators represent the fitting deviation of the prediction model for the real parameter data, and the smaller the index value is, the more accurate the fitting result is, which can provide error visualization based on percentage. e calculation formula of RMSE and MAE is as follows: where n is the number of forecast points, y i is the real load value of the i-th forecast point, and y i is the forecast value of the i-th forecast point.

DTW-LSTM Network Model Parameter Analysis.
As an important parameter of the LSTM model, the value of the learning rate has an important influence on the effect of nonlinear load harmonic prediction. erefore, it is necessary to determine the learning rate parameters of deep learning network model before load forecasting research and analysis. In this article, the training sample set data are used to optimize the learning rate parameters of the DTW-LSTM model, and the test results are shown in Figures 5 and 6.
From Figures 5 and 6, we can see that when the learning rate is 0.00015, the network jumps back and forth in the local optimum, the loss function and the accuracy of the model have obvious oscillation phenomenon, and the network cannot reach convergence after the set 200 iterations. On the contrary, when the learning rate is set to 0.0015, the network convergence speed is slow, the loss value and accuracy are not as good as when the learning rate is 0.015, the loss function value convergence is about 0.1 higher than when the learning rate is 0.015, and the model accuracy is reduced by 0.085. Obviously, the learning rate of 0.015 is the best, and the loss function converges to 0.168 when iterating to 23 times; the accuracy of the model converges to 0.964 after 23 iterations, and it is stable after 80 iterations, which can ensure that the network convergence is more stable and the convergence result is better.

Analysis of Harmonic Prediction Results.
In order to verify the feasibility and superiority of the prediction method proposed in this article, [26], [27], and [29] are used as comparative methods to train and predict the EUNITE network dataset and the prediction accuracy of each method is analyzed based on the model evaluation indexes RMSE and MAE. Figure 7 shows the simulation results of different methods on the EUNITE network dataset.
It can be seen from Figure 7 that the DTW-LSTM prediction method proposed in this article has obvious  advantages over the other three methods in prediction performance. e seven-day average RMSE index obtained by this method is 5.84, which is 6.91, 10.06, and 22.53 higher than that of [26], [27], and [29], respectively. At the same time, the average value of MAE on the seventh day was 3.83%, and the maximum value of MAE on the sixth day was 4.87%, which was still within 5%. It is confirmed that the performance of the DTW-LSTM method presented in this article is stable in 7 consecutive days. It should be noted that in the dataset used in this article, 6 and 7 days are weekend rest days, and the RMSE and Mae values of the proposed method in these two days are significantly different from those in the working days from August 1 to 5; However, using the prediction method of [29] to predict the nonlinear harmonics of rest days and working days, the evaluation index values differ greatly, which shows that the prediction method used in this article has good generalization ability.

Operation Efficiency
Analysis. In order to analyze the efficiency of nonlinear harmonic load forecasting, the training time and test time of nonlinear harmonic load forecasting modeling are used as evaluation indexes to count the training time and test time of nonlinear harmonic load. e results are shown in Table 2.
From Table 2, we can see that the training time and running time of the proposed method for EUNITE Network load dataset are 114.22 s and 51.43 s, respectively, which is obviously faster than that of [26] and [27]. However, it is noted that the processing time of the training process of the sample dataset in [29] is 0.33 s shorter than that of the proposed DTW-LSTM method, and the processing time of the nonlinear load harmonic prediction experiment of the EUNITE network data set is 1.89 s longer than that of the proposed method. At the same time, combined with the above comparison of the prediction accuracy of the two methods based on the model evaluation indexes RMSE and Mae, it can be The proposed method Reference [26] Date RMSE Reference [27] Reference [29]  The proposed method Reference [26] Reference [27] Reference [29] (b)   seen that the proposed method has obvious advantages in terms of stability and generalization, although the processing time is close to that of [29]. erefore, our method is still superior to the existing methods.
To sum up, compared with other methods, the proposed nonlinear load harmonic prediction method based on Power Distribution Internet of ings architecture has better performance in load harmonic prediction of distribution system and has better load harmonic prediction results than the existing methods under the premise of ensuring certain processing efficiency.

Conclusion
In order to meet the demand of high accuracy and real-time for nonlinear load harmonic prediction and analysis in the distribution system, this article proposes a nonlinear load harmonic prediction method based on the combination of distribution Internet of things and deep learning network. With the support of the architecture of Power Distribution Internet of ings based on nonlinear load harmonic prediction, this method uses the harmonic coupling admittance matrix model based on measured data at the edge of Power Distribution Internet of ings to realize the mathematical modeling of user side load data and solves the modeling problems caused by complex electrical structure and parameters; At the same time, the DTW-LSTM algorithm is used to build the load harmonic prediction and analysis model on the cloud side of the network, which can effectively reduce the number of load prediction models, ensure the strong generalization ability of the prediction model, and realize the efficient analysis of nonlinear load harmonic in the distribution system. Finally, based on the general dataset, the high-efficiency performance of the proposed method for nonlinear load harmonic prediction is verified, which proves that the proposed method has obvious advantages in processing accuracy and speed.
ere are still a few data errors or data missing in the existing historical load data, so future research direction should focus on the nonlinear load harmonic prediction analysis based on the blockchain technology in the Power Distribution Internet of things under the scenario of data uncertainty.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.