LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous curve fitting

Hi everybody !

 

Here is my problem : I need to fit a erf function in my programm with the VI non linear curve fit . So I have set this VI up with static reference model in which I configured my erf function so far so good . That program works ..... for one acquitsition but for continuous acquisition the program doesn't work anymore  because of the non linear curve fit VI and tells me "the equation system cannot be solved because the input matrix is a singular one"

Do you guys have some idea about this ?

Thank you !

0 Kudos
Message 1 of 13
(3,526 Views)

Without attached vi(s), we need a crystal ball 😄

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 13
(3,494 Views)

Of course ! Sorry

 

On this picture you can see the part which cause some problem

 

 

 

 

0 Kudos
Message 3 of 13
(3,489 Views)

Not only is there no picture, but pictures are not very helpful.  They show only a part of the code, they are sometimes hard to read, they cannot be "executed" or "tested" to see what is going on, and they drive me crazy (but that's probably my problem).

 

Please attach a VI, several VIs, or compress the folder containing your VI and attach the resulting .zip file.  We're happy to help, but please make our lives a little easier ...

 

Bob Schor

0 Kudos
Message 4 of 13
(3,486 Views)

Ok I ; going to get the VI

0 Kudos
Message 5 of 13
(3,486 Views)

Voilci le VI

Thanks for your help !

 

PS: Sorry but you won't be able to execute the VI because the treated data are from a

scope (via DAQx)

 

0 Kudos
Message 6 of 13
(3,476 Views)

You also need to attach the model VI. It is not necessary to zip a single VI up before attaching.

 

How is the Y array on the the various calls? Does it ever contain unusual values (Inf, NaN, etc.). It is ever zero lenght? Are the values suddenly way outside the typical range?

 

Is the array of parameter guesses of the correct size? Your default is an empty array, which will definitely not work. Are the guess values reasonable? (Sign, order if magnitude, etc.). How does the model look when calculated from the guess? Any resemblance to the data?

 

Your VI has no loop, so what exactly is "continuous acquisition"? Please don't tell me you are using the "continuous run" button 😮

0 Kudos
Message 7 of 13
(3,452 Views)

Hello altenbach thanks for your quick reply !

 

-The Y array only contains values form -1 to -10

-Firstly I thought the problem came from the fact that sometimes  the Y array  got a zero value but I put an offset (-1) to my data and the error is still here

-The array parameters guess is of correct size because I need four parameters to fit my experimental curve with a erf function

-I've made this study on qtiplot before and it gave the following parameters : -2,3,0,-2 . When I put those parameters in the pogram I got a nice erf function

-Yes I'm using the "continuous run button" :S why ?

PS: what do you mean by the model VI ? the diagramm ?

 

 

0 Kudos
Message 8 of 13
(3,419 Views)

@brico33 wrote:

 

PS: what do you mean by the model VI ? the diagramm ?


Your code contains a strictly typed static VI reference. Attach the model VI it refers to. It sows us how the error function is calculated and what the parameters are.

 


@brico33 wrote:

 

-Yes I'm using the "continuous run button" :S why ?

 


"continous run" is a debugging tool, not a way to run a VI normally.

 

Are the x values reasonable (just an integer ramp starting with zero). How big are the arrays? For positive X, the error function is positive, so why are your Y values all negative?

 


@brico33 wrote:

 

-I've made this study on qtiplot before and it gave the following parameters : -2,3,0,-2 . When I put those parameters in the pogram I got a nice erf function

 


If you don't show us the model, we don't know how the parameters are defined and what their order is. What x-values did you use to calculate the error function for these parameters?

 

 

 

 

0 Kudos
Message 9 of 13
(3,404 Views)

Here's the static model !

The purpose of this VI is to get a gaussian curve (vs time) deriving the erf function so the x arrays have been chosen to observe the gaussian curve and I can observ it during a few seconds and then the error occurs

0 Kudos
Message 10 of 13
(3,383 Views)