Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

spice simulation usefull or not 7

Status
Not open for further replies.

2dye4

Military
Mar 3, 2004
494
0
0
US
I was just reading in previos thread about good tools
to have on the electronics bench and once again I hear
of the evils of Spice circuit simulation.
What problems do people really have with spice or what
situations can cause it to give incorrect results.
Please confine your answears to those cases where the
circuit is reasonable well modeled by the components.
We all know about Garbage in Garbage out.
I ask because I use it frequently and rarely has it lied
to me.
In those cases the integration time step was not correctly
reduced and the circuit solution was in error.
My standard procedure now is to force a small time step
simulate then force a 0.8 X timestep and simulate.
Then compare the results. If agreement call it done.
It has not lied to me since I began this procedure.

thnks
 
Replies continue below

Recommended for you

This thread touches upon one of the deep dark secrets of electronics design - spice tools are available, but experienced engineers, for the most part, don't use them.

And why? Because the spice tools are not time-efficient or accurate enough. You can either spend all your time trying to "model" the circuit and tweeking your component models, or you can make a lot more progress actually breadboarding and testing the circuit. I guess if you were in an environment where you had a spice-engineer, you could drop the circuit on his desk and ask him to model it. But in engineering today, a single engineer has to do everything from ying-to-yang on a project - doing a spice simulation proves to be a very poor use of time.

I used spice a bit from 1990 to 1992, but then the spreadsheet programs got a lot better, and I find it better to do most designs using an Excel spreadsheet to obtain approximate behavoir.
 
Y'all need to meet the guru of anti-SPICE @ Caltech's Dr. Middlebrook has been teaching/preaching against the computer simulation approach for many moons.

The inability of a linear approximation algorithm to handle nonlinear (and worse, switched topology power converter) circuits is legendary. So, too the excess of information in the component models the SPICE programs use, which is the root cause of their notoriously slow computation.

Further is the problem, touched on above, of knowing what to do if the spice simulation says your circuit won't work!

In the case of switching power regulators, his solution to the large number of components (sometimes >100 parts) was to devise a linear model of an entire power converter. His 'Canonical Model' contains only 7 linear components! and models the most important dynamic behavior of a switcher. This leaves the clamps, drives, sensors, bells and whistles aside, but these are not difficult designs. My experience is that a few parts apiece is all each takes; the fact that they don't interact means they may be perfected separately, simplifying the overall process.
 
From Dr Middlebrooks web site

To access the GFT for Design Simulation:
Intusoft has implemented the GFT into their downloadable ICAP/4 demo CD. In addition to this complete toolset for schematic entry, SPICE simulation and design verification, the product includes GFT Templates. The templates calculate all the GFT constituent transfer functions generated by a user-specified test signal injection configuration. This forms a powerful and fast tool for use in “Design-Oriented Analysis."


The guru of anti spice ???


 
Don't know about him being the guru of anti-Spice, but when he was teaching EE114, the class was about being able to solve things by hand and being about measure circuit performance, in-situ, particularly in closed-loop systems.

The "extra-element" theorem was part and parcel to that vein of teaching.

His big kick was being able to determine open-loop gain without opening the loop.

TTFN



 
The most fascinating thing for me is the emotional intensity
people have about circuit simulation.
You would think it was a political topic.
Some respond as if circuit simulation was the ruination of
society. I really don't understand why.
If you do not find it usefull just say why.
I realize if your are stitching together IC's with
manufacturer app notes within arms reach and using
transistors for logic level translations you don't need a spice simulation.
I have yet been able to inspect a circuit diagram with
say 10 discrete transistors in a linear usage and been
able to provide a more accurate prediction than a properly
run circuit simulation. You could say though that as long as
i use spice i will never develop the skill. Fair enough.
I also can't do long division as well as i once could in
grade school.
I am suprised to hear that spice doesn't work at all.
I have worked in the past at a location staffed with
a whole floor of very smart people all using circuit
simulation daily to check circuit designs before
IC lay out. I think they believed it usefull.
Dr. Middlebrook must forefeit his crown as the anti spice
guru in my opinion do to collaberation with the enemy.
I nominate in his place Bob Pease of National Semiconductor.
On a philosophical note please remember that models are
all any of us use in our brains to analyze circuits.
My mental model of say a bipolar transistor, is just
a diode from base to emitter and a non linear current
source function between collector and emitter. I can use
this to visualize what will happen to a rough degree.
But it is far inferior to a model used in spice.
I am going to venture out on a limb past my comfort on
this topic to suggest that there actually are numerical
methods for integrating non-linear differential equ
with zero error due to the algorthem. If the eqn were
quadratic could not Runge Kutte (sorry mispelled im sure)
integrate with zero truncation error.
Unfortunately the equ of semiconductor devices are not
limited the order of available algorithems so there will
be errors. I just thought is was not correct to state
that non linear equations cannot be solved by numerical
methods. After all there are interpolation formulas
for quadratic, cubic and so on representation of data.

Sorry long winded
 
It all depends on what you are simulating.

If it a simple little circuit to operate at moderately low frequencies, and all the relevant parameters can be accurately modeled, the circuit simulation should work fine.

But what if your sensitive high impedance circuit is susceptible to outside electromagnetic interference ? How do you model in that ?

What about a simple resistor network that operates at 50Kv ? Would you just assume that ohms law would prevail, or might not corona discharge and physical circuit layout become rather important ?

How about designing a very low noise amplifier. Would the resistor models in spice allow for Johnston noise contribution in the resistors ?

How about a piece of wire sticking up in the air. Would spice see that as an open circuit, or would it correctly assume it is an antenna of some sort ?

I could go on, but for simple circuits simple models of components are more than adequate. But not always.

Emotional intensity it might all be, but practical real world electronic engineering can become far more complex than just assuming some simple linear dc and ac parameters.
 
That's the point, 2d... many people (especially green students) may not know what applications can be used...


Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Spice is a framework for simulation. As such, it can't "recognize" anything that the user doesn't put it.

GIGO. Ditto for the human brain. An engineer who can't figure out what to put into Spice will likewise be unable to analyze it by hand.

Is it really plausible think that these "green" students can go about "designing a very low noise amplifier" by hand any more than they can by Spice? If they aren't smart or experienced enough to model dangling wires as antennas in Spice, they're surely not going to include them in their hand analysis.

Even given an RF analysis program, are they suddenly smarter? I think not. While Spice and other simulation programs obviously distances an engineer from the actual math, I don't see that justifies condemning these programs.

Even in the simplest circuit, a neophyte cannot possibly know whether the base resistance is critical, whether it should be a simple lumped resistance or distributed resistance, without some prior experience. A standard I[sup]2[/sup]L logic gate with a single PNP injector and two collectors appears simple, but can be expanded ad nauseum to a monstrosity that includes half a dozen parasitic transistors and a dozen or so parasitic resistances.

TTFN



 
I have been using the Electronic Workbench now and then. It is good at normal analogue circuits, but sometimes difficult when modelling high-current circuits - especially those with diodes and low value resistors mixed with fast switches and inductivities, like what you find in PWM power stages.

I have, however, ordered the Multisim 8 and will be back with a report when I have tested it. It has to be good. Even if I got it at a bargain price.

Gunnar Englund
 
Oh yes. I did! And I think he was a real nice guy, too. He didn't have any change and was kind enough to take my AMEX card along with that funny number. He shall be back soon after having fetched the money.

Gunnar Englund
 
OKK....One perticular example where spice simulation was wrong with low power analog circuit , but since i had worked with hands on electronics and components, i got that.....The OPamp is TL064 and the one out of 4 opamps was capacitively coupled to the next one in a differenciator (Highpass) fashion to remove DC output offset due to high gain(50). The circuit when checked on board (3 times), had 3dB rolloff at 0.5Hz and worked absolutely well. The simulation frequency used was 40Hz @ 1mV and the spice simulation would not show output(would show 150uV scale), not considering the input impedance of opamp was in 100's of Megaohms. This is where the simulation failed and then i just finished pole-zero for stability and now the thing works......any comments anyone.....
 
If I may join an already beat to death topic:
I started out designing and building circuits hands on. Then, I learned SPICE in school. In those days, it was on DEC VAX and one had to draw nodes and then write a text file. It was not useful except for school.
I did designs for about 15 years plus without spice, then I got a job working with a huge motor [power in MWs] and drive. It was very complicated and had more than 3 electrical phases with many poles motor. There is nothing like it out there.
Also the drive had multi-level switching with complex current shaping controls and had to be implemented with closed loop controls for torque, power, and speed. This is not something one can just build and try a few times. We had to simulate the controller using Matlab Simulink and Simplorer. We used PSPICE for component level checks but not for system level.
I guess the point is, there are projects where it cost way too much to build and test first, so it needs to be simulated.
In the end the drive worked the first time, it needed more tweaks on the PID but it was close and did not blow up.
I believe that simulation tools are just that: tools.
They can be useful but not for every project.
 
If you can't prototype the thing you are building, like giant things, or conversely very small things, like ICs, then anything that might be useful in educating you can't be bad.

Even if it can't perhaps give a reliable 3 sigma simulation just the fact that you must think about each component going into the simulation is another opportunity for the mind to review and consider.

Nice example alley. Thanks.

Keith Cress
Flamin Systems, Inc.-
 
Hi
Thanks for the comment on my post

I noticed ScottyUk asked what I used spice for.
My hobby is home security devices.
Sensors and transmitters.
All my devices are battery operated and I would like
a 6 month battery change interval as a base goal.
I need my circuits to run on 50 uA total.
This is a stretch for even micropower op-amps and comparitors.
I find I can best achieve my goal by going straight to
descrete design with transistors. I can frequently sub
a differential pair for a comparator and still get my
goals realized with just a few uA of bias current.
Spice has allowed me to refine the design before building
and make circuits with many simple op-amps and comparators
included that operate on much less bias current than I
could achive with pre-packaged parts.
 
Status
Not open for further replies.
Back
Top