Power supply sawtooth oscillation

Papabravo

Joined Feb 24, 2006
22,082
Thanks.
I will play with it and see if I can break it. ;)

I am wondering if you have an idea why the original circuit had the sawtooth oscillation.

Looking back, I am thinking that the culprits might be the huge input capacitance of M3 in combination with the high value of R1 as well as the high output capacitance load. I suspect that either removing the 47 uF cap or at least putting a small resistor in series with it might help.

Along similar lines, do you think that using a faster op-amp would allow smaller values for your compensation network?
I gave you the answer in a previous post. What is the open loop gain of an LT1013? If your reference is at 4.5 volts and the voltage divider is at 4.501 volts, what is the output of the OpAmp? That's right it goes to the rail. What happens if the output of the voltage divider is 4.499 volts. Yup, it goes to the other rail. This is called bang-bang control and it is a notorious introducer of non-linear oscillations. In your case what you have is called a limit cycle. They are characterized by the non sinusoidal appearance of the oscillations. If you could get a phase plane plot you could see it clearly.

A faster OpAmp would -- probably make the situation worse.

\(A_{VOL}\;=\;8 \times 10^6\;=\;138\;\text dB\)

The rail to rail range around the threshold is ±1.875 μV. Any output from the voltage divider within 1.875 μV of the 4.5V reference will surely cause oscillation.

Final suggestion: How about summing the reference and the voltage divider with a gain of 3 to 4 instead of 8 million
 
Last edited:

crutschow

Joined Mar 14, 2008
38,503
I am wondering if you have an idea why the original circuit had the sawtooth oscillation.
When you add gain to an op amp feedback loop (here by the gain of MOSFET M4) the loop no longer meets the gain/phase stability criteria of the op amp internal compensation by itself and a 180° phase shift occurs before the loop gain drops to 0dB (gain of 1).
This gives positive feedback and oscillation at the frequency where that occurs.
So to stabilize the loop you add some loop compensation (here by C2 and R5) so that the loop phase shift is less than 180° at 0dB loop gain.

If you are not familiar with feedback control systems, this may help.
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
This is called bang-bang control and it is a notorious introducer of non-linear oscillations.
If you look closely, you will see there is overall feedback making it a linear amplifier. The MOS-FET may be confusing things because it adds an inversion so I swapped the inputs of the op-amp to account for it.
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
When you add gain to an op amp feedback loop (here by the gain of MOSFET M4) the loop no longer meets the gain/phase stability criteria of the op amp internal compensation by itself and a 180° phase shift occurs before the loop gain drops to 0dB (gain of 1).
This gives positive feedback and oscillation at the frequency where that occurs.
So to stabilize the loop you add some loop compensation (here by C2 and R5) so that the loop phase shift is less than 180° at 0dB loop gain.
Yes, I understand that. What I don't understand is why the oscillation is a sawtooth under some conditions of load and output voltage. The sawtooth can exist with some values of load capacitance and not others. Also, the sawtooth oscillation is well below the frequency that occurs from 180 degrees of phase shift at a loop gain of more than 1.

edit: If I expected an easy answer I would not be asking here. ;)
 

Papabravo

Joined Feb 24, 2006
22,082
If you look closely, you will see there is overall feedback making it a linear amplifier. The MOS-FET may be confusing things because it adds an inversion so I swapped the inputs of the op-amp to account for it.
It may be linear in a small region around the threshold but the slope of Vout/Vin is very nearly vertical. I guess you could claim that the transfer function was that of a limiter, but c'mon -- it is as close to a bang-bang element as I've ever seen. That's not quite the same thing as using stages with reasonable gains at all points in the loop. Remember you were initially puzzled as to the source of the oscillations. You certainly didn't expect them, but you should have.
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,082
Yes, I understand that. What I don't understand is why the oscillation is a sawtooth under some conditions of load and output voltage. The sawtooth can exist with some values of load capacitance and not others. Also, the sawtooth oscillation is well below the frequency that occurs from 180 degrees of phase shift at a loop gain of more than 1.

edit: If I expected an easy answer I would not be asking here. ;)
Point of fact the oscillation did not have the sawtooth characteristic. It had the characteristic shape of a non-linear limit cycle. It had a steep rise, a rounded hump, followed by a fast decay that began to slow down before the next cycle began. I did not see anything in the waveform that suggested a corner which would be characteristic of a sawtooth.

https://en.wikipedia.org/wiki/Limit_cycle

I recommend:
Steven H. Strogatz, "Nonlinear Dynamics and Chaos", Addison Wesley publishing company, 1994.
for an in-depth treatment of non-linear oscillators.

One more time a high gain stage within a loop makes it inherently non-linear. As we have seen, that does not mean that you cannot achieve stable behavior. As @crutschow was able to demonstrate making it stable under diverse conditions can be tricky. It might have been better to have a system without inherent non-linearities. There has been a great deal of effort devoted to the introduction of intentional non-linearities in control systems and the results are generally poor.
 
Last edited:

Thread Starter

RichardO

Joined May 4, 2013
2,270
Point of fact the oscillation did not have the sawtooth characteristic. It had the characteristic shape of a non-linear limit cycle. It had a steep rise, a rounded hump, followed by a fast decay that began to slow down before the next cycle began. I did not see anything in the waveform that suggested a corner which would be characteristic of a sawtooth.

https://en.wikipedia.org/wiki/Limit_cycle

I recommend:
Steven H. Strogatz, "Nonlinear Dynamics and Chaos", Addison Wesley publishing company, 1994.
for an in-depth treatment of non-linear oscillators.

One more time a high gain stage within a loop makes it inherently non-linear. As we have seen, that does not mean that you cannot achieve stable behavior. As @crutschow was able to demonstrate making it stable under diverse conditions can be tricky. It might have been better to have a system without inherent non-linearities. There has been a great deal of effort devoted to the introduction of intentional non-linearities in control systems and the results are generally poor.
Thanks for your tolerance.

When I said sawtooth I meant that it was not the expected sinusoidal waveform caused by phase shift in a poorly frequency compensated amplifier.
My math is not very strong so the link you gave is interesting but not real useful to me in my real world circuit.

A question: Why do you think my circuit is so much different than any other amplifier that is not linear before negative feedback is applied?
It seems to me that if I put the dominate pole well below the one of the op-amp that there should be no problem with oscillation. This does seem to be the case as shown by @cruuchow. However, there is still the non-sinusoidal oscillation ("sawtooth") under some load conditions.
 

crutschow

Joined Mar 14, 2008
38,503
I still get the "sawtooth" oscillation with no external load at several load capacitances.
What am I doing wrong?
You are changing the phase shift with different load capacitances that are then causing positive feedback.
It's difficult to design such a power supply circuit that's stable for any value of load capacitance.
Typically a power supply has a more or less a fixed output filter capacitance.

Try changing C1 to 50μF and R3 to 4kΩ.
 

Papabravo

Joined Feb 24, 2006
22,082
Thanks for your tolerance.

When I said sawtooth I meant that it was not the expected sinusoidal waveform caused by phase shift in a poorly frequency compensated amplifier.
My math is not very strong so the link you gave is interesting but not real useful to me in my real world circuit.

A question: Why do you think my circuit is so much different than any other amplifier that is not linear before negative feedback is applied?
It seems to me that if I put the dominate pole well below the one of the op-amp that there should be no problem with oscillation. This does seem to be the case as shown by @cruuchow. However, there is still the non-sinusoidal oscillation ("sawtooth") under some load conditions.
The secret to understanding non-linear systems does not lie in the mathematics. It lies in acceptance of the fact that a non-linearity, in this case an element with a gain of 138 dB cannot be reliably handled with confidence. These system have a sensitive dependence on initial conditions and can exhibit many bizarre behaviors. They are to be avoided.
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
@crutschow and @Papabravo
I was listening...
I figured that the most non-linear device was the power MOS-FET so I replaced it with a Darlington. (The high current diode does not seem to be a problem since shorting it out had little effect on the oscillation.)

AAC_50V_PS_Darl.png AAC_50V_PS_Darl_Limit.png

The circuit is much better behaved. I did a couple of other changes:
The compensation was changed to feedback around the small FET to reduce the size of the capacitor. A 1 ohm resistor was added in series with the 47 uF output capacitor.

In the circuit with the current limit there are more changes:

I added a pot to set the current limit.

The current sampling resistor was changed from 0.33 ohms to 0.976 ohms. Why 0.976 ohms? I needed a larger current sense voltage and I have this value in my stock.

There are some 1N4148 signal diodes to protect the output against having a voltage applied to the output. I am planning on charging NiCad battery packs so I think this is prudent. D1 may not be needed but it only costs a dime.


I don't have any TIP122 power Darlingtons in stock but I will get a couple tonight if I am lucky. Once I have the TIP122's I can do the modifications to my prototype and see what happens...

Thanks again for your insight and guidance.
 

Attachments

ronv

Joined Nov 12, 2008
3,770
@crutschow and @Papabravo
I was listening...
I figured that the most non-linear device was the power MOS-FET so I replaced it with a Darlington. (The high current diode does not seem to be a problem since shorting it out had little effect on the oscillation.)

View attachment 117234 View attachment 117235

The circuit is much better behaved. I did a couple of other changes:
The compensation was changed to feedback around the small FET to reduce the size of the capacitor. A 1 ohm resistor was added in series with the 47 uF output capacitor.

In the circuit with the current limit there are more changes:

I added a pot to set the current limit.

The current sampling resistor was changed from 0.33 ohms to 0.976 ohms. Why 0.976 ohms? I needed a larger current sense voltage and I have this value in my stock.

There are some 1N4148 signal diodes to protect the output against having a voltage applied to the output. I am planning on charging NiCad battery packs so I think this is prudent. D1 may not be needed but it only costs a dime.
I think you are always going to have trouble with both the transistor and op amp in the feedback loop. By the time you slow everything down enough it won't be much of a regulator.
You could use a PFET, but then you need to find a high voltage op amp.
If you don't mind some temperature drift I think you can make it real simple.




I don't have any TIP122 power Darlingtons in stock but I will get a couple tonight if I am lucky. Once I have the TIP122's I can do the modifications to my prototype and see what happens...

Thanks again for your insight and guidance.
 

Attachments

Thread Starter

RichardO

Joined May 4, 2013
2,270
@ronv
Interesting. Always fun to see someones elses take on things. :)
I think I want better regulation since this is a bench power supply.
 

tindel

Joined Sep 16, 2012
939
Richard - it was good seeing you last night -- I went looking for this thread after we spoke. After looking at the circuit - it was quite apparent that you did not compensate the 'plant' of your circuit. That's the only reason it's unstable. I will post two replies. One is quick and easy - the other is improves the bandwidth of the regulator a bit.

Your plant only has a gain of roughly 26dB up to about 6k. The circuit you originally submitted was horribly unstable (as you saw). When the phase crossed zero, it had 10dB of gain! When the gain crossed zero, the phase was already 190degrees out! No wonder you had oscillations! I'm surprised they weren't worse - just outright oscillation is what I would have expected. Anyway - I was able to stabilize easily by placing some local feedback around the op-amp to provide a zero at 6kHz. This offsets the pole of the plant at 6kHz. This provides a open-loop bandwidth somewhere around 13kHz and you have a VERY nice 20dB/dec attenuation all the way until the op-amp open-loop bandwidth is hit (~1MHz). This will stabilize the loop and is a decently performing amplifier.

I'll be very clear here since there is a lot of misinformation and half-truths in this thread (unfortunately), from very well respected people that have a lot of experience, but it's still incorrect. Your op-amp is not acting as a bang-bang controller. You have an inverter on the output of the opamp to help drive the pass-transistor. So your op-amp is operating correctly - in a linear region (ignoring your oscillation problem). Your op-amp does have a LOT of gain - but op-amps ALWAYS have a lot of gain. That doesn't mean they are going to scream from one rail to the other when properly compensated - and you got the DC loop figured out - which is always tricky with an inverter in the loop. Your plant has minimal gain - and really power transistors of this sort will not have much gain. 30dB or so is probably the max you would see. That's not a lot of gain - in fact the three stage darlington you changed to has MUCH more gain. 120dB if each has a gain of 100.

The red trace is the compensation circuit
The blue trace is the plant
The green trace is the open-loop gain.

P.S. This circuit does have a start-up regulation issue. The feedback voltage is zero until the pass-transistor is on. Problem is that the pass-transistor isn't on to give the feedback any voltage so the control voltage is forcing the output of the op-amp to 0 volts. The only reason I think it's turning on in the simulation is because of the turn-on delay of the zener regulator causing the output to AC couple thee turn-on voltage allowing just enough current to pass to the feedback loop. I'd fix this - because this does cause a turn-on spike that the compensation cannot adequately control because it is operating in a non-linear fashion.

as received:
AsRecd.png

properly compensated:
ProperlyCompensated.png
 
Last edited:

tindel

Joined Sep 16, 2012
939
For extra credit - it is possible to increase the open loop bandwidth (and the open-loop gain) by adding a feed-forward cap on your feedback network. Simply adding the cap gives reduced stability, but again, that can be accounted for in the local op-amp loop, again making the bode plot be a nice 20dB/dec attenuation. You are really only limited by your op-amp bandwidth. The attached shows the values I liked. I liked them because the bandwidth is now 200kHz with a phase margin of about 70deg. It can handle load changes very quickly.

The only place either one of these compensation methods really suffer is when the voltage is very low... you can't regulate 0V very well. Regulating to 5V is probably adequate.

I did reduce your min-load to 1k for this example, and I would suggest making the 1k be part of the feedback loop and changing the capacitors to stabilize the loop. This can dissipate about 2.5W when ouputing 50V @ 2A, but that's only a 2.5% efficiency hit - so I figured it wasn't too big of a deal. I'll let you decide though.

The .asc file shows what I mean about the startup being an issue. I also added a small buffer amp to slow set-point changes - note that this has no effect on the load step-response.

Extra Credit
ExtraCredit.png

Vs Load:
VsLoad.png

Vs Output voltage:
VsSetPointV.png
 

Attachments

Last edited:

Papabravo

Joined Feb 24, 2006
22,082
I agree that it is beneficial to reduce the gain of the OpAmp. The transfer function of the OpAmp no longer has a near vertical slope.
 

ronv

Joined Nov 12, 2008
3,770
Is it not all about phase margin?
You may make the oscillation go away by dropping the gain to a point where you have acceptable phase margin, but the best performance will be with highest gain with good phase margin? So proper compensation is the best approach.
@tindel, Could you post your .esc file for the frequency response. You made it sound to easy.:D
 
Top