LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Filter" a graph

Hi aitor,

 

unfortunately there is no data in your charts as has been requested…

 

Run your VI until you have a sufficient amount of samples in the chart. Stop your VI, edit menu->"make current values default", save your VI and attach it!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 19
(658 Views)

I was a bit glib before, but trying to make a point.  Now it's been made, so onward with more specific comments.

 

A well designed filter will get you closer to your idealized picture, but it won't get you there exactly.  A lowpass filter will greatly reduce the high frequency noisy fluctations surrounding the general trend.  In the process, it will also smooth out the corners around the transition points.

 

The "desired waveform" pic you show appears to be piecewise linear.  To produce *that*, I'd be working up an algorithm that locates those corner points, and then makes best-fit lines for each of the segments.  

 

After reducing the real & noisy data to this idealized view of its trends, you'll be better positioned to define the end result in terms of a small number of parameters.  I'm guessing this will be used for some kind of SPC activity?

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 12 of 19
(645 Views)

It looks like the filtering you've already done is almost what you're looking for but that your data has some step functions in the early data that make the filtering look like it is not effective.

 

Take a look at your wiring and grounding of the DAQ and thermocouple -- try to prevent the noise, rather than get exotic with the filtering.   Do you have any idea what may be causing the noise that is getting coupled into the thermocouple signal?   

 

Once you get rid of the noise source affecting the early part of the signal and if you still need a cleaner result, maybe increase the averaging effect by increasing the number of samples (and rate) being taken by the DAQ assistant  or use a more aggressive lowpass filter as suggested.  

 

 

 

0 Kudos
Message 13 of 19
(628 Views)

OK. 

here it is sorry, I though you were going to simulate the signal.

 

I have aplied a Low pass.

 

Thanks in advance.

0 Kudos
Message 14 of 19
(614 Views)

Hi,  

yeah, it has to follow an algorith separated in 3 steps, and yes, is for a SPC activity but for the moment, the low pass is not as good as I want.

0 Kudos
Message 15 of 19
(613 Views)

Hi,  thnaks for your thinks.

 

All the conexions are correct. Being more agressive with the lowpass filter still continue apperaing worst..

 

Any solution?

0 Kudos
Message 16 of 19
(612 Views)

Possible solution: piecewise best-fit lines (or curves), as I suggested in msg #12.

 

The refinements come from how you identify the place to split the data into piecewise segments, how you constrain the fitting (should plateau be constrained as a constant value?), how you then extrapolate the fitted curves to find where they meet (slightly different than where you first split the data).

 

Also, the fall-off from the plateau shown in the real data does not appear linear.  It looks more like an exponential decay toward an asymptote of linear fall-off.  You may need a 4th segment in your idealized shape.

 

 

-Kevin P

 

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 17 of 19
(595 Views)

You cannot filter a graph, you can only filter data. As a first step you need to identify what the noise is, what causes it, and what makes it different from the interesting parts of the data. Different sections of your data have different amounts of random noise and the shallow increasing part also has some repetitive pattern. The final drop has much less noise for some reason. Do you know why? Is the noise at an alias frequency of your power grid (e.g. 60Hz)?

 

As a first step, look at hardware issues and electrical crosstalk. Maybe the heater or relay currents cause electrical interference. Look at the routing of the power and signal cables and use good shielding and grounding. You could even add an simple analog filter or other signal conditioning before connecting to your measurement device.

 

Are all traces similar? Can the behavior described by simple sections (linear, constant, exponential, etc.) that are always there in the same order? What parts are you interested in (linear slopes? timepoint where the signal changes type? decay constants of the curved parts? etc.)

0 Kudos
Message 18 of 19
(591 Views)

Can you explain the application a bit more?  It looks like you are using some kind of heating element and power supply controlled by a PID, and you are recording the associated rise in temperature or your sample with a thermocouple and DAQ. 

 

From the graph it looks like the power supply ramps the current up suddenly (fast increase in temperature from 80-120) then you get all those spikes.  I suspect that the power supply and PID are coming into play, reducing the current to the heating element and then increasing (or switching ON/OFF quickly) to achieve the temperature set point but not overshoot.  If that's the case, then what you are calling noise is real - that's what the temperature is *really* doing and filtering is throwing away information.  You could try playing with the PID settings to incur fewer spikes in the data.

 

But this is all a guess until you explain the setup, application and expected behaviour a bit more.

0 Kudos
Message 19 of 19
(587 Views)