AC op-amp oscilloscope phase shift

Thread Starter

ajpik

Joined Feb 13, 2014
15
I set up a non inverting closed loop opamp with 100 gain to a function generator, set to produce a 10mV sinusoid @ 1khz. The graph of Vin vs Vout (oscilloscope) is kinda like a very thin parallelogram. Theres a small phase shift. Does anyone know why this is? Ideally one value of Vout produces one value of Vin, but what is the cause of this systematic error?
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,043
Really need a schematic. But until then...

A very thin parallelogram sounds like the amp is heavily saturated in both directions. With a gain of 100, one Vout does not equal one Vin. With your numbers, a 10mV output means a 100uV input. Microvolts are very difficult to get out of a standard function generator; the pots usuallly are not quiet enough.

ak
 

t_n_k

Joined Mar 6, 2009
5,455
I'm guessing the amp is working OK and the OP has wound up the sensitivity on the scope inputs to view the input / output signal zero crossings. From this they have seen a small phase shift from input to output.
 

Thread Starter

ajpik

Joined Feb 13, 2014
15
Wait wait wait,

Sorry, to clarify, the function generator creates 10 mv amplitude (sinusoid, 1kHz), the op-amp is set to 100 gain, and so the output is ~1 Volt.

"one Vout equals one Vin", I meant ideally one X values produces a single Y value, ie, it is a proper function and passes the vertical line test.

The amp is not saturated. Supposedly the power supply is generating a -5V to 5V range, but I have always seen that the min and max for this setup is less than 5V and usually not the same for min and max.

Edit: I used a UA741CN op amp with a brand that says "ST" on it
Edit: I uploaded the schematic and a screen shot of my graphs and data so you can see what I mean.
 

Attachments

Last edited:

Thread Starter

ajpik

Joined Feb 13, 2014
15
The larger graph are the sinusoids graphed against each other, instead of graphed against time (forming the distorted circle). Why is that, say when
X_in = 0 Y = .2 or -.2
or
X = .005 Y = .4 or .7
and as X approaches its max of 10 mV, the Y values are more precise and centered around 1.1 Volts.

The error is systematic. There must be some good reason...
 

shteii01

Joined Feb 19, 2010
4,644
The larger graph are the sinusoids graphed against each other, instead of graphed against time (forming the distorted circle). Why is that, say when
X_in = 0 Y = .2 or -.2
or
X = .005 Y = .4 or .7
and as X approaches its max of 10 mV, the Y values are more precise and centered around 1.1 Volts.

The error is systematic. There must be some good reason...
Are we talking mV or %?
 

Thread Starter

ajpik

Joined Feb 13, 2014
15
Volts.

i.e. When

Vin (X) is .005 V

Vout (Y) is either ~.4 V or ~.7 V.

The graph, in my mind, should resemble more a straight line, not an ellipse.
 

Thread Starter

ajpik

Joined Feb 13, 2014
15
Thank you!

I am on google now but I will also look through this website to see if it has good information about the difference.
 

shteii01

Joined Feb 19, 2010
4,644
There are several things going on:

1) stability of the function generator. small values in millivolts are harder to get precisely right.

2) error that op-amp introduces. this can be op-amp offset. could be the resistors that you use to setup the gain, i normally used 5% error resistors in my labs, what it means is that my 1k resistor could be anywhere from 950 Ohm to 1050 Ohm.

3) i think it is called jitter error. when you send your analog sinusoids to computer, you digitize them, so you no longer have analog sinusoid, you have a list of digital values. when you digitize analog signals, you run into situation where you can not assign a precise value, so you give it a next lower value or next higher value. this sort of thing is why super duper lab equipment cost not just thousands of dollars, but tens of thousands!
 

t_n_k

Joined Mar 6, 2009
5,455
Hello ajpik,

What you have been considering is something we used to call a Lissajous figure.

One solution to the sampling issue may be to apply some filtering to the raw data.

If the same filter alogorithm is applied to both data streams - input & output - you may have a fortuitous outcome which can resolve one way or the other whether there is indeed a phase shift.
 

Thread Starter

ajpik

Joined Feb 13, 2014
15
This Lissajous figure is BLOWING MY MIND!

Is the phase shift caused by a time delay? The scope measures on the order of milliseconds, is that so sensitive that the phase shift is caused by the fact that at any single moment in time, the voltage at the output will be slightly higher than the voltage at the input (or vice versa, depending on dx/dy). Do you think I could model this easily with drift velocity...
 

t_n_k

Joined Mar 6, 2009
5,455
This Lissajous figure is BLOWING MY MIND!

Is the phase shift caused by a time delay? The scope measures on the order of milliseconds, is that so sensitive that the phase shift is caused by the fact that at any single moment in time, the voltage at the output will be slightly higher than the voltage at the input (or vice versa, depending on dx/dy). Do you think I could model this easily with drift velocity...
The low sampling rate should't have an effect if input / output samples are truly concurrent. Not sure what you mean by drift velocity modelling.

The amplifier will introduce some phase shift - as the gain is increased the bandwidth reduces and this eventually impacts the phase shift. Also as shtei01 points out the 741 is a bit of a dinosaur and suffers from certain limitations which may include phase distortion.
 

Thread Starter

ajpik

Joined Feb 13, 2014
15
My theory: since both measurements are taken concurrently, Vin and Vout, that Vout is actually the product of a previous Vin. This also explains why the curve is wider in the center, since dVin/dt is greater along the x-axis.

I have no clue about bandwidth (yet) and do not understand what else could cause this.
 

Tesla23

Joined May 10, 2009
542
Try to work out the phase shift between the output and the input signals that your ellipse indicates, and then try to work out what you expect from an op amp with around 58dB of open loop gain at 1kHz when used in a circuit with a gain of 100. I think you will find that there is reasonable agreement.
 

LvW

Joined Jun 13, 2013
1,758
Yes - of course, the ellipse is simply the result of the phase shift between input and output of the opamp.
As another example: For 90 deg phase shift (sinus vs. cosinus) the Lissajous figure merges into a circle.

AC simulation shows that at 1kHz and a gain of 100 the phase shift is app. 10 deg.
This phase shift can also be derived from the ellipse using the following formula:

Phase shift Phi=2*arctan(a/b) with a= small ellipse axis and b=large ell. axis.
 
Last edited:

BytetoEat

Joined Mar 5, 2014
25
if you want to really understand this, you need to learn about bode plots, open loop gains, closed loop gains and negative feedback. In most op amps, a dominant pole at a low frequency is introduced to provide stability. On the classic 741, this pole starts coming into effect at 5Hz. That means that if you were using this op amp with no negative feedback, at its 5Hz -3dB point would have a 45 degree phase shift from the input. However using negative feedback makes a lot of seemingly magic things happen. When you put a resistive divider from the op amp output to its inverting input, you are in effect creating negative feedback. There's a lot to learn and say on this topic, but for your question: on a bode plot wherever your closed loop gain value meets the open loop gain will be your new (and extended) -3dB point(45 deg phase). The higher closed loop gain you want, the less your bandwidth will be in effect.
 
Top