2

My problem is the following: I am sampling data from a sine signal

  • Samples come in a online fashion (more and more data incoming through time).
  • The device does not have a lot of memory so it is impossible to store a lot of points -> the algorithm needs to be a online fashion.
  • The sine is noisy (assuming gaussian noise).
  • Sometimes it is clipping, sometimes it is not.

I need to detect when it is clipping. I guess this probably depends on the intensity of the clipping and the variance of the noise, but I am clueless on the type of "online" algorithms that could do that.

In the figure, my goal is to be able to distinguish between the sampled signal and the clipped sample signal in an online fashion.

Good signal Clipped signal

A.Eng
  • 21
  • 1

2 Answers2

0

For the signal in the picture a simple lowpass filter followed by a energy detector should do the trick. Clipping creates signal segments that are fairly constant, i.e. they have a lot of low frequency energy. If you set the cutoff of the lowpass below the signal frequency, it will remove most of the signal and the noise and what you are left are mostly clipping artifact (or lack thereof). The amount of low frequency would be a estimator of clipping occuring.

Hilmar
  • 44,604
  • 1
  • 32
  • 63
0

This maybe is a stale question, but I think there is no simple way to deal with this.

Probably the first thing you need to do is measure the "pitch" or period of the periodic function.

Then tune a really good comb filter to get rid of noise that is not close to the harmonic frequencies. Perhaps you can use a comb filter that passes just the odd-numbered harmonics.

So now what's left is a cleaned up periodic function. Now you have to select out just the fundamental, with a notch filter, and compare the energy of the harmonics to that of the fundamental. If it's sinusoidal, the energy of the entire periodic signal should be reduced to nearly zero when a notch filter is tuned to the fundamental.

robert bristow-johnson
  • 20,661
  • 4
  • 38
  • 76