CCICAP Models
CCICAP allows user defined models for field effect transistors (FETs), bipolar junction transistors (BJTs), and operational amplifiers (OAs). See the User's Guide for details.
Using Models
There are two steps involved in using a model within a circuit. First, the model parameters must be provided. This is done on a .MODEL record such as:
... .MODEL op21 10.e6 10.e9 6.e5 2.e6 1.e3 5.e5 2.e-8 .3e-12 8. 30. ...
This record defines a set of parameters for a model named 'op21'. The .MODEL record is placed before the beginning of the circuit definition, that is before the .CKT record.
The second step in using a model is to use its parameters to define a specific circuit element. For example:
... .OA op21 N1 N2 N3 ...
uses the parameters defined for model 'op21' to define an operational amplifier within the current circuit and connects the model to nodes N1, N2, and N3. The .OA record, since it defines a circuit element, is placed between a .CKT and a .END record.
Using Library Models with .Include
CCICAP provides a library of models for use by the designer. Typically library models are added to an input file using the .INCLUDE record. For example:
... .INCLUDE op21.mdl ...
will attempt to read in the contents of the file 'op21.mdl' at the current location in the CCICAP input file. The file 'op21.mdl' might contain the single .MODEL line described above.
If a .INCLUDE file is not found in the current directory, a search for the same file name will be made in the
/usr/local/lib/ccicap/
directory. If the file 'op21.mdl' is not in the current directory it will be looked for as the file
/usr/local/lib/ccicap/op21.mdl.
The following models are provided for the user of CCICAP:
2210_3p0.mdl clc505_2.mdl lt1077.mdl mp318_7.0.mdl op90.mdl 2210_3p3.mdl ha4741.mdl lt1101a.mdl mp318_8.0.mdl op97.mdl 2n2222_2.0.mdl lf353.mdl lt1112.mdl mp318_9.0.mdl opa111.mdl 2n2369.mdl lf355.mdl lt1125.mdl mp318.mdl opa132.mdl ad546.mdl lf356.mdl lt1169.mdl op113.mdl opa604.mdl ad645.mdl lm324.mdl mat2_3p0.mdl op177.mdl opa627.mdl ad705.mdl lm363_10.mdl mat2_3p3.mdl op193.mdl opa637.mdl ad711.mdl lm4250.mdl mat2_3p6.mdl op20.mdl stdc.10 ad743.mdl lm607.mdl mat2_4p0.mdl op21.mdl stdc.a ad795.mdl lm741.mdl mat2_4p3.mdl op220.mdl stdc.b ad797.mdl lm833.mdl mat3_3p6.mdl op270.mdl stdc.ecr ad8051.mdl lmc6022.mdl max410.mdl op275.mdl stdl.10 ad811.mdl lmc6042.mdl max478_3.mdl op27g.mdl stdr.1 ad829.mdl lmc6062.mdl max951.mdl op27.mdl stdr.10 amp01a.mdl lmc6082.mdl mc33078.mdl op284.mdl stdr.5 amp02_24.mdl lpc661.mdl mp312.mdl op37.mdl tl061.mdl amp02_26.mdl ls844.mdl mp318_3.0.mdl op400f.mdl tl070.mdl amp02_30.mdl lt1007a.mdl mp318_4.0.mdl op42.mdl tlc271.mdl amp02_40.mdl lt1013.mdl mp318_5.0.mdl op470.mdl amp02a.mdl lt1028.mdl mp318_6.0.mdl op77.mdl
Creating a New Model
This example shows how to create a new op-amp model from the data sheet for an Analog Devices AD795. The AD795 is a low power, low noise, precision FET op-amp.
The op-amp model uses up to 10 parameters:
- Differential Input Resistance (ohms)
- Common Mode Input Resistance (ohms)
- Gain Bandwidth Product (GBWP) (Hz)
- Open Loop Gain (V/V)
- Output Resistance (ohms)
- Second Pole Frequency (Hz)
- Input Noise Voltage Spectral Density (V/SQRT(Hz))
- Input Noise Current Spectral Density (I/SQRT(Hz))
- Input Noise Voltage 1/f Corner (Hz)
- Input Noise Current 1/f Corner (Hz)
A simplified model can be created using only the first four parameters. These are usually easy to determine from the data sheet for a part. For the AD795, from the data sheet:
.model ad795 1.e12 1.e14 1.6MHz 1.e6
This line of text can be saved as the file ad795_1_pole.mdl and used in a circuit.
Note that when no value is given for the fifth parameter, output resistance, CCICAP will assign a value of 1 ohm and will issue a notice on standard I/O.
Although the op-amp model is single pole, note that by adding capacitance at the output node in the circuit description a second pole is added to the response.
A second order model results when the second pole frequency is supplied. This can be estimated by looking at the open loop response given in the data sheet. For the AD795 the open loop phase changes by 45 degrees at about 2 MHz.
A better estimate for the output resistance can be obtained by the output characteristics on the data sheet. With a 2K load, the output can reach within 2.5 volts of the 15V rail, supplying 6.3 mA. Guessing that a volt of the 2.5 volt drop is due to junctions, a 1.5 volt drop at 6.3 mA implies a 240 ohm output resistance.
The input noise spectral density in the model is the value of the spectral density above the 1/f region. For the voltage and current these are 9 nV/SQRT(Hz) and .6fA/SQRT(Hz) respectively. The 1/f corner frequency for the voltage spectral density can be estimated from the plot on the data sheet at around 60 Hz.
The final model description is:
.MODEL a795 1.t, 100.t, 1.6M, 1.M, 240., 2.0M, 9.n, .6f, 60.
To check the noise model we can take the noise readings from the ASCII output file:
( 3, 0) AD795 two pole model - open loop
AC Analysis
Outputs in dB and degrees
Frequency in Hertz
Noise data at T = 2.982E+02 K
Noise from all circuit elements.
Response at elements:
eout
Mag(dB) Phase
Freq(Hz) --------------------
1.000E-01
Resp: 1.200E+02 -3.576E+00
Noise: -1.314E+01 0.000E+00
[snip]
1.000E+01
Resp: 1.040E+02 -8.091E+01
Noise: -4.849E+01 1.167E-01
[snip]
1.000E+02
Resp: 8.408E+01 -8.909E+01
Noise: -7.479E+01 1.171E-01
[snip]
1.000E+04
Resp: 4.408E+01 -9.028E+01
Noise: -1.168E+02 1.171E-01
[snip]
At 10. Hz, the output noise is -48.49 dBV/SQRT(Hz) or 3.8 mV/SQRT(Hz). Referring this to the input through the reported gain of 104 dB gives an input noise density of 24 nV/SQRT(Hz). The data sheet reports 20 nV/SQRT(Hz). At 100. Hz, CCICAP calculates 11.4 nV/SQRT(Hz) and the data sheet value is 12 nV/SQRT(Hz). The values at 10. KHz are 9.03 and 9 nV/SQRT(Hz) respectively.
The data sheet has plots of the open loop gain (Figure 18) as well as the small signal step response for a unity gain inverter (Figures 24 and 26) and a unity gain follower (Figures 27 and 29). A CCICAP input file to simulate these responses is:
.title AD795 two pole model - unity gain inverter .ac 25 10 0.1 10.M .plot ac png eout eout > .tr 200 0. 2.u .plot tr png eout -1.5 0.5 eout -1.3 -0.7 .include ad795.mdl .ckt ' circuit of figure 24 v ein 1 0 1. r rin 1 2 10.k r rfb 3 2 10.k oa a1 0 2 3 a795 r rl 3 0 10.k c cl 3 0 100.p vm eout 3 0 .end .go .next .title AD795 two pole model - unity gain buffer .ac 25 10 0.1 10.M .plot ac png eout eout > .tr 200 0. 2.usec .plot tr png eout -0.5 1.5 eout 0.7 1.3 .include ad795.mdl .ckt v ein 1 0 1. oa a1 1 2 2 a795 r rl 2 0 10.k c cl 2 0 100.p vm eout 2 0 .end .go .next .stop
Note that the number of points requested for the plots from the ac and transient analyses exceeds the limit imposed in the free version of CCICAP.
| This CCICAP input file creates the following step responses: |
- 702 reads
