1 Introduction

Since 1916, the German Geiger designed a mechanical device for measuring the torsional vibration measurement of the shaft. Since then, the measurement, application, and investigation of the torsional vibration signal in various types of systems with a rotating shaft are become more extensive [1,2,3,4]. Studies show that the Geiger’s mechanical inertial torsional vibration meter can accurately measure the low-frequency torsional vibration of the shaft. However, since the measurement is performed through direct contact, the system structure is complicated, so that the installation is troublesome. Thus, it is an enormous challenge in this method to handle the high-speed shafting system. In order to resolve such problems, measurements of the torsional vibration are now mainly replaced by electrical signal measuring devices [5,6,7,8,9,10,11]. The digital torsional vibration instrument usually uses a non-contact sensor to collect the real-time rotating speed with a high sampling rate. Then time–frequency algorithms are applied to process and analyze the collected signals. These instruments have remarkable advantages, including simple installation, accurate measuring in a wide range of rotational speed, and real-time analysis. However, similar non-contact sensors are exactly identical, and the corresponding adopted time–frequency algorithms are different too. Accordingly, it is necessary to calibrate these devices conveniently. Torsional vibration signal generator (TVSG) is used to generate relative standard and definite torsional vibration signals to measure the accuracy of the torsional vibration acquisition device. Currently, TVSG mainly includes mechanical gantry-type torsional vibration calibrator (MTVC) [12, 13] and pure digital torsional vibration calibrator (DTVC) [12, 13]. Studies show that the MTVC not only can be applied to calibrate the torsional vibration acquisition device but also evaluate the sensor signal. However, MTVC is a complicated and expensive device. Meanwhile, it is difficult to simulate various torsional vibration conditions through the MTVC. On the other hand, DTVC has no gantry system and only simulates the signal from the sensor in the analog torsional vibration measurement system. Consequently, it can more easily evaluate the accuracy of the signal processing in the torsional vibration acquisition device. However, the accuracy of the signal processing method of the torsional vibration cannot be fully evaluated through the DTVC, which uses a square wave with variable frequency to simulate a triangular wave for the torsional angle signal [13]. In the present study, it is intended to generate the time interval sequence of the tooth theory pulse by the inverse transformation based on the torsional angle of the shaft with instantaneous speed. It is expected that the proposed method can simulate arbitrary waveform torsional vibration signals and better evaluate the torsional vibration signal processing methods.

2 Measurement principle of the shaft torsional vibration

Currently, the method of measuring the torsional vibration of the shafting based on the instantaneous rotational speed is widely used in diverse applications [14, 15]. In fact, it is typical to obtain the instantaneous speed of the shaft through the gear sensor. Figure 1 shows the main principle of the torsional vibration measurement. The gear sensor is used to monitor the equally spaced gear wheel. Assuming that there is no torsional vibration, the instantaneous rotating speed of the shaft is equal to its average speed. With this assumption, the code wheel also rotates at a constant speed, and the repetition period of one pulse signal per tooth output by the sensor is the same. When the shaft has torsional vibration, it is equivalent to superimposing the rotating speed fluctuation to the rotating speed of torsional vibration based on its average speed. At this point, the pulse sequence received from the sensor is no longer evenly spaced, but a frequency modulated signal whose carrier frequency is modulated by the torsional signal. The signal is a pulse-position modulated (PPM) signal [16], and the corresponding instantaneous amplitude can be mathematically expressed as the following:

$$ S_{PPM} (t) = A\tau_{0} F_{0} + A\tau_{0} F_{0} K_{PPM} \frac{df(t)}{dt} + \frac{2A}{\pi }\sum\limits_{K = 1}^{\infty } {\frac{1}{K}\sin \left\{ {K\pi \tau_{0} \left[ {F_{0} + F_{0} K_{PPM} \frac{df(t)}{dt}} \right]} \right\}} \cdot \cos \left[ {K\omega_{0} + K\omega_{0} K_{PPM} f(t)} \right] $$
(1)

where \( f(t) \) is the original modulation signal, \( K_{PPM} \) is the adjustment coefficient, \( F_{0} \) is the unmodulated pulse repetition rate (Hz), \( A \) is the pulse amplitude (V), \( \tau_{0} \) is the pulse width (s), \( \omega_{0} \) is the angular frequency (rad/s) of \( F_{0} \). Moreover, the first term on the right hand side of Eq. (1) represents the DC component, the second term contains the differential information of the original modulated signal \( f(t) \), and the last term represents the phase modulation (PM) signal with the carrier frequency of \( K\omega_{0} \). It is worth noting that the spectrum of phase modulated (PM) and frequency modulated (FM) has the same bandwidth except for the phase difference \( \frac{\pi }{2} \).

Fig. 1
figure 1

Principle of the torsional vibration measurement

The analog torsional vibration test demodulates this signal through a low pass filter and an integrator to obtain a torsion angle signal. Moreover, the digital torsional vibration instrument collects the pulse signal through a pulse capture circuit (CAP), and the signal is demodulated as follows:

The time for the axis to rotate one cycle is set to \( t_{c} \), Eq. (2) shows that the average angular velocity is \( \omega_{c} \), the number of gear teeth is \( N \), the time for rotating \( n \) teeth is measured as \( t_{n} \). Moreover, Eq. (3) shows that the average speed of this tooth is \( \omega \). Equation (4) denotes that the torsional angle of the shaft is \( \theta \). Moreover, it should be indicated that Eq. (5) is obtained after the integral calculation. Therefore, as long as \( t_{c} \) and \( t_{n} \) are measured, the torsional angle can be calculated.

$$ \omega_{c} = \frac{{360^{ \circ } }}{{t_{c} }} $$
(2)
$$ \omega = \frac{{\omega_{c} n\frac{{t_{c} }}{N}}}{{t_{n} }} $$
(3)
$$ \theta (t_{n} ) = \int_{0}^{{t_{n} }} {(\omega_{c} - \omega } )dt $$
(4)
$$ \theta (t_{n} ) = \frac{{360^{ \circ } }}{{t_{c} }}\left( {t_{n} - n\frac{{t_{c} }}{N}} \right) $$
(5)

3 Principle of the digital torsional vibration signal generator

The torsional vibration signal generator inversely solves the time sequence of the sensor pulse signal by a known torsional angle signal. In other words, the \( t_{n} \) sequence in Eq. (5) is solved. When \( \theta (n) \) in Eq. (5) is known, \( t_{c} \) can be obtained from a known torsional angle signal and \( N \) is the number of actually simulated gears. In other words, it is the length of the sequence, so that it is also a known parameter. Therefore, \( t_{n} \) can be obtained by solving the equation.

3.1 Triangular wave torsional angle signal

Currently, some torsional vibration testing instruments use triangular waves as torsional vibration analog signals. The main principle of these instruments is to generate 100-tooth gear output pulse signals, mainly 50 pieces of 5000 Hz and 50 pieces of 5063.3 Hz square wave pulse signals. Figure 2 illustrates some of the square wave-forms. The inter-tooth angle is measurable. For a 100-teeth gear, such angle is 3.6º. Moreover, the transit time between the two teeth can be obtained from the pulse signal width. It is found that Fig. 3 can be effectively applied to calculate the instantaneous rotational speed. Figure 4 shows that the torsional angle curve formed by the time series of the pulse signal can be calculated by Eq. (5). The average annual rotation speed is 3018r/min, the torsional vibration frequency is 50.3 Hz, and the torsion angle peak is 0.566º. The torsional angle waveform is triangular. Moreover, the periodic function Fourier expansion is mathematically expressed as the following [16]:

Fig. 2
figure 2

Analog tooth measurement signal

Fig. 3
figure 3

Speed waveform

Fig. 4
figure 4

Torsional angle waveform

$$ \theta (t) = \frac{{8\theta_{m} }}{{\pi^{2} }}\left( {\sin \omega t - \frac{1}{9}\sin 3\omega t + \frac{1}{25}\sin 5\omega t + \cdots } \right) $$
(6)

The abovementioned equation can be applied to calculate harmonic torsional angles. Accordingly, it is found that the 1st, 3rd and 5th harmonic torsional angles are 0.458º, 0.051º and 0.018º, respectively. The FFT calculation is performed on the generated torsional angle signal. Moreover, Fig. 5 shows the torsional angle spectrum. According to Fig. 5, the amplitudes of the harmonics of 1st, 3rd and 5th have a certain error with the theoretical amplitude. The main reason is that the time series of the above mentioned torsional angles are not equally spaced and are discrete sequences of the finite length. Due to the discrete sampling, and the existence of the fence effect, FFT calculations cannot avoid the spectral leakage caused by the truncation. The accuracy of the amplitude calculation can be improved by improving signal processing methods, such as the equal time interpolation rearrangement, windowing and so on.

Fig. 5
figure 5

Torsional angle spectrum

The operating speed of the actual rotating shaft system is variable, and the pulse period can be adjusted according to a certain proportion. Therefore, the frequency of the 100 pulse signals can be adjusted, the different rotational speeds can be simulated, and the number of gears in the measured signal can also be adjusted by adjusting the number of pulses. It should be indicated that the trigonometric wave generator cannot completely cover all torsional angle waveforms, and cannot fully evaluate the analytical methods and instruments.

3.2 Single harmonic torsional angle signal

In more cases, the torsional angle signal is not a triangular wave signal, while it is a sinusoidal signal correlated to the excitation frequency.

Let the single frequency torsional angle signal be \( \theta (t) = A\sin (\omega t + \phi ) \).Where Fig. 6 shows that \( A = 1;\phi = 0;\omega = 100\pi \). Then:

$$ \theta (t) = \sin (100\pi t) $$
(7)

Substituting Eq. (7) into Eq. (5) yields in the following equation:

$$ \theta (t_{n} ) = \frac{{360^{ \circ } }}{{t_{c} }}\left( {t_{n} - n\frac{{t_{c} }}{N}} \right) = \sin (100\pi t_{n} ) $$
(8)

where \( t_{c} \) is the average period of the rotation speed and equals \( t_{c} = \frac{2\pi }{\omega } = 0.02\,{\text{s}} \). Moreover, \( N \) and \( n \) represent the number of the teeth and the real-time passing gear serial number, respectively. It should be indicated that \( N \) is set to 100. The tn sequence can be solved by dichotomy. Different from the linear torsional angle waveform, the tn sequence is unequally spaced. Moreover, Fig. 7 shows that the torsional vibration signal generator generates the corresponding pulse signal according to the tn time sequence. Figure 8 shows that the real-time rotational speed can be calculated according to this pulse sequence. The torsional angle can be calculated according to Eq. (5), that is, the torsional angle reconstruction signal, the difference between the reconstructed signal and the original signal. Figure 9 shows that the root mean square difference between the two is about 3.645e−4. It is observed that error between the pulse sequence and the original signal of the single-frequency torsion angle signal constructed by this method is minimal.

Fig. 6
figure 6

Single harmonic torsional angle signal

Fig. 7
figure 7

Pules sequence

Fig. 8
figure 8

Speed waveform

Fig. 9
figure 9

Reconstruction error

3.3 Inter-harmonic torsional vibration signal

In some cases, the torsional angle is not a single-frequency signal, but a torsional angle signal, which may contain an inter-harmonic signal, especially in the gearbox drive shaft structure. The inter-harmonic torsion angle signal can be described as the following:

$$ \theta (t) = A_{1} \sin (\omega_{1} t + \phi_{1} ) + A_{2} \sin (\omega_{2} t + \phi_{2} ) $$
(9)

Among them, \( A_{1} = 1;\phi_{1} = 0;\omega_{1} = 100\pi ;A_{2} = 0.5;\phi_{2} = 0;\omega_{2} = 90\pi \), then

$$ \theta (t_{n} ) = \sin (100\pi t_{n} ) + 0.5\sin (90\pi t_{n} ) $$
(10)

Substituting Eq. (10) into equation Eq. (5) results in the following equation:

$$ \theta (t_{n} ) = \frac{{360^{ \circ } }}{{t_{c} }}\left( {t_{n} - n\frac{{t_{c} }}{N}} \right) = \sin (100\pi t_{n} ) + 0.5\sin (90\pi t_{n} ) $$
(11)

If \( t_{c} = \frac{2\pi }{\omega } = 0.02s \), \( N \) equals 100. Then \( t_{n} \) sequence can be solved by dichotomy.

Figure 10 shows error between the reconstructed torsional angle and the original signal. Reconstruction error increases linearly, mainly due to the wrong value of \( t_{c} \). During the reconstruction and in the measured torsional vibration, \( t_{c} \) is the time of the rotation of the shaft system. In other words, through the time of 100 gears, the time of \( t_{c} = t_{100} \), then it can be obtained as the following:

$$ \sin (100\pi t_{c} ) + 0.5\sin (90\pi t_{c} ) = 0 $$
(12)

Find the third zero of Eq. (12), called tc. When error of tc occurs, the reconstruction error accumulates with time, so it increases linearly. In the actual tc testing process, it will also be affected by the sampling and counting clock. Therefore, when calculating the signal tc, the time step, which is consistent with the sampling clock when reconstructing the signal, is adopted. In this case, the third zero-crossing point of the signal is obtained by the fixed step search. In this case, 0.02067815 s is obtained and tc is modified. Figure 11 shows the post-reconstruction error. It is observed that the root mean square error is 7.11e−4. Moreover, it is found that the reconstructed signal is the same as the original signal.

Fig. 10
figure 10

Error reconstruction

Fig. 11
figure 11

Reconstruction error

If the inter-harmonic signal is analyzed, it is still calculated by FFT after the dual-period sampling. Figure 12 shows the frequency spectrum. Spectrum figure shows that because of less sampling period, lower frequency resolution and leakage and aliasing of the spectrum occurs. It is worth noting that the FFT analysis of the inter-harmonic signal can be carried out by increasing the length of the sampling window. The longer the sampling window, the higher the frequency resolution. Figure 13 shows the spectrum after the sampling window is enlarged.

Fig. 12
figure 12

Aliasing spectrum

Fig. 13
figure 13

High-resolution spectrum

3.4 Time-varying torsional vibration signal with inter-harmonics

The abovementioned signals are all stationary signals. While the actual torsional angle signals may be time-varying inter-harmonic torsional vibration signals.

The torsional angle signal can be mathematically expressed as the following:

$$ \theta (t) = A_{1} e^{{ - \varepsilon_{1} t}} \sin (\omega_{1} t + \phi_{1} ) + A_{2} e^{{ - \varepsilon_{2} t}} \sin (\omega_{2} t + \phi_{2} ) $$
(13)

where \( A_{1} = 1;\varepsilon_{1} = 0.5;\phi_{1} = 0;\omega_{1} = 100\pi ;A_{2} = 0.5;\varepsilon_{2} = 2;\phi_{2} = 0;\omega_{2} = 90\pi \), then

$$ \theta (t) = 1e^{ - 0.5t} \sin (100\pi t) + 0.5e^{ - 2t} \sin (90\pi t) $$
(14)

Figure 14 shows that the signal can be obtained by substituting Eq. (14) into Eq. (5) as the following:

$$ \theta (t_{n} ) = \frac{{360^{ \circ } }}{{t_{c} }}\left( {t_{n} - n\frac{{t_{c} }}{N}} \right) = 1e^{{ - 0.5t_{n} }} \sin (100\pi t_{n} ) + 0.5e^{{ - 2t_{n} }} \sin (90\pi t_{n} ) $$
(15)

where N equals 100 and tc can be obtained by Eq. (16). According to the 20 MHz fixed-step search, 0.02066315 s is obtained, and the dichotomy can solve the tn series.

Fig. 14
figure 14

Time-varying torsional vibration signal

$$ 1e^{{ - 0.5t_{c} }} \sin (100\pi t_{c} ) + 0.5e^{{ - 2t_{c} }} \sin (90\pi t_{c} ) = 0 $$
(16)

After the tn sequence is obtained, the torsional angle signal is reconstructed. Figure 15 shows error between the reconstructed signal and the original signal. It should be indicated that the reconstructed signal is consistent with the original signal. It is challenging to analyze this kind of signal by FFT. However, this time–frequency signal can be analyzed with high accuracy by Prony analysis or other time–frequency analysis methods [17,18,19,20].

Fig. 15
figure 15

Reconstruction error

3.5 Noisy torsional vibration signal

In the actual torsion angle model, it is necessary to consider the influence of noise. The Gaussian noise is a noise with probability density function obeying the normal distribution. The Gaussian distribution is denoted as N (μ, σ2). Where μ and σ2 are the mean of the Gaussian distribution (mathematical expectation) and the variance of the Gaussian distribution, respectively. It should be indicated that when μ = 0, σ2 = 1, the distribution is called a standard normal distribution. Moreover, the one-dimensional probability density of the Gaussian distribution is mathematically expressed as the following:

$$ P(x) = \frac{1}{{\sqrt {2\pi } \sigma }}\exp \left( { - \frac{{(x - \mu )^{2} }}{{2\sigma^{2} }}} \right) $$
(17)

Gaussian noise is added to the tn time sequence generated in Sect. 3.4. It should be indicated that the signal-to-noise ratio of the Gaussian noise amplitude and the measured sequence is 80 dB. Figure 16 shows the time series after the noise is added. Figure 17 shows the added noise signal. It is observed that the visible noise signal is small. Figure 18 shows the torsion angle signal after the time series reconstruction. Figures 19 and 20 present reconstruction error and the speed, respectively. Moreover, Fig. 21 shows the signal-to-noise ratio 100 dB reconstruction error. When the noise is 80 dB, there is a large reconstruction error, which indicates that the acquisition precision of the gear signal time series is high. This affects the acquisition accuracy of the gear time series, the frequency of the timing counting pulse of the CPU, the disturbance of the rotation speed sensor, the tolerance for gear codes and the basic vibration of the gantry.

Fig. 16
figure 16

The time series

Fig. 17
figure 17

Noise

Fig. 18
figure 18

80 dB noise reconstruction error

Fig. 19
figure 19

80 dB noise speed

Fig. 20
figure 20

Torsional angle

Fig. 21
figure 21

100 dB noise reconstruction error

4 Realization of the torsional vibration signal generator

The gear speed sensor obtains two kinds of signals as the following: (1) the pulse signal, where the real-time rotational speed can be obtained by pulse timing counting or pulse width measurement. (2) Sine wave analog signal, where this signal is shaped and filtered as a pulse signal. The first type of the signal can be generated by a pulse generator, while the second signal can be generated by DAC conversion. It is worth noting that DAC can also be used to simulate the signals of other sensors in the torsional vibration measurement such as the signals of stress and strain gauges or the analog signals of torque sensors. In the present study, TMS320F28335 is selected as the generator’s main control chip. The chip has a frequency of 150 MHz and has 12 PWM and 6 CAP. Moreover, it can provide multiple torsional vibration pulse signals at the same time and capture the pulse signal through CAP to self-calibrate. The SPI bus externally expands the DAC8552 module to generate an analog signal for the torsional vibration. TMS320F28335 has built-in AD. However, the built-in AD precision is not adequate. Therefore, through XINTF bus, the AD7606 digital-to-analog conversion module is expanded, which can be used to collect the analog signal of the torsional vibration. As a result, the generator also takes into account the acquisition of the torsional vibration signal. When calculating the TN time series, a transcendental equation should be resolved and the calculation time is relatively long. Therefore, in order to generate the TN series in advance according to the model, it is necessary to pre-store and expand the FLASH of the data and then obtain the correlation waveform according to the specified sequence by looking up the table method. Figures 22 and 23 illustrate the hardware structure and the prototype test, respectively.

Fig. 22
figure 22

Hardware structure topology

Fig. 23
figure 23

The prototype test

5 Evaluation of the torsional vibration analyzer

ANZT torsional vibration test analyzer [13] collects the pulse signal of the speed sensor. Then, it analyzes the signal with the STFT method to obtain the harmonic curve of the torsional vibration spectrum and shaft speed. Figure 24 shows the actual test bench, which is calibrated with the calibrator in this study. Moreover, Fig. 25 presents the ANZT software.

Fig. 24
figure 24

The actual test bench

Fig. 25
figure 25

The ANZT software

Moreover, Table 1 shows the ANZT analysis results.

Table 1 ANZT analysis results

In the analysis of the triangle wave and single harmonic torsional angle wave, ANZT obtains higher analysis accuracy. However, in inter harmonics and time-varying signal analysis, the accuracy of ANZT is significantly reduced. The method proposed in the present study can be used to more comprehensively evaluate the processing ability of a torsional vibration test analyzer for different types of torsional vibration signals.

6 Conclusions

DTVC detects the accuracy of the torsional vibration testing device by outputting the standard signal of the torsional vibration sensor. The output signals should support all kinds of torsional vibration working conditions as far as possible. The triangular wave torsional vibration waveform cannot completely represent the torsional vibration working condition. Moreover, it cannot test the torsional vibration testing device adequately. In the present study, the sensor signal sequence in the torsional angle formula is solved by the inverse method based on the principle of the torsional vibration testing device. Arbitrary torsional vibration waveforms can be generated theoretically by utilizing this method. In this study, single harmonic, inter-harmonic waveform, time-varying inter-harmonic and noisy time-varying inter-harmonic torsional vibration signals are illustrated, respectively. It should be indicated that the FFT analysis can result in higher accuracy of the single harmonic analysis. Therefore, multi-cycle FFT sampling is required to obtain high-frequency resolution in the inter-harmonic analysis. In time-varying inter-harmonic and noisy inter-harmonic analysis, it is challenging in the FFT analysis method to obtain high precision results. EMD [18, 19], Wavelet [20], and VMD [21] analysis may be required to analyze. According to this principle, DTVC based on TMS320F28335 is designed in the present study. The proposed method has a simple structure and multi-channel torsional angle signal outputs. Furthermore, it expands the output channel of real-time speed analog signal, which can adapt to the calibration of the torsional vibration testing device in more cases.