Investigation of the Temperature Compensation of Piezoelectric Weigh-In-Motion Sensors Using a Machine Learning Approach

Piezoelectric ceramics have good electromechanical coupling characteristics and a high sensitivity to load. One typical engineering application of piezoelectric ceramic is its use as a signal source for Weigh-In-Motion (WIM) systems in road traffic monitoring. However, piezoelectric ceramics are also sensitive to temperature, which affects their measurement accuracy. In this study, a new piezoelectric ceramic WIM sensor was developed. The output signals of sensors under different loads and temperatures were obtained. The results were corrected using polynomial regression and a Genetic Algorithm Back Propagation (GA-BP) neural network algorithm, respectively. The results show that the GA-BP neural network algorithm had a better effect on sensor temperature compensation. Before and after GA-BP compensation, the maximum relative error decreased from about 30% to less than 4%. The sensitivity coefficient of the sensor reduced from 1.0192 × 10−2/°C to 1.896 × 10−4/°C. The results show that the GA-BP algorithm greatly reduced the influence of temperature on the piezoelectric ceramic sensor and improved its temperature stability and accuracy, which helped improve the efficiency of clean-energy harvesting and conversion.


Introduction
In order to control vehicle overload, monitor and evaluate traffic volume, and ensure the safety and efficiency of vehicle transportation, the highway Weigh-In-Motion (WIM) system was produced [1,2]. The WIM system automatically obtains and detects the vehicle load information by embedding load cells on the driving road without affecting the normal driving of the vehicle, so as to fulfill its purpose of overload control [3,4]. The core component of the vehicle WIM system is the weighing sensor. At present, the products on the market have low measurement speed and low detection accuracy, with an average error of ±5-±30% [5][6][7]. While the American Society for testing and materials' (ASTM) specification standard (ASTME1318) stipulates that the total weight error of the high-speed weighing system (Class III) is 6%, and the total weight error of the European WIM system is uniformly specified as 5%, China's current road dynamic weighing standards are generally consistent with ASTM and European standards, and the total weight error of vehicles in the high-and low-speed-control weighing system is 5% [8]. It can be seen that the accuracy of WIM sensors needs to be improved in a large range. In addition, vehicle monitoring of some As shown in Figure 1, the piezoelectric sensor packaging slot adopted a band-type encapsulation structure. The overall size of the sensor was 150 mm × 45 mm × 28 mm (L × W × H). There was a reserved groove with a diameter ϕ of 25 mm for the PZT patch position in the middle of the protective structure. The size of the PZT patch was ϕ 20 mm × 2 mm. A stainless-steel gasket was added between the piezoelectric ceramic and the groove bottom in order to make the piezoelectric ceramic stress evenly. The size of the stainless-steel gasket was ϕ 25 mm × 2 mm. position in the middle of the protective structure. The size of the PZT patch wa × 2 mm. A stainless-steel gasket was added between the piezoelectric ceram groove bottom in order to make the piezoelectric ceramic stress evenly. The stainless-steel gasket was φ 25 mm × 2 mm. Based on the above design, the manufacturing process of the sensor was Firstly, we placed the stainless-steel gasket in the reserved groove and bonded electric ceramic sheet to the stainless-steel gasket with quick-drying glue. Sec signal wires were connected with the positive and negative pole of the piezo fixed into the groove wall. The remaining wires were drawn from the groove. T flexible electronic silica gel was poured into the gap between the groove wall ezoelectric ceramic, which could effectively prevent the piezoelectric materia trode from being affected by water or steam. Finally, after the flexible electroni ified, the two-component epoxy resin was filled and the air tightness and fla met. Using the same production process, two sets of sensors were packaged a SP-2, as shown in Figure 2.  Based on the above design, the manufacturing process of the sensor was as follows: Firstly, we placed the stainless-steel gasket in the reserved groove and bonded the piezoelectric ceramic sheet to the stainless-steel gasket with quick-drying glue. Secondly, the signal wires were connected with the positive and negative pole of the piezo sheet and fixed into the groove wall. The remaining wires were drawn from the groove. Thirdly, the flexible electronic silica gel was poured into the gap between the groove wall and the piezoelectric ceramic, which could effectively prevent the piezoelectric material and electrode from being affected by water or steam. Finally, after the flexible electronic gel solidified, the two-component epoxy resin was filled and the air tightness and flatness were met. Using the same production process, two sets of sensors were packaged as SP-1 and SP-2, as shown in Figure 2.

Temperature Characteristics Study of Piezoelectric Ceramics
groove bottom in order to make the piezoelectric ceramic stress evenly. T stainless-steel gasket was φ 25 mm × 2 mm. Based on the above design, the manufacturing process of the sensor w Firstly, we placed the stainless-steel gasket in the reserved groove and bon electric ceramic sheet to the stainless-steel gasket with quick-drying glue signal wires were connected with the positive and negative pole of the p fixed into the groove wall. The remaining wires were drawn from the groov flexible electronic silica gel was poured into the gap between the groove w ezoelectric ceramic, which could effectively prevent the piezoelectric mat trode from being affected by water or steam. Finally, after the flexible elect ified, the two-component epoxy resin was filled and the air tightness and met. Using the same production process, two sets of sensors were packag SP-2, as shown in Figure 2.

Temperature Characteristics of Piezoelectric Ceramics
PZT-4 has the advantage of a high piezoelectric coefficient, and is an id

Temperature Characteristics of Piezoelectric Ceramics
PZT-4 has the advantage of a high piezoelectric coefficient, and is an ideal forcesensing material. The performance parameters of piezoelectric ceramics are also different at different temperatures, which will result in changes in the piezoelectric sensor output and affect the accuracy of the sensor. This section tested the performance parameters of piezoelectric ceramics at different temperatures. Through the mechanical test, the sensor output signals under different temperature loads were obtained as the data basis for subsequent temperature correction.
First of all, the variation in electrical parameters with temperature were measured. Five PZT-4 piezoelectric ceramic sheets of the same size (ϕ 20 mm × 1.5 mm) were randomly selected. Temperature-adjustable refrigerators provided sub-zero temperatures with a temperature range of −40-0 • C, and the vacuum drying oven provided above zero temperatures in the range of 0-250 • C. In this test, the temperature was controlled at −25-80 • C, at an interval of 15 • C. The temperature was kept for 1h after the equipment reached the set temperature. Then, the specimens were taken out and measured in 1 min. The average values of the measured data of five samples were taken. Then, the data were used to analyze the changes in the piezoelectric coefficient and the capacitance of the piezoelectric ceramics with the change in temperature. The piezoelectric constant d 33 was measured using a quasi-static piezoelectric coefficient measuring instrument ZJ-6A, and the capacitance was measured using a UT603 capacitance inductance meter. The test equipment is shown in Figure 3, and the measurement results are shown Figure 4. different temperatures, which will result in changes in the piezoelectric sensor output and affect the accuracy of the sensor. This section tested the performance parameters of piezoelectric ceramics at different temperatures. Through the mechanical test, the sensor output signals under different temperature loads were obtained as the data basis for subsequent temperature correction. First of all, the variation in electrical parameters with temperature were measured. Five PZT-4 piezoelectric ceramic sheets of the same size (φ 20 mm × 1.5 mm) were randomly selected. Temperature-adjustable refrigerators provided sub-zero temperatures with a temperature range of −40-0 °C, and the vacuum drying oven provided above zero temperatures in the range of 0-250 °C. In this test, the temperature was controlled at −25-80 °C, at an interval of 15 °C. The temperature was kept for 1h after the equipment reached the set temperature. Then, the specimens were taken out and measured in 1 min. The average values of the measured data of five samples were taken. Then, the data were used to analyze the changes in the piezoelectric coefficient and the capacitance of the piezoelectric ceramics with the change in temperature. The piezoelectric constant d33 was measured using a quasi-static piezoelectric coefficient measuring instrument ZJ-6A, and the capacitance was measured using a UT603 capacitance inductance meter. The test equipment is shown in Figure 3, and the measurement results are shown Figure 4.  From Figure 4, it can be seen that the environmental temperature has a great influence on the electrical properties of PZT. In the temperature range of −25 °C to 80 °C, the piezoelectric coefficient and the capacity of the PZT-4 increased with the temperature, but the relationship between them is obviously not linear. different temperatures, which will result in changes in the piezoelectric sensor output and affect the accuracy of the sensor. This section tested the performance parameters of piezoelectric ceramics at different temperatures. Through the mechanical test, the sensor output signals under different temperature loads were obtained as the data basis for subsequent temperature correction. First of all, the variation in electrical parameters with temperature were measured. Five PZT-4 piezoelectric ceramic sheets of the same size (φ 20 mm × 1.5 mm) were randomly selected. Temperature-adjustable refrigerators provided sub-zero temperatures with a temperature range of −40-0 °C, and the vacuum drying oven provided above zero temperatures in the range of 0-250 °C. In this test, the temperature was controlled at −25-80 °C, at an interval of 15 °C. The temperature was kept for 1h after the equipment reached the set temperature. Then, the specimens were taken out and measured in 1 min. The average values of the measured data of five samples were taken. Then, the data were used to analyze the changes in the piezoelectric coefficient and the capacitance of the piezoelectric ceramics with the change in temperature. The piezoelectric constant d33 was measured using a quasi-static piezoelectric coefficient measuring instrument ZJ-6A, and the capacitance was measured using a UT603 capacitance inductance meter. The test equipment is shown in Figure 3, and the measurement results are shown Figure 4.  From Figure 4, it can be seen that the environmental temperature has a great influence on the electrical properties of PZT. In the temperature range of −25 °C to 80 °C, the piezoelectric coefficient and the capacity of the PZT-4 increased with the temperature, but the relationship between them is obviously not linear. From Figure 4, it can be seen that the environmental temperature has a great influence on the electrical properties of PZT. In the temperature range of −25 • C to 80 • C, the piezoelectric coefficient and the capacity of the PZT-4 increased with the temperature, but the relationship between them is obviously not linear.

Test Design of Temperature Compensation
There is a linear relationship between the ideal pressure sensor output charge and the measured pressure when the temperature is constant. However, in practical application, there is a nonlinear relationship between the pressure sensor output u and the input force F. Therefore, within the working temperature range of the pressure sensor, different temperatures can be selected to calibrate the compensated pressure sensor. In order to better test the influence of experimental temperature on the PZT sensor, the experimental control temperature was −25 • C to 80 • C, which covers most road conditions. The test temperature was successively set to −25 • C, −10 • C, 5 • C, 20 • C, 35 • C, 50 • C, 65 • C and 80 • C. According to the standard axle load and the load range of the machine specified in the code for the design of the highway asphalt pavement (JTG D50-2017), the loading force range was 5-25 kN. The load increment interval was 2 kN. At each temperature level, the temperature lasted for one hour to ensure a uniform temperature inside the sensor, and then the data were recorded. The test loading equipment adopted the electro-hydraulic servo fatigue testing machine from the Walter+Bai test equipment company in Switzerland, with a load range of ±100 kN and a temperature-control-box range of −150 • C to 350 • C. The loading test scheme is shown in Figure 5a. The loading device and the data acquisition equipment are shown in Figure 5 b and c. The load was sinusoidal, with amplitudes ranging from 5 to 25 kN, corresponding to an vehicle axle load range of 20-125 kN. The loading frequency was 5 Hz, which corresponded to a vehicle speed of 20-30 km/h. The output signal of the sensors was charge, which was converted into a voltage signal through a charge amplifier and amplified to an appropriate multiple. Finally, the data were collected by oscilloscope.

Test Design of Temperature Compensation
There is a linear relationship between the ideal pressure sensor output charge and the measured pressure when the temperature is constant. However, in practical application, there is a nonlinear relationship between the pressure sensor output u and the input force F. Therefore, within the working temperature range of the pressure sensor, different temperatures can be selected to calibrate the compensated pressure sensor. In order to better test the influence of experimental temperature on the PZT sensor, the experimental control temperature was −25 °C to 80 °C, which covers most road conditions. The test temperature was successively set to −25 °C, −10 °C, 5 °C, 20 °C, 35 °C, 50 °C, 65 °C and 80 °C. According to the standard axle load and the load range of the machine specified in the code for the design of the highway asphalt pavement (JTG D50-2017), the loading force range was 5-25 kN. The load increment interval was 2 kN. At each temperature level, the temperature lasted for one hour to ensure a uniform temperature inside the sensor, and then the data were recorded. The test loading equipment adopted the electro-hydraulic servo fatigue testing machine from the Walter+Bai test equipment company in Switzerland, with a load range of ±100 kN and a temperature-control-box range of −150 °C to 350 °C. The loading test scheme is shown in Figure 5a. The loading device and the data acquisition equipment are shown in Figure 5 b and c. The load was sinusoidal, with amplitudes ranging from 5 to 25 kN, corresponding to an vehicle axle load range of 20-125 kN. The loading frequency was 5 Hz, which corresponded to a vehicle speed of 20-30 km/h. The output signal of the sensors was charge, which was converted into a voltage signal through a charge amplifier and amplified to an appropriate multiple. Finally, the data were collected by oscilloscope. The digital oscilloscope type was a DPO2024 from Tektronix and the charge amplifier adopted an LZ1105-16. The main parameters are shown in Table 4. The digital oscilloscope type was a DPO2024 from Tektronix and the charge amplifier adopted an LZ1105-16. The main parameters are shown in Table 4. The charge amplifier used in this research can select seven gain factors which can be set by the four bits, as shown in Figure 6. In this paper, the gain factor was 1 as the sensitivity was 100 Pc/mV.  The charge amplifier used in this research can select seven gain factors which can be set by the four bits, as shown in Figure 6. In this paper, the gain factor was 1 as the sensitivity was 100 Pc/mV.

Data Acquisition
This experiment collected the voltage signal of the piezoelectric sensor converted by the charge amplifier. A total of 88 groups of data were collected. The original output data of the piezoelectric sensor are shown in Tables 5 and 6. Load F is the original input pressure, and U is the output voltage of piezoelectric ceramic sensor at different temperatures. The diagram in Figure 7 is the curve of two piezoelectric sensors before compensation. Based on the output results of a 20 °C room temperature, the relative measurement error δ percentage of the sensors at different temperatures was calculated, according to Equation (1), as shown in Figure 8, which shows that the measurement accuracy of the sensor is greatly affected by temperature. Without any compensation, the maximum error of SP-1 was more than 35% in the temperature range of −25-80 °C, and the maximum error of SP-2 was as high as 50%. According to Equation (1): where: • Δ is the is the absolute error; • L is the true value. Table 5. SP-1 raw output data.

Data Acquisition
This experiment collected the voltage signal of the piezoelectric sensor converted by the charge amplifier. A total of 88 groups of data were collected. The original output data of the piezoelectric sensor are shown in Tables 5 and 6. Load F is the original input pressure, and U is the output voltage of piezoelectric ceramic sensor at different temperatures. The diagram in Figure 7 is the curve of two piezoelectric sensors before compensation. Based on the output results of a 20 • C room temperature, the relative measurement error δ percentage of the sensors at different temperatures was calculated, according to Equation (1), as shown in Figure 8, which shows that the measurement accuracy of the sensor is greatly affected by temperature. Without any compensation, the maximum error of SP-1 was more than 35% in the temperature range of −25-80 • C, and the maximum error of SP-2 was as high as 50%. According to Equation (1): where: • ∆ is the is the absolute error; • L is the true value.  Table 6. SP-2 raw output data.        Table 6. SP-2 raw output data.   Table 6. SP-2 raw output data.

Mathematical Model of Temperature Characteristics of PZT Sensor
Based on the existing experimental research, this paper established the mathematical model of temperature characteristics of a piezoelectric sensor. When the sensor size and material parameters were determined and the environment temperature was constant, the

Mathematical Model of Temperature Characteristics of PZT Sensor
Based on the existing experimental research, this paper established the mathematical model of temperature characteristics of a piezoelectric sensor. When the sensor size and material parameters were determined and the environment temperature was constant, the output signal had a linear relationship with the force, which can be simplified by the following equations: where: • K is the sensitivity coefficient of the sensors, in V/N; • F is the force applied on the sensor, in N.
K was determined by the electrical parameters of the piezoelectric materials and load ratio of the piezoelectric ceramic sheets, which were affected by temperature and difficult to calculate using a mechanical formula. If considering the temperature effect, the output voltage of the PZT sensor was not linear with the force.
It was assumed that the sensor sensitivity changed linearly with temperature from −25 • C to 85 • C. where: • k T is the PZT sensor sensitivity temperature coefficient; • T is the temperature; • k 0 is the sensitivity of PZT sensor at 0 • C.
Therefore, the temperature characteristic mathematical model of piezoelectric sensor is:

BP Neural Network of Temperature Compensation
The temperature compensation principle using a BP neural network is shown as follows: the voltage collected after temperature control of piezoelectric ceramic sensor was taken as the output value. At this time, the voltage was affected by temperature, and the voltage and temperature were taken as the input of the BP neural network. After the training of the BP neural network, the corrected pressure value was obtained. At this time, the three-layer BP neural network [29,38] was used as the training model, including the input layer, hidden layer and output layer, as shown in Figure 9.
• K is the sensitivity coefficient of the sensors, in V/N; • F is the force applied on the sensor, in N. K was determined by the electrical parameters of the piezoelectric materials load ratio of the piezoelectric ceramic sheets, which were affected by temperature difficult to calculate using a mechanical formula. If considering the temperature effect output voltage of the PZT sensor was not linear with the force.
It was assumed that the sensor sensitivity changed linearly with temperature f −25 °C to 85 °C. = where: • T k is the PZT sensor sensitivity temperature coefficient; • T is the temperature; • 0 k is the sensitivity of PZT sensor at 0 °C. Therefore, the temperature characteristic mathematical model of piezoelectric se is:

BP Neural Network of Temperature Compensation
The temperature compensation principle using a BP neural network is shown as lows: the voltage collected after temperature control of piezoelectric ceramic sensor taken as the output value. At this time, the voltage was affected by temperature, and voltage and temperature were taken as the input of the BP neural network. After the t ing of the BP neural network, the corrected pressure value was obtained. At this time three-layer BP neural network [29,38] was used as the training model, including the i layer, hidden layer and output layer, as shown in Figure 9. The training of GA-BP neural networks in this study mainly included the follow steps: (1) Preparation of the dataset: In this paper, 88 groups of data, obtained from SP-1 in above experiment, were used for model construction. All of the samples were domly divided into two sets, of which 77 groups of data were used as the trainin The training of GA-BP neural networks in this study mainly included the following steps: (1) Preparation of the dataset: In this paper, 88 groups of data, obtained from SP-1 in the above experiment, were used for model construction. All of the samples were randomly divided into two sets, of which 77 groups of data were used as the training set and 11 groups of data were used as the verification set. All the data were normalized to unify their values between [-1,1]; (2) Number of implied layers: The number of hidden layer nodes and the number of iterations in the training process had a great impact on the accuracy and efficiency of network training. Empirical formulas were used to calculate the hidden layer nodes; where: • m is the input of the layer number; • n is the number of the output layer; • a is generally taken as an integer between 1 and 10.
(3) Determination of the training parameters: The essence of the training process is to iteratively reduce the error between the predicted value and the target (actual) value. The learning rate may affect the training accuracy and training speed of the network. With the decrease in learning rate, the training accuracy is improved at the cost of increasing training time. However, too high a learning rate will lead to network instability and lead to failure to converge. The learning rate is usually set between 0.001 and 1. This time, the learning rate was set to 0.01. The target training error was set to 0.00001 and the number of iterations was set to 1000; (4) Genetic algorithm solution: A population size of 30 was established by a genetic algorithm; the number of iterations was 50, the mutation probability was 0.2 and the crossover probability was 0.8.

Compensation Results of the Polynomial Regression Algorithm
The simplified equation of the temperature characteristics of the piezoelectric ceramic sensor established in this paper is shown in Equation (3), and the actual fitting process is carried out in Equation (6).
In this paper, the experimental results of the sensor output temperature characteristics were fitted by MATLAB. The X-axis is the temperature variable, the Y-axis is the pressure variable, and the Z-axis is the corresponding output of the sensor. The fitting results are shown in Figure 10. The black spot is the measured value of the sensor test, and the surface is the fitting result. The fitting results of the two groups of sensors are shown in Table 7.

GA-BP Neural Network Compensation Results
The neural network structure after GA-BP training is shown in Figure 11. There were 11 samples in the training set. The data outputs of BP and GA-BP neural network for training samples are shown in Table 8. The error and predicted results of BP and GA-BP neural network are shown in Figures 12 and 13. The mean square error (MSE) of BP neural network is 0.66604 and the root mean square error (RMSE) is 0.81611; the MSE of the optimized neural network is 0.017518; and the RMSE is 0.13236. It can be seen that the prediction accuracy of the GA-BP neural network is much higher than BP neural network on training set.

GA-BP Neural Network Compensation Results
The neural network structure after GA-BP training is shown in Figure 11. There w 11 samples in the training set. The data outputs of BP and GA-BP neural network for t ing samples are shown in Table 8. The error and predicted results of BP and GA-BP ne network are shown in Figures 12 and 13. The mean square error (MSE) of BP neural work is 0.66604 and the root mean square error (RMSE) is 0.81611; the MSE of the mized neural network is 0.017518; and the RMSE is 0.13236. It can be seen that the pre tion accuracy of the GA-BP neural network is much higher than BP neural networ training set.        In order to calculate the accuracy and sensitivity measurement piezoelectric ceramic sensor, all the data were taken into the train shows that the genetic algorithm reached the optimal individual fit with a value of 0.02811. Figure 15 shows the comparison of between and the real value. Figure 16 shows the relative error of the two neur samples. GA-BP neural network is much better than the BP neural ne  In order to calculate the accuracy and sensitivity measurement of the compensated piezoelectric ceramic sensor, all the data were taken into the trained model. Figure 14 shows that the genetic algorithm reached the optimal individual fitness at the 10th time with a value of 0.02811. Figure 15 shows the comparison of between the predicted value and the real value. Figure 16 shows the relative error of the two neural networks of all the samples. GA-BP neural network is much better than the BP neural network on the whole. In order to calculate the accuracy and sensitivity measurement piezoelectric ceramic sensor, all the data were taken into the traine shows that the genetic algorithm reached the optimal individual fitn with a value of 0.02811. Figure 15 shows the comparison of between and the real value. Figure 16 shows the relative error of the two neura samples. GA-BP neural network is much better than the BP neural ne    In order to calculate the accuracy and sensitivity measurem piezoelectric ceramic sensor, all the data were taken into the tra shows that the genetic algorithm reached the optimal individual with a value of 0.02811. Figure 15 shows the comparison of betw and the real value. Figure 16 shows the relative error of the two ne samples. GA-BP neural network is much better than the BP neural

Comparison of Compensation Results and Error Analysis
The SP-2 data were compensated by the same algorithm compensation algorithms are shown in Table 9. The evaluat adopted the determination coefficient R 2 and RMSE . R 2 is an i the goodness of fit of the model. It is the ratio of the sum of re of total squares. Its value reflects the relative degree of regre most commonly used index to evaluate the goodness of fit o greater R 2 (close to 1), the better the fitted regression equation deviation between the observed value and the real value. It is measure the prediction results of machine learning models. T termine whether the predicted value has achieved the expe RMSE value, the stronger the model's ability to interpret inf and closer it is to the real situation. It can be seen from the t effect of the GA-BP neural network is much better than that from the analysis of R 2 and RMSE. It can be seen that the stron of the neural network can be widely used in the field of temp

Comparison of Compensation Results and Error Analysis
The SP-2 data were compensated by the same algorithm, and the results of the two compensation algorithms are shown in Table 9. The evaluation index of the algorithm adopted the determination coefficient R 2 and RMSE. R 2 is an important statistic reflecting the goodness of fit of the model. It is the ratio of the sum of regression squares to the sum of total squares. Its value reflects the relative degree of regression contribution. R 2 is the most commonly used index to evaluate the goodness of fit of the regression model. The greater R 2 (close to 1), the better the fitted regression equation. RMSE is a measure of the deviation between the observed value and the real value. It is often used as a standard to measure the prediction results of machine learning models. To a certain extent, it can determine whether the predicted value has achieved the expected effect. The higher the RMSE value, the stronger the model's ability to interpret information for data samples, and closer it is to the real situation. It can be seen from the table that the compensation effect of the GA-BP neural network is much better than that of polynomial linear fitting from the analysis of R 2 and RMSE. It can be seen that the strong nonlinear mapping ability of the neural network can be widely used in the field of temperature compensation. The calculated load F' of the two groups of sensors compensated by the GA-BP neural network is shown in Tables 10 and 11. The compensated data are shown in Figure 17. It can be seen that the measurement results at different temperatures after compensation are basically unchanged. The relative error of the compensated data was calculated, as shown in Figure 18. The maximum measurement relative error of SP-1 decreased from 35.17% to 5.18%, and the maximum measurement relative error of SP-2 decreased from 50.00% to 5.71%.
In order to measure the performance index of the sensor after compensation, the relative errors of measurement accuracy, temperature sensitivity coefficient, and full scale were calculated, respectively. The relative errors of measurement accuracy before and after compensation are shown in Figures 8 and 18, respectively.    Table 11. SP-2 GA-BP neural network output after training.        The relative error percentage before and after compensation was averaged to obtain the relative error percentage of the sensors at different temperatures. The maximum average relative error of the two groups of sensors was reduced to within 2% after correction. As shown in Figure 19, the relative error of the piezoelectric ceramic sensor decreases after GA-BP compensation, and the average relative error of the sensor basically remains unchanged with the increase in temperature.

, x FOR PEER REVIEW
In order to measure the performance index of the sensor a ative errors of measurement accuracy, temperature sensitivity were calculated, respectively. The relative errors of measurem ter compensation are shown in Figure 8 and Figure 18, respect The relative error percentage before and after compensati the relative error percentage of the sensors at different tempe erage relative error of the two groups of sensors was reduced to As shown in Figure 19, the relative error of the piezoelectric cer GA-BP compensation, and the average relative error of the se changed with the increase in temperature. Then, the temperature sensitivity coefficient and the rela The sensitivity coefficient αs is shown in Equation (7), and the is shown in Equation (8)  Then, the temperature sensitivity coefficient and the relative error were calculated. The sensitivity coefficient α s is shown in Equation (7), and the relative error o at full scale is shown in Equation (8): Among them, U max − U min e the maximum value, T 2 represents the upper value, T 1 represent the lower value.
Using the above equations, the sensitivity coefficient before and after compensation and the relative error at full scale were calculated, respectively. The calculation results are shown in Table 12.

Conclusions
When the PZT sensor is used as a dynamic-weighing monitoring device, the improvement in detection accuracy and sensitivity is greatly limited due to the influence of temperature on the polarization intensity of the piezoelectric materials. In this paper, a PZT sensor suitable for a road traffic environment was designed, its temperature characteristics were studied, and the influence of the law of temperature on the performance of the sensor was analyzed according to the experimental results. After analyzing the results of the two compensation algorithms, the following conclusions can be drawn: (1) In this study, a piezoelectric sensor for a road Weigh-In-Motion (WIM) system was designed with piezoelectric ceramic as the core material. The sensor had the advantages of small volume, high reliability and easy construction; (2) In this paper, polynomial fitting and a GA-BP neural network were used to compensate for the output results. Compared with R 2 and RMSE, the compensation effect of the GA-BP neural network was far better than that of polynomial linear fitting compensation, and the temperature compensation effect was obvious; this shows that the GA-BP temperature compensation model can better weaken the influence of temperature on sensor output; (3) In order to measure the performance index of the sensor after compensation, the temperature sensitivity drift of SP-1 was reduced from 1.0192 × 10 −2 • C −1 to 1.896 × 10 −4 • C −1 , and the relative error at full scale was reduced from 30.5% to 1.42%, which was greatly improved. SP-2 also achieved the same effect. The measurement accuracy and sensitivity of piezoelectric ceramic sensor were improved.
At present, research on the temperature characteristics of piezoelectric sensors and temperature compensation methods for piezoelectric sensors are still in their initial stages. Compared with the commonly used temperature compensation methods, this paper used a genetic algorithm to optimize a BP neural network, in order to improve the accuracy and sensitivity of temperature compensation. When the new piezoelectric ceramic sensor with temperature compensation is used as the dynamic weighing device, its detection accuracy can be effectively improved.