Why do you need to build your own Op Amp model? Most Op Amp manufacturers have SPICE models for their components and make them available for free. Then why should you know how to build one? Well, not everything has a model and that is why, sometimes, you have to build your own. Also, it may be necessary to study a circuit to see what happens if you change the Op Amp slew rate or bandwidth, offset, and so on. Sometimes the manufacturer own model does not work, as a user found out and posted a question in this forum. I told him that the model has a bug and advised him to build his own.
No matter the reason, building your own model is fun and rewarding and can only add to your overall understanding on how an Op Amp works. One note of caution. The model described here is a behavioral model. This means that the model will mimic the op amp functionality, but will not have any transistor or any other semiconductor SPICE models.
Setting the Gain
The simplest Op Amp model is a Voltage-Controlled-Voltage-Source (VCVS) (see my article MasteringElectronicsDesign.com:An Ideal Operational Amplifier Simulation Model). We can build the model around it. This VCVS also helps in setting the Op Amp open-loop gain.
Let’s take an example. Let’s build a model for the Analog Devices’ ADA4004, which is a precision operational amplifier. At the time this article was published, Analog Devices did not release a SPICE model for this op amp.
The datasheet shows that the open-loop gain, AVO, is minimum 500V/mV. This means a gain of 500000 at DC level, so my VCVS will have the transfer function of 500000 V/V. Let’s build this op amp model in Multisim (see Figure 1). (Note: Multisim is a simulation program with a SPICE engine. It was developed by Electronics Workbench and now owned by National Instruments. Check this link http://MasteringElectronicsDesign.com/spice-links/ for info where to find Multisim, and also other simulation programs.)
Input and Output Resistance
The input resistance can be defined in the datasheet of an op amp as a group of three resistors: Rin1, Rin2 and Rin. These resistors represent the input common-mode resistance on the non-inverting/inverting inputs and the differential input resistance. As such, in our Multisim model let’s add these resistors in the VCVS input as in Figure 2.
The ADA4004 does not have a specification for the input resistance. This is most likely due to the fact that ADA4004 is made with the Analog Devices’ new iPolar technology which is an enhanced JFET technology. As such, the input resistance is very high, up to 1012 ohms. Let’s estimate the common-mode resistance as 1012 ohms and the differential input resistance as 1 Gohm. Having these resistors in the model will not make too much of a difference, therefore the model will work very well with or without them for this particular op amp. However, other op amps, built with different technologies, will have lower input resistance values and they will make a difference in the SPICE model.
The output resistance is not specified as well for this op amp. Because of that we will estimate a 20 ohm series resistor with the op amp output. Let’s add it as in figure 2.
The Input Capacitance
As in the case with the input resistance, the input capacitance of an op amp can be specified as three input capacitors, Cin1, Cin2 and Cin. They represent the input common-mode capacitance on the non-inverting/inverting inputs and the differential input capacitance. Let’s add them in parallel with the input resistors, as in Figure 3.
The ADA4004 does not have these capacitances specified in the datasheet. Because of that, let’s make them a conservative value of 2 pF each.
The Offset Voltage
If we power an op amp with a bipolar power supply and connect the inputs to ground, the output will not go to zero volts. It will likely rail up or down due to the offset voltage. This voltage is present in any op amp at its inputs. The output rails up because the op amp high gain, multiplied by the input offset voltage, makes a theoretical voltage of tens of volts, so the output will be limited by the available power supply level.
To simulate this voltage, all we have to do is add a DC voltage source in series with one of the inputs, say the non-inverting input, as in Figure 4. The ADA4004 offset voltage is typical 40μV, maximum 140μV. We can choose the typical value for our model, but we can also choose the worst-case value, of 140μV, as in the figure, if we want to study the op amp behavior in these conditions.
This model can now be connected in a circuit. Figure 5 shows a non-inverting summing amplifier made with our ADA4004 model.
In the next article I will show you how to add the gain bandwidth product and how to add poles in this model. We will also see that it is better to use Voltage-Controlled-Current-Sources (VCCS) to build the op amp SPICE model than the VCVSs.
- Build an Op Amp SPICE Model from Its Datasheet – Part 3 In Part 2, we left off at the open-loop bode plot. We saw that it resembles the datasheet. However, our...
- Build an Op Amp SPICE Model from Its Datasheet – Part 2 Part 1 of this article shows how to create a behavioral model of an operational amplifier based on the following...
- Build an Op Amp SPICE Model from Its Datasheet – Part 4 Parts 1, 2, and 3 of this article show how to create a behavioral model of an operational amplifier based...
Related articles by YARP.