Research on Prediction Method of Distribution Network Activity in Green Electric Power through PSO-WNN

The convergence and prediction accuracy of the artificial neural network prediction model are affected by the initial parameter settings of the model, and the wavelet neural network (WNN) modeling algorithm can effectively overcome this defect and achieve better prediction results. In this paper, the particle swarm optimization (PSO) algorithm is used to optimize the initial weights, and the optimal value of the particle swarm algorithm is assigned to the WNN to replace the initial random assignment of the WNN. The WNN is trained according to the backpropagation (BP) algorithm until convergence. The particle swarm optimization wavelet neural network (PSO-WNN) model is used to predict the cost of a single grid activity based on the cost driver parameters of the power grid. The prediction error analysis shows that the model significantly improves the accuracy of the activity cost prediction, which is beneficial to the grid enterprise to effectively manage the cost drivers and track the specific effects of the grid activity cost which produced by the driver parameters.


Introduction
The artificial neural network method has been widely used and achieved good results. However, it is difficult to scientifically determine the network structure in the application. When learning and training the optimal weights, the BP algorithm has the inherent defect of being trapped in local minimum convergence [1], which affects the reliability and accuracy of the prediction model.
Wavelet neural network (WNN) [2] is an emerging mathematical modeling analysis method in the past two years, which is formed by combining the recently developed wavelet transform [3] with the idea of artificial neural network. It has begun to be effectively used in many fields such as signal processing, fault diagnosis, and data prediction. It is a series obtained by translating and stretching the wavelet decomposition, and it has the properties of a general approximation function of the wavelet decomposition. Moreover, because it introduces two new parameters, namely the expansion factor and the translation factor, the WNN has more degrees of freedom than the wavelet decomposition. So that it has a more flexible and effective function approximation ability. After selecting appropriate parameters, Because the WNN modeling algorithm is different from the BP algorithm of the ordinary neural network model, it can effectively overcome the inherent defects of the ordinary artificial neural network model, and the prediction model built by it can achieve better prediction results. However, if the initial parameters of the WNN model are not set properly, it will greatly affect the convergence and prediction accuracy of the entire model. Therefore, this paper uses PSO algorithm to optimize the initial weights and assigns the optimal value of the particle swarm algorithm to the WNN to replace the initial random assignment of the WNN. Finally, the WNN is trained according to the BP algorithm until it converges. To a certain extent, the accuracy of the forecast is improved.

Principle of PSO
PSO is an evolutionary computing technology developed by J. Kennedy and R. C. Eberhart et al. [4] in 1995. It is derived from the simulation of a simplified social model. Particle swarm algorithm is a kind of swarm intelligence algorithm, which is an optimization algorithm that uses the information sharing mechanism between populations to conduct collaborative search [5]. Individuals find the individual optimal solution by exchanging information and sharing information, and then find the global optimal solution.
The PSO algorithm can be described as: in a D-dimensional search space, a certain group contains S particles. The particles have two attributes: velocity v and position x. The velocity of particle s is denoted as ) ,..., , ( , and the position is denoted as ) ,..., , ( Each particle searches the individual optimal solution by exchanging information and sharing information in the search space. When an individual optimal solution is found, it is recorded as ) ,..., , ( , and then the individual optimal solution is compared with the information of other particles to find the global optimal solution, denoted as ) ,..., , (

Principle and structure of PSO-WNN model
The wavelet transform is developed in response to the shortcomings of the Fourier transform. Fourier transform expands the signal based on trigonometric sine and cosine, which can better describe the frequency characteristics of the signal, but there is no resolution in the time domain or the space domain, and local analysis cannot be done. The wavelet transform has a flexible and variable time-frequency window, and it has good localization characteristics in both the time domain and the frequency domain.
The WNN is a model with neural network thought based on wavelet analysis, that is, a nonlinear wavelet base is used to replace the usual nonlinear Sigmoid function [6].
The basic idea of the PSO-WNN model is that the selection of parameters depends on the particle swarm optimization algorithm. A set of network parameters after particle decoding is put into training, the error is output, and the particle fitness is recalculated according to the error, and the particle speed and speed are updated. Position, after several times of training, to meet the network end conditions, the particle swarm trains a set of optimal parameters, and then inputs this set of parameters into the network for simulation prediction. Figure 1 shows the single hidden layer WNN model [7]. Among them, the number of input samples is M, the number of input layer nodes is P, the number of hidden layer nodes is n, and the number of output layer nodes is q; k m x is the input layer sample element; i m y is the corresponding input sample The output value of; jk ω is the weight connecting the hidden layer and the input layer; ij ω is the weight connecting the output layer and the hidden layer; ) , ( The choice of wavelet function should satisfy the framework conditions as shown in Eq. (2). ) 0 ( , , A and B are the upper and lower bounds of the frame. According to the model effect test, the Marr wavelet function is selected, which has good local characteristics in the time domain and frequency domain. It is shown in Eq. (3).  After the WNN model is built, the particle swarm algorithm is used to train the network. The optimal solution obtained by the particle swarm algorithm training is used as the initial value of the network parameters, and the BP algorithm is used to train the network [8]. The algorithm flow is shown in Figure  2.
The connection weights, wavelet expansion and time-shift parameters are used as the particle vector of the particle swarm algorithm, and each particle vector is decoded to each coefficient. The network inputs the training samples, calculates the output and error, and uses the reciprocal of the error as the fitness function (the smaller the error, the greater the fitness). Then assign the optimal value of the

The application of the PSO-WNN model
Activity cost management is an effective means for grid companies to strengthen budget management and strengthen cost control. It is helpful to improve the scientific nature of cost budget, effectively verify the preparation standard of cost budget, enable resource allocation to adapt to the actual needs of the company's production and operation, and enhance the standardization of budget arrangements. The forecasting model we have established in this paper is used to predict the cost of a certain operation in the distribution network. Expert experience assessment of various cost drivers such as voltage level, equipment type, load, operating environment, asset service life, overhaul methods, etc. Five key cost drivers are selected as input to the model based on expert analysis results, which are represented by codes as CD1, CD2, CD3, CD4, CD5, the actual cost (C) of the activity as output. A total of 128 sets of sample data for this activity from 2019 to 2020 were selected from the database. Due to confidentiality, the data has been preprocessed. Part of the data in chronological order is shown in Table 1. 100 groups of all sample data are used for model training, and the remaining 28 groups are used for model testing. This paper compares the prediction accuracy of PSO-WNN and WNN models. Three evaluation indicators are used to compare the WNN prediction model and the PSO-WNN prediction model, mean absolute error (MAE), mean relative error (MRE), and mean square error (MSE). The results are shown in Table 2. The PSO-WNN model parameters are set as follows. Acceleration factor c1=c2=2, population evolution iteration number N=200, population size NP=60, inertia weight is set to dynamic weight, the calculation formula is w=0.3+0.6r, where r is a random number between [0, 1].

Conclusion
In this paper, cost drivers are used to predict the activity cost. Aiming at the shortcomings of the traditional neural network prediction model, the PSO-WNN prediction model is proposed. First, the key factors and attributes that affect the activity cost are selected as the prediction input. Then, the prediction model for cost prediction is obtained after model training. The research results show that: (1) PSO solves the shortcomings of the WNN model by continuously iteratively optimizing the parameters of the WNN, including easy to fall into local minimums and easy to produce oscillation effects; (2) The activity cost prediction experiment based on the PSO-WNN model proved the advantages of PSO-WNN with high prediction accuracy and strong adaptability.
With the help of this method, the predicted activity cost results are closer to the actual cost. By adjusting the cost driver parameters, the scientific nature of the differential processing of the operating standard cost system can be improved, the workload and uncertainty of the empirical estimated cost can be reduced. Management level of the distribution network and efficiency of cost decisions can be