Circuit simulators and operational amplifiers

Thread Starter

Futurist

Joined Apr 8, 2025
721
Why do circuit simulators seem to steer away from simulating op amps? I'm weak on op amps yet when I tried to explore them in LTSpice, it was an unrewarding experience.

How can one do simulations of op amp based circuit designs?
 
Last edited:

Thread Starter

Futurist

Joined Apr 8, 2025
721
Can you explain further? I use opamps in LTSPICE without a problem.
OK Bob, perhaps I misjudged. I was playing with LTSpice and the newer simulator QSPICE (designed by the same guy who designed LTSpice) and found virtually no real built in models for op-amps.

Then when I did some exploring saw lots of stuff like this:

1765981102351.png

After reading a few posts like that I just threw my hands up and said "OK, well that's that I guess".

An Op-Ed on Op-Amp Modeling
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
3,313
I'm don't fully understand, do you want to actually model an Op-Amp in LTSpice or just use one in a simulation?

The thing I find frustrating when I do a sim with Op-Amps in LTSpice is trying to find the right one in the seemingly endless selection available or not being able to find the .sub file online for the one I want to use.
 

crutschow

Joined Mar 14, 2008
38,331
I've used LTspice to simulate many different op amps, including ones with models I've added, and never had any particular problems from model deficiencies.
It seems to model the op amps' frequency response, slew-rate, input offset voltage and current, common-mode limits, and output voltage and current limits reasonably well.
What more do you want?
I'm not concerned about how the model is made, only whether it delivers acceptable results.
 
Last edited:

ronsimpson

Joined Oct 7, 2019
4,649
trying to find the right one
Yes that is a problem. I look at analog (linear) and find an op-amp that are in LTspice and use it. I go to digikey.com and get a list of all op-amps, then sort for only analog, maxim and linear parts, most of which are in LTspice.
Next look for " Gain Bandwidth Product " for example the LM741 is near 1mhz.
Then look for " Slew Rate " example about 1v/us
I don't care how many are in the package
Maybe pick minimum voltage and max voltage but probably not.
Look for R-R input or output if that is important.
Now I have a list of parts that are likely to be in LTspice that have about the same specification I want.
For many applications 1mhz 1v/us 5V to 30V works well. Pick one and stay with it.
 

Irving

Joined Jan 30, 2016
5,004
There was a generic opamp in LTSpiceXVII under the name opamp which modeled an ideal opamp, basically Vo = G.(Vin+ - Vin-) where G was open loop gain of 100k rolled off with a GBW = 10Meg.

The current LTSpice still contains opamp. opamp2 is just a placeholder 5-terminal opamp symbol for use with any 5-terminal opamp library. However there are a group of UniversalOpAmpx ( where x=1-5) which allow you to spec any generic opamp parameter.. For example:

1765986470566.png
 

Thread Starter

Futurist

Joined Apr 8, 2025
721
I've used LTspice to simulate many different op amps, including ones with models I've added, and never had any particular problems from model deficiencies.
It seems to model the op amps' frequency response, slew-rate, input offset voltage and current, common-mode limits, and output voltage and current limits reasonably well.
What more do you want?
I'm not concerned about how the model is made, only whether it delivers acceptable results.
Well I don't want to "model" an op-amp (anymore than I want to model a BC107 or resistor). I kind of expected to see a list in a library of a variety of real op-amps that I can pick from (much as I can a transistor).

Now perhaps that expectation is wrong, but I assumed I can do that, pick a real device and design my circuit with that and simulate it.

I think that's the disconnect here, my expectation seems to be wrong but others don't see a problem.

Also I know next to nothing about these tools, so I could be way off in what I'm saying here!

Its just that that article (written by Mike Engelhardt the designer of LTSpice and QSPICE) does seem to say that simulating op amps isn't something it does out of the box.
 

panic mode

Joined Oct 10, 2011
4,871
there is a lot of different OpAmps out there because they all are usually designed with particular applications in mind. there is no single OpAmp that wins all the time. so what are you actually planning to use them for?
 

Irving

Joined Jan 30, 2016
5,004
There is a huge list... just not all the common ones from manufacturers other than Analog, Linear (as was) or Maxim. But if you add in the ZZZ library you get a lot of TI, Microchip, etc including the common ones like LM324, LM358, TL07x, TL08x, etc etc

1765988521160.png

1765988766379.png
 

Thread Starter

Futurist

Joined Apr 8, 2025
721
OK seems I am simply wrong, I was playing with QSPICE which is much newer and so perhaps that gave me the wrong impression.

Thanks gents.
 

Bordodynov

Joined May 20, 2015
3,430
Qspice has a universal built-in operating amplifier . After reading the dataset carefully, you can customize the model.
And articles need to be read to the end.

1766063342431.png
 

Thread Starter

Futurist

Joined Apr 8, 2025
721
OK I can see now that despite being somewhat old and with somewhat clunky UI, it is far and away a very trusted and capable system. So Ive answered my own question will take some LTSpice "lessons".
 

ci139

Joined Jul 11, 2016
1,955
UniversalOpamp2

SpiceModel : level.2
Value2 : Avol=1Meg GBW=10Meg Slew=10Meg
SpiceLine : ilimit=25m rail=0 Vos=0 phimargin=45
SpiceLine2 : en=0 enk=0 in=0 ink=0 Rin=.5G

Avol=1Meg - open loop gain 10^6
GBW=10Meg - gain bandwidth product 10^7
Skew=10Meg - slew rate 10V/us

ilimit=25m - Output current limit 25mA
rail=0 - output voltage to 0V to the supply voltage
Vos=0 - offset voltage 0mV
phimargin=45 - phase margin in degrees

en=0 - noise voltage per sqrt(Hz) e.g. B. 10n 10nV/sqrt(Hz)
enk=0 - noise voltage 1/f limit frequency e.g. e.g. 1k 1kHz
in=0 - noise current per sqrt(Hz) e.g. B. 1p 10pA/sqrt(Hz)
inc=0 - noise current 1/f limit frequency e.g. e.g. 1k 1kHz
Rin=500Meg - resistance between inputs
Rout - internal // !!! ? ser.R.out must be in series R to Vout ? !!!

**
 

ci139

Joined Jul 11, 2016
1,955
OK Bob, perhaps I misjudged. I was playing with LTSpice and the newer simulator QSPICE (designed by the same guy who designed LTSpice) and found virtually no real built in models for op-amps.

Then when I did some exploring saw lots of stuff like this:

View attachment 360701

After reading a few posts like that I just threw my hands up and said "OK, well that's that I guess".

An Op-Ed on Op-Amp Modeling
the problem is partially virtual ::

  • the LTspice included macro models assume a std. function
    as an amplifier of eigther DC or AC signals
    meeting/matching the behavioral responce of general d/s spec.-s
    such as a SR , GBW , (not always the) I/O voltage range
    @ the d/s specifiedverified supply voltage range
    .
  • however if your chosen Op Amp is "up to task"
    IF it is capable of doing what you intend it to do
    THEN the particular choice of the Op Amp model does NOT much affect the SIMULATED responce
    so for the sakeof the simulation speed and stability you may preffer to choose a simplified ver. of a generic Op Amp model
    .
  • IF what you intend to do is strictly dependent of the particular electrical circuit inside the Op Amp
    multiple problems (more often → may) arise . . .
    .
 

sparky 1

Joined Nov 3, 2018
1,218
====================================================
DISCRETE OP-AMP having an exposed INTERFACE vs Monolithic op-amp
====================================================

[INPUT STAGE]
- Non-inverting input (+): Exposed transistor base node
- Inverting input (-): Exposed transistor base node
- Biasing resistors: Visible, tunable
- Differential pair: Individual transistors accessible

[GAIN STAGE]
- Collector/emitter connections: Directly wired, testable
- Load resistors: Adjustable, replaceable
- Compensation capacitor: External, user-selectable

[OUTPUT STAGE]
- Push-pull transistor pair: Exposed emitter/collector pins
- Output node: Direct connection to load
- Feedback loop: Must be wired manually

[SUPPLY RAILS]
- V+ rail: Explicit connection to discrete power bus
- V- rail: Explicit connection to ground or negative supply
- Decoupling capacitors: External, visible

====================================================
COMPARISON TO MONOLITHIC OP-AMP PACKAGE
====================================================
- Inputs/outputs abstracted into 8-pin DIP/SOIC package
- Internal biasing, compensation, and gain stages hidden
- Output stage integrated, not user-accessible
- Power rails standardized, decoupling handled internally
====================================================

====================================================
SOFTWARE FLOWCHART INTERFACE SUMMARY
====================================================

[ENTRY POINT]
- Start node: Explicitly exposed in flowchart
- Input parameters: Visible at interface boundary
- Initialization routines: Shown as discrete blocks

[PROCESS STAGE]
- Decision nodes (IF/ELSE): Exposed as branching diamonds
- Loops (FOR/WHILE): Clearly visible iteration paths
- Function calls: Represented as labeled blocks, parameters exposed
- Error handling: Separate branch, explicitly drawn

[DATA FLOW]
- Variables: Shown as data inputs/outputs between blocks
- External resources: Exposed connectors (DB, API, File I/O)
- Feedback paths: Explicit arrows back to earlier stages

[OUTPUT STAGE]
- Result node: Exposed terminal block
- Return values: Clearly labeled outputs
- Logging/monitoring: Optional but visible connectors

====================================================
COMPARISON TO PACKAGED SOFTWARE MODULE
====================================================
- Flowchart exposes every decision, loop, and data path
- Interfaces (inputs/outputs) are visible and traceable
- Internal states are accessible for debugging
- Packaged module hides flow, exposing only API endpoints
- Internal branching, error handling, and loops abstracted away
====================================================

Discreet modeling is not for everyone. The hardware level animation, for example the differential pair flow pattern.
Teaching abstraction layer concepts, sharing curriculum priority, math vs programming finding the balance.
How the op-amp handles a large slew and why constant current traverses gradient, taming the huge open loop gain.
The math teacher is limited in this because the underlying complexity, the consensus, leave it for graduate program.

Assembling a discreet op-amp on pcb, getting past the complexity of the simulation. Testing the finished product.
This gives motivation having the ability to interact inside the op-amp and changing component values in schematic capture.
The decision to containerize the numerous op-amp species, the industry wanted a simple way to package the circuit.
Some simulators have animation, it does hint at some of the dynamics that teachers in advanced level need to address formally.
MitchElectronics

The 2nd year electronics can be supplemented, a summer course that combines hands-on might accommodate both CIS and ELE.
The text book cost and the extras cost, the availability of teachers and class size are not confined when approached as an online course.
Not another logic table!

 
Last edited:

eetech00

Joined Jun 8, 2013
4,704
OK Bob, perhaps I misjudged. I was playing with LTSpice and the newer simulator QSPICE (designed by the same guy who designed LTSpice) and found virtually no real built in models for op-amps.

Then when I did some exploring saw lots of stuff like this:

View attachment 360701

After reading a few posts like that I just threw my hands up and said "OK, well that's that I guess".

An Op-Ed on Op-Amp Modeling
Perhaps the meaning of that highlighted sentence was misunderstood..

The context is in the "modeling of op amps", where one would like to design their own opamp spice model.
It is true, however, that there are not any native circuit elements that are designed to behave like an opamp, unless you want an extremely simple "stand in" for a buffer or inverter, that have no other characteristics other than to buffer or invert (E device element).

Anyway, LTspice has a large amount of opamps that are made available when the program is installed.
The opamps are mainly from ADI and Linear Technology, but there are some third party opamps supplied as well.
 
Top