Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SDETERS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

spice simulation usefull or not 7

Status
Not open for further replies.

2dye4

Military
Mar 3, 2004
494
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

I would always trust SPICE on any passive circuit simulation without any problems.

Small signal simulations can be misleading if the bias conditions weren't set up right on an active circuit, but this can be checked by the DC operating point analysis.
 
No, no, no.

It is not the simulation per se that is bad. It is the way unexperienced users use simulators and the results. Educating young people without letting them getting their fingers burnt and without having to search for faulty components, unstable circuits and high ESR in electrolytic capacitors will not make them confident. I know, some get too confident. But not good engineers.

Simulation is fine but it shouldn't be the only exposure to electronics as it usually is today. I can understand that it is good for schools to have a set of simulators instead of having to buy hardware and have instructors that are good at electronics. How much easier isn't it to run a short introduction on how to use a simulator and then let the students go on from there. No components lost but also no experience gained.

I do not think that anyone is against simulation. But we need to expose students to the RW as well. And that is seldom done today. I have met young EEs that cannot tell a resistor from a capacitor (not talking SMD now) and when asked what education in electronics they had, one of them said "none". I found that interesting and asked what he meant. It turned out that the electronics part of his education was noting but simulation runs, transistor models and some complex math. Plus FFT. Another case is when an (also young) engineer had designed a filter to extract communication frequencies out of the 50 Hz grid. Exploded on first try. He had been working on a p.u. basis and when it came to component selection, he just chose components that had the right ohms and microfarads. The volts and watts were not interesting (or relevant to him). The only part that stood unharmed was the inductor - which someone else had helped him design.

That - I think - is why we think that 100 percent simulation is a bad thing.

Gunnar Englund
 
SPICE allows you build circuits which are impossible to build in reality. In Spiceworld, for example, an inductor of 100H with 0.01[Ω] resistance is a valid construction; transformers happily operate at 1000T flux density, etc. Without an appreciation of real-world practicalities and limitations, SPICE can be a dangerous tool. In the right hands it is invaluable, but requires a sound understanding of the real world to know when SPICE is producing nonsense.

----------------------------------
image.php
I don't suffer from insanity. I enjoy it...
 
Hello 2dye4

Thanks for pointing that out, I also have misinterpreted that posting and reading the responses here am now clear on this.

Chuck

 
Simulations in general can be a wonderful tool, but NOTHING substitutes for experience and understanding of the real world. I believe most of the posters in this forum can find agreement with that statement.

Simulators derive much of their value by allowing manipulation of certain variables while maintaining control of other variables, allowing a person to concentrate only on what they want to change. In the real world, a person cannot assume the variables in which they are not interested are unchangeable or predictable. That is the major weakness in simulations.

According to the accident analysis for the Tenerife air disaster (so far, the worst aviation accident in history for death count), the captain of the KLM aircraft (which was falling behind schedule) attempted takeoff without clearance. One point noted in the report as information (not listed as a contributory factor) was the fact that the KLM captain had been flying few real routes for a long time. During previous months most of his time was spent teaching in the simulators. Often in simulators, interaction with ground control is assumed, and the simulation starts with throttles moving forward when the captain is ready. No need to get takeoff clearance from a controller.

Is it possible the captain got in the habit of outside circumstances being controlled and not requiring his attention? While I can't speak for the now dead captain, qualified aviation accident investigators thought it was information that was important enough to be included in their report.

Spice works in a similar manner. It controls certain variables to allow you to manipulate other variables. Only experience that gives understanding of the real world can allow a person to make consistenly good use of a simulator, Spice or any other kind. If the schools today eliminate real world labs in favor of pure simulation, I believe they do their students a disservice.

debodine
 
That's an interesting and thought-provoking example, debodine! It conveys and underlines very well what I tried to say. You need to have it in your bone-marrow - and you don't get that from a simulator. A PLS for you.

Gunnar Englund
 
Spice's biggest limitation, has always been its fundamental framework of linearizing non-linear behavior of circuits. Linear analysis is the lynchpin of circuit analysis. But, no active circuit can be linear, since it's comprised of nonlinear devices such as transistors and diodes.

The second limitation of Spice is YOU and your computer. Spice is an abstraction of reality, and as with any other simulation, only simulates what you've put into the model. You cannot possibly put enough detail to duplicate reality, either because there won't be enough nodes to run a full circuit, or the fundamental models do not have sufficient verisimilitude.

To wit, I spent a rather amusing 2 months trying to simulate a SINGLE, I2L inverter. For what was ostensibly a one PNP and one NPN transistor circuit, I wound up with about 8 transistors and 20 resistors. Even then, I still couldn't get the DC characteristics to match perfectly.

Another example is the op amp. A typical SPICE model will model it with a simple push-pull output stage. When this is built into silicon, the circuit's offset voltage and current will be all over the map during operation. That's because SPICE does not even have facility to model the thermal gradients across the silicon die and the actual die requires splitting the output transistors in half and placing the halves symmetrically with respect to the input stage to balance the thermal gradients.

TTFN



 
Simulation? Why?

I have been doing electrical engineering for over 30 years. I started this stuff when I about 6. In 7th grade I built an exploding wire system for launching balls. In eighth grade I built a Tesla coil that took two people to carry and stood 6 feet high. I can understand simulation or modelling if you are trying to design an integrated circuit, which you really cannot ever build, but rather you cook up in a test-tube sort of way. But I see no purpose for it if you are designing circuits that result in a functioning circuit board. Why? Well for starters here's how I see product/circuit boarded designs being approached.

A description of a problem is put forth.
The power source is selected.
The shape factor is decided on.
A block diagram is created.
The implementer's skill set is considered.
The major components are selected.
The supporting components are chosen.
The technology is determined. (SMT or Thru-Hole or ?)
The passives are selected for each subsystem. AIN, AOUT, COMM, PS, DI, DO and the individual sections are designed.
Parts are ordered.
The packaging is selected.
The board dimensions are settled.
The schematic is completed.
The schematic is peer reviewed.
The layout commences. With careful attention to 'crosstalk' and coupling of all types.
Board goes out for fab.
Software development can commence.
The board is assembled.
Bench testing starts.
Any problems are fixed.
Software is completed.
Packaging is mated.
External wiring is completed.
Schematic is rev'd.
Board layout is rev'd.
Unit goes out for some RW testing.

Now I ask you where did I need any simulation? Most modern designs are compartmentalized. Do you need a computer to show you how to drive your output transistors or to do a level shift?
Do you need a simulation to show you how to hook two IC's together?
Or do you need a simulation to design a linear supply?
Ridiculous! A simulator will get you into more trouble! A simulator will distract your mind from getting the job done! Just as soon as you start trying to "understand why your circuit doesn't work like the simulator thought it would you are wasting someones money!! Now you are spending your time trying to puzzle out your tool not your design.

I would guess that designing that switching power supply might be a 'valid' job for a simulator... But it isn't! Why? because the complex IC that is the heart of it isn't model-able to the user. Even if it was, the interaction of the different components as they are laid out on the board cannot be modeled and makes ALL the difference in the functioning of the supply. No, you must refer carefully to the data sheet and its discussion of trace routing and component placement to end up with a functional circuit, so why try to simulate it? Pointless.

Basically if your circuit is complex enough in one huge pile that it could benefit from simulation it is probably too complex to simulate because of all the parasitical interaction that will also then be present.

Most circuits are now comprised of IC's which are not readily simulatable.

Most of a good design includes stuff that isn't even electrical.

Good design results from a clear global picture of the entire design not a myopic focus on a simulated sub-circuit.

Simulation? No thank you, I have work to do.[infinity]

Keith Cress
Flamin Systems, Inc.-
 
Wow, Smoked! That's intense.

I have tried to remember when I used a simulator last time. It was in a lecture about stability in feed-back circuits. And I only used it to demonstrate what we already knew.

I have also used simulation to show what can happen in a harmonics-rich power grid when PFC capacitors resonate with transformer's stray inductivity and motors are switched in and out (changes total inductivity). That's about all I have used simulation for. The first case because I didn't like to fumble around with little components on a bread-board and the second case because you do not 'experiment' with 11 kV and MVA circuits easily.



Gunnar Englund
 
I also have some very serious misgivings about the practical value of analog circuit simulation, outside of the classroom at least.

Most of my working life has been spent in analog/digital circuit design. The design problem involved was either so trivial as to make simulation a complete waste of time. Or it was so complex, as to defy accurate modeling. This is especially true where actual circuit layout is critical.

I agree with Scotty about the usefulness of being able to simulate improbably large or small real world values. The one time I was really grateful for Spice, was when simulating the dynamic discharge characteristics of a multi element LC pulse forming network used in a one megawatt laser system.

The circuit was simple enough to accurately model, but the thousands of volts, and hundreds of amps, and the size and expense of the components, made simulation a convenient, inexpensive, (and safe) way to quickly verify my design.

If the identical circuit operated down at the milliwatt level and generated a volt or two, I probably would not have bothered with a simulation.
 
Greetings
Thanks for your reply to my question about spice usage.
From what I see so far the consensus is that there are few
opportunities for experienced engineers to use simulation
in their design work. The subtleties of the design are
not modelable by spice so whats the point??
I offer a counter argument. As itsomoked pointed out
the design of a switcher supply involves many subtleties,
and one is well advised to consult the data sheet for
the control IC for important application info.
Well what if you need to alter the design on the data
sheet to incorporate a feature not considered by the chips
application engineers. Ah now we are in a difficult spot.
Are you the engineer sharp enough to predict how your
alterations are going to affect the circuit??
If you are not able to estimate the effects of your design
tweak what then?? You can of course build it and test it.
That is the most certain method. But if you can model your
modifications mathematically then you can let the computer
give some guidance.
I may be revealing to much but here goes.
Many the time I could not get the result I expected from
Spice and so I decided to dig into the problem, and in most
instances I wound up learning something about semiconductors
from finding the discrepancy in my result.

I personally find it faster to refine a design with spice
then build to verify.
Saves solder and helpless transistors
 
Clearly, if you've got a basic design that's unchanged over a span of years, there's not much new to simulate. And clearly, IC complexity has gotten to the point that building block approaches are adequate for most applications.

However, for those circuits that push the envelope or are not run-of-the-mill, SPICE, for analog and other simulators for digital are still a necessity. We often mix technologies with different thermal characteristics. This requires some degree of margin simulation to verify that the systems operate as designed over temperature.

If you're designing readout circuits for a new detector, a simulation is also a must. New chips come out every week; you can be sure that the designers at Maxim or Analog Devices have a permanent license for the latest version of SPICE, etal.

Designing a brand-new op-amp on the latest design rules requires a complete re-characterization of device parameters, ginning new device models and verifying that your circuits still operate as expected on the new process.

Many logic device simulations have simply moved up the food chain. VHDL simulators and Matlab are now used where lower-level bit-fiddling simulators were used in the past.

Obviously, the number of suppliers of simulators and design tools have consolidated, but they're not all dead, not by a long shot.

As with any design tool, some engineers are more comfortable with one than another. That's what keeps UTC, Mathworks, and Mathsoft all alive. Even Excel can be pressed into service for some design problems. But, to dismiss simulators out of hand, without knowing the specific application is somewhat short-sighted.

TTFN



 
2dye4,

A high frequency switching power supply is probably the worst conceivable thing to attempt to simulate in Spice. The reason being the design subtleties of the magnetics.

Winding techniques, skin effect, non linear magnetic core characteristics, evil unexpected self resonances, could drive an experienced power electronics design engineer to strong drink (that is my excuse anyway).

These are very rarely simple linear inductors and transformers. In fact, many very devious magnetic tricks often need to be employed as part of the fundamental design concept.
 
Warp,

Throw in the bewildering range of modern ferrites with properties optimised for specific applications, and perhaps a couple of saturable core devices to add further confusion?

2dye4,

If you have the time to develop accurate models of all the components that you need, it certainly can be worthwhile. Sometimes the problem is that the required model is so vastly complex that the time required makes simulation uneconomical: it is cheaper to build the prototype and debug it.

Cored magnetics is definitely one area where accurate modelling is difficult: I don't know what ferrite designers who are trying to squeeze every last watt out of a core use as a design tool today, but in the world of heavy electrical design, power transformer and generator designers seem to use an FEA package to model the magnetics because it is so complex.

I think most of the contributors here have a background in analogue or power electronics: what is your area of speciality? I'm curious if there is any relationship between the type of circuit being designed and the perceived benefits gained from SPICE.

----------------------------------
image.php
I don't suffer from insanity. I enjoy it...
 
Hello Keith[wavey3]

Thanks for you post most of all for purging some excellent comments out of the other members. I really appreciate your school of hard knocks approach to education, for me hands on was always the better tool. Kind of like the first time with a girl talk, read and wonder but nothing like being there! Jeez come to think of I'm still learning that after 23 years of marriage.

It is clear Spice like simulators have value not for everyone though, since I have little experience and want to learn I will explore the software and consider it, but I think the bench is where the action is.
[hairpull]

One thing I found a little odd though, In the must have tools thread no one has mention of a fire extinguiser!


Chuck

 
Chuck,

Good point - I actually have a CO2 extinguisher at my bench. Never had cause to use it yet - up to now the flames have died down once the power was turned off!

----------------------------------
image.php
I don't suffer from insanity. I enjoy it...
 
In 27 years, I've only had one fire. The damping resistor on the PopElex "Plastic Tiger" power amp ignited.

That's when I figured out that I wasn't going to be an analog designer.

Beyond that, my experience is that a high-performance ventilation system is more important than a fire extinguisher. Flux fumes, boiling ethylene glycol, vaporized plastic, etc., are all hazardous in high concentrations.

TTFN



 
Hi machmech;

Thanks, and you're correct it does flush out more thoughts
from our esteemed and skillful comrades, good stuff!

I am not against 'any' simulation I just feel for 'typical' electronics design it is not useful or cost effective. As a learning aid it could be very useful! As you can screw with all the variables that could cost you a lot of time waiting for parts etc to see generally what tripling that inductance might do. In other more accurately modeled fields like power transmission, as skogs was mentioning, simulation may be the only option and actually be a good one to boot!

Fire extinguishers... I didn't know the OP was looking for this kinda stuff.. But for sure they can bring some peace of mind! I got a Halon one that leaves no residue but will probably knock the ozone layer down on my head. It was a painful $350 but has the added feature that it leaves no residue is fairly light and knocks out fires stunningly fast like flipping a light switch!

zo7tbb.jpg


A good small, bright, flashlight is a useful tool. I have a lousy one at my lab and so curse it constantly.

Power strips with switches. I have about a dozen of them.
I break down my equipment into things plugged into my UPS (computer, emulators, lab supplies feeding active emulated prototypes, etc.) and things not.

As for tools:
I use my brain the most.
Then I use the a computer the second most.
Followed in rough order by a wood 2-1/2 pencil.

A triplet type loop:

zo6ot5.jpg


A dial caliper with a bright background on the dial (6"!) Something like the one on the right but I prefer a yellow background.

zo6p95.jpg


Hand DMM

Very fine point screw driver.

Xacto knife.

zo6qzr.jpg


with this blade. Kept sharp!

zo6rdg.jpg



Keith Cress
Flamin Systems, Inc.-
 
I have had an awful lot of things suddenly go "pop", or briefly blaze like a thousand suns before turning completely black. Plenty of "brown smells" too. But never a serious conventional fire.

My preference would be a carbon dioxide extinguisher, it also leaves no residue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor