Dynamic Compensation of Piezoresistive Pressure Sensor Based on Sparse Domain

In the process of transient test, due to the insufficient bandwidth of the pressure sensor, the test data is inaccurate. Firstly, based on the projection of the shock tube test signal in the sparse domain, the feature expression of the signal sample is obtained. Secondly, the problem of insufficient bandwidth is solved by inverse modeling of sensor dynamic compensation system based on swarm intelligence algorithm. In this paper, the method is used to compensate the shock tube test signals of the 85XX series pressure sensors made by the Endevco company of the United States, the working bandwidth of the sensor is widened obviously, the rise time of the pressure signal can be compensated to 12.5 μs, and the overshoot can be reduced to 8.96%. The repeatability of dynamic compensation is verified for the actual gun muzzle shock wave test data, the results show that the dynamic compensation can effectively recover the important indexes such as overpressure peak value and positive pressure action time, and the original shock wave signal is recovered from the high resonance data.


Introduction
Transient signal refers to the signal with short duration, wide spectrum range, and obvious beginning and end. A large amount of energy is released instantaneously after a certain amount of explosive explodes in gun launching, which produces a shock wave, which propagates around at supersonic speed and conforms to transient process, which belongs to transient signal. Shock wave pressure measurement is an important parameter to evaluate weapons [1]. In the national project participated by the author, the shock wave was measured by 85XX series pressure sensors made by the Endevco company of the United States. However, the frequency response of 85XX series sensors cannot fully meet the frequency response characteristics of a certain caliber gun [2], the effective bandwidth cannot completely cover the highfrequency components of the signal, the overshoot is seriously amplified, and the original shock wave signal cannot be obtained.
For similar problems, many scholars adopt the method of later dynamic compensation to correct the data and improve the test accuracy in recent years [3][4][5][6]. The traditional dynamic compensation methods can be divided into two categories: one is to identify the sensor system based on the sensor model, on this basis, compensation links are constructed, such as zero pole assignment method and deconvolution method, etc [4,7,8]. But the sensor modeling itself has errors, which directly affect the dynamic compensation accuracy. The other is the neural network algorithm and swarm intelligence algorithm which does not depend on the sensor model. The dynamic compensation method based on the swarm intelligence algorithm has high precision [1,3,5,6]. Particle swarm optimization (PSO) is widely used in sensor dynamic compensation because of its low complexity, Specific applications such as QR decomposition and PSObased dynamic compensation of pressure sensor are proposed in reference [5], but it is easy to fall into local optimum [3,5]. Some scholars have also proposed other optimization algorithms, such as the fireworks algorithm (FWA) [3], which is characterized by high explosiveness and better population diversity, but it is followed by slow solving speed.
To sum up, researchers are committed to develop a general solution algorithm and constantly improve the structure of the system mathematical model to obtain better solution speed and accuracy, but so far, each algorithm has its limitations. In this paper, from another point of view, the abovementioned improved system mathematical model problem is transformed into the problem of optimizing the mathematical structure of the problem to be solved, so that the problem itself is more suitable for the existing solutions and easier to be solved. Therefore, this paper proposes to design a sparse domain filter, combined with different swarm intelligence algorithms, aiming at the sparse characteristics of the signal to be compensated, that is, many zero value coefficients are generated after the sparse transformation [9], which reduces the solution parameters in the calculation process, reduces the solution space, obtains higher solution accuracy and faster solution speed, and reduces the complexity of the model. The rest of this paper is arranged as follows. In Section 2, the principle of dynamic calibration and dynamic compensation of the pressure sensor are described. Section 3 is the design of a dynamic compensation filter based on the swarm intelligence algorithm. Section 4 is a dynamic compensation experiment and application in the actual test. Section 5 is the conclusion.

Dynamic Calibration and Dynamic
Compensation Principle of the Pressure Sensor 2.1. Dynamic Calibration of the Pressure Sensor. To get the dynamic performance index of the pressure sensor, it is necessary to calibrate the pressure sensor dynamically. At present, the internationally recognized dynamic calibration method of the pressure sensor is to calibrate the pressure sensor with a shock tube as the "ideal" step pressure signal generator [10]. The dynamic calibration diagram of the shock tube is shown in Figure 1 [5].
During calibration, the sensor to be measured is installed at the end of the shock tube low-pressure chamber, the separated diaphragm is inserted between the low-pressure chamber and the high-pressure chamber, and the diaphragm with different thickness is selected according to the range of the sensor. Under the action of the excitation signal, the pressure in the high-pressure chamber increases gradually until the diaphragm breaks. At the same time, a shock wave with constant pressure is generated at the diaphragm position to the low-pressure chamber, and then the sensor generates the response signal. The high-speed data acquisition instrument processes the response data of the velocity sensor according to formulas (1)-(3) to obtain the Mach number M a and the step pressure Δp of the reflected shock wave felt by the pressure sensor to be calibrated [5]. According to the range of M a and Δp, we can judge whether the step signal generated by the shock tube fully excites the sensor to be calibrated, which provides effective and reliable data for the subsequent com- where v is the incident velocity of the shock wave, l is the distance between velocity sensors, c is the sound velocity before the shock wave disturbance is received in the lowpressure chamber, and p 0 is the pressure in the lowpressure chamber.

Principle of Dynamic Compensation.
As mentioned in the introduction, to meet the requirements of the actual dynamic test, it is necessary to compensate for the pressure sensor dynamically. The compensation principle is shown in Figure 2. After the output signal Y ðnÞ is connected with a compensation system, the compensated signal uðnÞ can meet the requirements of dynamic measurement accuracy [3].
In conclusion, the shock tube is used as the standard pressure signal source as the step signal UðnÞ of the pressure sensor test system. Due to the wide range of the signal spectrum, the frequency components falling within the resonant frequency range of pressure sensors are amplified several times, resulting in signal distortion and dynamic error. By designing a dynamic compensation filter, the

Design of Dynamic Compensation Filter
Based on Swarm Intelligence Algorithm 3.1. Sparse Filter Design. In this paper, an improved dynamic compensation filter as shown in Figure 3 is proposed. The output signal YðnÞ is sparse transformed to obtain a small number of nonzero coefficients, that is, the feature expression YðkÞ. The transfer function h of the optimal compensation system is obtained by constructing a difference equation with the least square error function as an objective function by swarm intelligence algorithm HðzÞ. Finally, the compensated signal is obtained by the sparse inverse transform uðnÞ.

The difference equation is
Among them, UðkÞ is the sparse expression of the ideal signal of the input port, YðkÞ is the sparse expression of the measured data, a 0 , a 1 , ⋯, a n is the molecular coefficient, b 1 , ⋯, b n is the denominator coefficient, and N is the order of the compensation system.
It can be seen from formula (5) that the transfer function of the optimal compensation system HðzÞ is transformed into the problem of obtaining the optimal parameters, that is, the swarm intelligence algorithm is used to iterate for many times to obtain the order AðzÞ −1 and BðzÞ −1 coefficients of the optimal filter so that the final output signal uðnÞ is as close to UðnÞ as possible. The final compensation process is shown in Figure 4.
Given the short duration of transient signal in the time domain, that is, the low signal information density in the whole acquisition process, the sparse characteristic of the signal under a certain base can be determined. At present, the commonly used sparse bases are DCT, FFT, and DWT, etc [11]. To determine the final sparse region of the signal, several classical sparse bases are selected to transform the step signal and shock tube signal, respectively, and the sparsity after transformation is compared. The results are shown in Table 1.
Among them, the sparsity of step signal and shock tube signal is close under the sparse transformation of the db30 wavelet base, and the sparsity degree of step signal is generally in the middle under the sparse basis in the above table.
To keep more feature points of the signal and solve the filter parameters better, a db30 wavelet base with middle sparsity is selected to design the sparse domain compensation filter. The simulation results show that the proposed method can not only guarantee dynamic performance in the time domain but also greatly reduce the amount of calculation.
3.2. Swarm Intelligence Algorithm. The Swarm intelligence algorithm usually imitates the occurrence process of some phenomena in nature and arranges them into a specific solving process. The common swarm intelligence algorithms mainly include ant colony algorithm, genetic algorithm, particle swarm optimization algorithm, and some improved algorithms. The basic evaluation method is also focused on its optimization speed and solution accuracy.
PSO is a traditional swarm intelligence optimization computing technology, which has the characteristics of low complexity, stable implementation, but easy to fall into local optimum. The basic idea is to initialize the position and velocity of each particle in the initial population randomly, calculate the fitness of the objective function from the current value, and obtain the global and local optimal solutions. According to the updated formula, the position and speed of each particle are adjusted continuously, and the search is carried out gradually until it converges to the global optimal solution [12]. FWA was proposed by Professor Tan Ying of Peking University and others in 2010 [13]. It stimulates the process of sparks generated by a fireworks explosion to search the solution space, which is suitable for solving problems with more local extremum in the solution space. Its principle is similar to particle swarm optimization (PSO). The difference is that in the process of generating explosive sparks, Gaussian mutation is carried out randomly to ensure the population diversity of the offspring sparks. In addition to retaining the individuals with the optimal fitness value, the selection mechanism of Roulette is used to screen the remaining particles, to obtain excellent local searchability. 3 Journal of Sensors Therefore, this paper uses the above two algorithms to calculate the dynamic compensation filter and analyzes the performance of the compensation system.

Dynamic Compensation Experiment
This experiment uses the 85XX series 5 psi range pressure sensor from Endevco, USA (1 psi = 6:895 kPa). The factory verification certificate gives its full-scale 34 kPa (absolute pressure), and its sensitivity is 11.02 mv/kPa. This sensor was used in this dynamic calibration experiment. The temperature of the low-pressure chamber measured in this experiment is T = 23:7°C, the pressure of the low-pressure chamber is p 0 = 100:5 kPa, and the shock wave propagation velocity is v = 353:912 m/s. Calculated by c = 20:055 ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 273:15 + T p , the sound velocity of the low-pressure     (3) in Section 2.1, we get △p = 7/3ðM 2 a − 1Þð4M 2 a + 2/M 2 a + 5Þp 0 = 11:077kPa. That is, the pressure value of the shock management theory in this experiment is obtained by speed measurement: 11:770 kPa.
The data measured by the calibrated sensor is shown in Figure 5. The output of the steady-state part of the read step pressure is about 123.465 mV, which is converted to 11.204 kPa based on the sensitivity. The actual test result is 11.770 kPa, and the theoretical calculation error is about 4.81%. The calibration error of the shock tube is less than 5%. Therefore, the test data is valid data that meets the sensor test standard.
According to the calibration data of the shock tube, the experimental samples are obtained. The measured data length N is 13999. The time-domain diagram of the pressure test signal and the step signal of the shock tube is shown in Figure 6.
As mentioned above, due to the insufficient working bandwidth of the pressure sensor, there is a dynamic error in the measured signal. It can be seen from the spectrum diagram shown in Figure 7 that the signal frequency component of the sensor system is abnormally amplified near the resonance point of 71.3 kHz, the effective working frequency band is difficult to meet the requirement of no distortion measurement of shock wave signal, and the overshoot is 190%.
The sparse transformation results of the shock tube pressure test signal and step signal are shown in Figure 8. As mentioned above, the nonzero elements in the signal are significantly reduced, and the distribution is relatively concentrated. In this paper, the sparse transform result of the shock tube pressure test signal is taken as the input signal of sparse domain compensation filter, the sparse transformation result of step signal is taken as the output signal of sparse domain compensation filter, and the inverse model of compensation filter in the sparse domain is built.

Analysis of Dynamic Compensation Results.
Considering the compensation effect and hardware implementation difficulty, the order of the dynamic compensation model is 10. The particle swarm optimization algorithm and fireworks algorithm were used for 5000 iterations and 20 optimization times, respectively. Set the fireworks algorithm parameters as fireworks number: 8; maximum spark number: 64. The initial population size of PSO is 20. Finally, the fitness function is recorded, and the mean value is calculated. The comparison results are shown in Figure 9.

Journal of Sensors
It can be seen from the above figure that the initial value of the fitness function of the fireworks algorithm is slightly better than that of the particle swarm optimization algorithm at the initial stage of iteration, and then the particle swarm optimization algorithm quickly converges to the local optimum after 1229 iterations and cannot jump out. Because of its explosive search mechanism and roulette based selection mechanism, the fireworks algorithm has better population diversity, stronger local searchability, and constantly jumps out of local optimum. The final algebraic value of the fitness function is closer to 0 than the particle swarm optimization algorithm and has better solution accuracy than a particle swarm optimization algorithm.
Compared with the data in the literature [3] in the second and third columns of Table 2, when the fireworks algorithm and particle swarm optimization algorithm dynamically compensate in the same time domain, the fireworks algorithm obtains a better rise time and overshoot due to its stronger local searchability. At the same time, compared with the results of sparse domain solution in column 4 and column 5, there is no significant difference in the precision and speed of solution between the fireworks algorithm and particle swarm optimization algorithm, and the compensation results are better than those based on time-domain filter design (using the same data in reference [3]). In the process of transient signal testing, overshoot and rise time make two mutually restricted parameters. Based on the fact that it is more desirable to obtain less overshoot and faster rise time in the actual test process, the fireworks algorithm and particle swarm optimization algorithm can find an equilibrium solution in the solution process to better suppress the resonance frequency.
The comparison of sparse transformation results after dynamic compensation is shown in Figure 10. The nonzero parameter value of the shock tube test signal after sparse transformation is closer to that of the step signal. Based on the feature representation of the signal in the sparse domain, the number of nonzero parameters in the original signal is greatly reduced, and the minimum amount of parameter calculation is ensured, at the same time, sparse feature representation covers the intrinsic information of the signal. For complex algorithms like fireworks, it does not increase the computational complexity of the algorithm and reduces the iteration time. It can be seen that the filter design based on the sparse domain has better algorithm generality and good hardware friendliness. Figure 11 is the spectrum comparison of shock tube test signals before and after dynamic compensation. It can be seen that after dynamic compensation, the resonance frequency point of the signal is effectively suppressed, and the dynamic performance of the system is significantly improved after compensation. Figure 12 shows the comparison before and after the compensation obtained by FWA for shock tube data. After the sparse domain dynamic compensation filter, the signal overshoot decreases from 190% to 8.96%, and the rise time is 12.5 μs. The compensated signal is closer to the original step signal.   Spectrum comparison of shock tube test signal before and after dynamic compensation Spectrum before compensation Spectrum after compensation Figure 11: Spectrum comparison of shock tube test signal before and after dynamic compensation. 6 Journal of Sensors

Application in Actual
Test. Through the comparison and discussion in the previous section, the optimal compensation system is the transfer function determined by the optimiza-tion of the fireworks algorithm. The specific results are as follows: Now, this compensation system is used to compensate for the actual test results of the shock wave transient signal of the corresponding sensor. In a certain gun muzzle shock wave test, the data of shock wave signal measured by the 85XX series pressure sensor of the Endevco company of the United States before and after compensation is shown in Figure 13. Due to the low resonance frequency of the sensor, the test signal obtained overlaps with a high amplitude vibration waveform, which submerges the original shock wave signal. The resonance signal is still superimposed in the subsequent reflected shock wave, but the resonance amplitude is low due to the small frequency component of the reflected signal at the resonance frequency. After the compensation system, the original shock wave signal is recovered from the high resonance signal, and the overshoot is reduced. The test indexes, including the overpressure peak value and the positive pressure action time of shock wave, are closer to the real value. The experimental results show that the dynamic performance of the compensation system is good and practical.

Conclusion
In the process of using, the pressure sensor has insufficient dynamic characteristics and serious overshoot, which is diffi-cult to meet the accuracy requirements of the actual dynamic test system. To solve this problem, this paper proposes to continue the design of dynamic filters in the sparse domain to obtain the feature expression of the original signal, improve the accuracy of the solution, reduce the optimization parameters in the process of solving, and improve the speed of solution. Finally, it is verified by the shock tube and the measured gun data that this method can effectively compensate for the pressure sensor. The model is simple to implement, high precision of compensation, obvious improvement of dynamic characteristics, and more universal for solving algorithms. The method proposed in this paper can also be applied to the dynamic test of other types of sensors or test systems. It is easy to implement in hardware and can be widely used in real-time data processing of the actual test system.

Data Availability
The [DATA TYPE] data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that they have no conflicts of interest.