What’s the difference between macro models and behavioral models?

Have you ever wondered what the difference is between a Spice macro model and a behavioral model?             

The basic difference is that macro models like the LMV641 are transistor based. There’s of course more to it than that, but before we dive in let’s first talk a little about the history of these models.

A few decades ago there was something called the Boyle model. It was rather simple but nevertheless provided users with the ability to simulate frequency response, look at gain/phase plots, and slew rate and input bias current, but not much else. I said simple because the topology consisted of a differential pair for the input stage followed by diodes, passive elements and some voltage control current sources (or voltage). The output impedance was not modeled properly in these early models and soon the macro was useless if anyone wanted to predict the behavior under specific conditions. How would you know how to compensate your op amp if you don’t know where the pole causing the problem is?

Over the years the Boyle model gave way to full blown macros with usually an input stage, a middle stage often referred to as the gain stage, and a third stage generally consisting of an emitter follower (for bipolar). These models provide users with much more flexibility such as gain dependence on the load (Av=gm*RL), common mode input range, output swing versus load current, offset voltage, CMRR, PSRR and a few more important parameters. However, many lack the proper modeling of the output impedance, which is paramount in any type of stability analysis. What I do like about macro models is the fact that they are easy to read, allowing the user to trouble shoot fairly quickly should an anomaly occur. There are exceptions though and that’s when the model creator decides to purposely “scramble” it.

Behavioral models, such as the OPA320, show you the behavior of the device regardless of the process technology, architecture and topology. They do not use transistors. Just like macro models, these usually address specific parameters such as Vos, Ib, CMVR, Zo, CMRR, quiescent current etc. at a given temperature and voltage. It’s also possible to create models in which datasheet specifications vary with temperature and operating voltage. However, this means a more complex model (whether macro or behavioral) which takes additional time for simulation.

At TI, a dedicated team of talented engineers works closely with the applications team to develop both, macro and behavioral models. Visit the precision amps forum to search for solutions, get help, share knowledge and solve problems with fellow engineers and TI experts.

Read all of Soufiane's blogs here. Don’t miss out on future Analog Wire blogs. Email subscribe using the button at the top, right-hand side of this post.

Anonymous