Configurable opamp model for Spice

Status
Not open for further replies.

Optikon

New Member
Found this from EDN and it works! Thought I would share...

If you have ever wanted to have a generic Spice opamp model that allows you to easily configure things like

* Open loop gain
* Input bias current
* Unity gain bandwidth
* Slew rate
* Phase Margin
* RIN, CIN
* Iq
* Output rail swing
* CMRR

Then this is for you! You can tailor this to simulate any opamp you wish when the real model is not available or requires too much work to create.

What it doesnt model:
* PSRR
* AC noise
* High frequency, NON-DOMINANT poles & zeros - these can be added if you feel comfortable modifying the model.
* It doesn't "float". Some of the stages are referenced to node 0 which, is ground in PSpice. If you don't know what "float" means, then this limitation probably won't bother you. I am working on changing the model to get it to float correctly but I'm not quite there yet. I also plan on adding PSRR & a frequency dependent output impedance instead of the Rout that's in there now.

To use the model just pass the appropriate parameters to the subcircuit. All default values make the opamp work very similar to a uA741.

The enclosed documentation also shows the macromodel for the netlist so you can figure out how to change the model if you wish.
 

Attachments

  • config_opamp.zip
    162.2 KB · Views: 535
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…