[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnucap] ua741 simulation
From: |
Al Davis |
Subject: |
Re: [Help-gnucap] ua741 simulation |
Date: |
Thu, 4 Nov 2004 13:47:10 -0500 |
User-agent: |
KMail/1.7 |
On Thursday 04 November 2004 10:59 am, Enrico Strocchi wrote:
> Why the solution not converge
The composite of your circuit and the limiting algorithm throws
the iteration algorithm into a limit cycle, so after some
number of iterations you get the same incorrect results as
before. In this case, the length of the limit cycle is 7
iterations, which is unusual. It is rare to have a limit cycle
this long.
The terms "limiting algorithm" and "limit cycle" have nothing to
do with each other, in spite of the fact that both use the word
"limit".
A "limiting algorithm" is a method used by the simulator to
limit differences between values on subsequent iterations.
A "limit cycle" means that the iterations bounce between values.
A "limit cycle of length 7" means that every 7 iterations are a
repeat of the previous 7. Once it enters a limit cycle,
convergence failure is guaranteed. By adding "trace
iterations" to a dc command (or op or tran) you can see every
iteration, which may give you insight into the problem.
In this case,to make it converge, all you need to do is make any
change to break the symmetry, The easiest is ".option
dampmax=.99". More generally, the default value is 1. One way
to help convergence is to lower the value until it converges.
Usually, just a little, such as .99, will work. Sometimes you
need to go farther. If you need to lower it to less than
about .6, the results should not be trusted even if it does
converge.
What it does is simple.. Suppose we have a guess of "1", and
the next iteration produces a value of "2". With dampmax=1,
the value of 2 will be used exactly. With dampmax=.9 a value
of 1.9 will be used instead. (.9 times the difference)
So. suppose it is in a limit cycle alternating between 1 and 2.
That is, iterations are 1 2 1 2 1 2 1 2 etc. With dampmax
= .9, it starts at 1, then 2 becomes 1.9 instead. The next
iteration might be something like 1.1, which becomes something
like 1.2... So it breaks the repeat.