LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce noise in all my graphs

Solved!
Go to solution

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...

 

Screenshot (64).png

Screenshot (63).png

 

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 😊

  

0 Kudos
Message 1 of 21
(3,861 Views)
Solution
Accepted by topic author Jugo

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?

 

Message 2 of 21
(3,857 Views)

Looking at your code, there are some glaring problems.

 

  • Firstly, it does not contain any data so we cannot reproduce your signal and test filtering. Please attach a small VI that contains a typical stretch if data.
  • Your are growing a string indefinitely in a feedback node. eventually you will run out of memory
  • It is safe to say that you don't need any dynamic data (and anything from the express palette) for any of this!
  • If you want to index out elements in order, you should not wire the indices.
  • There is no need for right-to left wires and wires tunneling under structures.
  • Does your device send termination characters? In that case there are probably better ways to do the IO.
Message 3 of 21
(3,849 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 21
(3,821 Views)

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.

Message 5 of 21
(3,809 Views)

@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:

 

altenbach_0-1661272689366.png

 

 

 

Message 6 of 21
(3,804 Views)

@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!).

 

altenbach_0-1654274076926.png

 

Or you could just do multipoint averaging.

 

 

Message 7 of 21
(3,801 Views)
Hey man yeah the signal you see is typical - with my funciton generator i am only using the Sinus function - i dont think i´ll be using a frequency higher then 100Hz - the highest/lowest value that i am expecting so far is roughly 50 mT - the noise is coming from all kind of electrical devices here in this room which can´t be turned off i just want to make it look nicer/smoother to be honest.. i found online a solution that has also been suggested by Fourier_ in this post, the butterworth filter i think.. but i couldn´t apply it properly and i ended up with a signal worse than before
0 Kudos
Message 8 of 21
(3,704 Views)

@Jugo wrote:

 

is there no universal approach to get rid of ALL noise?

 

 


 work at -278,15 Kelvin 🙈

Message 9 of 21
(3,700 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 21
(3,678 Views)