LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing Noise measurements from array

Hi!

 

Purpose is replace noise peak measurements to(of) 'normal' result . Replace noise meas UP peaks and
replace noise meas DOWN measurement results.

Replacement can be done example Previous measurement result if it is 'normal' result.

Peak removing is not solution, meaning array size need to be same IN vs OUT.

See attachment.

 

Any ideas?

T : HeVil

0 Kudos
Message 1 of 12
(1,311 Views)

Hi HeVil,

 


@HeVil wrote:

Peak removing is not solution, meaning array size need to be same IN vs OUT.

Any ideas?


Whatever you want to replace in your data: learn the LabVIEW basics before doing so!

Learn about using shift registers to replace all those local variables by wire.

Learn about using shift registers to replace those IndexArray nodes in the FOR loops getting previous samples…

Learn about replacing stacked sequences by flat ones.

Learn about joining sequence frames when the execution order is purely driven by DATAFLOW!

Learn about removing sequences at all when the whole code inside is driven by DATAFLOW!

 

As far as I can see the sample array has the same size after your loops as it has before them: you are using autoindexing tunnels…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(1,291 Views)

@HeVil wrote:

Purpose is replace noise peak measurements to(of) 'normal' result . Replace noise meas UP peaks and
replace noise meas DOWN measurement results.

Replacement can be done example Previous measurement result if it is 'normal' result.

Peak removing is not solution, meaning array size need to be same IN vs OUT.

See attachment.

 


Sorry, I don't understand the question at all (If it even is a question...) Does your code currently work correctly? If yes, what do you want to improve? If no, what result do you expect?

 

What's the definition of "noise peak". Do you want to get rid of the glitches instead? Why are these discontinuities even there?

 

As has been said, there is no need for sequence structures or local variables. Properly done, you code could probably fit on a postage stamp.

0 Kudos
Message 3 of 12
(1,265 Views)

Maybe something like this should get you started. (I am sure it can be improved!).

 

altenbach_1-1622816211485.png

 

 

Message 4 of 12
(1,260 Views)

Hi!

 

Thank you for this and I will try this.

 

0 Kudos
Message 5 of 12
(1,189 Views)

It's along your ideas, but still primitive. Currently, it only compares with the previous value but it should look at both sides to decide if there is a glitch, then replace it with the average of both adjacent points. See if you can improve it. You might also want to account for glitches that are more than one point wide.

0 Kudos
Message 6 of 12
(1,175 Views)

Sounds like you need a Low-Pass filter

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 12
(1,157 Views)

Thanks. Altenbach.

 

I t's work. But, when comes two or more zero/wrong result result after result. 

So, if  we assume that previous 3 measurement is a 'normal' meas, and i calculate a AVG average of those. How i do it?

And yes this is a question.

0 Kudos
Message 8 of 12
(1,138 Views)

@Yamaeda wrote:

Sounds like you need a Low-Pass filter


A lowpass filter will modify valid points adjacent to the glitches, so it is not quite the same.

 

(Yes, one could e.g. compare filtered and unfiltered and look at the points where the filter has a large effect, while keeping mostly the unfiltered result :D).

0 Kudos
Message 9 of 12
(1,110 Views)

Another thing you might want to consider is a Median filter.  It's not as selective as altenbach's example which only alters data where a single sample shows a large step change.  The Median filter operates on *all* the data.  On the other hand, it's quite simple to experiment with if you find you want to suppress "glitches" wider than 1 sample.

 

 

-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 10 of 12
(1,102 Views)