I am working on a project to reduce resonances caused by motors.
The vibrations in the material are measured and sampled by ADCs. The measuring works as intended and the next step is to reduce the measured resonances. My problem is the comparison of different measurements of the same resonances. I have an example:
The first picture shows the whole measurement with different uncompensated resonances. The second picture shows an uncompensated resonance and the third picture the same resonance but with compensation (samples from 15.3k to 16.3k). I need some metric or algorithm to be able to detect that the compensated resonance is "better" than the uncompensated one. Better in this context means that the amplitudes are smaller and less vibration is caused.
Initially, I thought of taking the absolute signal values and calculating the average amplitude like this:
$$\overline{A} = \sum \frac{\left|f(x)\right|}{N_{f(x)}},$$ where $f(x)$ are the samples and $N_{f(x)}$ is the number of samples.
After searching for algorithms on the internet I thought that my approach might be too simple and there are probably established algorithms in digital signal processing for such purposes. The closest fit I could find was cross-correlation to measure similarities between signals. I think this might not work for my problem, since cross-correlation does not describe in which direction the signals differ and I need to select which signal has overall lower amplitudes.
I also took a look at the resonance in the frequency domain. The compensation influenced primarily the amplitudes, so there was no significant change in the frequency domain. Here is a picture of my test:
The picture shows the above mentioned resonance both compensated and uncompensated in the time domain on the left and their FFT on the right. This was done in Scilabs.
I found many algorithms for different aspects of signal processing but nothing that addresses my problem. Is my initial idea a good way to compare the signals or are there better algorithms for comparing changes in signal amplitudes?
Update
I am not sure whether it is better to update or answer comments separately, but I have chosen to update the question because I got another graphic.
First of all, I looked at The Wavelet Tutorial, which was recommended in another post by OverLordGoldDragon, who commented on this question with a link to the other question. The wavelet transformation or time-frequency-analysis in general seems really interesting, but I do not think it helps with my problem. The resonances caused in my application are stationary signals, so FFT should be just fine to analyze the spectrum. However, my main concern is reducing the amplitudes of the resonances and find a way to compare them. There should be no need to compare the spectrum at different times. If I misunderstood something, please correct me.
Max commented that my FFT resolution was too low, which was true and I can present an example of another resonance (samples 2k to 3k), with 50 times as many samples.
This is a way better picture of the spectrum and shows, that two frequencies (290Hz and 390Hz) have been eliminated from the signal. What surprised me was the change in amplitude of the 100 Hz frequency. In the time domain the signals amplitude reduced by roughly 5.4% while the amplitude in the frequency domain reduced by roughly 40%. I can not explain where that difference comes from.