# Analog vet revamps circuit simulation

SANTA CRUZ, Calif. " Unemployment has brought an unexpected benefit to analog circuit simulation veteran Paul Tuinenga " time and the inclination to find a new way to bridge the gap between frequency-domain and time-domain analyses. Tuinenga claims to have found a simple way to use Spice models directly in the frequency domain, a discovery that could change the way RF engineers use simulation.

Tuinenga doesn't want to say too much about the details of his discovery, but in a nutshell, he's developed an algorithm that processes Spice models so as to extract a "kernel" formula that directly gives their frequency-domain response. Tuinenga said he's received interest from several companies, including semiconductor and EDA vendors, but no one has yet decided to implement the technique.

Tuinenga knows analog circuit simulation well. He was a founder and vice president of MicroSim Corp., which created the widely used PSpice simulator. Later, he was founder and president of Avista Design Systems, which offered an Excel-based linear and nonlinear circuit simulator. When Avista failed, Tuinenga went to work for Cadence Design Systems in 2000, only to be laid off in January of this year.

Tuinenga then started looking for other opportunities, and one of his interviewers raised a question that got him thinking about a longstanding problem with harmonic-balance simulation: the difficulty of converting nonlinear devices, such as diodes and transistors, from frequency domain to time domain and back again.

Tuinenga says he came up with a way to bypass a difficult numerical conversion, resulting in much faster and more accurate frequency-domain simulation.

"I don't remember what the question was, but I went off to check something and realized there was this mathematical equivalence," Tuinenga said. "For weeks afterward, I wondered, 'Why hasn't anybody else seen this?' I thought maybe I was going up a blind alley, but it turned out that it really does work."

Were it not for the layoff from Cadence, where he served as senior staff services applications engineer, the discovery probably wouldn't have been made, Tuinenga said. "I would not have had the questioning going on in the back of my head to look at this " or the time on my hands to pursue it."

Harmonic-balance simulation, which lives in the frequency domain, is widely used by RF engineers. Tuinenga noted that harmonic balance can handle linear or nearly linear devices easily and quickly. Radio engineers use it to look at small signals in the midst of large signals. You can do the same thing with Spice, Tuinenga noted, but you'll have to generate a lot of data and be very careful how you run the simulation.

Where harmonic balance falls short is with nonlinear devices such as diodes and bipolar transistors. The traditional approach is to convert frequency-domain signals to their time- domain equivalents. The signals are applied to Spice model equations to generate a time-domain response, which is then converted back to the frequency domain for the harmonic-balance simulation, Tuinenga said.

Usually the conversion is done with a fast Fourier transform (FFT), with much care taken to maintain accuracy during the conversions. For multitone simulations, Tuinenga noted, the conventional method requires 2-D FFTs for two carriers, 3-D FFTs for three carriers and so on, with the computational cost rising exponentially with each added carrier.

The basic problem is that direct transforms aren't available for devices like diodes. "You're trying to do a numerical end run around the fact that you can't come up with device equations," Tuinenga said.

With the new algorithm, "I can use the Spice model code as it is "I don't rewrite it," he said. "But I exercise it in a particular way so it reveals its kernel function, and once I have that I can use it directly in the frequency domain.

"One of the tedious calculations made in device equations is the instantaneous derivative of current with respect to terminal voltage," Tuinenga said. "My kernel function takes over this task and calculates guaranteed-correct derivatives. So roughly half the model code in traditional harmonic balance becomes obsolete, that being the part of each device that calculates derivatives."

Spectral balance

Tuinenga is currently building his algorithm into a customized version of Berkeley Spice-3, extending the traditional dc, ac, noise and transient analyses to handle modulated signals. He said his technique falls under the label "spectral balance" rather than "harmonic balance" because it has an analytical path between the time and frequency domains, rather than FFTs.

There's university research in spectral balance, he noted, but researchers haven't gotten far with extremely nonlinear devices.

For traditional single-tone harmonic balance, Tuinenga said, his technique will yield a speed and accuracy im- provement. But the real win, he said, is greatly reducing the computational requirements for multitone simulations, because there's no dependency on multidimensional FFTs.

Tuinenga said he has thought about starting a company to market the breakthrough himself, but he's concerned it might address too narrow a niche to fund an EDA startup. So instead he is presenting the idea to chip makers and design automation companies. "It will be interesting to see who grabs at this opportunity during the recovery to step ahead of their competition," Tuinenga said.

Meanwhile, the job search goes on, despite Tuinenga's "geographically challenged" location in Florida. When he's hired, will the new algorithm come along with him? "I'll have to talk about that with the company," he said.

Tuinenga discusses the problems with harmonic balance simulation, and explains the need for a new methodology, in an EDA Views column located at EEdesign.