{'fraction_non_alphanumeric': 0.026055124892334195, 'fraction_numerical': 0.007895492391616422, 'mean_word_length': 4.539960238568589, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Low-cost Measurement of Industrial Shock Signals via Deep Learning Calibration

Special high-end sensors with expensive hardware are usually needed to measure shock signals with high accuracy. In this paper, we show that cheap low-end sensors calibrated by deep neural networks are also capable to measure high-g shocks accurately. Firstly we perform drop shock tests to collect a dataset of shock signals measured by sensors of different fidelity. Secondly, we propose a novel network to effectively learn both the signal peak and overall shape. The results show that the proposed network is capable to map low-end shock signals to its high-end counterparts with satisfactory accuracy. To the best of our knowledge, this is the first work to apply deep learning techniques to calibrate shock sensors.


INTRODUCTION
Accurate measurement of shock signal is crucial for product design in various industries. Some examples where shock signal matters include, the dropping of electronic devices [1], the crashing of automobiles [2], and the landing of aircraft [3]. To verify and validate the design of these products, physical experiments need to be conducted to measure their response under shock loading. However, measuring shock signal with high accuracy can be challenging with traditional accelerometers due to the extreme loading condition especially under the high-g shock environment [4]. While existing work in shock signal measurement is mainly based on more reliable but expensive hardware [5], in this paper we show that, high-g shock signals can be measured at a much lower cost with low-end sensors after deep learning calibration.
In shock signal measurement, both the overall signal shape and peak value are of interest to us. The peak value of a shock signal is a very important index in board-level shock test [6], while another important index shock response spectrum (SRS) is decided by the entire shock signal shape [7]. However, the complicated frequency content, short duration, and high magnitude of the shock response pose many These authors contributed equally to this work difficulties to the accurate measurement of shock signals [8]. Due to the less capable piezoceramic material, the defect in sensor structure design and manufacturing, those low-end shock sensors will become easier to get noise-polluted when measuring shock signals [9].
Traditional approaches to improve the sensor performance are usually based on designing better but more expensive hardware [10]. Existing research in calibrating shock sensors is mainly focused on making use of Hopkinson bar [5]. However, instead of directly calibrating the measured signals, Hopkinson bar is primarily used to calibrate the dynamic linearity, sensitivity, and repeatability of the accelerometer. Based on Hopkinson bar, researchers have tried to establish the nonlinear relationship of the signal parameters between the sensor output and physical models [11,12]. Despite the fact that these methods are very complicated, they are limited to calibrating the peak value and/or pulse width and other important features in the shock signals are ignored.
Although shock signals are complicated, their internal dynamics are governed by similar physics laws. Inspired by recent progresses in deep learning applied on time series data [13,14], we believe that deep learning can be a promising tool to find the internal correlations between these shock signals. To the best of our knowledge, the only related work to us is [15], which calibrates force sensors with neural networks and numerical simulated data. While both work use data driven approaches to calibrate sensors, we are focusing on high-g shock signals, which brings two extra difficulties: (1) unlike in [15], numerical simulated data can be unreliable to serve as references at high-g region due to the extremely nonlinear dynamics [16], (2) we are interested in calibrating both signal peak value and its overall signals shape, which requires better network design to accomplish.
In this paper, we first collect a dataset of shock signals through drop shock test. This dataset includes paired shock signals simultaneously measured by low-end and high-end sensors. Secondly, we propose a network that can accurately map the signals measured by low-end to signals similar to what high-end sensors will produce. Although our network is similar to [13,15] for time-series modeling, specific design needs to be made for modeling shock signals. We claim three folds of major contributions in this paper: • We establish the first dataset for industrial shock signal, which will facilitate the future research in the field of shock signal measurement.
• We propose a novel network which is able to map shock signal to higher fidelity.
• We show that data driven approach is promising for measuring complicated shock signals at low cost.

PROPOSED APPROACH
In the first part of this section, we describe the acquisition procedure of our shock signal dataset. In the second part, we describe our network structure and how it is trained.

Data collection
We conduct drop shock test to collect shock signals. The experiment platform setting is based on our previous work in [17], which is also illustrated in Fig.1. The logic behind this drop shock test is simple: the drop table is lifted up and released, it falls freely along the guide columns and collides with the rubber waveform generator (RWG) to produce the shock signal. This shock signal is transmitted to and picked up by the sensors mounted on the top of the drop table. The  higher we lift the drop table, the harder the drop table will hit RWG, and the larger the shock signal the system will produce. For more details on the experimental setup, we encourage readers refer to [17].
We used a low-end sensor and a high-end sensor to measure the shock signal simultaneously. Both sensors are attached to the top of the drop table. Low-end sensor is very cheap, but its signal tend to be noisy and can have large error in signal peak value. Meanwhile, high-end sensor is much more expensive but can produce a fairly accurate measurement. We will use the high-end sensor output as the groundtruth. In this study, all sensors are set to have the same sampling frequency of 200kHz. Once a shock signal is generated, these sensors will gather a pair of signals simultaneously with different levels of fidelity. We change the dropping height to obtain different pairs of the measured signal. A total of 660 drop tests are conducted, which leads to 660 collected shock signal pairs.
The raw signal is pre-processed to have equal length. We cut the signals to have an equal duration of 15 ms, with 2.5 ms and 12.5 ms before and after their peak. Considering the sampling rate, each signal has a length of 3000. Samples signals after pre-processing can be seen from Fig.3, where the signal to the left and right are produced by low-end sensor and high-end sensor respectively. We randomly select and hold back 160 pairs as testing set, while the rest 500 pairs are used to train the network. The distributions of the peak value of the signals from training set are shown in Fig.2. It can be seen that this dataset covers a wide range of acceleration up to 8,000 g. We will release this dataset to the community for research purpose.

Network architecture
In this subsection, we propose a novel network architecture to learn the mapping between shock signals obtained with different sensors. The motivation is that, after training, our network can transform the signals produced by low-end sensor to some signals very similar to what high-end sensor will produce. Intuitively, we adopt encoder-decoder style network to learn the mapping between signals produced by different sensors. In addition, as peak value matters for shock signals, we  Fig. 3. Illustration of proposed network architecture. PPN is the branch at the bottom. Our network takes in a noisy signal x r as input, and will output a calibrated signal y pred . The global feature vector is first further encoded into 8 dimension and then concatenated with the signal peak feature in PPN. Blocks in color denotes tensors, and transparent blocks denote network layers. Numbers in the block corresponds to feature dimensions.
introduce peak prediction network (PPN) to further calibrate the signal peak value.
As illustrated in Fig.3, our network has three main parts: encoder, decoder, and PPN. Raw signal x r is normalized first and its shape x n and magnitude p x are feed into the encoder and PPN separately. The normalized signal x n will be encoded to a 256 dimensional vector z, and reconstructed back to a 3000 dimensional vector y n by the decoder: z = enc(x n ; θ 1 ) where θ 1 and θ 2 are the network parameters for encoder and decoder respectively. Because the peak value is crucial for shock signals, we used PPN to further calibrate it. We feed the encoded global information of the normalized signal z as well as the peak value of the input signal p x to PPN. Its output p y res is the estimated error between the accurate peak value and the input peak value, which will be added back to p x to predict and the correct peak value p y : where φ is the network parameter of PPN. The network loss is composed of two parts: where L s is the loss to regulate the normalized signal, which is defined on θ 1 and θ 2 . L p is the loss to regulate the peak value of the raw signal, which is defined on φ. The L 2 term in L s loss encourages the transformed signal to have a similar overall shape as the ground truth, and the L ∞ term further pushes normalized signal to have correct relative peak value and location. We expect that by minimizing these losses in Eq.3, the network will be able to predict both the overall shape and the peak value of the shock signal well.

RESULTS AND DISCUSSION
As traditional "hardware" based approaches are costly and the comparison is not quite "apple to apple", we compare our methods with several possible "software" based approaches in this section. Candidate "software" approaches includes low pass filter (LPF), linear regression (LR), and auto-encoder (AE). For LPF, we choose to filter out frequency larger than 5,000 Hz. For AE, we removed the PPN component from the proposed network and kept L s as training loss. We propose two metrics E p and E o to measure the calibration performance on peak value and overall signal shape respectively: where M and N are signal length (3000 in this case) and the number of signals respectively. y i is the i-th testing signal, and y ij is the signal value of y i at j-th time step. As a matter of fact, p is the relative prediction error of peak value, and s  is the relative overall error w.r.t. the peak value. Without any treatment, the raw signal from the low-end sensor will have p of 13.5% and s of 228.6. The comparison of the calibration performance of these "software" based approach is listed in Tab.1. It can be seen that the filtering approach will result in a large p as expected, as the signal peak is of high frequency and is hard to be maintained after denoising. In the meantime, all data driven approaches turns out to be effective in calibrating the shock signals. LR is the fastest, but its accuracy on peak prediction is not very satisfactory. While vanilla AE has good performance, proposed network achieves the best result on both p and s . As the prediction of the peak value and signal overall shape are decoupled, our proposed network is able to further improve the performance of AE.
An example of the calibrated result from proposed method is shown in Fig.4. The subplot to the left and right shows the calibration effect in time and frequency domain respectively. It can be seen from the left subplot that the signal noise has been largely suppressed after passing through our network. Notably, in the meantime, the signal peak is maintained and even its value has been further calibrated. In the right subplot, we adopted the SRS curve to visualize for the calibration effect in frequency domain. SRS is one of the most widely adopted descriptor for shock signals, which can be used to estimate the maximum dynamic response of structures. It is calculated by imposing an excitation in a series of single de-gree of freedom systems with progressively increasing natural frequency. For more details on its computation we encourage readers refer to [18]. It can been seen that while there is a gap between the SRS curve from low-end and high-end signals, the difference is getting very small after our network calibration. This means that the calibrated signal from lowend sensors doesn't have much difference with the signal from high-end sensors in industrial applications.
In order to further understand the effect of each component of our network, we conduct an ablation study on our network structure and loss design. We first remove the global information z in PPN and find that the p increases to 9.7%. This means that the global signal shape information actually plays a very important role in predicting the signal peak value. If we only remove L ∞ term in L s , it is observed that p will increase by 1%. This means L ∞ term helps better learning of the relative value and location of the shock signal peak. We also tested that removing the ResNet style connection in PPN will increase p by 0.6%. These result show the effectiveness of our network design.

CONCLUSION
This is the first time that data driven approaches are introduced to measure shock signals. We designed a novel neural network that is able to calibrate low-end sensors. Results show that, with deep learning calibration, low-end sensors can be used to measure high-g shock signals with satisfactory accuracy. Since industrial signals can be collected in large scale with little effort, we expect that the proposed approach will lower the cost of high-g shock sensor largely in the near future.