06-23-2017 03:41 AM
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 !
06-23-2017 07:10 AM
Without attached vi(s), we need a crystal ball 😄
06-23-2017 07:44 AM
Of course ! Sorry
On this picture you can see the part which cause some problem
06-23-2017 07:50 AM
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
06-23-2017 07:55 AM - edited 06-23-2017 07:58 AM
Ok I ; going to get the VI
06-23-2017 08:19 AM - edited 06-23-2017 08:25 AM
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)
06-23-2017 11:14 AM - edited 06-23-2017 12:19 PM
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 😮
06-26-2017 03:28 AM
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 ?
06-26-2017 10:10 AM - edited 06-26-2017 10:11 AM
@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?
06-27-2017 02:59 AM
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