"Clive Arthur" <
cli...@nowaytoday.co.uk> wrote in message
news:o33pga$4be$1...@dont-email.me...
> It was weird. The circuit was using an LT micropower comparator with
> reference and was designed to generate pulses when an external voltage
> exceeded a certain level. Quite straightforward, and it worked until I
> changed the resistance, but not the ratio, of a potential divider.
I'm pretty sure that numerical solvers depend upon the luckiness of their
numbers being "approximately correct", or for that matter, incorrect just
enough to be useful. With floating point (most often, double precision, I
think?), the last couple bits are noisy, due to nonidealities in
transcendental functions, and bit rounding after arithmetic operations.
Not having written SPICE myself, I'm just guessing here, but -- producing
inversions of nearly-singular matrices is one of those ill-posed problems.
The answer exists, but getting from A to B (or rather, to A^-1) is
non-obvious. (A singular -- non-invertible -- matrix is the multivariable
equivalent of "divide by zero".) If the rounding errors happen to coincide
to a nearly-singular case, it will fail in a deterministic but non-obvious
way. (And for that matter, it might be a combination of errors which isn't
even near-singular, but just so happens to be an unfortunate combination for
the algorithms used to compute it.)
In other words, in the region where the calculation fails, there are
combinations of LSBs that work, and that do not work; it's not a sudden
failure.
This does suggest that, if your circuit is failing, occasionally, it's still
so far from well-behaved that it's probably a "wrong" circuit to begin with.
But with nonlinear, time-dependent circuits, I don't think that's even a
generally applicable case -- all circuits are "wrong", at some timestep or
another, which is why variable timestep is used in the first place. Even
with, for example, Jim's favorite continuous-derivatives function blocks.
(It's just a matter of changing that fail-space from dense to sparse, and
dodging the potholes.)
Hmm, now I wonder if there could be a rigorous definition to "fail space",
between linear algebra and computer science.
Tim
--
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website:
http://seventransistorlabs.com