What’s All This Spicey Stuff, Anyhow? (Part II)

Jan. 13, 2012
Bob Pease recalls some of his struggles with Spice, answers some reader questions, proves a point to his marketing exec, and discusses the role of modeling.

1 of Enlarge image
 

caption of image

(First published in the December 13, 1990 issue)

The other day I was standing out in the rain, talking with a design engineer from the East Coast. He said all of the other engineers at his company ridicule him because they rely on Spice, and he depends on the breadboards he builds. There’s just one hitch: his circuits work the first time and their circuits don’t.

To add insult to injury, his boss forces him to help his colleagues get their circuits working, since he has so much time left over. I said that sounds pretty good to me, so long as his boss remembers who is able to get out the circuits when it comes to doing reviews for all of the guys.

This guy gave me a tip: don’t design a circuit in Spice with 50-Ω resistors. Use 50.1 Ω, It converges better. Hmmmm. That sounds kind of intriguing. (see "What's All This Spicey Stuff, Anyhow? (Part I))

Right now I’m struggling with a Spice model of a circuit. Not of a new circuit, but of an old circuit: the bandgap reference of the old LM331 that I put into production back in ’77. It’s a good thing I put it into production before we got Spice, because if I had first run this through Spice, I’d have been pretty discouraged. Spice says that this circuit not only has a rotten tempco, but that it oscillates like a politician.

I went back and double-checked the actual silicon circuits. They soar like an angel, have a very low tempco, and are dead-beat when you bang on them. They have no tendency to oscillate; they don’t even ring. So why does Spice persist in lying to me? Doesn’t it realize I will break its back for the impertinence of lying to the Czar of Bandgaps? I’m a little busy right now, but in a while I will find out why it lies to me. The Spice and CAD experts around here tell me, “Oh, you must have bad models.” I’ve been told that before, when I was right and the experts were absolutely wrong. (I mean, how can a single FET oscillate at 400 kHz?? With the help of two resistors….) More on this topic later.

I’ve already gotten several letters from readers expressing general interest and enthusiasm concerning this column about linear circuits. Already a couple of readers have asked, “how about all of these new models for op amps? Won’t they lead linear designers in a new direction?” My replies to them start out by covering a couple examples of old op-amp macromodels that have raised questions for over a dozen years.

A guy calls me up and asks me, “What is the maximum dc voltage gain on an LM108?” I reply, “Well, it’s 40,000 min., but a lot of them run 300,000 or 500,000, and some of them are as high as 3 or 4 million.” The customer sighs, “Oh, that’s terrible….” When I ask why it’s terrible, he explains that when the gain gets high, the gain bandwidth (GBW) product will get so high that it will be impossible to make a stable loop if the GBW product gets up to dozens or hundreds of megahertz.

Sigh. I sit down and explain that there’s no correlation between the dc gain and its spread when compared to the GBW product and its spread. The guy says, “Oh, I read in a book somewhere that there’s good correlation, because the first pole is constant.” I tell him to throw out the book, or at least X out those pages, because the first pole is not a constant frequency.

These days, I read that several op-amp companies are giving away free Spice models. What do I think of these models?

Well, on a typical basis, I have read that some are pretty good. In several typical situations, they slew and settle (and ring just a little, as real op amps do) and have as good accuracy as a real typical op amp and its feedback resistors. Maybe in a few years, models of slow op amps will be trustworthy. But I don’t think you can get very good results from modeling the fast ones. Why? PC-board layout strays. Enough said.

And besides, how good are those models if you ask their makers? Are the models guaranteed to give such a good representation of reality that if Spice gives good results, the op amps are guaranteed to work? Well… no, not exactly. In fact, from what I’ve read, none of the op amp models are guaranteed for anything. The only thing they can do “guaranteeably” is give a customer something when he begs for Spice models. It’s guaranteed to make the customer go away happy and to keep him busy for a while. But it’s not guaranteed to make him happy in the long run. This is because the performance of high-speed op amps and precision circuits depends so critically on the layout and on the resistors and capacitors, making the model itself almost irrelevant.

Now some people might say, “Hoe does Pease dare to say that?” It’s easy. I haven’t got any Spice models of my op amps to give away. Not at this time. And if I did, or when I do, I won’t be able to guarantee them either. At best, I may be able to say, “If you are a good engineer and use these models as a tool to pioneer some experiments that are inconvenient to test on the breadboard, you may find these models are helpful. But you had better check things out with a breadboard to confirm the circuit. For example, you can use Spice to ‘measure’ some voltages or currents that are so small and delicate that you really could not measure them with a scope, a buffered probe, or current probe—not in the real world. But, if you try to rely solely on these models, without breading, they won’t tell you the whole story. Your crutches will collapse, sooner or later, and you can’t say I didn’t warn you.”

I showed this column to Bettina Briz in amplifier marketing, and she said, “Bob, you can’t say that.” I said, “Oh, tell me where I have said anything that is untrue, and I will fix it.” She admitted that what I had said probably was… quite true. Then I said, “Well, why try to soft-pedal the truth, and pretend that you can trust computers all of the time? Wouldn’t that be a disservice to our customers?” And Bettina replied, “When we have models, we’ll have to try to educate our users. We’ll point out when you can trust the models, and when you shouldn’t. So, after that, are we in disagreement?” Well, maybe we did agree after all.

At present, we have a small library of op-amp models released with Analogy, Beaverton, Ore. They’re only Level I models (low precision), and while we have made some progress on good-precision ones (level II), they’re not released yet. These are “behavioral models” rather than Spice models, and we think they have several advantages over Spice models. There are some min/typ/max specifications that pretty much correspond to data sheet limits. If you use them wisely, they may be helpful—subject to the conditions I listed in the previous paragraph.

These models aren’t free, though. They’re not even cheap. But we think they’re worth what you pay for them. Still, none of these models are guaranteed.

Now, seriously, where can you get a model of a transistor that’s guaranteed? And to run under all conditions? I don’t think you can beg or steal or borrow or buy a model of a transistor that’s guaranteed. Or of a capacitor. The same holds true for a resistor.

But I can guarantee that every op amp you can buy or make has some characteristics that can’t be absolutely modeled by any computer model. If you happen to depend on that feature, or the absence of that feature, it’s only a matter of time before you get in trouble.

I will also guarantee that just because you made one breadboard, and it works well, you can’t put that circuit into production and get 1000 units in a row to work well. Unless, of course, you’re a smart engineer and design the circuit “properly” and do your worst case design studies, and plan for well-behaved frequency response, and so on. And I think that’s true no matter where you buy your op amps. What’s new? What color is the king’s new underwear? Dirty gray, same as everybody else’s.

I think there are a number of Electronic Design’s readers out there who will want to comment on this topic. You may be dubious or skeptical about my views. Your comments are invited. You may have experience with Spice or other macromodels. Good? Bad? You tell me, and I’ll pass along your comments to the editors. (We may have to allot a little extra space for the Letters-to-the-Editors column for a while.) The guys who believe in Spice macromodels, whether they’re somebody that buys or sells op amps, well, they’re also invited to write in. I promise to faithfully pass all of the letters along (with appropriate comments on the side). But I think you can already tell how skeptical I am.

I was at an evening session at the IEEE Bipolar Circuits and Technology Meeting in Minneapolis recently. Several companies that sell CAD tools had done some serious work to analyze the circuit for a 12-bit a-d converter (ELECTRONIC DESIGN, Oct. 25, p. 16).

Even the ones that had only a little time to put in showed that macromodels were feasible and effective as a way to do good analysis while saving computing time. That was the primary objective of the study. But even the ones that put in the most time at analysis didn’t recognize (or didn’t comment about) that the noise of the reference and the comparator were rather large, and you could not achieve 12-bit resolution without slowing down the response a lot more than you would have to do otherwise (for a circuit where you didn’t have to consider the effects of noise).

If a good designer of ADCs had these tools, and he knew where to look for noise, or where to insert lead inductance or extra substrate capacitances, he might use some of these CAD tools to help him design a better ADC. But if he just believed what the computer told him, he would probably be badly fooled.

Once, a customer called me up and asked me how to get my LM108s to stop oscillating in his circuit. He explained it was a simulated LM108 with some simulated feedback resistors, and simulated switches and filters. Hmmmm. I asked if he has made up a breadboard, and if it oscillated. He said he had made it and it didn’t oscillate. Hmmmm. I asked him, “If you build up a breadboard and a computer model, and the real breadboard oscillated, but the computer did not, you wouldn’t be calling up to complain, would you?” He stopped and thought about it. He cogitated for a while. He said, “I’ll call you back.” And he hung up. He never did call back. I mean, what would you do?

All for now. / Comments invited! / RAP / Robert A. Pease / Engineer

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!