LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding pattern in 1d array

Hi

 

I've got a problem where I have to fit quadratic function (which is good enough approximation of gaussian) to the plot that looks like part of gaussian with additional left and right data (it's a scan of a weld between two steal objects)

2.PNG


My job is to find angles between this "middle" shape and left or right part (effectively find the green points). This middle shape is a weld that can be easy to spot by human, but it's kind of a nightmare to find generic function that could detect it. This shape can be bigger or smaller, shuttered on top, or be concave, but it always have some kind of gaussian shape, because when weld is cooling down (sometimes upside down), it's forming like that.

 

The question is, what could be the best and most generic approach to do it? I was trying second derivative on moving average, some stock market indicators, etc. I was trying to train neural network to find those points, but it's useless. I need some kind of fitting function that has a fitting score, that fits only to data that's having good fit, and discarding all other.

 

Any ideas?

Please help

0 Kudos
Message 1 of 4
(2,814 Views)

Hmmm...

1) cut average of the right and left region from array, 

2) fit by 3-d order polynomial

3) distinguish between 1 and 2

4) find largest amplitude of oscillation in case of 2

5) fit by gaussian

0 Kudos
Message 2 of 4
(2,795 Views)

Option 2:

Use general fit algorithm based on vi (nonlinear curve fit.vi) with 2 parameters of the model vi: cut from the left and right side. Fit remaining array by gaussian inside. Estimate width and amplitude first and increase output error if fit results are too far away (to distinguish between first and second oscillation on 2)

0 Kudos
Message 3 of 4
(2,791 Views)

Hi

What do you mean by cut average from left and right side?

Do you mean moving average? And measuring if distance between data and average is bigger than some value?

Sometimes left and right edge are very noisy and have a lot of strange shapes like here:

3.PNG

The right and left side is very often not flat.

0 Kudos
Message 4 of 4
(2,769 Views)