#### Humungus

##### Full Member level 6

I have to simulate the open loop gain of a differential ampllifier (to get ft and phase margin) at several temperatures and DC input levels.

What I normally do is to put the amplifier in closed loop, in the non-inverting input I apply the DC level that I want and I make a DC simulation at a given temperature. Then, I got the output DC level that make my amplifier is within the linear region. I apply that DC level to the inverting input and do the AC simulation.

The diff. amplifier I'm trying to simulate has high gain (more than 100dB), so, if I don't set both inputs at the right value, the smallest offset (random or systematic) makes my amplifier to saturate.

In some cases one can calculate the open loop gain by putting the amplifier in closed loop and defining the open loop gain as

Vout/(Vin_plus - Vin_minus). This is usefull for relatively low gains, as the gain increases the error introduced by the numerical calculations done by the simulator increases too.

Also I must do Monte Carlo analysis at several DC input levels and several temperatures.

What's the most efficient way to automatize the simulation procedure?

I'll apreciate very much any help

Regards

Humungus