On Mar 8, 3:40=A0pm, "Dmitry Dmitry" <klio2...@list.ru> wrote:
> Hello!!!
>
> My problem is connected with solving the NONLINEAR SYSTEM
> OF EQUATIONS in Matlab, which has the following
> peculiarities:
>
> 1) The number of equations is very big (>30)
> 2) The accuracy required is very high
>
> FSOLVE function doesn't provide the accuracy I need (the
> relative error between the known and found solutions is
>
> >10%).
>
> What methods and functions in Matlab would you recommend?
> If necessary, I can download the system of equations.
>
> Thanks in advance
>
> Dmitry
Hi Dmitry,
Is it possible that fsolve is returning a local minima? What happens
if you use something very close to the exact solution as the starting
value?
In fact, I don't know the exact solution, therefore I
pointed ZERO values as the starting ones. In fact, the
solution, as I've written, is very close, but still it
doesn't satisfy the accuracy requirements. Concerning
Jacobian, I tried both: calculating it myself and making
FSOLVE do it. The difference doesn't seem much.
At the end of iteration process I saw the warning:
"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."
So the optimizer has found a minimum but not a zero,
however the criterion (of FSOLVE function) is satisfied!!!
How can I guess the starting point? How can I improve
FSOLVE work?
"Dmitry Dmitry" <klio2003@list.ru> wrote in message
...
> 2) The accuracy required is very high
>
> FSOLVE function doesn't provide the accuracy I need (the
> relative error between the known and found solutions is
> >10%).
Hello Dmitry:
There are two standard metrics for measuring "suitability"
for an approximate solution:
a) check how close to zero is the current solution
b) check how close to the exact one is the current solution
In order to have an estimate for b) you need to expand the
nonlinear vector function and truncate. Thus, you will need
the Jacobian, and indirectly its condition number will play
a role.
The other option does not provide any cue about how close
are you to the exact solution. In some cases (I have
suffered from that) requiring the "relative change" to be
below a prescribed, low level, is not a wise idea.
The reason arises when (at least in my case) there exist
severe cancellation and shift out, thus precluding to
improve the results using double precision. To make things
worse, such pathology IS NOT related with the condition
number of anything, but with the deep limitations of the
number system.
In my case (which might serve for others) I managed to
recalculate the residual (i.e. option a)) using
higher-than-double precision. Despite tiny, the changes
close to the solution were significant enough to make again
valid all the math behind the algorithms.
Hope this helps
Regards
Carlos
PD: as a higher-than-double precision I can mention the
Multiple Precision Toolbox by Ben barrowes, available on the FEX
"Dmitry Dmitry" <klio2003@list.ru> wrote in message <fquc16
$r4u$1@fred.mathworks.com>...
>
> What methods and functions in Matlab would you recommend?
> If necessary, I can download the system of equations.
>
You may wish to try lsqnonlin. Normally, the Levenberg-
Marquardt approach provides better convergence.
> My problem is connected with solving the NONLINEAR SYSTEM
> OF EQUATIONS in Matlab, which has the following
> peculiarities:
From my experience with Matlab I have to say "forget it". Neither
'fsolve' nor 'lsqnonlin' can solve any serious problem.
Last year I attended a student whose task was to check out the
capabilities of 'fsolve' and 'lsqnonlin'. The problem statement was
to find the steady-state solution for a mixing process of compressible
gases. Although the initial value was equal to the exact solution in
5 digits after the decimal point and the Jacobi matrix was provided
analytically, neither of the two commands could find a solution. After
weeks of fiddling with options and tolerances we forwarded the problem
to The Mathworks. The response was disillusioning -- in summary "no
chance" to solve it in any reasonable computing time. Our target was
less than 2 minutes, The Mathworks support estimated that it may be
possible to solve it over night with the help of a global optimizer.
Nota bene: The exact solution was calculated with Dymola/Modelica in
less than a second with initial values set to zero! The current
Modelica model has approx. 300 linear equations and approx. 100
non-linear equations. I don't even think about feeding that into
Matlab.
<flame>The Mathworks definitely should invest more money in algorithms
than in GUI gimmicks.</flame>
Respected Sir,
I am student of Master in .Eng. (Process Intrumentation&Control)
Currently working on Design of PID controler for Two in put two out
put system.
I have concentrated my work on your research paper .In present paper
PID controller response final plot is there I am not able to
reproduce it thorugh matlab programming.
I will send you my research paper and my .m file. please tell me
any changes to be made.
my e mail id is shri.shripad@gmail.com
Thanking you in Advance
Eagerly waiting for your reply
Regards
Shripad
Tags for this Thread
Add a New Tag:
Separated by commas
Ex.: root locus, bode
What are tags?
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.