August 22, 2012

Anyone who has read a few of my blogs has seen that I simulate circuits in SPICE. You may know that Bob Pease was pretty opinionated about SPICE and once wrote, “SPICE takes away your ability to get good insights on what is happening. Spice actually HURTS your understanding of how circuits function.” In honor of Bob’s birthday today, let’s consider some merits and pitfalls of SPICE.

Bob was a colorful character and often resorted to hyperbole to make a point. I understand his concern. Half-baked hacking around in SPICE can be counterproductive and may stunt your analog growth. I’m sure he witnessed this on occasion.

The fact is we may not be as skilled or experienced as Bob. We may not have the analog mentors to guide and teach us as he once did. Our design world moves at a quick pace and we may need help.

I believe that SPICE, when used judiciously, can improve your understanding of circuits and make you a better analog designer. It requires discipline. What does that mean?

When you perform a circuit simulation, have clear expectations. Think carefully first. From knowledge, experience and calculations, anticipate the result. If you get what you expected, great. If not, you have an opportunity to learn. Don’t immediately try something different. First, do your best to answer the question of why the results didn’t match your expectation.

Maybe it is due to a simple oversight and you can quickly move ahead. But if not, it may be an indication of some faulty thinking or a miscalculation on your part. Better to learn from it and gain new insight. Or maybe your models are not perfect (Bob would remind us that they never are). Could this account for the difference? Or maybe you have misused SPICE and gotten some quirky result (it happens). Whatever the reason, ignoring it and moving on is analog-hacking.

Figure 1.  A small-signal transient simulation in SPICE can reveal potential instability. It’s used here to step through three values of CF to check compensation for input capacitance. Bob would remind us that the tiny capacitance values of CF would demand verification and optimization on actual circuit board layout!

Now I won’t say I always follow my own advice. Sometimes, I will suspect a cause and try something different. I will circle back later to resolve the discrepancy. There are plenty of ways to use or misuse SPICE but I think this is a basic philosophy that can guide your simulation efforts.

I would love to have a friendly discussion with Bob about SPICE. I bet there could be some “give” in his seeming never-use-SPICE position. In fact, here is another side of the story indicating that he indeed had some flex on the issue:  Bob Pease didn’t hate SPICE.

In future posts I’ll provide some tricks and suggestions on how to get the most from SPICE simulations. And if you’re not already using SPICE, I recommend TI’s free SPICE program, TINA-TI. It’s very capable and quite user-friendly.

Bruce        thesignal@list.ti.com

 

A Pedantic fact:   SPICE = Simulation Program (with) Integrated Circuit Emphasis

 

          Index to all The Signal blogs.

 

Anonymous
  • I use spice for exploring circuit concepts so I start with fundamental building blocks of E, and G sources and then add the chosen models.  Like Larry Martin1 you can make measurements that are difficult to on the bench.  It is also useful in understanding why a real, breaded board circuit fail.  For university students they can explore circuits without burning components.  Although the latter is extreme useful for developing caution in experimentation.  

  • Bob P. also did not like spreadsheet programs like Excel. and regularly degraded them. It is true that these programs can be easily misused, just like SPIICE, but most people will agree that for certain things, Excel sure improves productivity. Like anything else, you just have to be careful....

  • Spice actually lets you measure things that are difficult to measure in real life, such as the current transient through a capacitor.  It is just another tool in the box.  I think even Bob would agree.  And I agree that you can't make a good design just using Spice.

  • So true. I do the same with i simulate. Simulation is solely because you dont have the parts. If you try to silmulate and try to figure the correct reading of capacitors and resistors and stuff, you're going to end up failing all your exams and being probably a very bad electronics engineer who knows nothing!

  • I too agree. It became apparent to me as these modeling tools became prevalent (not just spice) that they were great tools for understanding, but not so much for design. If you get used to jumping to the answers in the back of the book, you short circuit your learning process. These simulation tools are great for verification as you mentioned, and to some degree to do "what ifs", but as a general design tool they lead to some pretty suboptimal designs.