Keywords

1 Introduction

The response of a structure to an excitation allows identifying the state of the structure. Structural health monitoring uses this advantage. Currently, there are many methods available that conclude on the integrity of the structure based on the modifications of the modal parameters, see for instance [1,2,3]. Among the modal parameters involved, the most commonly used is the natural frequency, as it is easily measured with the basic instrumentation [4]. Estimating the natural frequencies is typically made involving the Discrete Fourier Transform (DFT). It consumes more resources as the Fast Fourier Transform (FFT) but it ensures better results [5] because it permits setting the time length of the analyzed signal and in consequence the frequency resolution [6].

The clear advantage of the DFT against the FFT is the accuracy of the frequencies estimated, which is crucial in early state damage detection [7]. However, for short signals, accurate estimation of the natural frequencies becomes challenging due to the raw frequency resolution obtained [8]. Nowadays, numerous methods to increase the accuracy of the estimate exist. The simplest and most efficient techniques involve interpolation to obtain a correction term [9]. With this technique, we can find the position of the estimated frequency in an inter-bin position in the DFT spectrum. To obtain the correction term, interpolation is made for two [10,11,12] or three [13,14,15] DFT samples, including the maximizer found in the frequency range of interest. Even if the estimation gain precision, we found the results still depend on the signal acquisition strategy (i.e. the time length) [8].

In this paper, we propose an alternative approach for an accurate estimation of the harmonic components of the vibration signal. First, we repeatedly cut two samples from the initial signal that was attained by measurements. Next, we calculate a DFT for each of the resulting signals. All the obtained spectra are overlaid, resulting in a dense so-called overlapped spectrum. The largest of the individual maximizer is identified in the frequency range of interest in the overlapped spectrum and further interpolation is performed involving its two neighbors. Note that these two neighbors are also maximizers in the individual spectra. Because the maximizers are distributed in the overlapped spectrum in accordance with a pseudo-sinc function, which is asymmetric, we introduce a correction term to improve the estimate. The algorithm is implemented Python, resulting in an application that provides extremely precise results that can be used to assess damage in a very early state.

2 The Algorithm and Its Theoretical Background

The signals under consideration contain one or more harmonic components that are estimated with the proposed algorithm. The way the signals obtained from measurements are treated is identical, and we can assume that the results fall within a similar margin of error if the acquired signal has the same parameters as the generated signal. Let us consider that the signal x[n] has a time length tS and is generated with a frequency rate r. The number of samples necessary to create the signal is N, which can be calculated with the mathematical relation:

$$ N\, = \,\frac{r}{{t_{S} }}\, + \,1 $$
(1)

The frequency resolution Δf is inversely proportional to the signal length tS, so that their product is equal with 1. The frequency components are displayed in the spectrum at lines k, i.e. frequencies \( f_{k} \, = \,k\, \cdot \,\Delta f \) are indicated. Because the single-sided spectrum displays N/2 lines, the number of necessary spectral lines is \( k\, \in \,[0,\,N /2] \). If the signal has a length that does not involve an integer number of cycles for a given harmonic component, the maximizer will be displayed on the spectral line k indicating frequency fk closest to the true frequency fS and a value Xk smaller than the amplitude A of the component in question will be displayed. The maximizer illustrated in Fig. 1 is located on the spectral line k  = 5 that indicate the frequency fk = 5 Hz. The true frequency is fS = 5.31 Hz.

Fig. 1.
figure 1

Distribution of the spectral lines and the associated amplitudes

Along with the maximizer, due to leakage, the spectrum displays amplitudes on other spectral lines. The distribution of the amplitudes in the spectrum for a sinusoid that’s frequency fS does not fit a spectral line, i.e. \( f_{S} \ne f_{k} \), follows approximately the sinc function rule. The way how the frequency lines and their associated amplitudes in a DFT spectrum are calculated is well-known and not detailed here.

The idea based on which the algorithm is built is that by modifying the original signal length, different distributions of the spectral lines are obtained. By superposing the spectra, we obtain an overlapped spectrum with very fine resolution at which maximizer and the neighbors are displayed at frequencies very close to the true frequency. Figure 2 shows the peak of the overlapped spectrum, i.e. maximizer of the individual spectra obtained from the signals with different time lengths.

Fig. 2.
figure 2

Zoom on the peak of the overlapped spectrum highlighting the position of the maximizer achieved by iteratively cropping the signal

By performing an interpolation based on the three main peaks in the overlapped spectrum we obtain the amplitude AE and frequency fE that are even closer to the true one as that obtained from the overlapped spectrum.

Note that in the algorithm we use amplitudes that are not adjusted with the number of cycles N, thus for a different number of cycles different amplitudes will be obtained. This permits easily associating the maximizer to the number of cycles contained in the signal. After choosing the curve for a given number of cycles, we calculate the Power Spectral Density (PSD) before interpolation in order to normalize the amplitudes to the energy contained in maximizer (obtained from signals with different time lengths).

The error obtained when the same number of cycles is considered

$$ \varepsilon \, = \,\frac{{f_{S} \, - \,f_{E} }}{{f_{S} }} $$
(2)

can be normalized with the true sinusoid’s frequency. It results in a coefficient κ that is the same irrespective to the sampling strategy. Since:

$$ \kappa \, = \,\frac{\varepsilon }{{f_{S} }}\, = \,\frac{{f_{S} \, - \,f_{E} }}{{f_{S}^{2} }} $$
(3)

the true frequency is calculated from the algebraic equation:

$$ \kappa f_{S}^{2} \, - \,f_{S} \, + \,f_{E} \, = \,0 $$
(4)

If the harmonic components are quite far from each other, the effect of the leakage generated by one of them does not affect the other components. Therefore, we can treat each harmonic component of the signal individually. This approach is also motivated by the fact that each component contains an integer number of cycles for a different signal length. In the section dedicated to testing the algorithm, we also analyze the case where the signal has several harmonic components and show how close they can be to allow accurate frequency estimation.

In conclusion, running the algorithm involves the following steps:

  1. 1.

    Import the acquired/generated original signal S_1 (it should contain at least 5 cycles for the fundamental frequency);

  2. 2.

    Calculate DFT_1 for this signal and extract the maximizer M_1;

  3. 3.

    Extract two samples from the end of the signal and perform DFT_2;

  4. 4.

    Extract the maximizer M_2;

  5. 5.

    Repeat steps 3 and 4 until the signal S_1 is shortened with 2.5 periods T calculated for the frequency of interest. It should result j = 1…J maximizer;

  6. 6.

    Overlay all extracted maximizers M_j - three curves result, each for a certain number of cycles;

  7. 7.

    Select a curve for which the maximum M_max has two neighbors;

  8. 8.

    Convert the curve from DFT to PSD; l

  9. 9.

    Perform interpolation to find the trendline and its maximum MAX;

  10. 10.

    Apply the correction coefficient to find the estimated frequency.

The algorithm is implemented as an application written in Python programming language. The results obtained when the steps described above are performed are illustrated in Fig. 3.

Fig. 3.
figure 3

The results displayed when performing the steps described in the algorithm: (a) the DFT calculated for the original signal with the maximizer; (b) the overlapped maximizers for the iteratively cropped signal; (c) the overlapped maximizers for the selected number of cycles with the identified peak.

As one can observe in Fig. 3a, the DFT calculated for the original signal has two points with fairly close amplitudes, which means the real frequency and amplitude are not properly identified. Figure 3b shows all maximizers M_j found in the frequency range 4.5–6.5 Hz when the cropped signal contains at least four and maximum seven cycles. One can observe we obtained adequate maxima for both five and six cycles. Finally, selecting the number of cycles six, we obtain the curve represented in Fig. 3c. The interpolation is performed and the correction coefficient is applied, resulting the correctly estimated frequency and amplitude.

3 Tests Performed to Improve the Method’s Accuracy

To demonstrate that the algorithm implemented in Python is feasible, we perform tests that involve one or more sinusoids generated with known frequencies and amplitudes. Mainly we test the accuracy and repeatability of the results and the limit at which two harmonics with close frequencies can be detected.

3.1 The Effect of the Signal Length on the Estimation Accuracy

As we have shown in Sect. 2, the DFT calculation does not ensure the consistency of the results, because the frequency values determined depend on the signal length used for the calculation. Usually, the entire length of the acquired or generated signal is used, because the general idea is that a longer signal permits estimating more accurately the frequencies. This length is defined by the operator and usually remains unchanged until the experiment is finalized.

In this first example we show how the frequencies are estimated if the signal length varies in a limited range of around one period T. To this aim we generate a sinusoid with the frequency fS = 6.33 Hz and amplitude AS = 1 mm/s2. The original signal has N = 868 samples by a sampling rate r = 400, resulting in a time length tS = 2.1675 s.

From the original signal we repeatedly cut 2 samples, until it contains only 784 samples. For each signal thus obtained, the DFT is calculated by the standard method and the spectral component is determined again using the PyFEST application. The results, presented in Fig. 4, show that the values of the frequencies obtained using a standard DFT are strongly affected by the signal length and are in general not estimated correctly. The variation of the values obtained by the standard DFT method is framed in respect with the frequency resolution Δf, the range in which the estimated frequency may vary being indicated with purple lines in Fig. 4. On the contrary, using PyFEST we obtain the frequency fPy2 = 6.2999 Hz for the signal generated with even number of samples and the exact frequency fPy1 = 6.33 Hz if the signal is generated with an odd number of samples. Even if this effect is vanished for longer signals, we recommend using signals containing odd number of samples.

Fig. 4.
figure 4

The frequencies estimated using the standard DFT and with PyFEST.

We performed analysis involving signals with different frequencies, time lengths and generated with different frequency rates and have obtained always accurate results [16,17,18]. Therefore, we conclude the frequency estimation made with PyFEST is accurate and can be used for demanding applications of physics or engineering.

3.2 The Capacity to Detect Small Frequency Changes

If the signal is short, a coarse frequency resolution Δf is achieved and a big gap between two consecutive spectral lines results. This makes it impossible to observe small frequency changes, because, if the frequency changes slightly, the DFT still indicate the signal on the same spectral line but with different amplitude. The frequency change is observed only if the amplitude is shifted to a neighboring spectral line. So, for an interval ±Δf/2 around a spectral line the same frequency will be read.

The question is whether, with PyFEST, we can find very fine frequency changes even for short signals. To determine this, we generate one by one three sinusoids with close frequencies, see Table 1. These have the amplitude AS = 1 mm/s2 and are generated with the frequency rate r = 1000 Hz. Each of the three sinusoids is considered containing 970, 1970 and 2970 samples, respectively.

Table 1. Comparison of the results obtained with the standard DFT and involving PyFEST

For the nine resulted signals we calculated the standard DFT and performed an analysis with PyFEST. The frequencies obtained by the two methods are also shown in Table 1.

One can observe from Table 1 that the results obtained with the standard DFT do not allow detecting the frequency change, the same values being estimated for a given number of cycles. Conversely, PyFEST allows detection of frequency change with high accuracy, which has an important role in early-state detection of physical or engineering systems.

3.3 Frequency Estimation for an Acquired Signal

In this example we show how the natural frequencies of a beam in the intact state and with a complex-shaped crack are found from measured signals. The specimen is a carbon steel cantilever beam fixed in a machine vise at the left end, as shown in the schematic of the experimental stand, see Fig. 5. The beam has the active length L = 1 m and the rectangular cross-section has the width B = 50 mm and thickness H = 5 mm. In Fig. 5, the equipment used for excitation and acquisition is indicated and detailed information about the experimental setup is presented in [19].

Fig. 5.
figure 5

Schematic of the experimental stand.

The target was to find the natural frequencies for the out-of-plain vibration modes of the intact and damaged beam. In the case of damage, this has the depth 0.5 mm and is produced by electro-erosion with a wire of 2 mm diameter. The location of the crack is 225 mm from the fixed end. The two modes are analyzed independently, this meaning a tailored excitation was applied involving the sound speaker when the acquisition system was activated, followed by post-processing of the acquired signal.

We exemplify the case of modes four and five, for which the excitation was applied involving a sound speaker with a frequency close to that of the targeted vibration mode. The excitation time was, tE = 1…5 s. This kind of excitation was made to ensure a bigger amplitude for the targeted mode in comparison to all other modes.

The subsequent acquisition was made after a time tP = 0…3 s measured from the moment the excitation has stopped. The acquisition time was set to achieve at least 20 cycles in the signal. This strategy permitted the selection of response signals with different amplitudes, which was necessary to test the robustness and repeatability of the results. Obviously, PyFEST was used for signal post-processing. The estimations results are presented in Table 2.

Table 2. Estimation results for the measured signals for modes two to five

Analyzing Table 2, we can observe that the achieved frequencies are not the same as we obtain when involving DFT, but the differences are less than 0.01%. On the other hand, small frequency changes due to incipient crack is observable and the shift is certainly quantifiable, permitting to assess damage. This demonstrates the excitation method and the post-processing algorithm are feasible and permit observing the frequencies with accuracy, and, if the frequencies are altered, the change is observable.

4 Conclusion

We propose estimating the natural frequencies of a beam by an interpolation method performed on DFT samples belonging to spectra obtained for different time lengths. The method is proved reliable and errors less than 1% are obtained. The precision increases with the time signal’s length becoming negligible when considering numerous cycles in the original signal.

We improved the frequency estimates by taking for interpolation PSD samples and applying a correction coefficient which we have determined for all combinations of frequencies, sampling rates and time lengths. Using the PSD has the advantage that, for the different cropped signals, the effect of the time length is suppressed by normalization. The results are significantly improved compared with the case when we use the DFT samples, especially for a small number of cycles.