The Museum of HP Calculators

HP Forum Archive 19

 Survey about convergence of iterationsMessage #1 Posted by Namir on 21 Mar 2009, 10:10 a.m. Hello All, When performing iterative processes you often compare one of more values between the current and last iterations. This comparison involves a tolerance value used to determine whether or not the current iteration has generated good enough results. My question to all out there is "Do you prefer comparing the absolute difference between iteration values or a percentage absolute difference with a tolerance value? Keep in mind that the tolerance value or % can be specified with the arguments to the procedure performing the iterations. Fixing the tolerance value or % is a bit more tricky since it may not be able to handle a wide variety of problems. Thanks Namir Edited: 21 Mar 2009, 10:12 a.m.

 Re: Survey about convergence of iterationsMessage #2 Posted by Egan Ford on 21 Mar 2009, 1:28 p.m.,in response to message #1 by Namir Quote: Do you prefer comparing the absolute difference between iteration values or a percentage absolute difference with a tolerance value? The former. Usually something like: ```if |diff| < 1E-desired precision then end loop ```

 Re: Survey about convergence of iterationsMessage #3 Posted by Mad Dog ebaycalcnut on 22 Mar 2009, 3:25 p.m.,in response to message #1 by Namir Actually, I concur. If you pick a reasonably small absolute value, and I do mean reasonable compared to the solution values, you should not need to mess with the headache-y percentage tolerance. It would be interesting to try a coupled algorithm where you first try an absolute value tolerance, get a solution, then switch to a percentage tolerance using as initial values solutions from the absolute value tolerance problem. I guess this would essentially be a double convergence.

 Re: Survey about convergence of iterationsMessage #4 Posted by Karl Schneider on 22 Mar 2009, 4:05 p.m.,in response to message #1 by Namir Namir -- If the calculated value(s) that establish convergence are large in magnitude, they can be normalized by scaling. One application is power-flow programs for complicated AC networks. Sums of calculated values of power establish network convergence when they match known injection values. These values are large -- typically in megawatts (MW) and megavars (MVAr) -- along with voltage in kilovolts (kV) and current in hundreds of amperes (A). The powerflow calculations are done utilizing normalized "per unit" values, typically ranging from zero to ten. Mismatches are then small in magnitude, so absolute tolerances are employed. -- KS

Go back to the main exhibit hall