LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

nonlinear system

Hi all. I'm trying to solve non-linear equation, but I can't get any result. 

Can you say where is my mistake?

 

 

0 Kudos
Message 1 of 7
(3,627 Views)

At least one issue is the use of comma as decimal separator.  I do not recall where it is documented, if at all, but the formula parsing VI do not allow commas in numbers. Replacing your commas (",") with periods (".") eliminates the syntax error.  However, then it generates an error which indicates that the Start array needs to have something connected. I tried values like {1,1} and {0,0}, but those produce a No Root Found error.  Do you know the approximate values of the zeros?

 

Lynn

0 Kudos
Message 2 of 7
(3,608 Views)

Hi johnsold.

Sorry for late response and thank you for your reply.

The values of Zeroes will be

a=519721.26945201156
f0=0.00112621 

 

I have also one question. I don't understand the meaning of connection something to Start. Can you explain me for what it is necessary?

 

Thank you in advance. 

 

0 Kudos
Message 3 of 7
(3,584 Views)

To understand the nature of your problem, it is instructive to consider the "improvements" made to that VI in later versions.  Instead of specifying a starting point, you now specify upper and lower limits for each variable.  The VI then chooses a random starting point in that region.  You can choose how many starting points to try.  In cases like yours where the results are very sensitive to the starting point, this is a big help.

 

To get a result on my machine using the old VI I had to:

 

1) Change , to ., this depends on the system formatt, there is a subVI which converts the sqrt(2) to a string and then determines the system radix separator.  If you use the comma you should be fine.

2) Enter [500000, 0.001] into the Start Array for the starting point.

3) Change accuracy to 8e-4 and h to 1e-7. 

 

In general though, the result will be very, very dependent on the starting point, and closer won't always help.

 

I would suggest either using the new version, or improvising.  You can achieve similar results by specifying bounds for each variable, choosing random values within each interval for a starting point, then testing for a result. 

 

SolveSystemFP.png

 

SolveSystem.png

 

 

0 Kudos
Message 4 of 7
(3,557 Views)

Thank you so much for your explanations!! It is very useful for me.

But as I think, the system of non-linear equations must have a SINGLE solution. Then, why is it necessary to mark the Start Array and start points ???

 

Thanks in advance.

0 Kudos
Message 5 of 7
(3,546 Views)

@Moony wrote:

 

But as I think, the system of non-linear equations must have a SINGLE solution. Then, why is it necessary to mark the Start Array and start points


First of all, the idea of two equations, two unknowns therefore a single solution applies to linear systems.  It appears to be the case for these equations, but you are applying a general numeric algorithm (Newton-Raphson) so you are obliged to provide a starting point.  You can try to do some crude bracketing beforehand if you really have no idea of a starting point, but I usually find a little time studying the plots or adding other information that you have (expected scale of different parameters) to be very helpful in solving these problems.

0 Kudos
Message 6 of 7
(3,534 Views)

OK, thank you so much!!!

0 Kudos
Message 7 of 7
(3,511 Views)