Briefly, remember that loop gain is not a single value; For 99% of power supply compensation networks, loop gain varies with frequency. Combinations of capacitors and resistors creates poles and zeroes on a bode plot. If we wanted to reduce the gain at higher frequencies, we can put a cap across R8+C4.
Oh, ok - I still have a lot to learn :-)
Transistor T4 is really screwing things up though because it adds voltage gain within the operational amplifier's feedback loop. The added voltage gain also varies with collector current which just makes things worse. With a resistive load as the output voltage is increased, the collector current rises lowering the emitter resistance increasing the transconductance raising the voltage gain until the voltage feedback loop oscillates.
The best solution is to get rid of T4 or replace it with a more suitable circuit but you could also try adding resistance between the operational amplifier and emitter to lower and control the transconductance. Then the frequency compensation should be taken directly from the output of the operational amplifier instead of the collector of the transistor.
Someone who helped me getting the CC mode non-oscillating in another electronics board recommended to put that T4 transistor in. Basically all I know is that it is excess current protection (as mentioned earlier). As there weren't any issues in the simulation, I did keep it.
What would be a suitable replacement circuit?
Resistance between Opamp and Emitter? What Emitter? Darlington or T4 (I thought I should rather get rid of T4)?
You mean better take the compensation from the output of the opamp rather than from the
emitter of the transistor?
To test for stability the best way is with a injection transformer, plenty of talks about it after the omnicron teardown. You don't need such fancy transformer, there are many CM chokes that work for some applications and ranges.
Don't know what a injection transformer or a CM choke is, will have to look that up.
The other way is to set a step in the output current. Best way is to have some load (a resistor probably) and a mosfet switching (fast and clean) a second load in and out (another resistor). That way you will see the overshoot in current as you switch the mosfet on, in voltage as you switch it off and any ringing both directions that might expose an issue with stability, or at least close to one. You can get the closed loop response with that. The loop response will change with conditions (current, voltage and load impedance) so you migt want to check adding different capacitance, sometimes the intermediate values are problematic so check every decade or so, mostly bigger or close to your output cap.
That sounds like I can do that quite easily. will have to wire up some MOSFET/load resistor action, though.
Inductive loads aren't so common for lab PSU but you migt have one some day, they tend to makes things more stable unless crazy happens, like huge inductance pulling energy into the PSU in some transient and for that you not only need stability but good protection.
Low ESR cap at the output is usually not a good idea, adding a 0.1 to 0.47 resistor in series with it can improve stability and muffle some jiggles. Some have a small cap, about 100nF directly across the output and a bigger, few uF with a series resistor. Here again, a zero appears and it helps preventing oscillations if properly placed.
How'd I protect the PSU from inductive loads pulling energy into it? I have a reverse diode from the darlingtons emitter to its collector but I guess if voltage rises above about 70V, the Darlington will be gonsky...
So I'd rather buy a non low ESR cap for the output or would the resistor in series still be necessary? Wait - why in series, not parallel to the cap? Parallel would be a bleeder resistor which is what we want, don't we?! (confused I am, again).
Schematic looks fine. It's a bit here-or-there with odd/inconsistent design choices. That implies a level of experience of, say, advanced amateur, but not seasoned professional. Which, mind, is still better than a sizable fraction of professional engineers* doing this sort of thing...
Thanks :-) If I had to describe my expertise by myself, I'd say: I know more that the common Arduino LED blinking guy, but I didn't learn ANY of this in school and also didn't finish school so veeeery much of the math skills are missing (many formulas in datasheets I can't even read correctly). So yes, amateur/advanced amateur maybe describes it best :-)
*Not P.E. as such, but in the sense that they get paid for it, and "engineer" is in their job title.
I'm an IT guy, I was in the field for many years and now in an internal IT department of a big company. I know what you mean, I've stumbled across many, many "professionals" where I had excessive facepalming parties afterwards.
The only thing that stands out is that one transistor at the opamp output. What the heck is that for?
according to the guy who told me to put it there, excess peak current protection. I'll try to translate from german:
"The solution with T4 has the advantage, that even with high unlimited currents the voltage drop stays low and you can get much closer to Ub. That means a higher stabilized output voltage at max. output current. Besides, I do the peak current limitation with this. For that, one has to check R1, having a short at the output and with disconnected D1."
I only kind of understand what he was trying to do, maybe you get more of an idea of it.
By the way, a system that is stable at rest, but unstable in motion: that's a classic chaotic behavior. You have a stable limit cycle: there is a region (in the "phase space" of the system) where the system will tend towards stability (no motion), but outside of that area, an instability which tends to push it into a circular (oscillating) trajectory.
A physically useful description of "phase space" might be, the voltage and current in an oscillating (LC) circuit. A more abstract case would be a single parameter and its phase shift (Hilbert transform), hence(?) "phase space".
Whatever the case, anything that oscillates, always does so with at least two components. The simplest possible case is equating two derivatives together (in a differential equation), which has the solutions of sine and cosine. Derivatives, as in, the change in one causes the change in the other, and vice versa; and they are always changing, perfectly in step.
You might only have access to one component -- you can measure voltage easily enough on the oscilloscope -- but you need some kind of sense circuit or probe to measure current, say. Or the complementary signal might be trapped inside an IC or something. As long as you can see one, you can infer the other, and just know that, when you see a squiggle on the 'scope, you're actually seeing a sideways view of a corkscrew path through time (the phase plot is the along-axis projection).
Another distinguishing feature of chaotic systems, is having some control parameter (in this case, load resistance), which as it progresses, the size and shape of the stability regions change, and so a stable condition might become unstable and get stuck oscillating, and keep oscillating even as that parameter is dialed back down. But that oscillation can be 'quenched' by damping it, returning the system to its stable state. This bistability (or N-stable, more generally) is another classic sign of chaotic behavior.
Now, in linear systems -- control theory -- there is no such thing as a stable limit cycle. A system is only ever stable, or not. And it doesn't vary with independent parameters like DC voltage or current. So even if you know nothing about chaos, you can tell that your system is nonlinear, and it was supposed to be linear. Find that source of nonlinearity, remove it, and try adjusting compensation values again.
Sounds reasonable and highly intelligent, way beyond my knowledge :-D SO how can I find that peace of *** which makes my system nonlinear? :-)
Except for the extra transisor T4, the voltage regulation loop looks reasonable. It is especially odd with the base to GND - so nothing should happen at all. The missing positive current source / resistor to deliver the base current is another point. Without it nothing should happen.
However the comment on the low Z capacitor applies. It usually helps to have at least some capacitance with larger ESR, like a normal type electrolytic and than a small ceramic or film typ in addition.
The current regulation might be prone to oscillation though: high side / collector side current sensing tends to be slow and not having a low impedance power source for the darlingtons is also not very good. A local capacitor for the power input might be a good ideal.#
For the external loads, it is usually a low Z capacitive load that causes the most trouble. A resistive load should be relatively easy, though the low ESR output cap could already be bad enough.
It might be a good idea to do a simulation of such a circuit with something like LTspice.
A little bit above I wrote about the purpose of T4 according to the guy who told me to put it there like this.. Maybe you'll understand better than me what it is doing there and how I could replace it with something more suitable...
Regarding the cap I also already wrote in this comment (replace with non low esr or put a resistor in?)
The current regulation seems to work very good, currently - no oscillations at all until now. :-) There are 20.000µF near the Darlingtons Collector, those caps are on another sheet...
Simulation is attached, I went quite to town with LTSpice before I built this thing up...
I agree about the current sense amplifier. The MAX4080 is pretty slow so special attention needs to be paid to frequency compensation of the current control loop. This is especially the case when a fast operational amplifier like the OPA2197 is used although the slow TIP3055s may be helping some. The first time I designed a somewhat similar power supply, I also included a phase lead network around R3 for outstanding voltage mode performance but the added phase lag from the current sensing amplifier required so much compensation around the current control error amplifier that the current limit performance was abysmal.
At least for now, CC seems to work fine. Didn't do excessive testing yet, though...
Since then, my high side current sense circuits when used are more like video amplifiers if they are inside the control loop. Better is to move the current control error amplifier itself to the high side so no separate current sense amplifier is required and this is what HP and Tektronix commonly did in their power supplies.
No idea how I could accomplish this :-)
There is a tricky way to compensate for a low ESR output capacitance and load. Move the current shunt to the output side of the power transistor and take AC feedback before the current shunt and DC feedback after it across the output capacitance. Now for stability purposes, the current shunt is in series with the output capacitor raising the minimum ESR.
No idea how to do this, either, unfortunately... Sounds interesting, though.
The uncontrolled and poorly defined voltage gain of T4 inside the voltage control loop is still the big problem though.
Ok, ok, I believe you now :-D
Thank you all for all your time, effort and input, I really appreciate that!
edit: LTSpice Simulation attached, however some things have been changed since the simulation... you'll need all the attached files within the same directory as the asc file. you'll need to remove .txt file ending and place a dot before lib or asy.