Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Convergence of iterative procedure

Subject: Convergence of iterative procedure

From: George Papazafeiropoulos

Date: 28 Apr, 2011 08:04:04

Message: 1 of 5

Hello to everyone,

I am dealing with an iterative procedure in which an initial estimate of a vector {c}0 is given, and at the end of the process an updated vector {c} is calculated. This is used as the initial estimate for the next loop and a more updated {c} is obtained, and this goes on until the difference of the updated {c} from the penult {c} is lower than a specified number, in which case the iterative procedure stops.

However, in certain cases the above procedure does not converge; the estimates of {c} seem to "oscillate" around a value, and this oscillation does not always happen every two estimates, but I have observed that it could happen also every 3-6 estimates. Furthermore, the elements of {c} take extreme values in some cases, and in the next iteration they come back to acceptable values. What could I do to force these oscillations to stop and avoid the appearance of extreme values?

I write here an indicative example of the m. file which I run:

c=ones(2,1);
for i=1:Nt
uL=2*sum(c);
K=[uL^2,sqrt(uL);uL, 1/uL];
D=[sin(uL);cos(uL)];
d=c-K\D;
if d<ones(2,1)*0.0001
break
end
c=K\D;
end
c

I would appreciate any of your help. If anyone knows something about such procedures he is kindly requested to give me some hints or suggest some links for further information.
Thank you very much in advance.

Subject: Convergence of iterative procedure

From: Torsten

Date: 28 Apr, 2011 10:08:55

Message: 2 of 5

On 28 Apr., 10:04, "George Papazafeiropoulos"
<gpapazafeiropou...@yahoo.gr> wrote:
> Hello to everyone,
>
> I am dealing with an iterative procedure in which an initial estimate of a vector {c}0 is given, and at the end of the process an updated vector {c} is calculated. This is used as the initial estimate for the next loop and a more updated {c} is obtained, and this goes on until the difference of the updated {c} from the penult {c} is lower than a specified number, in which case the iterative procedure stops.
>
> However, in certain cases the above procedure does not converge; the estimates of {c} seem to "oscillate" around a value, and this oscillation does not always happen every two estimates, but I have observed that it could happen also every 3-6 estimates. Furthermore, the elements of {c} take extreme values in some cases, and in the next iteration they come back to acceptable values. What could I do to force these oscillations to stop and avoid the appearance of extreme values?
>
> I write here an indicative example of the m. file which I run:
>
> c=ones(2,1);
> for i=1:Nt
> uL=2*sum(c);
> K=[uL^2,sqrt(uL);uL, 1/uL];
> D=[sin(uL);cos(uL)];
> d=c-K\D;
> if d<ones(2,1)*0.0001
> break
> end
> c=K\D;
> end
> c
>
> I would appreciate any of your help. If anyone knows something about such procedures he is kindly requested to give me some hints or suggest some links for further information.
> Thank you very much in advance.

What makes you believe that a general iteration of the form
K(x_i)*x_(i+1)=D(x_i)
should always converge ?
It's simply not the case.
Use MATLAB's fsolve to solve the system of equations
K(x)*x - D(x) = 0

Best wishes
Torsten.

Subject: Convergence of iterative procedure

From: Roger Stafford

Date: 28 Apr, 2011 20:10:14

Message: 3 of 5

"George Papazafeiropoulos" <gpapazafeiropoulos@yahoo.gr> wrote in message <ipb71k$o99$1@fred.mathworks.com>...
> ........
> I would appreciate any of your help. If anyone knows something about such procedures he is kindly requested to give me some hints or suggest some links for further information.
> Thank you very much in advance.
- - - - - - - -
  I am very curious as to what equation or equations you were attempting to solve with that iteration you have described. Based on my limited observations it will fail to converge no matter what initial values it is given. There is a certain single pair of values with a sum a little less than two that in theory would give a constant result to that iteration, but it is highly unstable and in practice would actually diverge rapidly even with them because of round off errors. You should know that there are iterative methods that would quickly converge to that pair, but I have a hunch that there is some kind of error, typographical or programming, in what you have presented here.

Roger Stafford

Subject: Convergence of iterative procedure

From: George Papazafeiropoulos

Date: 29 Apr, 2011 05:26:04

Message: 4 of 5

Dear Mr. Roger,

The iteration I described does not pertain to the specific problem I am trying to solve. It was indicative of that problem. However, I used successfully the fsolve command and I solved the problem. Thank you very much for your answer!

Best regards,

George

"Roger Stafford" wrote in message <ipchj6$dfm$1@fred.mathworks.com>...
> "George Papazafeiropoulos" <gpapazafeiropoulos@yahoo.gr> wrote in message <ipb71k$o99$1@fred.mathworks.com>...
> > ........
> > I would appreciate any of your help. If anyone knows something about such procedures he is kindly requested to give me some hints or suggest some links for further information.
> > Thank you very much in advance.
> - - - - - - - -
> I am very curious as to what equation or equations you were attempting to solve with that iteration you have described. Based on my limited observations it will fail to converge no matter what initial values it is given. There is a certain single pair of values with a sum a little less than two that in theory would give a constant result to that iteration, but it is highly unstable and in practice would actually diverge rapidly even with them because of round off errors. You should know that there are iterative methods that would quickly converge to that pair, but I have a hunch that there is some kind of error, typographical or programming, in what you have presented here.
>
> Roger Stafford

Subject: Convergence of iterative procedure

From: George Papazafeiropoulos

Date: 29 Apr, 2011 05:35:19

Message: 5 of 5

Dear Mr Torsten,

Thank you very much for your reply. I tried the fsolve command and I managed to solve the problem.

Best regards,

George

Torsten <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message <d01e02ec-e1d4-4059-948f-789ab4bca203@s9g2000yqm.googlegroups.com>...
> On 28 Apr., 10:04, "George Papazafeiropoulos"
> <gpapazafeiropou...@yahoo.gr> wrote:
> > Hello to everyone,
> >
> > I am dealing with an iterative procedure in which an initial estimate of a vector {c}0 is given, and at the end of the process an updated vector {c} is calculated. This is used as the initial estimate for the next loop and a more updated {c} is obtained, and this goes on until the difference of the updated {c} from the penult {c} is lower than a specified number, in which case the iterative procedure stops.
> >
> > However, in certain cases the above procedure does not converge; the estimates of {c} seem to "oscillate" around a value, and this oscillation does not always happen every two estimates, but I have observed that it could happen also every 3-6 estimates. Furthermore, the elements of {c} take extreme values in some cases, and in the next iteration they come back to acceptable values. What could I do to force these oscillations to stop and avoid the appearance of extreme values?
> >
> > I write here an indicative example of the m. file which I run:
> >
> > c=ones(2,1);
> > for i=1:Nt
> > uL=2*sum(c);
> > K=[uL^2,sqrt(uL);uL, 1/uL];
> > D=[sin(uL);cos(uL)];
> > d=c-K\D;
> > if d<ones(2,1)*0.0001
> > break
> > end
> > c=K\D;
> > end
> > c
> >
> > I would appreciate any of your help. If anyone knows something about such procedures he is kindly requested to give me some hints or suggest some links for further information.
> > Thank you very much in advance.
>
> What makes you believe that a general iteration of the form
> K(x_i)*x_(i+1)=D(x_i)
> should always converge ?
> It's simply not the case.
> Use MATLAB's fsolve to solve the system of equations
> K(x)*x - D(x) = 0
>
> Best wishes
> Torsten.
>
>

Tags for this Thread

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.

Contact us