5
\$\begingroup\$

I see a lot of questions here where people have seen a certain circuit mentioned somewhere, and their first step is to run it through a simulator. In some cases I wonder if the actual hardware ever gets built at all.

Being of an older generation, I came to simulators fairly late. I do find them useful, especially when some degree of component tweaking in (say) a filter circuit is needed. But it's pretty much always accompanied by bench testing and looking at real measurements.

I feel that bench work has been easily one of the most enriching aspects of my development as an engineer. Even the simplest seeming circuits can have unexpected "features" and one can learn valuable lessons from figuring out what is going on and why.

Are their specific benefits to simulating even basic circuits before building them? Or vice versa? If so, what? If you have the choice of the two approaches, what do you prefer?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ well, if you're going to be simulating the whole complex thing at the end, you're not even losing significant time simulating the small parts of it :) \$\endgroup\$ – Marcus Müller Jun 18 at 11:53
  • \$\begingroup\$ Note that I think the problem here lies specifically in how subjective "basic" and "simple" are. \$\endgroup\$ – Marcus Müller Jun 18 at 11:54
  • \$\begingroup\$ yes there is an inherently subjective element to this question, which I tried to minimise. I decided to post it anyway as I think it is both beneficial and informative (but of course that's just my opinion ... sigh ...) \$\endgroup\$ – danmcb Jun 18 at 12:08
  • \$\begingroup\$ The lower the circuit frequency, the less important are the parasitics and the more meaningful are sims. I do mostly sub MHz stuff and sims are excellent. But I wouldn't trust sims as much if I was doing more RF, at least not Spice sims. \$\endgroup\$ – tobalt Jun 18 at 12:53
  • 2
    \$\begingroup\$ Simulation test gear doesn't load the circuit like real scopes and DMMs do, so with care, you can get better results. Without care, you can get total rubbish. \$\endgroup\$ – Neil_UK Jun 18 at 13:56
17
\$\begingroup\$

Are their specific benefits to simulating even basic circuits before building them?

The bottom line is this; if you simulate the circuit you are trying to design and the simulation doesn't show adequate results then, the chances of it working when you build it are very, very close to zero.

So, a simulator tells you quite categorically that something won't work. This saves you building a prototype that isn't going to work. It stops you wasting your time and saves you money on near-useless hardware.

I use a simulator for every single circuit I design and do so because of the clear and obvious cost and time benefits. My latest circuit (a rather complex and powerful hysteretic Cuk-like converter) worked first time with zero component changes or value changes. I count this as success in a very real way. It's still going through the paces, but I'm confident.

In addition, my simulation results then stand as a proper evidence that I have designed the circuit with due diligence and this is important for quality systems.

About 50% of the circuits I design work first time with no component modification. Of the other 50%, about half require component value tweaks and the remaining quarter of all circuits I design require another iteration. Of that quarter requiring another iteration, 90% of the modifications required could have retrospectively been found with more extensive simulation.

In my opinion (and I have had years of practical experience recognizing this), the more effort you put into simulation, the more economical is the overall result.

In short, it is naïve not to use simulation before you build something.

My advice is simulate everything that you design and do so before laying out your circuit board or buying components.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ I fully agree on the essence that more simulation brings me to working circuits faster. I simulate, then select components, simulate again because components force compromises, layout, simulate again with approximate parasitics, maybe tune values. \$\endgroup\$ – tobalt Jun 18 at 12:48
  • \$\begingroup\$ I'm not one who works with electrical circuits in such a setting, but when I watch the people who do, I notice that they're pretty good at intuitively figuring out which circuits can be almost fully designed in simulation and which circuits are going to be obnoxious and require multiple turns in hardware. (although I'm pretty sure I saw an RF engineer sacrifice a chicken as part of divining whether their simulation would be sufficient or not. \$\endgroup\$ – Cort Ammon Jun 20 at 3:55
7
\$\begingroup\$

The second part of the question is "opinion based" and out of scope for this site..

But, simulation is not something meant to replace real world testing. It's another tool in our development toolbox. It has some advantages but also some pitfalls. The simulation is as good as the model you use.

One key aspect of simulation is the ability to "mesure" quantities that are not mesurable in the real world. For instance internal timing inside a chip itself. One can't have access easily to the chip internals.

Another aspect is the speed at which you can adjust and try new things, without creating a new prototype at every step.

As I said it's just a tool. Most of the time, some part of the design are simulated. When others are not.

But every simulation tool user knows (or should know) that simulation models are not perfect and thus the simulation has some limitations. "It works in simulation" doesn't mean "it will work in the real world" ! At the end, only real world testing, at different temperature, load, batches of critical components, etc is able to validate the design against its spec.

A simulation of an OPAMP negative feedback might tell you that you have a phase margin of 60°. Nice, but that simulation doesn't tell you what the real phase margin will be. The only thing you can conclude is that your system is very likely to be stable because you have a big simulation margin and if the model is not very poor, it should agree with the real thing somehow. I am not saying that all OPAMP simulations are not accurate, it was just an example. You may find extremely good models that accounts for temperature and even some parameter tolerancing that will results of excellent results.

But if you are simulating "basic stuff" : resistors, inductors, MOSFETS, BJT etc, the probability of having a correct answer that closely match the real world is very high, and you may not have to prototype that part of the circuit.

The point is to choose the right tool for the right job. As you won't use the general relativity to solve for the motion of an apple falling down a tree. Even if you know that Newton's laws of motions are a just a special case that works well only in specific conditions and if theses specific conditions are met, go for Newton ! It's much easier and faster.

Same for electronics simulations, you are designing 60 GHz filters, don't use a spice simulation using the internal R L and C models, you won't go very far. Here the right tool would be an RF aware simulation package. But simulating a MOSFET for a LED driver at 100KHz at ambient temperature, It won't make any sense to use Agilent ADS for that task. Spice is perfectly suited to that task and may allow you to pinpoint problem such turn-on time out of specs...

\$\endgroup\$
5
\$\begingroup\$

Some great answers here already. My sentiment is also that sims have replaced 90% of bench tests for me. Making good sims is a skill however, that one needs to develop. Component datasheets and models are often very good these days.

One other thing: Sims also allow me to push the limits of the possible farther because I can explore very tolerance sensitive circuits and then still consider if they are at all practical.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Plus, you can burn your sim as many times you want without having to rebuild charred electronics. \$\endgroup\$ – Andy aka Jun 18 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.