# Noise Source Diagnosis Method Based on Transfer Path Analysis and Neural Network
## 4 Noise Source Diagnosis by TPA-NN
### Network Structure  
The contribution of the path point is inversely solved by the transfer function from the path point to the target point through the response of the target point when working in the converter cabinet. Simultaneously, the unknown contribution is 13 and the known response is 6. According to the mathematical analysis, when the unknown is greater than the number of equations, the solution of the path contribution is not unique. Taking the above target point response as the input and path contribution as the output of the neural network, the network structure in this paper is determined by comparison and parameter adjustment, as shown in Figure 8. Among them, red represents the input/output layer, and green represents the hidden layer.  
The network consists of one input layer, two hidden layers for a fully connected layer, and one output layer. Fully connected layer operations are essentially linear transformations from one feature space to another. Unlike convolutional networks that extract local features, each fully connected layer neuron can be treated as a polynomial that optimizes the weight coefficient through backpropagation to obtain the appropriate weight, and extracts global features through the weight matrix.  
The upper limit of transformer electromagnetic noise is about 6000 Hz, and in order to avoid data omission, the upper limit of test data is raised to 10,240 Hz. The input layer receives a two-dimensional array of the shape (10240,6), i.e., six target points in the range of 0-10,240 Hz, through the first fully connected layer, which has six neurons and applies the _ReLU_ activation function to extract the input features; through the second fully connected layer, which has nine neurons, and the _ReLU_ activation function is applied to further capture the relevant features in the input data; and finally, through the output layer to obtain the contribution of each path to the target point. The output layer has 13 neurons, and the _Softmax_ activation function is applied, which converts the real value vector of the output from the previous layer into a normalized probability distribution, which is the normalized output, and the sum of the outputs is equal to 1.  
The activation function expression is as follows:  
\[ReLu=\max(0,x) \tag{6}\]  
\[Softmax=\frac{e^{z_{i}}}{\sum_{j=1}^{K}e^{z_{j}}} \tag{7}\]  
Figure 8: Neural network structure diagram.  
where \(Z_{i}\) is an element of the input vector of the function, \(\sum_{j=1}^{K}e^{z_{j}}\) is a normalized term. Equation (7) ensures that all output values of the function add up to 1, and that each value is in the range (0, 1), thus constituting a valid probability distribution, where \(K\) is the generic number.  
To train and optimize the model, the optimizer Nadam (Nesterov-accelerated Adaptive Emoment Estimation) is selected, and the Mean Squared Error MSE (Mean Squared Error) is used as the loss function of the model. Minimize the difference between the model output and the real output so that the model can accurately predict the desired output.