1
$\begingroup$

I would like to detect oscillations in a signal $s$ and determine the nature of the oscillations, i.e. whether they are high-frequency oscillations or not.


Edit : An example of $s$ is given below : enter image description here

As you can see, the signal $s$ has no oscillations for the most range of time. But, at the end, the oscillations appear and I would like to determine the nature of the oscillations in term of frequency content.


My idea is to use a Butterworth high-pass filter to extract the oscillations $o$ of the signal $s$ and compute the amplitude spectrum of the extracted signal $o$ : $$ s(t) = \left[ s(t) - o(t)\right ] + o(t) $$

But, I forget some results of my signal processing courses. That is, I am not sure how to exploit the amplitude spectrum of $o$ to determine the nature of the oscillations.

Any help would be really appreciated. Feel free to use some maths to explain me. Many thanks :)

$\endgroup$
2
  • 1
    $\begingroup$ You could take the Fourier transform of $s(t)$ and perform a peak finding algorithm. This would be reliable if your signal is narrowband. Do you know anything about the bandwidth of the signal? $\endgroup$
    – Ash
    Commented Mar 31, 2022 at 16:02
  • $\begingroup$ In my opinion, the signal is narrowband. I just added a plot of an example of signals I am working on. $\endgroup$
    – Mistapopo
    Commented Apr 1, 2022 at 11:30

1 Answer 1

4
$\begingroup$

If your signal is a narrow band and real signal, the Hilbert Transform can be useful to determine the amplitude modulation and phase modulation components of the signal. This is done by adding the signal to it's Hilbert Transform as an imaginary component, and this result is called the "Analytic Signal" and given as:

$$x_a(t) = x(t) + j \hat x(t)$$

Where $\hat x(t)$ is the Hilbert Transform of $x(t)$.

Note that tools like MATLAB/Octave and Python scipy.signal actually return the analytic signal from the hilbert function, and not the Hilbert Transform directly (the Hilbert Transform would be the imaginary component of the complex signal that is returned).

In terms of AM and PM components $x_a(t)$ can be described as:

$$x_a(t) = A(t)e^{j(\omega t + \phi(t))}$$

And thus the absolute value of the analytic signal ($|x_a(t)|$) will recover the real envelope or AM component of the signal $A(t)$. If you take the phase of the analytic signal and subtract a reference carrier $\omega$, you can recover the phase modulation of the signal $\phi(t)$.

As Hilmar points out here and other posts, this does not work well for wideband signals. If we are to extract "oscillations in a signal", the implication in that statement is that we are either dealing with a narrowband signal with a tone (carrier) as reference, or a wideband reference signal from which we can extract narrow band oscillations.

For the more complicated case of a wideband reference signal a complex correlator could be used to accomplish this- we would need to first align the signals in time (our signal being observed and our reference), where the same correlation techniques can be used for alignment. Correlation is done with a product and low pass filter of the two waveforms, and the same result would be the difference or low frequency oscillation we seek to observe.

$\endgroup$
4
  • $\begingroup$ I think that the signals I am dealing with are narrowband signals (I just added one of them in the post). I can extract the oscillations accurately using a simple high-pass filter with Python (scipy). If I understand well, the nature of the oscillations can be determined using the phase modulation, isn't it ? $\endgroup$
    – Mistapopo
    Commented Apr 1, 2022 at 11:32
  • $\begingroup$ Not necessarily- you could have a fixed carrier with no phase modulation and all AM modulation (I can’t tell from the scale of your plot). An FFT would tell you the avg frequency content over the duration but not how it changed with time- my approach would be a quadrature down conversion (complex multiply with the perceived center carrier frequency, any close to the signal will do) and then evaluation the amplitude and phase vs time in the complex result after low pass filtering. Remove a linear unwrapped phase trend which serves to find a best “carrier” reference to use. $\endgroup$ Commented Apr 1, 2022 at 21:54
  • $\begingroup$ I am using Hilbert transform and it seems to work for several signals. The instantaneous frequency gives a good hint, I am working on windows. But the instantaneous amplitude seems to be affected when oscillations has frequencies too close to the sample rate (f_s). I am quite interesting in your approach, but I don't understand it. Do you have some references, articles, or something similar ? $\endgroup$
    – Mistapopo
    Commented Apr 8, 2022 at 9:41
  • $\begingroup$ You are seeing the effects of aliasing. Oscillations "close to the sampling rate" appear identically as oscillations close to DC (f=0), and the Hilbert does not pass DC. Any oscillations above half the sampling rate will be aliased to a lower frequency. I think this post will help to further explain what you are seeing: dsp.stackexchange.com/questions/70881/… $\endgroup$ Commented Apr 8, 2022 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.