Opinion on Semi predictive feedback control

Hi

I got a power supply working in hysteresis mode with a not very precise ref erence

So I am wrapping a digital loop with a microcontroller around it using a DA C output to tune the reference and thus the output to a precise value

Right now I have it working with a very simple P regulator, so if the value measured by the ADC is off target, I just move the DAC control one LSB to move the output back to the target value

It works, but it will have a small ripple around the target value since tha t is the way it functions

So I was thinking about predictive control. I have a model of the plant, so I know how much to modify the DAC to get it back on track from an error vo ltage. So I could just measure how much I am off target, and program the DA C with the correct correction including the model information

This would let the output swing back to target very fast and very precise. I should then add logic so the DAC is not moved if the measured output is i nside a certain error band. That would stop the ripple around the target va lue

Any opinions on this? Stability issues?

Thanks

Klaus

Reply to
Klaus Kragelund
Loading thread data ...

But, isn't that now a PI loop? And, with 'hysteresis mode'?

So, that's going to be PID control? With embedded hysteresis? Safest thing to do, is let it be noisy, because it's just a supply of POWER, and keep a highly-tweaked accurate secondary reference outside the loop. It's beyond me to know what would stabilize (or even accurately characterize) that feedback.

Even if the feedback can be made to work under normal operation, the startup and shutdown transients are capable of unpleasant surprises. Disclaimer: I've debugged bunches of power supplies, but don't know much about fine tuning 'em.

Reply to
whit3rd

Well, I don't think it's either because no matter how far the target is away, the speed is still just 1 LSB of the DAC per timeframe. A P term and a I term relates to the size of the error signal, which I do not here

The hysteresis is the control of the SMPS, not the outside loop control.

Cheers

Klaus

Reply to
Klaus Kragelund

No, that's nonlinear (constant slew rate), and also unstable.

Seems to me, following a hysteretic control with a hysteretic control has a certain poetic awfulness to it. ;-)

A linear process has the output change proportional to the error. Multiply the input error by a coefficient (and the error sum over time -- the integral term) and set the output to that. Keep track of fractional bits (say, using a 32 bit register, 16 of which feed the output) so that the output still changes (slowly, i.e. an LSB every however-many samples) when the input error is very small (a few LSBs).

You might as well strip it back further, replacing the outside hysteretic controller with a PWM channel so you can do average current mode control. (Peak current mode control isn't practical on most MCUs.) I'm guessing you need to add a current shunt to do this, but it is well worth doing.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: https://www.seventransistorlabs.com/
Reply to
Tim Williams

why not simply force the DAC to use close to its full range output and do an analgo scale to the power supply to correct it?

If moving the DAC 1 bit is causing a ripple then you have way too much gain on it. scale the DAC output to the power supply reg circuits which will allow you to use a broad range of the DAC and tuhs have very little ripple.

Jamie

Reply to
M Philbrook

reference

a DAC output to tune the reference and thus the output to a precise value

alue measured by the ADC is off target, I just move the DAC control one LSB to move the output back to the target value

that is the way it functions

, so I know how much to modify the DAC to get it back on track from an erro r voltage. So I could just measure how much I am off target, and program th e DAC with the correct correction including the model information

se. I should then add logic so the DAC is not moved if the measured output is inside a certain error band. That would stop the ripple around the targe t value

I want to get the best performance possible, just to see how far I can go

I have 3V on the SMPS output, 12 bit DAC, so that is about 0.75mV/LSB.

The DAC output has a 1 to 1 ratio to the output, so 1 LSB moves the output with 0.75mV

The ADC is also 12 bit, so the same 0.75mV resolution. Off course I have so me LSB jitter, but some of that is fixed by a moving average of the ADC cou nts. If I really wanted to push it further, I could jitter the DAC also to get higher resolution, but I really don't need to go that far

I cannot add a lot of stuff due to cost reasons

Cheers

Klaus

Reply to
Klaus Kragelund

do you have an additional DAC to play with ? if so you can use that one to increase your resolution with a summing circuit. Of course you'll need to use some high precision R's to make that work out.

Reply to
M Philbrook

cise reference

ing a DAC output to tune the reference and thus the output to a precise val ue

he value measured by the ADC is off target, I just move the DAC control one LSB to move the output back to the target value

ince that is the way it functions

lant, so I know how much to modify the DAC to get it back on track from an error voltage. So I could just measure how much I am off target, and progra m the DAC with the correct correction including the model information

recise. I should then add logic so the DAC is not moved if the measured out put is inside a certain error band. That would stop the ripple around the t arget value

d

ch

ch

tle

go

put with 0.75mV

e some LSB jitter, but some of that is fixed by a moving average of the ADC counts. If I really wanted to push it further, I could jitter the DAC also to get higher resolution, but I really don't need to go that far

I think I have enough resolution, I just need it not to dance around the ta rget value

On a side note, the microcontroller that controls the outer loop knows the exact loading of the 3V supply, and when a potential load shift is happenin g

In a normal supply regulator, a load step would cause the 3V to either over shoot or undershoot. It may be going a little over the top for this supply, but for sake of experiment, I could shift the DAC with 50% of the expected over/undershoot, to reduce the overall overshoot by 50%

I guess this kind of stuff is patented heavily, so I need to do a patent su rvey

Cheers

Klaus

Reply to
Klaus Kragelund

I have designed a system that used this approach except there was no internal hysteric hardware loop and it wasn't a power supply. It was a multi-channel phase adjuster where several receivers had to be "phased together" at exactly xx degrees towards each other. The errors were measured, the processor looked at it, grabbed the required correction magnitudes from a look-up table and applied those. It worked very well and fast but you must know the plant (which you probably do if you have a model). If there is any chance that your plant could come back with an unforeseen fast load change reaction this method could become unstable.

Long story short the client had a DSP on the board for a previous method that they couldn't get to converge properly. This DSP became largely unemployed and could have been replaced with a cheap 8-bitter or less.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

then you have ANOTHER reference to compare the results of the not precise reference against?

then why not just use the more precise reference in the first place?

without another reference, I don't see how you can improve the results?

mark

Reply to
makolber

The funny thing about this microcontroller is that the internal voltage reference is better than a garden variety TL431. That is the reason I am wrapping the microcontroller around the outer feedback loop

Cheers

Klaus

Reply to
Klaus Kragelund

Unpopular opinions: fuzzy logic could work

Reply to
bitrex

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.