Digitally controlled power supply response time - Page 1
Forum section: electronics / general

author: Rick Law
author_rank: Super Contributor
timestamp: August 23, 2014, 05:21:53 am
content: Just for learning, I use an MCU to create a CC/CV output to charge a LiIon - that worked. As a learning project should be, it brings question(s) to mind…Digitally controlled power supply must also have an MCU running a control loop. This loop takes time. It will likely be in milliseconds or tens of milliseconds before it drives the current/voltage up or down.Is there a typical rule/expectation on how fast a digitally controlled power supply should respond? What would you consider too slow to be practical?In trying to research for an answer myself, I looked at typical specs (from web sellers) “Digital Control Lab Power Supply”, none of them has any response time on it at all – such as:- time it takes for the system to drive current down when output are shorted, or- when load suddenly changed (say via relay which would be sharp change), how long it takes to take voltage up/down.Thanks for sharing your experience…Rick

author: cyr
author_rank: Frequent Contributor
timestamp: August 23, 2014, 05:53:32 am
content: You wouldn't typically put a microcontroller inside the control loop, you simply generate control voltages for an analog regulator circuit.

author: owiecc
author_rank: Frequent Contributor
timestamp: August 23, 2014, 07:29:46 am
content: Quote from: Rick Law on August 23, 2014, 05:21:53 amIt al depends on the bandwidth that you need. For some applications you don't care for others you need to guarantee response time of X. You can implement all sorts of controllers in digital form, putting your micro in the loop, giving you different response times. I made a small interleaved buck, with 200kHz switching frequency and step response in 50?s. This was fine because I didn't need super fast response.Response/recovery time depends on switching frequency and bandwidth of the controller. Switching frequency depends on the power level. All good SMPS will (e.g. Kepco, Magna, Agilent or Delta) will all have these informations available.

author: Yago
author_rank: Frequent Contributor
timestamp: August 23, 2014, 07:34:42 am
content: I did see this when reading the Agillent 6632b manual:Transient Response TimeNormal mode: <100?s (microsec)(forum ate the symbol!)Fast mode: <50?s (microsec)(for the output voltage to recover to its previous level within 0.1% of the voltage rating of the unit or 20 mV following a change in load current of up to 50% of the output current rating)Page 49:http://cp.literature.agilent.com/litweb/pdf/5962-8196.pdfThere are some other numbers there, output rise, settle times.

author: wraper
author_rank: Unknown
timestamp: August 23, 2014, 09:02:09 am
content: Putting MCU in control loop generally is a very stupid thing to do. Not only you will get a huge delay but also very bad (unexpected) regulation.

author: owiecc
author_rank: Frequent Contributor
timestamp: August 23, 2014, 06:20:08 pm
content: Quote from: wraper on August 23, 2014, 09:02:09 amIf you can't design a digital controller then you will get bad regulation. Good designs will have good performance. All wind farm controllers are digital. But I agree that when we are talking about small converters with very high switching frequency analog is the way to go due to the delays in ADC and calculation time.There are few cases where digital control is faster than analog. If you know your load you can design the controller that will calculate the necessary state-space trajectory to reach the desired operating point. This way you will reach the operating point in the shortest physically possible time. It is not possible in analogue control.

author: wraper
author_rank: Unknown
timestamp: August 23, 2014, 06:57:39 pm
content: Quote from: owiecc on August 23, 2014, 06:20:08 pmIt will be very hard to design fast and precise digital controller that reacts adequately to the rapidly changing load which you cannot predict. For example while it will react to the voltage drop, there might be already no load => huge overshoot. Digital usually is good for things where response have a big delay or for specific needs. Also it will be not trivial to get clean output with like 3mV p-p ripple.

author: David Hess
author_rank: Super Contributor
timestamp: August 23, 2014, 06:59:03 pm
content: Quote from: owiecc on August 23, 2014, 06:20:08 pmGrid interfacing is a good example where the needed control loops are so slow that timing may be relaxed.The opposite example I like is cycle by cycle current limiting. Response time in an analog design is in the 10s to 100s of nanoseconds and is only limited by noise considerations. Handing that with complex digital logic would be a waste of resources.QuoteThis is not impossible in the analog domain as shown by translinear designs which use frequency compensation that changes with operating point but it is only worth doing in specialized applications. Some regulators do this to prevent poor regulation at light loads or during startup. I have also seen it done so response is tailored to handle both continuous and discontinuous operation.

author: mazurov
author_rank: Frequent Contributor
timestamp: August 23, 2014, 07:04:35 pm
content: Speed will also depend on how you detect your changes and what they are. Often times the regular day-to-day load changes are slow enough, but you still want to manage output short/open circuit events swiftly. Large abrupt load changes can easily be sensed with a comparator connected to the same ADC input that senses load current - very fast and also asynchronously (means you can shut down the supply if the load shorted during ADC conversion interval). If you have an interrupt tied to this comparator your response time is essentially the interrupt latency of your MCU, or in the case of Microchip's "motor control" peripherals even faster since you can wire the comparator output to PWM "fault" input and turn off your power stage in < 10ns if the need arises.That being said, designing fast MCU-controlled supplies is quite difficult. On the other hand, MCU-controlled battery chargers, LED drivers, PV MPP trackers all work very well.

author: IanB
author_rank: Super Contributor
timestamp: August 23, 2014, 07:27:37 pm
content: Quote from: wraper on August 23, 2014, 06:57:39 pmIt's all about context. In the specific context of a regulated DC power supply then analog may certainly be more appropriate.But in the wider context of industrial automation then controllers have been almost universally digital for a very long time. Digitally implemented systems give you far more flexibility over the control algorithm and required transfer functions, and far more control over the discontinuous behavior required for initialization, mode switching and handling of control limits.

author: IanB
author_rank: Super Contributor
timestamp: August 23, 2014, 07:33:13 pm
content: Quote from: Yago on August 23, 2014, 07:34:42 amFor anyone else bumping into this, here is a version of the micro symbol the forum doesn't eat: µUnfortunately there is no similar such symbol for ohms

author: wraper
author_rank: Unknown
timestamp: August 23, 2014, 07:43:35 pm
content: Quote from: IanB on August 23, 2014, 07:27:37 pmTalking about this particular use. Of course digital is much better for some process control. But not for some fast but simple regulation with almost no delay in the loop.

author: dannyf
author_rank: Super Contributor
timestamp: August 23, 2014, 08:17:13 pm
content: QuoteNot necessarily true. It depends on how you want to the mcu to be involved.For the kind of mcu-controlled power supply, Freescale is a leader there and you can check them out.

author: Neilm
author_rank: Super Contributor
timestamp: August 23, 2014, 09:44:16 pm
content: TI keep sending me stuff on the C2000 micro and how it can be used in digital power supplies. Unfortunately, I just had my request to go on a training course for it turned down so I can't anything about how easy it is to do.

author: Rick Law
author_rank: Super Contributor
timestamp: August 24, 2014, 02:27:00 am
content: Thanks for all the interesting insights! Always something interesting to learn.

author: akis
author_rank: Frequent Contributor
timestamp: August 24, 2014, 08:41:34 am
content: In my small experience on the analogue side, it is a compromise between reaction times and unwanted oscillations. The point at which oscillations will occur depends on the whole topology and even the parts used from beginning to end, anything inside and outside of the control loop can and will affect the circuit, and there will be weird situations that you cannot possibly predict or test.For example I thought I had a fairly stable two channel PSU, with both channels the same identical PCB and parts (well within reason), and when powering a remote device pulling around 2A on each channel at 12V and 200KHz, thereby having 25+ volts dropped on the pass transistors, one of the two channels started oscillating in unison with the current drawn while its identical sibling did not. The oscillations occurred because I had removed 1000uF bypass caps on the target device, and went away when I put them back in, but of course you could try to power a device that has absolutely no bypass caps, no low pass filters (chokes and caps) at the power inputs and will leak all sorts of noise around everything else. So I do not think there is a universal solution.

author: coppice
author_rank: Super Contributor
timestamp: August 28, 2014, 09:23:50 am
content: Quote from: Rick Law on August 23, 2014, 05:21:53 amIf you use an MCU designed for control loops, like the TI C2000 range, you can control the loop as fast as the PWM will allow updates. A PWM loop is a sampled system, and has to obey the Shannon/Nyquist criterion like any other sampled system. It just has a funky frequency response, as the varying pulse width takes you from something close to a Dirac sampler, to something close to zero order hold.

author: BravoV
author_rank: Super Contributor
timestamp: August 28, 2014, 10:06:57 am
content: Cmiiw, also I'm not an expert on this, its just I study few of TI mcus lately.Regarding TI's C2000 mentioned above, an example illustration below explains how the digital part reacts in TI C2000 mcu when it comes power regulation loop, fyi, it has "dedicated" peripherals like 1 MSPS ADC and PWM modules designed for motor control, which is also capable of doing power supply regulation, again, cmiiw.Assuming the mcu is running at full speed at 80Mhz = 12.5 nS at each cycle, from rough ball park I think its safe that it can regulates safely a power switching circuit running at few hundreds of Khz switching frequency. Also of course assuming its also programmed by a qualified programmer that has efficient ISR that can fully handle cycle by cycle regulation properly.Quoting C2000 datasheet :

author: coppice
author_rank: Super Contributor
timestamp: August 28, 2014, 03:26:37 pm
content: Quote from: BravoV on August 28, 2014, 10:06:57 amFor a control loop you need to do the bulk of the computation inside the ADC's ISR. That's how you keep the control loop latency to a minimum, and maximise phase margin. In fact, your main loop might be a null loop, and 100% of everything that happens after initialisation might be in the ISRs.

author: David Hess
author_rank: Super Contributor
timestamp: August 28, 2014, 04:13:16 pm
content: Quote from: BravoV on August 28, 2014, 10:06:57 amThose cycles get eaten up fast and many (most? all?) microcontrollers with high frequency cores have a significant number of wait states when accessing I/O or even memory. The older ARM microcontrollers were especially bad about I/O access.And it is not the best or average number of instruction cycles available per interrupt. It is the worse number given any irregularities like non-uniform memory accesses and cache misses.The "digital" feedback loops I have seen used in high performance regulators looked more like they used dedicated state machines which would have none of these issues.I would also consider reliability a problem with such a complex device like a microcontroller within the feedback loop. Smash the stack and the ISR fails causing regulation to fail. Is it economical to dedicate a whole high performance microcontroller to such a simple task?

author: coppice
author_rank: Super Contributor
timestamp: August 28, 2014, 05:05:29 pm
content: Quote from: David Hess on August 28, 2014, 04:13:16 pmPretty much all the digital power supplies in production now use something like a C2000. Microchip and others have similar specialist devices targeting control loops, and more specifically power supplies. A C2000 can run numerous concurrent control loops without any performance problems. The highest performance ones have control loop accelerator hardware, freeing the main CPU for other jobs. These are not general purpose devices.If you think you have seen a software free implementation of a power supply control loop look closer. Chances are that under the skin its some form of processor.

author: David Hess
author_rank: Super Contributor
timestamp: August 28, 2014, 05:36:18 pm
content: Quote from: coppice on August 28, 2014, 05:05:29 pmDid you have a specific application in mind where they are ubiquitous because I run across non-digital but not necessarily non-sampled control loops all the time.

author: mikerj
author_rank: Super Contributor
timestamp: August 28, 2014, 07:28:31 pm
content: Quote from: David Hess on August 28, 2014, 05:36:18 pmAgreed, I suspect software controlled power supplies are very much the exception rather than the rule.

author: David Hess
author_rank: Super Contributor
timestamp: August 28, 2014, 08:41:57 pm
content: Quote from: mikerj on August 28, 2014, 07:28:31 pmThere has been a lot of marketing noise about "smart" or "digital" power in connection with point of load regulators but it is just the kind of thing I would expect from companies making up a problem that can only be solved with their solution.I have seen more "managed" point of load power solutions but not many. If I was designing a digitally programmed and monitored power supply, that is how I would go about it.If I was designing a maximum power point controller, I would seriously consider a sampled analog design instead of a digital design.

author: dannyf
author_rank: Super Contributor
timestamp: August 28, 2014, 08:46:01 pm
content: QuoteYes.QuoteProbably not.

author: diyaudio
author_rank: Frequent Contributor
timestamp: August 29, 2014, 05:29:26 pm
content: Quote from: wraper on August 23, 2014, 09:02:09 amYou probably never came to understand the role a DSC Digital Signal Controller plays other than Motor Control applications.There are tons of examples and companies that uses a "digital" control loop in SMPS designs, theses digital control loops sit in the heart of the controller (and not as secondary control that imposes the analogue loop) ,digital control loops is this the way forward for many "obvious reasons" its the future weather you agree or not.

author: David Hess
author_rank: Super Contributor
timestamp: August 29, 2014, 05:49:51 pm
content: Quote from: diyaudio on August 29, 2014, 05:29:26 pmControl loop logarithms? Weather?What are some of the many obvious reasons?

author: wraper
author_rank: Unknown
timestamp: August 29, 2014, 05:55:32 pm
content: Quote from: diyaudio on August 29, 2014, 05:29:26 pmQuestion was about lab power supply without any mention of SMPS. Answer stated: GENERALLY, not always

author: diyaudio
author_rank: Frequent Contributor
timestamp: August 29, 2014, 06:56:58 pm
content: Quote from: David Hess on August 29, 2014, 05:49:51 pmtypo whether."obvious reasons" are.* Flexibly power control algorithms are upgradable as firmware.* Control algorithms are possible and are not dependant on passive components that control poles and zeros , also passives age with environmental conditions alters characteristics, firmware doesn't.* Intelligent software control management.* Lower design BOM and maintenance cost.* Efficiency and performance.* Intellectual property now resides on the chip as software so its harder for copy cats.You don't have to believe me its already taken off.The hard part is programming the system and the amount of work involved taking DSP theory into the power control world, Microchip has a good app note with source (written in assembly) on this subject that uses a DSC.http://www.microchip.com/pagehandler/en-us/technology/intelligentpower/

author: David Hess
author_rank: Super Contributor
timestamp: August 29, 2014, 09:04:19 pm
content: Quote from: diyaudio on August 29, 2014, 06:56:58 pmUnfortunately high ripple current input and output electrolytic capacitors are still going to age altering the control loop. Maybe the controller will be able to adaptively compensate for this over time. Fail-safe operation would be nice but I have not seen it as a significant problem in existing designs.QuoteI am not convinced that efficiency will be improved significantly but performance for a given power density could be. I would hope reliability is improved simply because of better monitoring.QuoteWon't the maintenance cost be the same as it is now? Throw it away and buy a new one? It certainly will not be any more repairable.QuoteI would add, "Easier and more effective hardware rights management." This will become another rent extraction tool. With some of the dumb design decisions I have seen recently, it could also be a security problem.QuoteI do not doubt these exist. I doubt that it will be a universal replacement for existing controllers except in specific applications and I am dubious of the marketing claims being made. Of course it is the greatest thing since, well, ever.QuoteI expect that the manufacturers pushing these solutions will work hard to reduce the needed design work to cookbook engineering level.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 30, 2014, 03:51:58 am
content: In PFC applications that often see part load, adding a little digital control can let the PFC operate with higher efficiency by gating off operation during the low parts of the wave where the efficiency is low, while still maintaining a minimum power factor.

author: Rick Law
author_rank: Super Contributor
timestamp: August 30, 2014, 04:15:32 am
content: This discussion is interesting and educational.When I build the charger (which I referred to in my OP), I did it just to experiment with different cutoff voltage. I was exposed to the issue with response time. I concluded at that time the system response time (in 10-50 ms) is not important for the application I had in mind.Recent thread about some cheap cc/cv led driver / charger bring that back into mind hence my OP about how other digital PSU's response time would be.I think I will put it on my "TODO" - pull my "charger" back out from the "box of the forgotten" and reheat that thing (re-familiarize and generalize it a bit) to see what else I can learn...Rick

author: coppice
author_rank: Super Contributor
timestamp: August 30, 2014, 04:29:33 am
content: Quote from: David Hess on August 28, 2014, 05:36:18 pmSorry, I missed a word. I should have said...If you think you have seen a software free implementation of a digital power supply control loop look closer. Chances are that under the skin its some form of processor.