LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smoothing

Hi all,

 

I would like to know how can I smooth this graph?

graph1.png

Graph.png

0 Kudos
Message 1 of 20
(6,520 Views)

Hi Learners,

                  Here are some options:-

                  

  1. Use the filters in the Signal Processing palette to smooth the data.
  2. Use fourier filtering techniques to smooth the data.  Fourier transforms are also in the Signal Processing palette. 
  3. Use almost any standard smoothing technique. Savitzky-Golay smoothing is especially good for this type of problem.

You will need to convert your data from XY to waveform to get any of these to work.  If your data are evenly spaced, this is pretty easy.  If they are not, you will need to do some sort of interpolation.  Or you can simply ignore the fact that you have unevenly sampled data, convert to a waveformsmooth, then convert back.   

But you have'nt provided much more details or not even attached your VI.

Anyway Hope this HelpsSmiley Wink   

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 20
(6,514 Views)

Hi Danil,

 

Thanks for your reply.

This graph is plotted at real time point by point.

How do I know that my data are evenly spaced?

Sorry I am not allowed to enclose the VI. Here is a picture.

program.png

Is it possible to smoth the graph at real time when it is plotting or must I wait for the graph to complete plotting? Thanks!!!

0 Kudos
Message 3 of 20
(6,505 Views)

You don't show where the blue wire is coming from, but chances are that it is connected the the iteration terminal. This means that the samples are equally spaced in x. You don't even need an xy graph in this case, a simple chart would suffice.

 

Since your data arrives one point at a time, you need a ptbypt smoothing version. Look it the "point by point" filters palette.

0 Kudos
Message 4 of 20
(6,500 Views)

Hi Altenbach,

 

The blue line can be said to be coming from from the iteration. It is the iteration multiply by the value in control.The Vi is set to stop at 255.

 

e.g control value = 1, I will have 256 pts.

 

I have some question please bear with me.

.

Using this ptbypt, can I smooth the point at real time?

 

May I know do I still need to convert my data from XY graph to waveform?

 

Is it possible for you to name me the ptbypt filters that you think is most suitable for my graph, perhaps Savitzky-Golay? Thanks!

 

 

0 Kudos
Message 5 of 20
(6,488 Views)

Hi Altenbach,

 

Do you mean that I can connect my Y data to a waveform graph?

graph2.png

0 Kudos
Message 6 of 20
(6,451 Views)

Hi all,

 

Please help me.I am using Savitzky Golay Filter PtByPt Vi. The orignal data and filter data differ alot. My curve is inverted.

Filter help.png

0 Kudos
Message 7 of 20
(6,405 Views)

There are several parameters which can be set on the Savitsky Golay filter and they can have a significnat effect on the result.

 

Please post your latest VI along with some typical data.

 

Lynn

0 Kudos
Message 8 of 20
(6,388 Views)

Hi Johnsold,

 

This is the snippet of my program and the other vi contain some example data.

I am unable to upload the driver and my subvi. Can you look at my program without it? I used all default setting on Savitsky Golay filter.

 

program help (2).png

example data.png

0 Kudos
Message 9 of 20
(6,384 Views)

Hi Johnsold,

 

This is the screenshot of the graph block diagram.graph.png

0 Kudos
Message 10 of 20
(6,379 Views)