LTspice
Production
LTspice® is a powerful, fast, and free SPICE simulator software, schematic capture and waveform viewer with enhancements and models for improving the simulation...
LTspice on Analog.com
AD8226
Production
The AD8226 is a low cost, wide supply range instrumentation amplifier that requires only one external resistor to set any gain between 1 and 1000.
The...
Datasheet
AD8226 on Analog.com
AD8228
Production
The AD8228 is a high performance instrumentation amplifier with very high gain accuracy. Because all gain setting resistors are internal and laser trimmed...
Datasheet
AD8228 on Analog.com
LT1166
Production
The LT1166 is a bias generating system for controlling class AB output current in high powered amplifiers. When connected with external transistors, the...
Datasheet
LT1166 on Analog.com
The following circuit operates on the bench but isn't stable with a zero load (as shown: R8 is the output current sense resistor):

(Most components are as shown, but the FETs and the 2.5V references are different in the physical circuit, and the AD8226 with gain-setting resistor replaces AD8228 configured for a gain of 100).
I've tried a few things to try and ensure stability, but without success, so have had a go at simulating the circuit in LTSpice to more quickly vary components.
Unfortunately, although an open loop circuit with the LT1166 will simulate, when the feedback is added to create a current source (outputs up to 20A, 0 to 10V in controls 0 to 20A out), LTSpice can't find an operating point. It doesn't throw an error, it just sits there calculating for hours (literally).
Is the LT1166 model too complex for this type of circuit to simulate in a realistic amount of time (I've run it on a reasonably powerful i7-based PC with lots of RAM)?
Are there any settings in LTSpice that I can tweak to make the simulation faster (it would need to be hundreds of times faster)?
Colin
The '1166 model is essentially transistor-level and it has trouble converging in some instances (the sim run itself is not especially taxing on the CPU). It may help to have the alternate solver invoked, as it uses an extended-precision math function. In tough cases, you can skip the dc solver in the control setup and use a pulse source signal to help kick-start the sim. Changing the R5 value in the LT1166 entry within LTC.lib can help, but it pushes the bias point a bit higher than the nominal 20mV.
The instability you notice though is due to the loop gain being a function of the load resistance (driven where you show a ground symbol?), so at low load resistances, the current will swing wildly with small voltage commands at the '1166. If there is voltage headroom to spare, a coupling resistance could be added that would ensure a minimum load resistance and the loop could be compensated properly for that worst-case (through selection of the integration cap at the error opamp). You could analyze the opamp loop more easily by replacing the '1166 section with a gain=1 e block driven by a 1us RC.
Thanks for the very helpful response.
I used the AD8226 with an external gain resistor as a quick alternative to an AD8228 configured for a gain of 100. A colleague did the job "properly" and imported the AD8228 model into the circuit. That cured the convergence problem (although LTSpice still worked hard to find the operating point).
I've been using the alternate solver by default.
I'll try both your suggestions: replacing the '1166 block, and experimenting with a coupling resistance (although there isn't much voltage headroom to spare). The load resistance is where the ground symbol is shown.
Sometimes this circuit is used with a current transducer, so the load resistance is very close to zero ohms.
Thanks for the very helpful response.
I used the AD8226 with an external gain resistor as a quick alternative to an AD8228 configured for a gain of 100. A colleague did the job "properly" and imported the AD8228 model into the circuit. That cured the convergence problem (although LTSpice still worked hard to find the operating point).
I've been using the alternate solver by default.
I'll try both your suggestions: replacing the '1166 block, and experimenting with a coupling resistance (although there isn't much voltage headroom to spare). The load resistance is where the ground symbol is shown.
Sometimes this circuit is used with a current transducer, so the load resistance is very close to zero ohms.