08-23-2022 10:27 AM
Hey there!
I found a few things online about this problem but i couldn´t figure it out by myself how to apply it to my program...
So i would like to get rid of the noise as much as possible but i am having problems doing so... The waves have variable frequencies and on the lower picture my function generator is just turned off..
is there no universal approach to get rid of ALL noise?
As always, i appreciate every help and advise 😊
Solved! Go to Solution.
08-23-2022 10:33 AM - edited 08-23-2022 10:48 AM
Getting rid of all noise is easy. Just multiply the signal by zero. 😄
Getting rid of all noise while retaining all interesting data without distortion is difficult and critically depends on an algorithm that can distinguish between the two. Are the signals you show typical (amplitude, frequency, etc.)? Can we make assumptions about the shape (e.g. single sinusoidal each, maybe with few harmonics)?
How much to do you know about the noise and where it comes from? Maybe it can be eliminated on the hardware side!
Are you trying to solve a more cosmetic problem to just make it look nicer or are you interested in analysis, e.g. find the fundamental frequency?
08-23-2022 10:46 AM
Looking at your code, there are some glaring problems.
08-23-2022 11:08 AM
@altenbach wrote:
- Does your device send termination characters? In that case there are probably better ways to do the IO.
Just change the Byte Count control to a constant (leaving the value at 1000) and they are fine.
08-23-2022 11:32 AM
All code cosiderations (made in the other post) aside, the simplest solution is to apply a low-pass filter on your signals, like a Butterworth 2nd order low pass filter.
The low-pass filter will improve your signal-noise ratio but I don't know if this is enough for you.
You should define a cut off frequency for your filter and it should be greater than the max frequency of your signal.
Note: the low-pass filter will not cancel all the noise but it will reduce it.
08-23-2022 11:39 AM
@crossrulz wrote:
@altenbach wrote:
- Does your device send termination characters? In that case there are probably better ways to do the IO.
Just change the Byte Count control to a constant (leaving the value at 1000) and they are fine.
Not knowing anything about the string except that the values are formatted as %.2f with a ";" as delimiter, I have no idea if 1000 is reasonable. (we only get 12 values per read, so 83 characters per value is probably plenty assuming that the termination character is actually correct. 😄
Here's I would do the rest of the code using simulated data:
08-23-2022 11:41 AM - edited 08-23-2022 11:45 AM
@SlippinJimmy85 wrote:
Note: the low-pass filter will not cancel all the noise but it will reduce it.
Since your data arrives one point at a time (12 channels), you need a ptbypt solution.
An alternative that is extremely cheap to compute is an exponential filter (here is an example!).
Or you could just do multipoint averaging.
08-24-2022 03:11 AM
08-24-2022 03:29 AM
@Jugo wrote:
is there no universal approach to get rid of ALL noise?
work at -278,15 Kelvin 🙈
08-24-2022 05:41 AM
@alexderjuengere wrote:
@Jugo wrote:
is there no universal approach to get rid of ALL noise?
work at -278,15 Kelvin 🙈
I think you mean -278.15 Degrees Celsius, which is 0 Kelvin.