Le lundi 21 janvier 2019 11:00:58 UTC-5, mako...@yahoo.com a écrit :> On Monday, January 21, 2019 at 10:26:16 AM UTC-5, benjamin....@gmail.com wrote: > > Le dimanche 20 janvier 2019 14:45:37 UTC-5, gyans...@gmail.com a écrit : > > > On Saturday, January 19, 2019 at 2:24:35 AM UTC+13, benjamin....@gmail.com wrote: > > > > Le jeudi 17 janvier 2019 19:15:19 UTC-5, gyans...@gmail.com a écrit : > > > > > On Friday, January 18, 2019 at 11:05:26 AM UTC+13, benjamin....@gmail.com wrote: > > > > > > Hi, > > > > > > > > > > > > I'm designing a controller for a boost converter. I'm able to find a set of gains that fit for all situations, but I get a slow response at full-load. > > > > > > > > > > > > I was thinking instead of using gain scheduling, 1 set of gains for little to no load and 1 set of gain when load is significant (say more than 25% of the maximum load). > > > > > > > > > > > > Now my question. What are the gotchas about gain scheduling? In books they don't say much about implementation details. > > > > > > > > > > > > I was thinking that in order for gain scheduling to work, I need to apply the Ki gain of the integrator AFTER the integration and not before. That way I canchange seamlessly from one set of gain to the other. > > > > > > > > > > > > I.e : > > > > > > > > > > > > Use this => > > > > > > integrator = integrator + error; > > > > > > output = Ki*integrator + Kp*error; > > > > > > > > > > > > Instead of > > > > > > integrator = integrator + Ki*error; > > > > > > output = integrator + Kp*error; > > > > > > > > > > > > > > > > > > Am I correct in that thinking? > > > > > > > > > > > > Regards > > > > > > > > > > > > Benjamin > > > > > > > > > > Makes no difference for a LTI system. > > > > > > > > A PI controller with gain scheduling is not LTI, but LTV. > > > > > > > > What I meant, is that since Ki changes with time, I was thinking of implementing the integrator this way > > > > > > > > integrator += integrator; > > > > output = Ki(t)*integrator + Kp(t) *error; > > > > > > > > Am I on the right path? Are there any other gotchas when changing the gains "live" ? > > > > > > For what reason are you changing the gain anyway? Is it integrator windup or is it on startup you are worried? I usually just have a soft integrator on startup and switch on the full think later. Of course if you already have a mechanical integrator - as in a position servo then it is not quite so critical. A phase lag compensator ie a soft integrator is usually good enough. Or are you working in process control? > > > > As I said before, the transfer function of the booster DC/DC changes, a lot, depending on the load. With a fixed-gain, I can have a stable system, but the time response will be slow-ish at high loads. > > > > Thus, I was thinking of using gain scheduling, one set of gains for low loads and one set of gains for high loads. > > > > For the record, I have anti-windup implemented. > > just for clarification... > is this system implemented in DSP or analog hardware? > markDSP
Implementation of gain scheduling for PI controllers
Started by ●January 17, 2019
Reply by ●January 21, 20192019-01-21
Reply by ●January 21, 20192019-01-21
On Tuesday, January 22, 2019 at 4:26:16 AM UTC+13, benjamin....@gmail.com wrote:> Le dimanche 20 janvier 2019 14:45:37 UTC-5, gyans...@gmail.com a écrit : > > On Saturday, January 19, 2019 at 2:24:35 AM UTC+13, benjamin....@gmail.com wrote: > > > Le jeudi 17 janvier 2019 19:15:19 UTC-5, gyans...@gmail.com a écrit : > > > > On Friday, January 18, 2019 at 11:05:26 AM UTC+13, benjamin....@gmail.com wrote: > > > > > Hi, > > > > > > > > > > I'm designing a controller for a boost converter. I'm able to find a set of gains that fit for all situations, but I get a slow response at full-load. > > > > > > > > > > I was thinking instead of using gain scheduling, 1 set of gains for little to no load and 1 set of gain when load is significant (say more than 25% of the maximum load). > > > > > > > > > > Now my question. What are the gotchas about gain scheduling? In books they don't say much about implementation details. > > > > > > > > > > I was thinking that in order for gain scheduling to work, I need to apply the Ki gain of the integrator AFTER the integration and not before. That way I canchange seamlessly from one set of gain to the other. > > > > > > > > > > I.e : > > > > > > > > > > Use this => > > > > > integrator = integrator + error; > > > > > output = Ki*integrator + Kp*error; > > > > > > > > > > Instead of > > > > > integrator = integrator + Ki*error; > > > > > output = integrator + Kp*error; > > > > > > > > > > > > > > > Am I correct in that thinking? > > > > > > > > > > Regards > > > > > > > > > > Benjamin > > > > > > > > Makes no difference for a LTI system. > > > > > > A PI controller with gain scheduling is not LTI, but LTV. > > > > > > What I meant, is that since Ki changes with time, I was thinking of implementing the integrator this way > > > > > > integrator += integrator; > > > output = Ki(t)*integrator + Kp(t) *error; > > > > > > Am I on the right path? Are there any other gotchas when changing the gains "live" ? > > > > For what reason are you changing the gain anyway? Is it integrator windup or is it on startup you are worried? I usually just have a soft integrator on startup and switch on the full think later. Of course if you already have a mechanical integrator - as in a position servo then it is not quite so critical. A phase lag compensator ie a soft integrator is usually good enough. Or are you working in process control? > > As I said before, the transfer function of the booster DC/DC changes, a lot, depending on the load. With a fixed-gain, I can have a stable system, but the time response will be slow-ish at high loads. > > Thus, I was thinking of using gain scheduling, one set of gains for low loads and one set of gains for high loads. > > For the record, I have anti-windup implemented.ah yes, now I see.