This might be a stupid question but shouldn't the DC gain of a OP be the same as the low frequency ac gain? For the DC gain I am sweeping the non-inverting input from one rail to the other for a fixed inverting input. Then I extract the DC gain from the slope of the curve. For AC I supply a 1 V AC into the noninverting input and find the output response.
So am I doing something wrong? Any suggestion will be appreciated.
Are you getting slew rate limiting on the AC signal? Are you measuring it with an oscilloscope? Is it really low frequency? Try an even lower frequency and a lower amplitude to see if you get the same results.
In Cadence try the lower amplitude and the lower frequency in the time domain and examine the output waveform for clipping and slew rate limiting. A harmonic distortion test should show up any distortions that you cannot see by eye.
The slope of the DC transfer curve is exactly
equal to AC response.
Now problem with DC simulation appoach that you
describe is that the input magnitude is not constant.
In AC simulation you assume 1V (differentila signal)
in DC analysis this value changes while you sweep.
Why you are trying to extract the AC gain from DC simulation?
I am just trying to compare the two answers. I measure the slope of the DC gain around the point where the inverting and noninverting are equal. For the AC I use the same DC bias and apply 1 V AC magnitude and measure the output response.
I think it due to the fact that your op-amp has dc offset. Do a derivative instead of just finding the slope. Then plot the derivative against the output of the op-amp. The derivative value when output is zero should be nearly the same as you ac gain.
You constructd the non-inversing opamp and simulate it, its results are the external gain, not the opamp itself response.
If you want to know the opamp DC and ac gain, you should construct the opamp with "DC" in unit-gain closed loop to compensate the opamp offset voltage and "AC" is open loop to simulate the gain and phase margin response, at the same time.
In fact, the DC gain of the op may be wrote as:
A(vi)=A0-a*vi-b*vi^2.......
A0 is the DC gain when vi=0
the ac gain of the op is
a(vi)=A0-2a*vi-2b*vi^2
So you can see the DC gain and the low frequency ac gain only equals
when vi=0 and the ac gain may be smaller the DC gain.
As a conclution, the DC gain and ac gain only equals somewhere.