Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LTSpice Sim Fails After Circuit Changes

452 views
Skip to first unread message

Kevin Foster

unread,
Dec 13, 2016, 10:42:19 PM12/13/16
to
I am using LTSpice XVII under WINE in Linux. The sim works when I start
out but then fails (become inaccurate) after a time spent adding, moving
and deleting components. If I wipe everything back to the simple start
circuit it does not work correctly as it did originally, although the
signal sources do.

Is this a known problem and is there any way to get around it?

Kevin Foster

jurb...@gmail.com

unread,
Dec 13, 2016, 11:17:42 PM12/13/16
to
Perhaps it is the circuit. I don't mean to insult, but from your postings we can tell there are a few holes in your knowledge base.

If nothing else changed it is probably your changes. you need to do things the old way, you should already know how it works, every waveform, every voltage. At one time it was all done on paper (or actually napkins at the greasy spoon restaurant).

I can design you an amp, an SMPS and a few other things on paper but I have a shit ton of trouble with doing it on the computer. So I still do it (when I do) on paper.

I think everyone should be given a pad of the graph paper and made to actually draw out things, and label it with all expected waveforms and voltages before being allowed to use Spice in any of it's versions. You should not need a simulation unless the thing is exceedingly complex, and most things aren't. What happens at startup ? What happens at shutdown ? You should already know this and the computer is just a tool to confirm it. You decided the capacitor values, you designed the reset circuit. If it doesn't work in a simulation you should already know why.

I am not being hostile or trying to insult, thought I have been told I sound that way sometimes. It is just it seems you got a bit more to learn. Work it out yourself before giving it to Spice, YOU designed it, YOU should know everything about it. Every bias on transistors, every time constant, everything period. Spice can be a nice tool to save you from wasting paper and then to confirm that the thing runs as YOU intended, but it cannot do it for you.

Bottom line if the unchanged circuit still runs in the simulation but the new and improved version does not, it has nothing to do with your computer.

They sat Madman Muntz used to walk through the engineering department and cut components out of the prototypes the engineers were making. If it stopped working it was included in the final design. You might just have pulled a "Muntz" and removed something that was actually needed. But he did it one component at a time. If you remove a whole bunch of shit, why did you include it in the first place ? Think back to WHY it is there.

bitrex

unread,
Dec 14, 2016, 12:17:18 AM12/14/16
to
Can you post a netlist of the working circuit, and the non-working edit?

Jim Thompson

unread,
Dec 14, 2016, 5:08:11 PM12/14/16
to
Look for a boo-boo in the schematic. Sometimes reading thru the
netlist will help you spot the error.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| STV, Queen Creek, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Jim Thompson

unread,
Dec 14, 2016, 5:09:40 PM12/14/16
to
On Wed, 14 Dec 2016 15:07:59 -0700, Jim Thompson
<To-Email-Use-Th...@On-My-Web-Site.com> wrote:

>On Wed, 14 Dec 2016 14:42:11 +1100, Kevin Foster
><kfo...@internode.com> wrote:
>
>>I am using LTSpice XVII under WINE in Linux. The sim works when I start
>>out but then fails (become inaccurate) after a time spent adding, moving
>>and deleting components. If I wipe everything back to the simple start
>>circuit it does not work correctly as it did originally, although the
>>signal sources do.
>>
>>Is this a known problem and is there any way to get around it?
>>
>>Kevin Foster
>
>Look for a boo-boo in the schematic. Sometimes reading thru the
>netlist will help you spot the error.
>
> ...Jim Thompson

In addition:

I haven't "upgraded" to XVII... MANY hiccups have been reported.

Kevin Foster

unread,
Dec 16, 2016, 9:17:32 PM12/16/16
to
Thank you for your reply. There is most likely no problem with the
circuit, since it is from an LT datasheet. It just seems like the more I
tinker with the sim, the less reliable the output is.

As was suggested by another, I will go through the netlist and see if I
can spot what is happening. Might have something to do with running Wine
Linux.

Kevin Foster

Jasen Betts

unread,
Dec 17, 2016, 12:31:00 AM12/17/16
to
if I has a badly behaved sim, another test would be save it and re-load
it in a new instance of ltspice and see if it is consistently bad or if
it behaves better before looking for differences in the saved files.

--
This email has not been checked by half-arsed antivirus software

Phil Hobbs

unread,
Dec 17, 2016, 8:02:19 AM12/17/16
to
It runs fine in Wine on RHEL6, Fedora, and Debian--about one crash a
month. Usually it says "can't start marching waves", at which point if
you touch the plot window, down she goes. You can still save the
simulation if you only touch the schematic window. So it's unlikely to
be that.

Try poking around on the "SPICE" tab in the control panel. Turn on the
'alternate solver' for a start, and think about all the abs tolerances
if you're running at unusually low currents.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

Clive Arthur

unread,
Dec 17, 2016, 9:13:19 AM12/17/16
to
I had a similar problem just yesterday. This fixed it...

On the 'Edit Simulation Command' menu, tick the 'Start external DC
supply voltages at 0V' box.

Cheers
--
Clive

Jim Thompson

unread,
Dec 17, 2016, 9:37:09 AM12/17/16
to
As Phil Hobbs suggested, use "alternate solver". The basic solver is
set up for show so that Mikey can claim fastest simulator... but it
takes liberties and model simplifications in the process.

And go back to LTspice IV, XVII is _known_ to have bugs... join the
LTspice List to follow all the whine.

Clive Arthur

unread,
Dec 17, 2016, 11:36:53 AM12/17/16
to
On 17/12/2016 14:37, Jim Thompson wrote:
> On Sat, 17 Dec 2016 14:13:15 +0000, Clive Arthur
> <cli...@nowaytoday.co.uk> wrote:
>
>> On 14/12/2016 03:42, Kevin Foster wrote:
>>> I am using LTSpice XVII under WINE in Linux. The sim works when I start
>>> out but then fails (become inaccurate) after a time spent adding, moving
>>> and deleting components. If I wipe everything back to the simple start
>>> circuit it does not work correctly as it did originally, although the
>>> signal sources do.
>>>
>>> Is this a known problem and is there any way to get around it?
>>>
>>> Kevin Foster
>>
>> I had a similar problem just yesterday. This fixed it...
>>
>> On the 'Edit Simulation Command' menu, tick the 'Start external DC
>> supply voltages at 0V' box.
>>
>> Cheers
>
> As Phil Hobbs suggested, use "alternate solver". The basic solver is
> set up for show so that Mikey can claim fastest simulator... but it
> takes liberties and model simplifications in the process.

I tried that with my circuit, but it made no difference.

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.

The thing that made it work again was the fix described above.

I've been using LTspice for years, albeit not intensively, and every so
often it does something odd. Less often than it used to, that may be
bug fixes or it may have subliminally trained me to avoid certain mistakes.


Cheers
--
Clive

Jim Thompson

unread,
Dec 17, 2016, 12:45:45 PM12/17/16
to
On Sat, 17 Dec 2016 16:36:48 +0000, Clive Arthur
You could post your .asc file so we could peruse it for quirks.

Clive Arthur

unread,
Dec 17, 2016, 2:42:15 PM12/17/16
to
Sadly not. It would be great if all who could read SED had implicitly
signed some sort of binding NDA, but until that happens, I can't post
details of my client's IP, and without the details it would be pointless.

OK, that's sort of fatuous. But wouldn't it be great?

Cheers
--
Clive

Phil Hobbs

unread,
Dec 17, 2016, 2:42:49 PM12/17/16
to
>You could post your .asc file so we could peruse it for quirks.

Yup, sounds like pilot error, such as ignoring the input bias current.

Cheers

Phil Hobbs

Clive Arthur

unread,
Dec 17, 2016, 2:47:49 PM12/17/16
to
On 17/12/2016 19:42, Phil Hobbs wrote:
>> You could post your .asc file so we could peruse it for quirks.
>
> Yup, sounds like pilot error, such as ignoring the input bias current.

No, not by orders of magnitude.

But it doesn't matter. The circuit simulates now and works (I mean in
the physical domain - breadboard) as expected.

Cheers
--
Clive

Jim Thompson

unread,
Dec 17, 2016, 3:08:54 PM12/17/16
to
On Sat, 17 Dec 2016 19:42:12 +0000, Clive Arthur
You could send it to me privately. I have no problem signing an NDA.
I do so almost daily.

Tim Williams

unread,
Dec 18, 2016, 5:47:04 PM12/18/16
to
"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

Jim Thompson

unread,
Dec 18, 2016, 7:05:42 PM12/18/16
to
Clive has not indicated if he's followed advice here and set Solver =
Alternate?

One of my general rules of thumb is... if I experience repeated
convergence issues... non-convergence or slow convergence, I'm doing
something wrong, and I should revisit the pieces individually.
0 new messages