I am making real-time measurements, which are affected by some noise. This noise has oscillating pattern, i.e. the total signal tends to oscillate around the mean value. The examples of measurements are shown in figures below.



Filtering this noise after the signal is received is quite straitforward - we may use mean filter, for example.

What I would like to do is to implement real-time noise filtering, so that filtered signal would be close to its constant mean value.

What kind of methods of filtering could you recommend? I thought about Kalman filter, but the state model is unknown. Maybe there is something else?..

P.S. I am totally unexperienced in signal processing, please excuse me for any ignorance.

UPD: I am not considering mean filters, because the two pictures below represent only particular stages of evolution. It means that the signal evolves in an unpredictable manner in between. Mean filter usually leads to loss of information about such evolution.

  • $\begingroup$ a mean filter, for example. You're not defining very well what your requirements for that filter are! And, honestly, a Kalman is a completely different beast than the filters you're considering here. $\endgroup$ – Marcus Müller Jan 12 '18 at 15:13
  • $\begingroup$ Can you convert the noise to ADC LSBs? If the noise is about 1 or 2 LSBs then such noise is probably normal. $\endgroup$ – Ben Jan 12 '18 at 15:35
  • $\begingroup$ @MarcusMüller see the update in my question $\endgroup$ – newt Jan 12 '18 at 15:39
  • $\begingroup$ @Ben No, I cannot (or I do not know how). I do not have any analog device, all measurements are done with virtual machine. $\endgroup$ – newt Jan 12 '18 at 15:40
  • $\begingroup$ @newt but your virtual machine definitely somehow only generates a very distinctive set of samples; so, you have some ADC model underneath. Generally, when designing a (model for a) analog-to-digital-conversion system, you'd make sure that your step size (LSB) is chosen to match your noise performance. $\endgroup$ – Marcus Müller Jan 12 '18 at 15:43

Marcus and Ben have very clearly identified the problem: the signal is simply too small relative to the least significant bits (LSBs) of the "virtual machine"'s ADC. The sensible solution is to increase the signal by use of gain. From the provided plots, a signal gain around 100 would be a good starting value. Alternatively, the ADC resolution would have to be increased (> 4 more bits), so the LSBs would be smaller. In a real system, the first option would be the only feasible option, since amplifiers are relatively inexpensive and high resolution ADCs are most certainly not. Since the goal is real-time noise filtering, rather than Lazarus filtering, i.e., post-mortem reversal of fatal mis-quantization, dithering and signal averaging is ruled out.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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