×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

spice simulation usefull or not
7

spice simulation usefull or not

spice simulation usefull or not

(OP)
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

RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

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
www.gke.org

RE: spice simulation usefull or not

2
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.

----------------------------------
  I don't suffer from insanity. I enjoy it...

RE: spice simulation usefull or not

Hello 2dye4

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

Chuck

RE: spice simulation usefull or not

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

RE: spice simulation usefull or not

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
www.gke.org

RE: spice simulation usefull or not

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



RE: spice simulation usefull or not

2
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.- http://www.flaminsystems.com

RE: spice simulation usefull or not

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
www.gke.org

RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

(OP)
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

RE: spice simulation usefull or not

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



RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

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.

----------------------------------
  I don't suffer from insanity. I enjoy it...

RE: spice simulation usefull or not

Hello Keithwavey3

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

RE: spice simulation usefull or not

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!

----------------------------------
  I don't suffer from insanity. I enjoy it...

RE: spice simulation usefull or not

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



RE: spice simulation usefull or not

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!



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:



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



Hand DMM

Very fine point screw driver.

Xacto knife.



with this blade. Kept sharp!

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

I have a CO2 at home in my kitchen as you can put out the Thanksgiving Turkey with it a few times and still eat it!lol

But they are really heavy and hard to get in small sizes anymore if its possible at all.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

I like using spice too catch my realy stupid mistakes,
before I have a board made. I also find the monticarlo and
worst case analysis usefull for tolerances. Some of the
new spice simulators allow you to load your code for your
processor and simulate it.
http://www.labcenter.co.uk/index.html?/products/pic16.htm
Just my $0.02

RE: spice simulation usefull or not

Y'all need to meet the guru of anti-SPICE @ www.ardem.com!  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.

RE: spice simulation usefull or not

(OP)
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 ???


RE: spice simulation usefull or not

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



RE: spice simulation usefull or not

(OP)
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

RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

(OP)
Warp
Spice is not for those applications
Everyone knows that.

RE: spice simulation usefull or not

That's the point, 2d... many people (especially green students) may not know what applications can be used...

Dan - Owner
http://www.Hi-TecDesigns.com

RE: spice simulation usefull or not

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 I2L 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



RE: spice simulation usefull or not

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
www.gke.org

RE: spice simulation usefull or not

Oh no skogs you didn't go for one of those "LEADING SOFTWARE AT 20%!!"  spams did you?  Or Ebay software?? Tell me you didn't get it out of the back of a van on a back country road from a guy wearing a trench coat?

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: spice simulation usefull or not

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
www.gke.org

RE: spice simulation usefull or not

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.....

RE: spice simulation usefull or not

You've only proven that you started with a poor model.  Nothing to do with SPICE itself.

TTFN



RE: spice simulation usefull or not

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.

RE: spice simulation usefull or not

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.- http://www.flaminsystems.com

RE: spice simulation usefull or not

(OP)
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.

RE: spice simulation usefull or not

2dye4,

I have had the same problem (low power requirement). I solved it using a low power PIC and ran it with a clock crystal (32768 Hz). It can measure two temperatures, detect ring signals, answer the phone, produce tones that tell the user what the temperature is and also check if there is any mains voltage or not.

The mean power consumption is 15 uA and four AA batteries keep it going for many years. We had one guy calling us after five years. He wanted to buy a new unit because he thought lightning had killed the first one. He was very surprised when I asked him to change batteries first. He did - and it worked.

Gunnar Englund
www.gke.org

RE: spice simulation usefull or not

The newer PICs even let you drop lower yet I think.  You'll need to watch out for batteries rotting to death. infinity

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: spice simulation usefull or not

SPICE

Engineer A:  Expert Circuit Designer
Engineer B:  Expert Circuit Designer plus Expert SPICE
Engineer C:  Expert SPICE Designer

Engineer B's circuits will always:

1.  Perform better - i.e. optimum design
2.  Be lower cost - i.e. minimum toleranced components
3.  Released to production quicker - minimum post PCB tweaks

I would never hire Engineer A if I can find Engineer B.  And I would never hire Engineer C.

Anyone who admonishes SPICE simulation as having very little use either does not know how and when to use SPICE or never designs circuits with more than 20 components.

RE: spice simulation usefull or not

I agree, Spice is just a tool.

An experienced and thorough electronics designer will choose the best and most suitable approach which may or may not involve any analog simulation.

I only use it when there are clear and obvious advantages in doing so, which is very rare indeed.  

RE: spice simulation usefull or not

I have take issue with you sanlog. Asside from IC design, education and complex linear circuits spice will tell you very little you dont know allready. Setting up an accurate simulation takes a lot more effort than the original design and is only any use if it has accurate models. Once you has done your simulation you then have to build it, test it and modify since your simulation missed something. So engineer B circuit will not allways perform better and will never reach production quicker. Of course if you have an example i'm all ears.

RE: spice simulation usefull or not

(OP)
Cbarn

Suppose I sketch up a two transistor amplifier with a pair of 2n2222 transistors and give you the schematic for analysis, then I build one with solder and then I simulate one with spice.

Are you telling me that you can predict the output of the circuit with greater overall accuracy than a simulation using a 2n2222 model from the vendor in a spice simulation.

Note that I am not suggesting setting up an elaborate simulation.  Just the parts in the library.

Takes maybe 20 minutes to enter, run, read results.

Do you think your figures will be closer to the measured results or will my spice simulaton??

RE: spice simulation usefull or not

2dye4, i'm not saying that at all. Firstly which model are you using? EM1, EM2, EM3? you probably dont know. If I build the circuit and measure the results I will know what it does. If you simulate it you won't, so you'll still have to built it and measure it. So what has spice saved you? Of course such a simple design would most likely come out fine with spice but change your transistors to ones with an ft of 5GHz and its a different story.

RE: spice simulation usefull or not

(OP)
Barn

I think you are saying just build it and then tweak components until you satisfy your design requirements.

For my two transistor amp.

Bias current.
Distortion as func of frequency
Dissipation of transistor at bias and various drive levels.
input impedance as a function of frequency
output impedance as function of frequency

So you could start with a example design and measure these things and use your intuition to guide you as you hone in on the specs.

Note that many of these things are not trivial to measure with affordable equipment.

Will you allow that time could be spent with Spice to  reduce the bench time by getting the starting design a little closer to the mark???

You must admit that some pre-build analysis is frequently beneficial. And if so how can you do it better than spice??

RE: spice simulation usefull or not

Additionally, a simulation is used to test conditions that are difficult to achieve or inaccessible.

Consider the example posited, how are you going to verify performance over temperature?  Are you going to get a temperature controlled oven and spend a day or so running different temperatures and jotting down all the pertinent data by hand?

TTFN



RE: spice simulation usefull or not

Well no i'm not saying that either, that appears to be your design method. Simulate, tweek, simulate ect. Some things are dificult to measure like distortion but if its important to your design them you have to measure it somehow or just trust to luck. If your relying on some model that is approximate at best then your "accurate" spice measurements aren't going to accurate at all. The same applies to the temperature problem, if it matters then you will at some point have to verify it for real.

RE: spice simulation usefull or not

Sure, but wouldn't you rather temperature test something that you have some confidence will achieve temperature performance, instead of crossing your fingers and wasting hours temperature testing only to find that it doesn't quite meet its requirements?

Another area that simulation provides is margin testing.  You can Monte Carlo or otherwise vary the device parameters to determine if your design is robust enough to survive process variations.  This is something that can absurdly expensive to test, tweak, test, etc.  Been there, done that.  A single lot run of 25 wafers costs several tens of thousands of dollars, with no assurance, even with specific engineered variations, that you've covered all the bases in processing variation.

There's a funny story here.  We, at a previous job, got to second source a Hitachi 6845 CRT controller.  They shipped us the mask set and nothing else.  Not only that, there weren't even test devices on the masks.  Call up Hitachi, "What are the processing parameters and how do we verify them?"  Hitachi responds, "Don't worry, just run masks on whatever standard process you have."  Duh?

So, anyway, we run the first lot; it yields more die than any of our own products.  Second lot is even better than the first.  Third lot yield was about double the yield of any of our own products.  Design for Manufacturing DOES work, when you WORK it.  Unfortunately for us, we never bothered learning that lesson.

TTFN



RE: spice simulation usefull or not

i dont think its a question of crossing your fingers, more like designing properly in the first place. Monty Carlo, yes Ive seen that, snag is the very properties that vary the most are not varied, alot of them are not even modeled in the EM1 model, the most common model, you can of course do all those 1% resistors though.

RE: spice simulation usefull or not

(OP)
Barn

I take another stab at it. Your design philosophy is not to build test modify, test modify etc...

You must be capable of refining the design by carefull analysis without a simulation and then build to verify. Correct??

You can work out the mathematics with a calculator or excell for my two transistor amp and select the components to meet the distortion,dissipation,input output impedance and any other pertinant qualifications to the point where you can build it with expectation of minor tweaking.

If so you are quite skilled indeed for it requires inverting most of the non-linear equations for the transistors and solving closed form equations for desired variables.

If you say you can do it I believe you. As for most of humanity some level of build- test- refine, iteration is required. And for this, spice is quicker than actually building-testing so we can use this to get closer to a design that is ready for actual build-test-refine iteration.
In the long run us mortals save ourselves a lot of time with spice.

RE: spice simulation usefull or not

Well if you think it saves you time use it, its your time after all.

RE: spice simulation usefull or not

It seems to me that a very great deal depends on what this amplifier is for, what does it do, what is the application ?

Perhaps it is something really crude like a photocell amplifier that only needs to distinguish between night and day and drive a relay. A sensitivity potentiometer can cover for a lot of component spread. Or is it something terribly sophisticated for high end professional equipment?

Another factor is prior knowledge and experience of similar circuitry. If you have been designing this type of application for the last ten years, it is going to be a lot simpler to design a slight variant than it would be for a complete novice new to the field starting completely from scratch.

Quite often it is only the very first input stage of what may be a very large and complex circuit that is really critical.

I cannot see any real advantage of simulating a power transformer, a pair of diodes, a filter capacitor, and three terminal regulator in Spice. That wold be a complete waste of time. The application notes for the regulator will caution you about instability problems, excessive lead lengths or any other traps. Spice most probably would not.

 

RE: spice simulation usefull or not

(OP)
I remember a incident with my grandpa when I was just a punk. I found him doing long division with pencil and paper and I, with some pride informed him that the new solid state calculators would do long division for him with just a few key  strokes. He replied he didn't have time for that, and that he knew for certain that if he did it himself with pencil and paper it would be right and he was not going to waste time placing trust in any electronic calculating device that could give him a wrong answear.

RE: spice simulation usefull or not

I use calculators as well, however I've seen many cases where someone uses one and gets a wrong answer.  Why?  They didn't notice that it was in radians, or grads, or degrees when they used a trig function, or thought "LOG" used base e, because they didn't see the "ln" key.

They are excellent tools, but if you don't have some idea as you work through the problem what kind of answer to expect, you can easily get burnt.

I was using a scientific calculator program on my PDA and was getting some bizarre results (or so it seemed to me) when I was doing some statistical analysis.  The regression results didn't look right to me.  Double checked everything, no mistakes.  Ran the same data with another calculator, results were different, and looked good.  Ran it on a spread sheet, same results as the second calculator.

Emailed the software company with my input data and showed them the results.  They found a bug in their software in an intermediate step that no user would ever see.  When you exceeded a range of values in the intermediate results, their routine went bonkers.  (I was even able to tell them approximately what values to look for that would expose the bug.)

That was unintentional.  One of the best practical jokes I remember from college was my lab partner had a fancy new HP45 scientific calculator, and everybody kept borrowing it.

So he took the top half of the case off and swapped the "sin" and "cos" chicklet keys.  No one ever noticed that their results were wrong.  Well, not until they got the graded homework back...

There's a reason all my old math teachers used to drill into us, "show your work!"  If you don't have a very good idea what's going on and what to expect, and just trust the machine or the software that runs on it, watch out.

RE: spice simulation usefull or not

I work as an apps engineer for an IC mfg company. Many of our parts have a lot of complex features. There is no way that I could spend the time necessary to create a spice model for each of the parts that I am responsible for - that would end up being my job - no thank you. Even so, we are increasingly seeing requests from customers for spice models of these parts. For the life of me I can't figure out why someone would want to simulate the circuits. To me, it's a pointless exercise. The datasheets and app notes are written to give ample guidance to design the circuits that the ICs go into.

There was a push a while ago to join the herd and put sim tools on our website. IMO, none of the sim tools that we, or our competitors have, really do anything special that one could not do with the datasheet, a calculator and a piece of paper. I can tell you that I don't use them - nor do any of my collegues. It's been my experience that those who want these simulation tools don't really know what they're doing in the first place - it is painfully obvious when called upon to review their designs.

On the other hand, the designers do rely on sims to flush out the design prior to masking out the first rev of the part (or subsequent ones). The sim tools the designers use are scrutinized closely - each component is tested and verified to the process used prior to being released to the designers for design use. Many times, when reviewing problems, the designers are called on to sim out the problem while we look at it concurrently on the board. It is invaluable to find out just what is happening inside the IC.

RE: spice simulation usefull or not

I hate to burst your bubble, but datasheets are RARELY designed to help designers.  Parameters are measured under some conditions, but not others.  There's no information about interacts, i.e., what happens when one parameter is at its extreme and something else is at different extreme.

And why does, "It is invaluable to find out just what is happening inside the IC" not apply to the system designer?

TTFN



RE: spice simulation usefull or not

If I had to run a component right at two extreme design limits simultaneously, I would be looking for a more suitable component.

RE: spice simulation usefull or not

Or a better design. I see the old calculator example has come up. Snag there is a calculator was made to be friendly to the user, spice isn't.

RE: spice simulation usefull or not

I can't speak for all datasheets - you're right, there are some poor ones out there. I can speak about the datasheets that I write - I do my best to describe how every feature works and how to implement those features properly. Regarding the spec tables - there are gives and takes. We need to supply all the pertinent specifications that we can on the spec tables. Anything you see on the spec table is a tested parameter and is guaranteed throughout the operating temperature range of the IC. If we can't test a particular parameter, but it is important to the design, then we will put something like "Guaranteed By Design" or something similar on the table or include it in the functional description. If you want every single testable parameter to be tested and listed on the spec table, then be prepared to pay more money for the part because each part does get tested and it takes time to test each part - and of course time is money.

And why does, "It is invaluable to find out just what is happening inside the IC" not apply to the system designer?

I was speaking in terms of responding to a problem or a failure that a customer may be experiencing. Typically, problems like this are a small percentage of the total amount of parts being used - usually the problem is specific to the application in question. We need to get to a root cause, and simulation by the designer may be required.

Have you ever tried to contact the applications support of the company that mfg's the IC your using to help with any issues you are having? Some companies are better than others when it comes to that, but you should be able to get some type of response about how the part should behave in a given application.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources