Spice: A Tool For All Seasons

Jan. 19, 2004
Spice is an eminently useful tool for analog design. It has its eccentricities, so to speak, and they have led to some harsh criticism. But its capabilities far outweigh its foibles. The "ice" in Spice, developed by the University of California,...

Spice is an eminently useful tool for analog design. It has its eccentricities, so to speak, and they have led to some harsh criticism. But its capabilities far outweigh its foibles. The "ice" in Spice, developed by the University of California, Berkeley, means

"integrated circuit emphasis." Yet it also works well for discrete and hybrid circuits. I've never designed a monolithic IC, but I often use Spice. The tool is available for several operating systems. Applications that add schematic-capture or an intuitive user interface and other capabilities make learning Spice easy and rewarding. Such Spice applications range from "freeware" to costly.

Here's how good Spice is. A client-engineer had the wrong capacitors in a self-biased signal-clipper. Spice quickly confirmed my guess about his symptoms by duplicating them. When I called back, we found the offending capacitors. Also, Spice shows bipolar junction transistor (BJT) base current at 1 GHz, a difficult task on a breadboard. After years of seeing only voltages, I had to remind myself to observe currents. And, Spice outputs a Bode plot in seconds. It facilitates reverse-engineering as well. Test-drive a competitive schematic, find its warts, and do better.

Spice provides such ideal devices as independent and dependent sources. If a BJT current source seems plagued, its ideal cousin offers a comparison. If an op-amp model is unavailable, an ideal voltage-controlled voltage source (VCVS) set to an appropriate gain may mimic it. Some Spice applications even provide LaPlace blocks. Cascaded with a VCVS, these can adjust frequency response.

As noted, though, Spice has some foibles. It balks at a flashlight schematic unless a ground is added. In transient analysis, it does not simulate the dc path along a transmission line, an open end is seen as floating. Any node lacking a dc path to ground, floating parts, an open-ended capacitor, or a node in a T-section, M-derived high-pass filter, is noticed. But a 109-(omega) resistor from each floating node to ground lets Spice find a dc operating point.

Spice's ideal nature can trouble the naïve designer. An ideal current source can charge a simulated capacitor to several kilovolts. Open-loop, that VCVS "op amp" may seem to output kilovolts. Spice also lacks error sources unless they are manually added. Differential 2N3904s with 10k collector loads will all match perfectly unless one mismatches them. Some applications include Monte Carlo analysis, but not as a default.

But edited models help to impose reality. My model library contains "2N3904x2" and "2N3904x10," low current-density models made by editing currents up and resistances down by 2× or 10×. Paired with a normal 2N3904, these models yield about 18- and 60-mV offsets, respectively. My library also contains "2N3904lo" and "2N3904hi," low- and high-beta models.

Though not part of Spice, device models—text files listing Spice parameters and their numerical values—are needed. The Spice3 User's Manual fully describes Spice models and their parameters (http://soc.ajou.ac.kr/data/ppt/document%20data/Spice3/man_spice3.pdf). Agilent Technologies summarizes BJT parameters at http://eesof.tm.agilent.com/docs/iccap2002/ic_mdl/icim014.html and MOSFET parameters at http://eesof.tm.agilent.com/docs/iccap2002/ic_mdl/icim024.html.

Without an understanding of model parameters, one is at the mercy of the model writer. Spice models of BJTs, FETs, diodes, and other devices are available online. The best come from manufacturers, but even they sometimes err. A downloaded model of a UHF BJT performed poorly. I discovered that the model's IKF, beta-knee current, was given as 0.267E-003. Yet a datasheet graph showed a beta-knee between 26 and 27 mA, a two decimal-place error. A Tnom parameter given as 300 K, when my application needed 27°C, also hurt. Many models ignore collector or drain breakdown. An inductor kicking a 2N3904 to 170 V works in Spice, but not in production. Models usually ignore self-heating too, so dissipation must be watched.

Used with discernment, however, Spice is a workhorse. Ironically, while Spice may be most familiar to users lacking the experience to fully exploit it, some of the best of my seasoned contemporaries abounding in such experience are not yet Spiced. Perhaps we should help each other to make Spice a choice for all seasons of our engineering careers.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

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.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

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