Application of frequency optimization neural network method on power line communication

The quality of broadband power line carrier communication mainly depends on the carrier communication frequency. However, there is a lack of fast and effective optimal carrier frequency selection method. One frequency selection method based on frequency point optimization neural network is proposed by this paper. This method combines transmission line theory and voltage partial reflection theory to build a power line carrier channel mathematical model of the distribution network. The input frequency point sample set is used as the training set of the frequency point optimization neural network to obtain a neural network model that can predict the local optimal frequency point set. Then the actual distribution network is taken as an example for simulation analysis. When inputting any frequency range, the model outputs the corresponding optimal frequency point set. Simulation results show that the algorithm saves a lot of input impedance or channel strength testing time, while the error rate is limited to about 3%.


Introduction
Power line carrier communication is a unique communication method for power systems, which has natural network channel resources and application convenience [1] . Among them, the research and application of the power line high-speed data communication technology of the distribution network has gradually become a hot spot in the power line carrier research. Compared with the working range of the narrowband power line carrier of 3k-500kHz, the main frequency of the broadband power line carrier recommended by the State Grid is 2MHz-12MHz, and the extended frequency band is 30MHz~100MHz. It is often used in the last mile of the Internet and digital home network [2] .
The power line has been loaded with power frequency power signals, resulting in a harsh PLC communication environment and severe interference; on the other hand, the power line communication topology network is complex and the load types are diverse, so the channel has strong time-varying [3] and significant frequency selectivity. Features [4,5] . Orthogonal Frequency Division Multiplexing (OFDM) technology is a special multi-carrier signal modulation technology, and its principle is to transmit data in parallel through the

Power line carrier channel modelling
Combining the transmission line equation and the partial reflection theory, the relationship between the channel attenuation and the input impedance of the distribution network can be obtained.
As is shown in Figure 1, γ 1 and Z c1 are the transmission constant and characteristic impedance of the transmission line respectively. According to the transmission line equation and combined with the expression of the hyperbolic function, the ratio of the terminal voltage to the first terminal voltage is obtained: In the formula, Γ is the nodal reflection coefficient. And the equivalent input impedance at the head end of the line is [22] :

Frequency point optimization neural network model
The frequency point optimization neural network model is based on the Back Propagation(BP) neural network algorithm, and then the communication frequency point is optimized on the broadband power line carrier channel model established according to the voltage partial reflection theory. In this paper, input frequency points and their corresponding local optimal frequency point sets as sample sets, and the frequency point optimization neural network model is obtained by training.

Frequency point optimization neural network structure
Neural network is a similar model abstracted based on the human brain neural network [ 23] . The basic arithmetic unit of the frequency point optimization neural network is the frequency-selective neuron, and Figure 2 Among them, P is the input of the frequency selection neuron. In this article, it refers to the input frequency point sample set, which is a vector composed of all the frequency point sample sets to be selected. w is the weight coefficient of the frequency point input to the frequency selection neuron, indicating the degree of connection with the frequencyselective neuron. b is the threshold of the frequency-selected neuron. f is the excitation function; y is the output of the frequency-selected neuron, where the local optimal frequency point set corresponding to the frequency point sample is represented. The excitation function is used to limit the output amplitude of the neuron. Commonly used excitation functions include Sigmoid function, tangent function, Relu function and Softplus function. Finally the output of the frequency-selective neuron is obtained as, The frequency point optimization neural network is mainly composed of three parts, a frequency point input layer, a frequency point processing layer and a local optimal frequency point output layer. The nodes in each layer are not connected to each other, and the layers are connected to each other. The number of nodes in the frequency input layer depends on the dimension of the input vector: the number of features of the frequency sample. The number of nodes in the output layer of the local optimal frequency point depends on the dimension of the output vector. In general, a single layer of the hidden layer is sufficient. According to Kolmogorov's theorem, a three-layer network of a single-layer frequency point processing layer is sufficient to fit arbitrarily complex nonlinear functions with simple operation and fast training speed [24] . Therefore, the article selects the frequency point of the single-layer frequency point processing layer to optimize the neural network for prediction, and its topology is shown in Figure 2(b).
From Figure 2(b), the input vector of the frequency point optimization neural network is x∈R n , where x=(x 1 ,x 2 ,...,x n ) T , where n=3, and the attribute feature of each frequency point sample is the carrier frequency. The frequency processing layer has m frequency selection neurons; while the local optimal frequency point output layer has l frequency selection neurons, the output is y∈R l , y=(y 1 ,y 2 ,...,y l ) T , here l is the number of the selected optimal frequency points, and the output y is the local optimal frequency point set corresponding to the input frequency points. The connection weight from the frequency input layer to the frequency processing layer is w ij , and the threshold is α j ; the connection weight from the frequency processing layer to the local optimal frequency output layer is w jk , and the threshold is β k . φ and ϕ are the excitation functions of the frequency processing layer and the local optimal frequency output layer, respectively.

Frequency point optimization neural network algorithm derivation
The essence of the frequency point optimization neural network algorithm is to obtain the minimum value of the error function [25] . It can find a set of parameter combinations under known constraint conditions to minimize the objective function. This process consists of the forward propagation of the input signal and the backward propagation of the error.

Frequency sample forward propagation
In the forward propagation process of the frequency point samples, for the frequency point processing layer, the input of the j-th node I j is, The output O j of the j-th node is, For the local optimal frequency point output layer, the input I k of the k-th node is, The output y k of the k-th node is,

Error backpropagation
This process corrects the network weights and thresholds by calculating the total error between the expected value and the actual value output by the neurons in the local optimal frequency point output layer. The partial derivative of the error function to the weight or threshold of each layer of neuron is obtained, and the parameters are adjusted accordingly. After repeated training until the error satisfies the calibration range, the training is completed.
Assuming that the frequency point set contains P frequency points, for any frequency point (the p-th), the error function is E p : Among them, e k is the expected value of the frequency point carrier frequency for the k-th node of the local optimal frequency point output layer. The total error function of all frequency points in the frequency point set is: Calculate the partial derivative of the error function to the weight and threshold, and then correct it in the opposite direction to obtain the corresponding correction formula.
The concealed layer weight and threshold correction formula is: η is the learning rate Substituting the partial derivative values into equations, the adjustment formula can be obtained as: ' '

Frequency point optimization neural network algorithm execution steps
The article chooses the logarithmic Sigmoid as the excitation function, and executes the frequency point optimization neural network algorithm according to the flowchart shown in Figure 4. At the same time, the threshold of each neuron is incorporated into the weight matrix, that is, w i,m+1 =α i ; w j,l+1 =β j . When inputting the frequency point sample set X, take X=(x 1 ,x 2 ,...,x n ,-1). (1) Initialize the weight in the network, the initial value can be randomly generated; (2) Input the samples in the frequency point set and the local optimal frequency points near the corresponding frequency point in sequence, assuming that the p-th sample is currently input; (3) Calculate the output value of each layer: Oj, yk, j=1,2, ..., n+1, k=1,2, ..., m; (4) Calculate the back propagation error of each layer; (5) Modified weight: for the frequency point processing layer, the modified weight is, Where t is the number of iterations, and the weight of the t+1 iteration is the sum of the weight of the previous iteration and the corresponding weight correction value.
In the same way, the weight of the channel attenuation output layer after correction is, (6) The master node selects 18 communication frequency points as the communication channel between the master-slave node according to the uplink and downlink strength of each frequency point in the f bi-directional , and informs the slave node through the default frequency point, and the frequency point selection process is completed.
After calculating the weight of each layer, determine whether it meets the requirements according to the indicators. If the requirements are met, the algorithm ends; if the requirements are not met, then return to step (3) to continue execution. This learning process needs to be performed on all samples and their corresponding local optimal frequency point sets until all input and output requirements are met.

Algorithm validity
In order to verify the effectiveness of the frequency point optimization neural network algorithm, the distribution network model shown in Figure 4(a) is first established [  Among them, the line model and parameters refer to the actual distribution network of Baoding City, Hebei Province [7] . Assuming that the internal resistance of the source Z s = 50Ω, the load impedance Z eq =75Ω, and the transformer impedance Z T are all 500Ω; The lines l 1 , l 2 , and l 3 are the model JKLYJ-120mm 2 insulated overhead lines. The unit length inductance L 1 =0.961μH/m, the capacitance per unit length C 1 =12.7pF/m, resistance per unit length R 1 =9.7*10-6*f0.5Ω/m. The line l 4 is type YJV22-70mm 2 insulated cable, and its unit length inductance L 2 =0.194μH/m, the unit length capacitance C 2 =131pF/m, the unit length resistance R 2 =4.85*10-6*f0.5Ω/m. According to the above parameters, the channel attenuation of the distribution network model in the frequency range of 1MHz-100MHz can be obtained.
According to the channel attenuation shown in Figure 4(b), it can be seen that as the application background changes from narrowband power line carrier communication to broadband power line carrier communication, the number of carrier frequency points has increased significantly. Although the attenuation tends to decrease as the frequency increases, the channel attenuation at a single frequency becomes more difficult to predict.
In the frequency range of 2MHz-92MHz, one frequency point is selected every 5MHz, a total of 19 frequency points are used as the input sample frequency point set, and the best frequency point with the frequency point as center and the bandwidth of 2MHz is selected by the traversal method. Use it as the expected output value and input the frequency point to optimize the neural network. After the training is completed, the frequency point of the carrier frequency 46MHz is used as the new input, and different optimal frequency points are selected to obtain the corresponding predicted local optimal frequency point set. In Table 1, the largest error rate between the local optimal frequency point lumped communication quality predicted by the frequency point optimization neural network algorithm and the optimal frequency point selected by the traversal method is only 3.9%, which proves the accuracy of the algorithm. On the other hand, as the number of local optimal frequency points increases, the accuracy of the algorithm will decrease. When the optimal number of frequency points is 6, the frequency point optimization neural network predicts that the total communication quality of the frequency point set is only 5.6dB worse than the actual result, and the error rate is 1.7%. When the optimal number of frequency points is 18, the error is the largest, but it is only 3.9%, which is also within the actual acceptable range. According to Table 2, as the input frequency point carrier frequency point increases, the error between the neural network's predicted frequency point set and the actual optimal frequency point set communication quality increases accordingly.
Compared with the ergodic method or the traditional frequency selection algorithm, the frequency point optimization neural network algorithm saves a lot of time for testing signal strength or equivalent input impedance while ensuring accuracy.

Conclusion
Under the application background of broadband power line communication, the number of sub-carrier frequencies of OFDM technology has greatly increased, and traditional frequency selection methods based on empirical estimation or traversal methods have become difficult to implement. The frequency point optimization neural network algorithm reduces the workload of a large amount of testing signal strength or equivalent input impedance, and realizes the optimal selection of frequency points.
In the context of broadband power line communication, this paper proposes a frequency selection algorithm based on frequency point optimization neural network. After the channel model is established on the basis of the local reflection theory, the neural network model that can predict the local optimal frequency point corresponding to any input frequency point can be obtained by training the broadband range input frequency point set and the corresponding local optimal frequency point set. Through the application analysis of the calculation examples, it is proved that the algorithm is fast and effective in the optimization and selection of broadband OFDM sub-carrier frequency.
At the same time, as the number of selected local optimal frequency points increases, the error rate of the neural network is still increasing, although it is still within the acceptable range. On the other hand, when the carrier frequency of the input frequency point increases, the error between the predicted value and the actual value also increases.
Although the frequency point optimization neural network algorithm can predict the local optimal frequency point set of the input frequency point to a certain extent, it cannot avoid the error increase when the carrier frequency of the frequency point or the number of optimal frequency points increases. Therefore, the frequency point selection neural network algorithm itself needs to be further optimized in the future.