val79
Mechanical
- Nov 17, 2006
- 5
Hi guys,
I have a problem with a nonlinear system equations solve.
I'm not able to find a good solution to my system, and I don't realize if the algorithms used are good for the system.
I wrote the system of equation in a Matlab file, and sure I used the fsolve command. Below is the Mfile (nonlinear system):
function F = myfun (x)
F=[(2e-2)-0-(3.5e-3)*((((x(2)/345)*sin(x(1)))/sqrt(1-(x(2)/345)^2*(sin(x(1)))^2))+(((x(3)/345)*sin(x(1)))/sqrt(1-(x(3)/345)^2*(sin(x(1)))^2)));
(1e-2)-0-(3.5e-3)*((((x(2)/345)*sin(x(4)))/sqrt(1-(x(2)/345)^2*(sin(x(4)))^2))+(((x(3)/345)*sin(x(4)))/sqrt(1-(x(3)/345)^2*(sin(x(4)))^2)));
(sqrt(1+((x(2)/345)^2*(sin(x(1)))^2)/(1+(x(2)/345)^2*(sin(x(1)))^2))/x(2)+sqrt(1+((x(3)/345)^2*(sin(x(1)))^2/(1+(x(3)/345)^2*(sin(x(1)))^2)))/x(3))*(3.5e-3)-(42.68e-6);
(sqrt(1+((x(2)/345)^2*(sin(x(4)))^2)/(1+(x(2)/345)^2*(sin(x(4)))^2))/x(2)+sqrt(1+((x(3)/345)^2*(sin(x(4)))^2/(1+(x(3)/345)^2*(sin(x(4)))^2)))/x(3))*(3.5e-3)-(28.58e-6)];
I chose a start point x0=[0.1;50;50;0.1]; and I launched the fsolve command: x=fsolve(@myfun,x0,option)
where in option is definite the algorithm choose for the solution.
Using the Gauss-Newton algorithm the exit message and the solution was:
Conditioning of Gradient Poor - Switching To LM method
Warning: Matrix is singular to working precision.
> In optim\private\nlsq at 269
In fsolve at 300
2 402 NaN 1e-008 NaN 0
Maximum number of function evaluations exceeded. Increase OPTIONS.MaxFunEvals.
x =13.6589;50.0206;50.0206;6.8449
Using the Levenberg-Marquardt algorithm the exit message and the solution was:
Optimizer appears to be converging to a minimum that is not a root:
Sum of squares of the function values is > sqrt(options.TolFun).
Try again with a new starting point.
x =1.4522;50.0234;50.0234;1.3728
Besides in all trials I made changing the start point, the result is always very close to that x0 chose (I think it is not so good).
Now I need of a tip to understand which is the right algorithm solver to use for my problem, and how to choose a good start point.
How can I find the right solution to my nonlinear system?
Thanks in advance.
I have a problem with a nonlinear system equations solve.
I'm not able to find a good solution to my system, and I don't realize if the algorithms used are good for the system.
I wrote the system of equation in a Matlab file, and sure I used the fsolve command. Below is the Mfile (nonlinear system):
function F = myfun (x)
F=[(2e-2)-0-(3.5e-3)*((((x(2)/345)*sin(x(1)))/sqrt(1-(x(2)/345)^2*(sin(x(1)))^2))+(((x(3)/345)*sin(x(1)))/sqrt(1-(x(3)/345)^2*(sin(x(1)))^2)));
(1e-2)-0-(3.5e-3)*((((x(2)/345)*sin(x(4)))/sqrt(1-(x(2)/345)^2*(sin(x(4)))^2))+(((x(3)/345)*sin(x(4)))/sqrt(1-(x(3)/345)^2*(sin(x(4)))^2)));
(sqrt(1+((x(2)/345)^2*(sin(x(1)))^2)/(1+(x(2)/345)^2*(sin(x(1)))^2))/x(2)+sqrt(1+((x(3)/345)^2*(sin(x(1)))^2/(1+(x(3)/345)^2*(sin(x(1)))^2)))/x(3))*(3.5e-3)-(42.68e-6);
(sqrt(1+((x(2)/345)^2*(sin(x(4)))^2)/(1+(x(2)/345)^2*(sin(x(4)))^2))/x(2)+sqrt(1+((x(3)/345)^2*(sin(x(4)))^2/(1+(x(3)/345)^2*(sin(x(4)))^2)))/x(3))*(3.5e-3)-(28.58e-6)];
I chose a start point x0=[0.1;50;50;0.1]; and I launched the fsolve command: x=fsolve(@myfun,x0,option)
where in option is definite the algorithm choose for the solution.
Using the Gauss-Newton algorithm the exit message and the solution was:
Conditioning of Gradient Poor - Switching To LM method
Warning: Matrix is singular to working precision.
> In optim\private\nlsq at 269
In fsolve at 300
2 402 NaN 1e-008 NaN 0
Maximum number of function evaluations exceeded. Increase OPTIONS.MaxFunEvals.
x =13.6589;50.0206;50.0206;6.8449
Using the Levenberg-Marquardt algorithm the exit message and the solution was:
Optimizer appears to be converging to a minimum that is not a root:
Sum of squares of the function values is > sqrt(options.TolFun).
Try again with a new starting point.
x =1.4522;50.0234;50.0234;1.3728
Besides in all trials I made changing the start point, the result is always very close to that x0 chose (I think it is not so good).
Now I need of a tip to understand which is the right algorithm solver to use for my problem, and how to choose a good start point.
How can I find the right solution to my nonlinear system?
Thanks in advance.