LT SPICE Negative Phase

Status
Not open for further replies.
I'm simulating a two stage amplifier using an op amp opa2134.

I don't understand why the Output Phase after the last capcitor is negative "-360*".

It should be zero not -360*.

Regards.
Alfredo Mendiola
Lima, Peru
 

Attachments

  • 2StageOpamp.jpg
    2StageOpamp.jpg
    534.6 KB · Views: 156
.
Since you don't show all of your circuit, who knows. You can show the entire circuit by full-screening the circuit (without the frequency trace), then click Tools ~> Copy bitmap to Clipboard.

By the way, you can also change the background color, if you wish, at Tools ~> Color Preferences. Still by the way, you can right-click on the circuit, and there's an option to Zoom to Fit.

In any case, if I'm reading your schematic correctly you're running a single-supply setup that I'm not familiar with. Maybe the power supply setup shown below would work better for you.
.
 

Attachments

  • single-power-supply-IC-op-amp-02.jpg
    single-power-supply-IC-op-amp-02.jpg
    47.1 KB · Views: 108
.
Since you don't show all of your circuit, who knows. You can show the entire circuit by full-screening the circuit (without the frequency trace), then click Tools ~> Copy bitmap to Clipboard.

By the way, you can also change the background color, if you wish, at Tools ~> Color Preferences. Still by the way, you can right-click on the circuit, and there's an option to Zoom to Fit.

In any case, if I'm reading your schematic correctly you're running a single-supply setup that I'm not familiar with. Maybe the power supply setup shown below would work better for you.
.

Sorry by no including the bottom part of the schematic.

Tha bottom part includes a DC power supply with 6 volts (12v/2).

R5, R2, R7 and R1 are connected to the 6v dc power supply.

The porblem with the negative supply is solved if i remove C1 for example.

Regards.
Alfredo Mendiola Loyola
Lima, Peru
 
Wait now...so you're connecting the + and - power supply pins of the op amps across a 12VDC power supply...and then biasing the input pins to +6VDC with a separate power supply?

OK that's a new one on me, but I can't say that it wouldn't work fine. I'd think you might run into problems with two different grounds for two different power supplies, but if you don't, then you don't.

So back to your question, I'm looking at the frequency trace for your image in post #1. It seems to me that C2 and C4 are waaay too big. Something more like 100pF might be better.

After that, you're concerned about the frequency shift up around 10megHz? This won't be audible with any speaker known to man, and you're reducing gain in that area too, so this is only important if the circuit oscillates, and I see no reason for it to do so.

As for C1, it's not needed in single-supply setups when you're running both op amps from the same power supply, but in this particular case I don't know.

By the way, C5 is what's rolling off your bass response at around 100Hz, but that might be what you want.
.

Now the model is working well the only difference is on the sine wave power source and de Capcitancr 1.5uf:

SINE(0 0.1 1000 0 0 0 0)

With capacitor of 0.68uF the phase change to -360*

Regards.
Alfredo Mendiola Loyola
Lima, Peru
 

Attachments

  • 2StageOpAmpFixed.jpg
    2StageOpAmpFixed.jpg
    253.4 KB · Views: 92
  • 2StageOpAmpFixedGraphic.jpg
    2StageOpAmpFixedGraphic.jpg
    504.4 KB · Views: 94
  • AmplifierSimulation.zip
    AmplifierSimulation.zip
    2.6 KB · Views: 47
Last edited:
Tha bottom part includes a DC power supply with 6 volts (12v/2).

R5, R2, R7 and R1 are connected to the 6v dc power supply.

The porblem with the negative supply is solved if i remove C1 for example.

Wait now...so you're connecting the + and - power supply pins of the op amps across a 12VDC power supply...and then biasing the input pins to +6VDC with a separate power supply?

OK that's a new one on me, but I can't say that it wouldn't work fine. I'd think you might run into problems with two different grounds for two different power supplies, but if you don't, then you don't.

So back to your question, I'm looking at the frequency trace for your image in post #1. It seems to me that C2 and C4 are waaay too big. Some value more like 100pF might be better.

After that, you're concerned about the frequency shift up around 10megHz? This won't be audible with any speaker known to man, and you're reducing gain in that area too, so this is only important if the circuit oscillates, and I see no reason for it to do so.

As for C1, it's not needed in single-supply setups when you're running both op amps from the same power supply, but in this particular case I don't know.

By the way, C5 is what's rolling off your bass response at around 100Hz, but that might be what you want.
.
 
I don't uderstand why changing the capacitor values from 0.8uF to 1.5uF solved the problem.

I'm not familiar with your power supply setup, so I can't really comment on your circuit beyond the obvious.

But after that, you can see from the previous comments that nobody understands your problem. What 360-degree shift?

In your posted images the dotted line shows phase. No 360-degree shift shown. Are you somehow getting an inverted output, even though your circuit is non-inverting? What?

<< I don't understand why the Output Phase after the last capcitor is negative "-360*". >>

360 degrees is a full circle, just back to the starting point. I'm with those other guys, I don't know what a 360-degree shift might be, and unknown problem = no solution.
.
 
Perhaps it is time to put the OP out of his misery. When writing software which uses and outputs angles as part of the calculation the programmer often has to choose between two options:
1. Just output the result of the calculation, even if it doesn't sit between 0 and 360 degrees. Your -360 degrees suggests that the programmer chose this option.
2. Fold angles back into either 0 to 360 or -180 to +180 (which can be either programmer choice or user choice). The snag with doing this is that people can be alarmed when an increasing angle suddenly changes like: 178, 179, -180 -179 etc.
So, either choice can be confusing for people who think that angles are just like any other numbers. The programmer can't win.
 
If I understand correctly, the problem of the OP is the following: why is the phase not drawn as 0° instead of -360° at medium frequencies where there is no rolloff and the gain is at maximum? There is wide range of frequency where the output is in phase with the input. -360° phase turn implies there is a frequency where the phase turn is -270°, another where it is -180°, etc. and there is a frequency where it converges to 0°.
 
Angles output from electronic calculations are often a sum of individual angles, which each come from applying an inverse trigonometric function to a ratio. The snag is that inverse trig functions all have 0-360 ambiguities, and some have 0-180 ambiguities too. Adding two angles which sum to near zero (when summed by an intelligent human) can give you something near -360, near 0 or near +360. The programmer could 'correct' this, but then he has to keep track of what he has done - in case he has to undo it again for some reason.

As I said, you basically have a choice between large angles or jumps in angles. These are the only two options if you want a numeric result for something which is not a normal number, but instead wraps around - it is a modulo number.
 
another issue is the starting point - the sw also has to guess the branch of the phase at the start of its plotting

so you can get different numbers if you change the frequency start of a plot of the exact same circuit

phase really requires intelligent, informed human interpretation - which may be hard for some beginners to deal with at 1st
 
Commercial Spice simulators have a "phase unwrapping" option so you can choose the angle "wrapping" back through zero or continuing past 360. As pointed out above its an artifact of the math. If you want to make a prettier graph, export the LT Spice waveform into Excel and add 360 to the phase data points that jump back to zero.
 
Status
Not open for further replies.