Error estimation method for extracting Brillouin frequency shift by aiming at neural network
By calculating the variance of the gains of each node of the input layer in the neural network and estimating the BFS error using a specific formula, the problem of cumbersome steps in extracting Brillouin frequency shifts in the prior art is solved, which significantly improves the extraction of neural networks accuracy.
Patent Information
- Application Number
- CN202311093016.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-20
- Publication Date
- 2025-02-21
AI Technical Summary
The prior art has complicated steps and lacks error estimation methods when extracting Brillouin frequency shifts, which affects the accuracy of neural networks.
An error estimation method for extracting Brillouin frequency shifts for neural networks is proposed. By calculating the variance of gains of each node of the input layer and calculating the error of BFS using a specific formula to improve the extraction accuracy of neural networks.
This method can effectively estimate the error of BFS and improve the accuracy of neural networks in practical applications, especially in feedforward neural networks where the activation function is a linear function.
Smart Images

Figure CN119492406A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an error estimation method for extracting Brillouin frequency shift by a neural network, and belongs to the technical field of measurement. Background Art
[0002] Fiber optic sensing has a large number of applications in many fields due to its advantages such as small size, anti-electromagnetic interference, and anti-radiation. Among them, distributed fiber optic sensing based on Brillouin scattering is widely used in temperature and strain monitoring due to its excellent resolution and high precision, such as monitoring large bridges, railways, pipelines, and transmission lines.
[0003] Distributed fiber optic sensing based on Brillouin scattering obtains the Brillouin frequency shift (BFS) by analyzing the Brillouin gain spectrum (BGS), and then calculates the temperature or strain of the optical fiber according to the Brillouin gain spectrum (BGS). The existing patent application document "A Brillouin frequency shift extraction method based on a neighboring algorithm" with a publication number of CN111721222A includes the following steps: Step 1, constructing a Brillouin gain spectrum feature set according to a given curve function line type, a Brillouin frequency shift value range, a parameter vector value range and a sweep frequency value range; Step 2, constructing a corresponding Brillouin frequency shift label set according to the Brillouin gain spectrum data set; Step 3, for a given Brillouin gain spectrum, calculating its distance from each row vector in the Brillouin gain spectrum feature set; Step 4, given a k value, sorting the distances in order from small to large, and selecting the first k distances; Step 5, for the first k distances, finding the corresponding element from the Brillouin frequency shift label set; Step 6, counting the frequency of occurrence of each value of the element, sorting from large to small, and finding the value with the maximum frequency, that is, the Brillouin frequency shift corresponding to the given Brillouin gain spectrum. Compared with the curve fitting method, the present invention reduces the error.
[0004] However, the above method has cumbersome steps, requires iterative calculation, and has no corresponding error estimation method. Nowadays, with the development of artificial intelligence technology, neural network technology is becoming more and more mature, and it is widely used in extracting BFS. Therefore, its error estimation method is also very important. The advantages of neural network in extracting BFS are real-time and high accuracy. The error estimation method proposed in the present invention further improves the accuracy of the neural network.
[0005] The present invention proposes an error estimation method for extracting Brillouin frequency shift by neural network. The present invention can realize the estimation of BFS error to improve the BFS extraction accuracy of neural network in practical applications. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention provides an error estimation method for extracting Brillouin frequency shifts from a neural network. While ensuring the high real-time performance of the neural network, the accuracy of the neural network is further improved, so that it can play a key role in practical applications.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] A method for estimating the error of extracting Brillouin frequency shift by a neural network, characterized in that the method comprises the following steps:
[0009] S1. Extract the trained neural network weight matrix.
[0010] S2. Calculate the variance of the gain of each node in the network input layer.
[0011] S3. Calculate the BFS error using the following formula.
[0012]
[0013] Where v BS is the error of BFS, I V It is a 1×n matrix composed of the gain variance of each node in the input layer, where n is the number of nodes in the input layer; R is the sweep frequency range of the input neural network; P is a matrix calculated by the weight matrix, with a size of n×1, and its calculation method is as follows:
[0014] P=(W·W)×(M 1 ·M 1 )×(M 2 ·M 2 )×...×(M t-1 ·M t-1 )×(V·V)
[0015] Where W is the weight matrix between the input layer and the first hidden layer, and its size is n×m 1 , where m 1 is the number of nodes in the first hidden layer; M i is the weight matrix between the i-th hidden layer and the i+1-th hidden layer, and its size is m i ×m i+1 , where m i is the number of nodes in the i-th hidden layer, i = 1, 2, ..., t-1, t is the number of hidden layers; V is the weight matrix between the t-th hidden layer and the output layer, and its size is m t ×1; “×” is the cross product; “·” is the dot product.
[0016] Furthermore, the neural network targeted by the present invention is a feedforward neural network whose activation function is the linear function "Purelin".
[0017] Furthermore, the linear function "Purelin" is expressed as follows:
[0018] f(i)=i
[0019] Where i is the input of the activation function and f(i) is the output of the activation function.
[0020] Furthermore, the neural network input of the present invention is the BGS gain at different frequencies, and each frequency corresponds to an input node; the neural network output is the normalized BFS, which is expressed as the following formula:
[0021]
[0022] Where v BN is the normalized BFS; v B is BFS; v 1 is the frequency of the first sweep point. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described below in conjunction with the accompanying drawings;
[0024] Figure 1 is a flow chart of error estimation according to the present invention;
[0025] Figure 2 It is the neural network architecture established;
[0026] Figure 3 It is 124 sets of BGS repeatedly measured at a certain fiber distance;
[0027] Figure 4 It is the BFS error calculated by the method proposed in the present invention and the actual BFS error and the difference between the two. DETAILED DESCRIPTION
[0028] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0029] The flowchart of error estimation described in the present invention is as follows Figure 1 .
[0030] The specific implementation cases are as follows:
[0031] 1. Train the neural network to extract BFS
[0032] 1.1 Design of training set
[0033] The BGS is constructed by adding a pseudo-Voigt function and a Gaussian noise proportional to the gain, as shown in equation (1).
[0034]
[0035] Where g is the Brillouin gain; v is the frequency; g 1 and g 2 are the peak values of the Brillouin gain of the Lorentz and Gaussian curves, respectively. Without loss of generality, both are defined as 0.5 in the present invention; x is a random variable with a mean of 0, a standard deviation of 1 and a normal distribution. It should be noted that in order to improve the performance of the neural network, BGS needs to be normalized before being input into the neural network. The normalization process is shown in formula (2).
[0036]
[0037] Where g N is the normalized Brillouin gain; g Max is the maximum value of the Brillouin gain.
[0038] The parameters of the training set are set as follows: The training set consists of BGS data with different BFS deviations and different signal-to-noise ratios (SNR). The line width of BGS is 40MHz; the sweep interval is 1MHz; the number of sweep points is 65; the sweep range is 1.6 times the line width, i.e., 10.688 to 10.752GHz; the other BGS parameter settings are given in Table 1; 3 groups of BGS are generated under each parameter combination setting.
[0039] Table 1 parameter Range of variation Step Length BFS 10.705GHz~10.735GHz 1MHz SNR 10dB~25dB 1dB
[0040] 1.2 Neural Network Parameter Design
[0041] After continuous trials, the best network structure and parameters were selected. The network architecture was set to 65-10-1, that is, the number of nodes in the input layer, hidden layer, and output layer were 65, 10, and 1 respectively, and there was only one hidden layer. The convergence condition was set to be when the mean square error (MSE) of the test set was less than 1×10 -6 The training is stopped when the maximum number of iterations is set to 30 and the learning rate is set to 10 -9 The network architecture of the neural network is as follows Figure 2 As shown in the figure, g(v i ) is the frequency v i The size of the Brillouin gain when W is , and it also represents the input of the i-th node in the network input layer; ij and V j1 are the weights between the input layer and the hidden layer, and between the hidden layer and the output layer, respectively, j = 1, 2, ..., 10; θ and α are the node thresholds of the hidden layer and the output layer, respectively; φ and are the activation functions of the hidden layer and the output layer respectively, and are selected as the linear function "Purelin", whose expression is as shown in formula (3).
[0042] f(i)=i(3)
[0043] Where i is the input of the activation function and f(i) is the output of the activation function.
[0044] 1.3 Neural Network Training
[0045] Use MATLAB's "netff" function to build and train the network.
[0046] 2 Extract the weight matrix
[0047] Each weight matrix of the neural network is derived. Since there is only one hidden layer in this embodiment, only two weight matrices are derived, namely, the weight matrix W between the input layer and the hidden layer and the weight matrix V between the hidden layer and the output layer. The sizes of the two are 65×10 and 10×1 respectively.
[0048] 3. Obtain the variance of the gain of each node in the input layer
[0049] 3.1 Acquisition of measured data
[0050] The BGS of a single-mode optical fiber with a length of about 300 m and wound on the optical fiber axis was measured by BOTDR. The frequency sweep started at 10.688 GHz and ended at 10.752 GHz. The frequency sweep interval was 1 MHz. The number of superposition averages was 2. 10 ; The incident light pulse width was 100ns, the measurement was carried out at room temperature, and the measurement was repeated 124 times.
[0051] 3.2 Calculating Variance
[0052] Each frequency at each fiber position is considered as a set of data, and the variance of each set of data is calculated. Therefore, it can be obtained that the variance at each fiber distance corresponds to 65 frequencies, which is recorded as I V , whose size is 1×65. Taking a certain fiber distance as an example, 124 groups of BGS are displayed on Figure 3 middle.
[0053] 4 Calculate the error of BFS
[0054] The error of BFS is calculated using the following formula.
[0055]
[0056] Where v BS is the error of BFS; R is the frequency sweep range of the input neural network; “×” is the cross product; “·” is the dot product.
[0057] Then the measured spectrum data is input into the neural network to obtain the actual value of the BFS error. The BFS error calculated by the method proposed in the present invention is compared with the actual BFS error, which is shown in Figure 4 middle.
[0058] According to statistics, the absolute error of the method proposed in this invention is 4.49×10 -2 MHz, and the relative error is 14.68%. It can be found that the method proposed in the present invention has a high accuracy.
[0059] The present invention fills the gap in error estimation of a neural network whose activation function is a linear function, and can further improve the accuracy of extracting BFS by the neural network.
Claims
1. A method for estimating the error of extracting Brillouin frequency shift by neural network, characterized in that: The method comprises the following steps: S1, extract the trained neural network weight matrix; S2, calculate the variance of the gain of each node in the network input layer; S3. Calculate the error of Brillouin frequency shift using the following formula; Where v BS is the error of Brillouin frequency shift; I V It is a 1×n matrix composed of the gain variance of each node in the input layer, where n is the number of nodes in the input layer; R is the sweep frequency range of the input neural network; P is a matrix calculated by the weight matrix, with a size of n×1, and its calculation method is as follows: P=(W·W)×(M1·M1)×(M2·M2)×...×(M t-1 ·M t-1 )×(V·V) Where W is the weight matrix between the input layer and the first hidden layer, and its size is n×m1, where m1 is the number of nodes in the first hidden layer; M i is the weight matrix between the i-th hidden layer and the i+1-th hidden layer, and its size is m i ×m i+1 , where m i is the number of nodes in the i-th hidden layer, i = 1, 2, ..., t-1, t is the number of hidden layers; V is the weight matrix between the t-th hidden layer and the output layer, and its size is m t ×1; "×" is the cross product; "·" is the dot product.
2. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 1, characterized in that: The neural network targeted by the present invention is a feedforward neural network whose activation function is a linear function.
3. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 2, characterized in that: The linear activation function of the neural network is "Purelin", which is expressed as follows: f(i)=i Where i is the input of the activation function and f(i) is the output of the activation function.
4. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 2, characterized in that: The input of the neural network targeted by the present invention is the Brillouin spectrum gain at different frequencies, and each frequency corresponds to an input node; the output of the neural network is the normalized Brillouin frequency shift.
5. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 4, characterized in that: During the neural network training process, the Brillouin spectrum gain of the input neural network is generated by adding a Gaussian noise proportional to the gain using a pseudo-Voigt function, as shown in the following formula: Wherein g is the Brillouin gain; v is the frequency; g1 and g2 are the peak values of the Brillouin gain of the Lorentz and Gaussian curves, respectively, and without loss of generality, both are defined as 0.5 in the present invention; x is a random variable with a mean of 0, a standard deviation of 1 and a normal distribution.
6. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 4, characterized in that: During the neural network training process, the normalized Brillouin frequency shift output by the neural network satisfies the following relationship: Where v BN is the normalized Brillouin frequency shift; v B is the Brillouin frequency shift; v1 is the frequency of the first sweep point.
7. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 2, characterized in that: When using a neural network, the data input into the neural network needs to be normalized. The processing process is shown in the following formula: Where g N is the normalized Brillouin gain; g Max is the maximum value of the Brillouin gain.
8. The error estimation method for extracting Brillouin frequency shift by neural network according to claim 1, characterized in that: The steps to calculate the variance of the gain of each node in the network input layer are as follows: ① Repeat the experiment multiple times under the same experimental settings to obtain Brillouin spectrum data; ② Classify the Brillouin spectrum data according to the fiber distance to obtain a set of Brillouin spectrum data for each sampling distance. The number of Brillouin spectra in the set is recorded as the number of repeated experiments; ③ Classify the Brillouin spectrum of each sampling distance according to frequency, obtain the set of Brillouin gains at each sampling distance and each frequency, and calculate the variance of each Brillouin gain set; ④ Sort and combine the variances under the same sampling distance according to frequency to obtain I V .
Citation Information
Patent Citations
Brillouin frequency shift extraction method based on proximity algorithm
CN111721222A
Cited By
BOTDR or BOTDA temperature or strain error estimation method for high spatial resolution scene
CN121994290A