Wheel Weighing Meter of Continuous Rail Based on BP Neural Network and Symmetric Moving Average Filter

: Regularly detecting the wheel weight of EMU (Electric Multiple Units) is of great significance for maintaining the safety of railway transportation. The existing wheel weighing instruments are mostly the rail-broken type, which is easy to cause safety risks in long-term use. A rail-continues wheel weighing meter is introduced to solve the problem. The rail-continues wheel weight meter introduces a composite sensor structure, using BP neural network to search the optimal sensor factors and introduces a parameter to eliminate the interference of the EMU driving speed. To process the output of the BP neural network, a symmetric moving average filtering algorithm is proposed. The experimental results show that the wheel weighing meter introduced in this paper has high precision and stability. The weighing error of the continuous rail wheel weighing meter is 0.24%.


INTRODUCTION
As railway transportation has gradually become the national preferred mode of transportation, people pay more attention to the safety and reliability of EMU operations. The Wheel weighing instrument is mainly used to measure the wheel weight and axle load of EMU vehicles, so as to effectively evaluate the driving safety of EMUs. At present, the railway transportation department needs to detect the overweight and biased load of vehicles, intervene from the source to prevent the occurrence of overweight and biased load. The use of the wheel weighing meter can prevent the occurrence of vehicle overload and unbalanced load from the source, which is very significant for the safety of railway transportation. The research and development of wheel weighing meters are always going on [1][2][3]. Cao Yu et al. [4] proposed a real-time acquisition and transmission method of sensor signals. The method is based on embedded Ethernet technology and can realize real-time and long-distance transmission of wheel load detection sensor signals. Gan Yingjun et al. [5,6] designed a portable railway vehicle intelligent wheel weighing meter and arranged the hydraulic components inside the meter to make the instrument compact and portable. Li Zhanheng [7] developed a wheel weighing meter with a measurement and control system. The lower computer and the upper computer work together, the lower computer is for wheel weight measurement and display, and the upper computer is for signal processing and storage. By integrating ARM technology and ZigBee wireless network, Long Ling [8] wirelessly collected the data of the intelligent wheel weighing meter and used the upper computer for fusion processing of the collected data. The wheel load meter proposed by Pu Lihua [9] is composed of mechanical measuring components, pressure sensors, data acquisition and control circuits, etc., and the wheel weighing is realized by using a micro motor.
The existing EMU wheel weighing instrument uses separate sensors and a broken rail structure. However, in practical applications, it has been found that the vehicle weighing zone of the broken rail structure is subjected to large impact force, and there is a safety risk in long-term use. The weight accuracy will also decrease with the service life.
In view of the shortcomings of the broken rail wheel weighing meter, this paper proposes a continuous rail train wheel weighing meter, which does not cut the track structure to improve the impact resistance of the weighing zone, and arranges the composite sensor directly on the rail. Simultaneously it expands the effective weighing range and improves the detection accuracy. At the same time, this paper proposes a BP neural network for data fusion of composite sensors and proposes a symmetrical moving average filter algorithm to process the weighing signal.

THE SENSORS OF THE CONTINUOUS RAIL WHEEL WEIGHING METER
Under the continuous rail structure, the steel rail of the weighing zone generates shear stress and gravity pressure when subjected to the force of the wheels. Combining pressure measurement technology and sheer force measurement technology, the continuous rail wheel weighing meter composes the shaft pin type sensors and the rail pad type sensors. A pair of shaft pin sensors are set at both ends of the rail, and a rail pad type sensor is set between the two shaft pin sensors. The length of the weighing zone can be adjusted by the number of rail pad sensors to achieve the purpose of extending the weighing zone. In addition to certain weighing tasks, the shaft pin sensor is mainly used to obtain steep rising and falling sensor signals, while the rail pad sensor is responsible for the main weighing task. Through the combination of the two sensors, the signals of the two forces are superimposed to form a comprehensive force measurement area. The weighing structure of the continuous rail wheel weighing meter is shown in Fig. 1. When the wheel approaches the shaft pin sensor from the outside of the weighing zone, the shaft pin sensor outputs a negative voltage. When the wheel reaches the weighing zone, the output voltage of the pin sensor is positive. When the wheel leaves the weighing zone, the output voltage of the shaft pin which the wheel passes changes from a positive value to a negative value. The rail pad sensor always outputs positive values. The signal output characteristics of the two sensors are shown in Fig. 2.

DATA FUSION OF CONTINUOUS RAIL WHEEL WEIGHING METER 3.1 Data Fusion of Continuous Rail Wheel Weighing Meter under Calibration Speed
In the case of a certain speed, we use the following method for data fusion: In the traditional rail-broken wheel weighing system, the wheel passes the sensor and outputs a trapezoidal signal. After filtering, the analog-to-digital conversion value can be obtained in the smoothing interval. Then the wheel weight is calculated according to the following formula: where BT G is the wheel weight; BT AD is the analog-todigital conversion value; BT K is the constant rail sensor parameter, which is obtained by calibration.
When using rail-continuous wheel weighing meter, the pressure is detected by the rail pad sensors and the shear force is detected by the shaft pin sensors. Firstly, the outputs of the sensors are combined into a trapezoidal model through a data conversion algorithm. That is to achieve the data conversion between the continuous track detection model and the broken track detection model, the specific formula is as follows: where ct M is output of the continuous rail wheel weighing model; S1 AD , S4 AD are the outputs of the shaft pin sensors after analog-to-digital conversion; S2 AD , S3 AD are the outputs of rail pad sensors after analog-to-digital conversion: S1 K , S2 K , S3 K , S4 K are the sensor factors. After completing the conversion between the continuous rail and the broken rail detection model, the wheel weight can be calculated by the Eq. (3) which is referring to the Eq. (1).
where ct G is the wheel weight; ct M is continuous track detection model; ct K is the constant rail sensor parameter, which is obtained by calibration.
The data fusion effect is shown in Fig. 3. The orange and light blue lines in the figure are the outputs of the shaft pin sensor S1 AD and S4 AD , the light green and dark green lines are the outputs of the rail pad sensor S2 AD and S3 AD , and the blue curve is the output of the continuous rail wheel weighing model ct M . The purpose of fusion is to integrate the outputs of multiple sensors into a trapezoidal curve. The smooth part of the trapezoidal curve is used to calculate the wheel weight in the following steps.

Data Fusion of Continuous Rail Wheel Weighing Meter under Changing Speed
In actual engineering applications, the speed of the EMU is not constant. Experiments show that when the sensor factors are constant, as the traveling speed of the EMU increases, the measurement value of the wheel weight decreases. If Eq. (3) is still used for data fusion, it is necessary to calibrate different sensor factors for different speeds, otherwise, the measurement results will be biased.
In order to solve the above problem, we introduce the speed parameter v K . Rewrite the Eq. (3) as: As v increases, ct G tends to a stable value. The introduction of the speed parameter v K conforms to the laws of physics.
After introducing the speed parameter v K , the data fusion problem of the continuous rail wheel weighing meter is transformed into finding the optimal are S1 K , S2 K , In the paper, these parameters are determined by constructing a BP neural network.

Introduction to BP Neural Network
BP neural network was proposed by R. Hart et al. in 1986 and is now the most widely used neural network. Take the three-layer neural network in Fig. 4 as an example. In Fig. 4, I is the input layer, H is the hidden layer, O is the output layer, W is the weight, and b is the bias. The goal of the BP neural network is to update the weight parameters through backpropagation to minimize the loss value, thereby searching for the optimal model parameters. Backpropagation needs to take the gradient between the loss value and the weight and use gradient descent to gradually converge the model to meet the engineering needs.

The BP Neural Network Model of the Continuous Rail Wheel Weighing System
The expansion of Eq. (4): The BP neural network model of this paper is based on Eq. (6). The model is a three-layer neural network, and its structure is shown in Fig. 5. The network has five inputs, including four sensor signals: , AD AD AD AD and the driving speed of the EMU: v. The output is ct G ' , which is the predicted value of the wheel weight of the EMU. The parameters that need to be trained are When training, the loss function L chooses MSE (Mean Square Error), the learning rate β is set to 1×10 −9 . The 5 inputs of the BP neural network are all vectors, and the length is equal to the number of input samples.

Forward Propagation Path
Build a matrix to simplify calculations: It can be seen from Fig. 5: In all formulas of this paper, "×" means matrix multiplication, and "*" means two matrixes with the same shape multiply the elements in the same position to obtain another matrix with the same shape. W and K v are initialized randomly, and updated through the back propagation path, finally reaching convergence.
The loss function L uses MSE, and the calculation formula is as follow: where N is the number of samples, ct G ' is the forward propagation prediction wheel weighing, and ct G is the real wheel weighing, which is 6000 kg in this paper.

Back Propagation Path
The back propagation gradient value in Fig. 5 is calculated as follows: Update parameter: The overall algorithm flow is shown in Fig. 6. The input of this algorithm is the 4 signals of the composite sensor, the driving speed v and the real weight value ct G . The output are the factors W of each sensor and the speed parameter v K . After W and v K are determined, the wheel weighing system predicts the wheel weight through Eq. (7).

SIGNAL PROCESSING OF CONTINUOUS RAIL WHEEL WEIGHING METER
Since the EMU driving through the weighing zone at a certain speed, the original weighing signal after the analogto-digital conversion has different degrees of fluctuation, and the hardware filtering alone cannot meet the highprecision weighing requirements, so it is necessary to introduce a filtering algorithm to preprocess the weighing signal.

Moving Average Filtering Algorithm
In engineering, people often use the moving average filtering method to process the weighing signal. Taking N consecutive sampling values as a queue, the first average the data in the queue to obtain the first filtering result. Then sample a new data, putting it at the end of the queue, and discard the first data of the queue. The total number of data in the queue is fixed to N, and the new queue is averaged to obtain the second filtering result. The following data can be deduced by analogy, repeating the above process. The filtering effect of the moving average filtering method is shown in Fig. 7 (N is set to 200). The blue curve in the figure is the weighing signal before filtering, and the red curve is the weighing signal after filtering. The filtering result shows that if the traditional moving average filtering method is directly applied to the continuous rail wheel weighing, there are the following defects: (1) The signal at the weighing interval still has a certain degree of fluctuation (part A of Fig. 7). The reason is that if there is continuous oscillation somewhere in the signal, the oscillation cannot be completely eliminated after being processed by the moving average filtering method.
(2) The filtered signal has some deviations at the time when the EMU is entering or leaving, which cannot accurately reflect the time when the EMU is entering or leaving (part B of Fig. 7). The reason is that at the end of the signal, it is impossible to take N/2 samples on the left and right sides to form a queue, and only N samples on the left can be taken, which leads to high filtering results.
(3) The filtered signal is less sensitive to the entry and exit of the EMU compared with the original signal (the slopes at C and D decrease).

Symmetrical Moving Average Filtering Algorithm
In order to eliminate the above three defects, this paper proposes a symmetrical moving average filtering algorithm.
Considering that the speed can be regarded as constant when the EMU is driving through the weighing zone, the resulting wheel weighing waveform should be a symmetrical curve. We propose a symmetrical moving average filtering method taking the data beyond 1/3 of the maximum value of the signal for filtering. These data are highly symmetrical and are the part needed for weighing. The data below the 1/3 the maximum value are retained. They cannot help the weight measurement but can reflect the times of the EMU in and out.
The algorithm does the following processing for the part of the data beyond 1/3 the maximum value: Suppose the queue length is N (200 in this paper). The filter takes the N/2 samples with the smallest abscissa of the original signal as the left queue, and the N/2 samples with the largest abscissa as the right queue. The filter averages the N samples and outputs the result as the first point and the last point of the filtered curve.
The left queue moves one bit to the right each time, and the leftmost data is removed; the right queue moves one bit to the left each time, and the rightmost data is removed, keeping the length of the queue unchanged. The filter averages the second queue and outputs the result as the second point and the penultimate point of the filtered curve. The following data can be deduced by analogy, repeating the process until the left and right queues meet. The filtered effect is shown in Fig. 8. Compared with the traditional moving average filtering algorithm, the symmetric moving average filtering algorithm proposed in this paper has the advantages of high smoothness and high sensitivity to the in and out of EMU. When the EMU drive in or out, the curve rises or falls sharply, showing a high sensitivity. At the same time, the middle part of the filtered curve is stable, which can better measure wheel weight.

EXPERIMENTAL DATA PROCESSING AND ANALYSIS
The real weight of the test wheel in this experiment is 6000 kg. In order to verify the data fusion effect of the BP neural network and the signal processing effect of the symmetric moving average filter, three sets of comparative experiments are carried out in this section. The first experiment only relied on experience to calibrate the sensor factors; the second experiment used BP neural network for data fusion but did not filter the data; the third experiment used filter algorithms for signal processing of the result of the second experiment. We calculated the mean square error values of the three experiments separately.
In order to eliminate the influence of the driving speed of the EMU and verify the optimization effect of the speed parameter, all experiments were completed at six different speeds.

Empirical Calibration Method
The data processing result of the empirical calibration method is shown in Fig. 9. The Left curve is the measurement result of the left track, and the Right curve is the measurement result of the right track. Considering the right track and left track have different inclination and sensors sensitivity, we need to calibrate each rail separately.
In Fig. 9 ch0-ch3 are the four sensors of the left track, and the values correspond to S1 K , S2 K , S3 K of Eq. (2). The "Left" corresponds to ct K of Eq. (3). The empirical calibration method cannot evaluate the influence of speed, so it uses the Eq. (3) to predict the result.
The middle part of the weighing curve was used for measurement to avoid the rising and falling edge of the signal. The weighing value of each moment is taken as a sample. The mean square error value is used as the evaluation index of the measurement effect.
where ct G ' is the predicted value of wheel weight, ct G is the real value of wheel weight, and N is the number of samples.
After calculation, the effect of the empirical calibration method is: The mean square error of the left track measurement result is: 14769.5 The mean square error of the measurement result of the right track is: 15018.7

BP Neural Network Training and Signal Filtering Processing Method
The training data of the BP neural network comes from data collected by the empirical calibration method, with 17500 samples on the left and right tracks respectively. The BP neural network was trained 50000 steps in total. The symmetrical moving average algorithm is used for signal processing, takes the wheel weighing data predicted by the BP neural network as input. The result is shown in Fig. 10.
The blue curve in the figure is the predicted value of wheel weight by the BP neural network, and the orange curve is the predicted value after filtering. It can be seen from the figure that the filtering algorithm in the paper has a good elimination effect for the occasional interference signal. After filtering, the estimated value of wheel weight fluctuates between 5950 kg -6050 kg, and the oscillation range is small.

Experimental Comparison and Analysis
The comparative results of the three groups of experiments are shown in Tab. 1 and Tab. 2. The final weighing results is the average of the Weighing results of left and right tracks.
The value in the table is the mean square error value between the measured wheel weight and the real wheel weight. From the table, we can see: 1) The sensor factors obtained by the empirical calibration method cannot be applied to all speed conditions. The BP neural network proposed in the paper introduces the speed parameter to solve the influence of the EMU speed on the wheel weighing.
2) After BP neural network training, the mean square error of the weighing results is greatly reduced.
3) Using the symmetrical moving average filter algorithm, the weighing results are more accurate and stable.
This experiment proves that the BP neural network model and the symmetric moving average filtering algorithm proposed in this paper have practicability.

Final Parameters and Measurement Accuracy of the Detection System
Through BP neural network training, the final sensor factors and speed parameter v K of Eq. (7)  Among the 17500 input samples, the standard error of the rail-continues wheel weight meter is 0.24%, the maximum error is 0.79%. We use the average value of the effective weighing signal as the final measurement result. Therefore, the standard error reflects the final accuracy and the maximum error reflects the oscillation of the weighing signal.

SUMMARY
In view of the shortcomings of the broken track wheel weighing meter, we propose a continuous rail wheel weighing meter. The composite sensor is directly arranged on the rail, and the output of the composite sensor is processed by data fusion and signal filtering. In terms of data fusion, we propose a BP neural network model and train the network to obtain the optimal fusion factors of each sensor. We introduce the speed parameter to solve the influence of the speed of the EMU on the wheel weighing. In terms of signal processing, we propose a symmetrical moving average filtering algorithm to process the estimated data of the BP neural network. The experiment proves that the neural network and filtering algorithm proposed in this paper greatly improve the weighing accuracy and measure the stability of the detection system. When the driving speed of the EMU is changeable, the weighing error of the rail-continues wheel weighing meter is 0.24%. In the National Metrological Verification Regulations of the People's Republic of China, 2012, the maximum allowable error is 1%. The rail-continues wheel weighing meter is up to standard.