PSU instability in CC mode - Page 1
Forum section: electronics / beginners

author: bagunceiro
author_rank: Newbie
timestamp: June 04, 2025, 06:59:44 pm
content: I've been toying with adjustable power supply design, and coud do with some pointers. To be clear, this project is purely for teaching myself what is going on - it's never going to be production - and I don't really need a solution, just an explanation.The circuit is in the attached PDF (is there a better way to supply this? The source is KiCAD).In CV mode it works a charm with a nice stable output voltage controllable from more or less zero all the way up (nearly) to the supply voltage at a wide range of currents. The control voltage is on VCtlV with a range of 0-5V.CC mode also appears to work fine if you look at it on a multimeter. (The control voltage here is on ICtlV, also 0-5V). However the wave form is actually not stable; it is ramping up exponentially to a peak and then suddenly dropping with a frequency of about 6KHz. The voltage of this - shall I call it ripple - is quite large, up to a volt or more.Can anyone suggest what is causing it? It looks like a capacitor charging and then suddenly discharging but I don't think it is the output capacitor as changing the value of that enormously (up to 4700uF) doesn't affect the frequency at all . Perhaps it's the capacitance of the MOSFETs? But if so, why doesn't it happen in CV mode which opertes in exactly the same way. I also tried it with a single MOSFET and this made no difference. Is it something about the LMP8601 that I don't understand?The op-amps are powered of the main input voltage (12V shown here although I've also run it at 24V) by the way.Thanks in advance.

author: inse
author_rank: Super Contributor
timestamp: June 04, 2025, 08:20:02 pm
content: As the circuit is currently designed, it is not going to be a lab power supply, it is either a voltage source or a current source.The current control loop is probably oscillating due to the delay introduced by the current sense amplifier (which is actually unnecessary) which is not compensated by the driver.

author: bagunceiro
author_rank: Newbie
timestamp: June 05, 2025, 12:40:19 pm
content: That's exactly the sort of reply I was hoping for, thanks. Trouble is, I don't fully understand either point! Can I ask a couple of supplementaries?The first is about definitions, probably. What does a lab power supply do that is not it being either a voltage or current source?The second is more significant. Your suggestion that the oscillation is down to a delay in the current sense amp makes perfect sense. But you also say that I don't need it - how would I eliminate it? I need to measure the very small voltage drop across the shunt and raise it to levels where it can be compared to a control voltage, don't I?Thanks again

author: David Hess
author_rank: Super Contributor
timestamp: June 05, 2025, 03:30:02 pm
content: Quote from: bagunceiro on June 05, 2025, 12:40:19 pmThe current control preamplifier is not any more precise than an operational amplifier used for the current control loop, so it does not add anything to the circuit. To make that work, the delay through the preamplifier needs to be low so it needs to be faster than the error amplifier, or the error amplifier needs to be slowed down.In the example shown below, the LM101A operational amplifier makes the current comparison directly by moving the its voltage reference to the positive supply.There are other problems.The 100 kilohm pull-down does not draw enough current. Operating the pass transistors in common source mode can work, but this means they introduce variable gain within the feedback loop which will make compensation more difficult. C4 adds delay within the voltage control loop reducing phase margin. I am not sure what output current you are expecting, but C5 would be appropriate for a 2 to 4 amps.Quote from: bagunceiro on June 05, 2025, 12:40:19 pminse might be referring to the large output capacitance. The example below has an exceptionally low output capacitance of 0.22 microfarads in series with 10 ohms for a 10 amp output.

author: bagunceiro
author_rank: Newbie
timestamp: June 05, 2025, 04:13:47 pm
content: Excellent, thanks. I'll go away and think all that through.

author: MariuszD
author_rank: Regular Contributor
timestamp: June 05, 2025, 04:35:40 pm
content: You have two amplifiers and output stage in feedback loop. At low frequency phase shift is this loop is 180° and feedback is negative. For high frequency phase shift for each amplifier tends to 90°. Phase shift in loop tends to 360° and feedback becomes positive. You have an oscillator.I can show you bode plot in simulation. Amplifiers are modelled as ideal gain and RC filter. This gives gain and phase similar to real thing.Important crossover point is where loop gain crosses 0dB, if phase in this point is 0° loop will be unstable (google for bode plot stability criteria) For stable and robust circuit we want phase margin at least 45°

author: MariuszD
author_rank: Regular Contributor
timestamp: June 05, 2025, 06:24:08 pm
content: The phase margin can be easily improved by adding an RC circuit to the amplifier.

author: bagunceiro
author_rank: Newbie
timestamp: June 05, 2025, 07:41:59 pm
content: Ah. Starting to understand. Thanks very much for this.

author: David Hess
author_rank: Super Contributor
timestamp: June 05, 2025, 07:43:05 pm
content: Quote from: MariuszD on June 05, 2025, 06:24:08 pmThat works but the tradeoff is increasing recovery time when the power supply switches to constant current mode.This will not matter with so much output capacitance. In the example I linked, the output capacitance is very small, so the LM101A current error amplifier has no feedback capacitance, and is also clamped (D2) to control windup of its compensation capacitance (C2) required for unity gain stability.

author: bagunceiro
author_rank: Newbie
timestamp: June 05, 2025, 07:43:47 pm
content: OK. I'll experiment with that before I strip it down.

author: inse
author_rank: Super Contributor
timestamp: June 05, 2025, 08:39:57 pm
content: Quote from: bagunceiro on June 05, 2025, 12:40:19 pmIn fact it does so, but your design is not setup to support the transition between both.Lets say you want your supply to deliver 5V but not more than 1A to protect the connected circuit.So if you apply your reference voltage for both control loops, the current control loop will crank up the output until the load consumes 1A.The current control loop need to pull down the output to achieve a transition between both modes.The current can be sensed by a R/R OPAMP in the return line, no need for a specific floating bidirectional current sense amplifier.

author: David Hess
author_rank: Super Contributor
timestamp: June 06, 2025, 07:37:25 am
content: Quote from: inse on June 05, 2025, 08:39:57 pmHuh? The pass MOSFET is configured as common source, so pulling the gate down increases the output and pulling the gate up reduces the output. The output is inverted from the gate drive in this case so the output rises until it reaches either the voltage or current limit.

author: mikerj
author_rank: Super Contributor
timestamp: June 06, 2025, 08:00:34 am
content: Quote from: inse on June 05, 2025, 08:39:57 pmThe pass transistors are biased ON by R7 and diodes D1 and D3 means each control loop can only reduce the gate drive so they do not "fight" each other. It's quite a common architecture for simple linear PSUs. However this scheme can suffer from problems during transition; when one control loop is operating in the linear region, the other op-amp is saturated (e.g,. during current limit the voltage control op-amp is demanding maximum voltage output) which causes a small delay for the loop to settle which causes output voltage spikes during the transition.

author: xavier60
author_rank: Super Contributor
timestamp: June 06, 2025, 08:43:58 am
content: Connecting the CV compensation RC to the diode ORing node prevents wind-up of the CV loop while the PSU is in CC mode,https://www.eevblog.com/forum/beginners/lm324-power-supply-with-variable-voltage-and-current/?action=dlattach;attach=1225187;image

author: MariuszD
author_rank: Regular Contributor
timestamp: June 06, 2025, 09:03:56 am
content: Quote from: bagunceiro on June 04, 2025, 06:59:44 pmConnect an oscilloscope and make a sudden change in load current; you'll see it's not as good as you think. The controller will be slow and might be on the verge of instability.

author: mikerj
author_rank: Super Contributor
timestamp: June 06, 2025, 09:43:03 am
content: Quote from: xavier60 on June 06, 2025, 08:43:58 amThat R5/C3 network may improve the behaviour of loop coming out of saturation, but I don't see how it could prevent the op-amp output saturating in CC as it provides no DC feedback?

author: xavier60
author_rank: Super Contributor
timestamp: June 06, 2025, 10:01:39 am
content: Quote from: mikerj on June 06, 2025, 09:43:03 amThe CV opamp does saturate in CC mode. As the PSU comes out of CC mode, the CV opamp's output is free to swing down at its full slew rate because initally there is no feedback until its Oring diode conducts.

author: inse
author_rank: Super Contributor
timestamp: June 06, 2025, 01:21:53 pm
content: Quote from: David Hess on June 06, 2025, 07:37:25 amRight, my bad 🫣

author: D2236
author_rank: Regular Contributor
timestamp: June 06, 2025, 04:30:24 pm
content: Quote from: MariuszD on June 06, 2025, 09:03:56 amAnother problem is lack of driving current into the large gate capacitance's from the TL082. If you hit the current limit gradually, it may be stable and controllable, but hitting the limit fast will most probably produce a large overshoot and instability.You may need something like a current feedback op-amp, fast with more drive current capability.

author: CaptDon
author_rank: Super Contributor
timestamp: June 06, 2025, 04:42:06 pm
content: What is your load? Perhaps a 5 or 10 ohm load will help to see if CC stabilizes.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 06, 2025, 04:44:23 pm
content: The circuit as originally shown has the loop gain set by the OP-amp open loop gain and BW. The proposed RC as local feedback sets the loop gain from this local feedback and this way more predictable. Setting this feedback in a good way is one of the main difficulties in designing a lab supply.To have another parameter to adjust and thus optimize a bit more one often has a small resistor in series with the FB capacitor.Using 2 MOSFETs in parallel without extra measures for load balancing is not working reliable. One of the MOSFETs is expected to take mainly all the load and the other only acts as load capacitance.A current feedback OP-amp does not necessary have more drive capability than a voltage feedback type. It would still help to look for a type with good drive capability. It could especially be critical driving the gate close to the upper limit. Depending on the threshold of the power MOSFETs already the TL082 could be only borderline able to turn off the FETs (drive the gate close to the positive supply).For the start it can be OK to have a slow lab supply. Often it is better to have a somewhat slow current limit than an oscillating supply. A large capacitor at the output acts a bit similar to a slow current limit.

author: D2236
author_rank: Regular Contributor
timestamp: June 06, 2025, 07:33:38 pm
content: Quote from: Kleinstein on June 06, 2025, 04:44:23 pmThere are several CFB devices that have drive capabilities >=100 mA and some to 1 Amp. Of course, it is a tradeoff between performance and price, as some of these can be pricey. One old One, the AD8000 comes to mind that is not that expensive, drive 100 mA and is very fast. It works up to 12 V supply. It will swing within a volt of the supply rails driving into 100 ohm load. As with all high speed devices, layout is critical otherwise parasitic's can ruin your day.So, the question is: do you want a so-so general lab power supply, or a good performance unit with fast-stable transient response and what are you willing to spend on it?

author: Kleinstein
author_rank: Super Contributor
timestamp: June 06, 2025, 08:08:58 pm
content: Usually the speed of a power supply is not really limited by the OP-amp, but more the power transistor and parasitics (like inductance of the shunts). Many circuit get away with rather slow speed parts like LM358.How critical driving of the output FET(s) is, depends on the size of the FETs. P Channel FETs have a bit more capacitance for the same current rating, but on the upside they have less SOA issues. For the 2nd FET one really has to decide: skip it, or add extra circuitry for better load sharing.Instead of a high current OP-amp, one could add a transitor to boost the current if needed. One may just replace the diodes with NPN transistors and limit the voltage enough to stay inside the allowed V_BE range. Limiting the voltage at the OP-amps output from going way to far into saturation is anyway a good step to a fast cross over.

author: David Hess
author_rank: Super Contributor
timestamp: June 06, 2025, 09:59:52 pm
content: Quote from: Kleinstein on June 06, 2025, 08:08:58 pmOr put diodes in series with the bases or emitters to prevent base-emitter breakdown. If the error amplifiers are clamped, then the diodes are not required.Shown below is the design I have been thinking about. The three transistor circuit above each error amplifier clamp its output to 2xVbe, so base-emitter breakdown is never a problem and integrator windup is controlled. The feedback networks are more complicated than shown. An LM350 is shown as a power pass element, but could be a power transistor.As shown this design requires a negative supply to support output voltages to zero, and can operate as a floating supply, however with some changes this could be altered to only require a positive supply if transistors are used for the output. I guess I should draw that up.

author: xavier60
author_rank: Super Contributor
timestamp: June 06, 2025, 10:19:21 pm
content: A problem with the design in the opening post is that ripple will be applied to the Source and amplified by the MOSFETs, relying on the feedback to minimize it.Driving a PMOS pass transistor with a current sinking level shifter will give better ripple rejection.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 07, 2025, 12:32:11 pm
content: Why are you using MOSfet's in the power stage? IMHO BJT's are a much better option.* Emitter follower is already quite stable on itself, it does not react as abruptly as the threshold voltage of the FET.* The 4V or so threshold voltage wastes 4V from your power supply, unless you add an auxiliary power supply for the fet drivers.* The high gate capacitance of the MOSfet's makes the control loop more difficult to tame.* Most MOSfet's are designed for switching operation, and not for analog applications.I don't see any advantage of using a MOSfet over a BJT as the end stage in a lab power supply. Only for very low dropout analog regulators, an P-channel fet has advantages, as it's channel resistance can be in the milli Ohm range.

author: David Hess
author_rank: Super Contributor
timestamp: June 07, 2025, 02:26:44 pm
content: Quote from: Doctorandus_P on June 07, 2025, 12:32:11 pmI actually have no objection; there are advantages and disadvantages.QuoteBipolar transistor transconductance is higher than that of MOSFETs, so the emitter follower should actually be more abrupt. I do not think this matters either way however.QuoteThat applies for a source follower application, however this design is common source, which has its own problems.QuoteAdd a stiff driver stage. I would do this for a big bipolar transistor also.QuoteOn the other hand, power MOSFETs with much higher power ratings than bipolars are available at reasonable prices.How many TO-264 bipolar transistors are available? Amazingly there are some from OnSemi for audio applications which are excellent for power supplies, but there are much larger power MOSFETs available in this package.QuoteI would prefer a bipolar transistor power stage as well, but at higher power levels a MOSFET stage may be more economical despite its drawbacks.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 07, 2025, 03:12:12 pm
content: I quite like the 2SC5200. This BJT does 230V 15A Hfe of around 80 and can dissipate 150W. Fit for both audio amplifiers, power supplies and other higher power stuff.It costs around EUR 2 a piece (10+).When you really need to dissipate a lot of power, then putting a bunch of devices parallel is most often the better option. It reduces thermal resistance to the heatsink, and you can make more efficient use of the heatsink itself too. If you put a lot of heat into a big heatsink, then the farthest end will be significantly cooler then just close to your power device.But don't buy them from Aliexpress. I made that mistake and they exploded at quite moderate power dissipation. I also bought a small audio amplifier with these transistors. When the package arrived, I was a bit disappointed at first, as the transistors clearly had some scratches and looked second hand. Then I looked closer at that Ali shop, and saw they were explicitly marked as being second hand. I had become uncertain because the "new" transistors I bought exploded far too quickly, so I de-soldered one of the 2SC5200 transistors from the audio amplifier and tested that one too. And It did not blow up. It can handle more voltage then it's datasheet claims, and can handle more current then my power supply can deliver. So I'm quite happy with these transistors, but next time, I'll buy them at a real shop.

author: David Hess
author_rank: Super Contributor
timestamp: June 07, 2025, 05:46:34 pm
content: I agree about the use of heat sinks with multiple smaller power packages, but what I am getting at is that for a given power requirement at the extreme end, power MOSFETs can be cheaper per watt and for a given SOA.There are some slightly larger TO-3 parts, but the MJL4302/MJL4281 are the largest TO-264 bipolar parts that I would use, at 230 watts and a 50 volt 4 amp SOA. For about the same price, a linear rated IXTP80N075L2 MOSFET in the far smaller TO-220 package is available at 357 watts and a 50 volt 7 amp SOA, or a switching IXFH74N20P in the TO-247 package at 480 watts and a 50 volt 10 amp SOA.Although p-channel power MOSFETs are very limited and barely better than a PNP transistor for the same cost. There might be some good p-channel parts from off-brand manufacturers.

author: D2236
author_rank: Regular Contributor
timestamp: June 07, 2025, 11:10:54 pm
content: Here is a somewhat modified current-loop circuit from the original posting. The modifications help deal with the current drive and stability issues. Simulation shows fast and stable response to various load currents. The P-MOSFET is rated similar to what is in the original circuit ( 55 V, 74 A).Note: Current sensing part is LMP8603, where the original design shows LMP8601.

author: D2236
author_rank: Regular Contributor
timestamp: June 08, 2025, 07:12:46 am
content: Here is the same circuit simulated with another program for verification, showing similar results.

author: MariuszD
author_rank: Regular Contributor
timestamp: June 08, 2025, 05:06:00 pm
content: @D2236 What programs did you use?I would expect instability in the internal loop (U3,T2,T4), yet the entire system seems to be functioning correctly. Do you know how to explain that?

author: D2236
author_rank: Regular Contributor
timestamp: June 08, 2025, 11:27:50 pm
content: The programs used are TINA Professional by DesignSoft and TopSpice by Penzar development.Referring to the last diagram, the dominant pole set by C1 seems to keep things under control. Dropping this value, under 10 nF and the wheels start coming off. As far as the inner loop, I suspect the time constant from R10, R4 and the gate capacitance seem to roll off the inner loop enough to keep the phase margin healthy.I did find that with the TopSpice program that at certain current settings, with the control loop in active constant current limiting, there were some sporadic bursts of oscillation appearing on the plots.This could not be reproduced in TINA. It may be due to simulation engine differences? However, I made some more modifications as shown in the last diagram here that cleared up these oscillations. Some RC was added to the current sensing amp, just to take the edge off some faint fuzziness that appeared. Next another RC damper was added to the feedback return path. I found that the LED may be causing some of the erratic bursts as well and bypassing this with a small capacitor appeared to clean up all the signs of instability. I think it has to do with the turn-on time, and the capacitor provides a bypass for fast currents. That is my take on this from what I observed in the simulation results. Someone else may analyze it differently.After these modifications, the phase margin is near 58 degrees. Then, increasing the LED bypass capacitor to 100 pF also increased the phase margin to 70 deg at low current settings < 1 A. At very low settings (<=100 mA) the phase margin moves toward 90 degrees. Increasing C!, provides more phase margin, but also reduces the loop bandwidth and slow response times..

author: MariuszD
author_rank: Regular Contributor
timestamp: June 09, 2025, 07:13:08 am
content: Maybe I could run your simulation with Tina TI. It could be interesting to experiment with. But I don't want to redraw it from scratch.Can you attach your simulation file?

author: D2236
author_rank: Regular Contributor
timestamp: June 09, 2025, 08:15:31 pm
content: Enjoy.BTW, I tried to run a simulation with the faster TL082H. For some reason I could not get this spice model to run. I will try later when I have some time.

author: xavier60
author_rank: Super Contributor
timestamp: June 10, 2025, 12:46:10 am
content: This is a good way to drive the MOSFET although the component count is high.It's preferable that the MOSFET isn't turned on by default.

author: bagunceiro
author_rank: Newbie
timestamp: June 12, 2025, 02:20:34 pm
content: What is it about this circuit that gives it the low output capacitance? (Apart from a small capacitor, of course - I mean what feature of this allows it to get away with that?)

author: Kleinstein
author_rank: Super Contributor
timestamp: June 12, 2025, 03:18:25 pm
content: The output capacitor allows a short but very high peak in the current, that can not be controlled from the CC regulation. A small output capacitor can be benificial to have a small output capacitor.

author: MariuszD
author_rank: Regular Contributor
timestamp: June 12, 2025, 05:09:47 pm
content: Quote from: bagunceiro on June 12, 2025, 02:20:34 pmThe lower the bandwidth of the feedback loop, the slower the regulator response. The more time the regulator needs to stabilize the voltage, the larger the capacitor you need. The capacitor prevents voltage drops during sudden increases in current draw. Inside complex integrated circuits, very fast LDO regulators are used that operate without a capacitor.

author: David Hess
author_rank: Super Contributor
timestamp: June 12, 2025, 06:06:58 pm
content: Quote from: bagunceiro on June 12, 2025, 02:20:34 pmIt is not so much a feature as how the frequency compensation is implemented.With a large output capacitor, the output resistance plus the capacitor create a pole in the frequency response and if the capacitance is high enough, then this pole will be low in frequency and dominate the frequency response by reducing gain below 1 before all of the phase margin is exhaused. This is known as dominant mode compensation and it is the slowest scheme, but the large output capacitance makes up for the slow response. The higher series resistance of an aluminum or tantalum electrolytic capacitor adds a zero in the frequency response which adds phase lead further stabilizing the regulator. If you tried this with a huge film capacitor, this would likely fail.With a small output capacitance, the frequency compensation depends mostly on the external compensation around the error amplifier and power pass element, and this is more tricky to get right, plus now the load impedance has a larger effect on the frequency compensation, so the regulator may not be stable with all loads. The ESR of the small output capacitor becomes very important here, as shown in the example I posted earlier.There are advanced methods to make things work, like implementing the frequency compensation around the error amplifier with only 45 degrees of phase lag instead of 90, improving the phase margin by 45 degrees. *Now* you can use your huge film output capacitor, or a small capacitance and drive all loads.I would not trust a common emitter/source design without the output capacitance as shown; the simulation does not include a realistic load.

author: D2236
author_rank: Regular Contributor
timestamp: June 12, 2025, 07:18:31 pm
content: I thought the design aimed to be a fast response (minimal capacitance) PSU. So, I was curious about hooking some capacitance on the output. I ran the simulation with (100 uF, 0.1 ESR) and (1000 uF, 0.01 ESR). It appeared that the circuit was mainly unaffected by this, maintaining good response and healthy gain-phase margins. Plots are in sequence starting with 100 uF to 1000 uF.It is important to remember tonever blindly trust simulationswithout actual bench testing. This design may have issues in real bench testing, but you still need to test it to be sure. The simulations just give us some workable starting point.I also added the response with 24 ohm load together with the 100 uF.