DSPRelated.com
Forums

Bound control system

Started by Vladimir Vassilevsky August 30, 2008
Vladimir Vassilevsky wrote:
> > > Tim Wescott wrote: >> Vladimir Vassilevsky wrote: >> >>> >>> The classic closed loop system tries to minimize the error wrt some >>> criteria. But what if the requirement is to limit the error to the >>> bounds (-E,+E) ? So as long as the error is within the bounds, the >>> control signal should be zero. > >> What's your goal, really? Are you trying to build a controller for a >> system where it just doesn't matter what the error is once it gets >> within the error bounds? Are you trying to build a controller for a >> system where it's expensive to keep the drivers turned on (making your >> desire to turn the drivers _off_ quite valid)? > > The plant is a heavy push-pull thing which normally balances itself. > Sometimes the external disturbance is too high, so the plant needs a > little help from the servo to keep within the allowed limits. The plant > is naturally slightly off zero because of the tolerances. So if I set > the servo to keep the plant at exactly zero, then the servo will be > fighting with the self balancing property of the plant. What is even > worse in this case is that the servo has to compensate the full strength > of the external disturbance rather then only helping to the plant when > needed. > >> Synthesizing an appropriate controller from specifications and >> mathematical first principals can be a monumental, if not impossible >> task. Sometimes the best method to solve one of these corner cases is >> just apply a combination of common sense, intuition, and mathematical >> analysis of candidate controllers. > > I got the system to work by the shamanistic methods. I was wondering if > there is a good systematic approach to the problem. The compensation of > the nonlinearities in the loop is a well developed area, however what I > need seems to be the opposite. >
_A_ systematic approach, which probably won't get you the optimal solution but may make you feel better, would be to design the controller with a predictor that anticipates the plant going out of bounds, and aims to stop the plant just within them. You could certainly be systematic about this, although you'd have trouble trying to prove that it's 'optimal' by any measure. I'm not sure that you need any integral action in your controller, unless your disturbances occasionally get strong enough steadily enough that your plant is always edging out of bounds one way. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Tim Wescott wrote:
> Jerry Avins wrote: >> Tim Wescott wrote: >>> Vladimir Vassilevsky wrote: >>>> >>>> The classic closed loop system tries to minimize the error wrt some >>>> criteria. But what if the requirement is to limit the error to the >>>> bounds (-E,+E) ? So as long as the error is within the bounds, the >>>> control signal should be zero. >>> >>> For the general plant you run into problems right there, because in >>> general a plant may well require a control signal to remain in place >>> (this is usually the job of the integrator if you're doing control >>> with a PID). >> >> Right, and freezing the integrator says "Steady as she goes." >> >> ... >> >> Jerry > "the controller output is disabled, the integrator state is frozen" > > Freezing the integrator says "steady as she goes", but "disabling the > controller output" says "anything goes". > > Vladimir explained quite well why he wanted it to do what it does -- > it's a set of requirements that are off the beaten track, hence the > solution needs to be as well.
Freezing the integrator until the error goes out of the designated deadband has worked for me. That's quite different from pulling the plug on the controller. What have I missed? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> Tim Wescott wrote: >> Jerry Avins wrote: >>> Tim Wescott wrote: >>>> Vladimir Vassilevsky wrote: >>>>> >>>>> The classic closed loop system tries to minimize the error wrt some >>>>> criteria. But what if the requirement is to limit the error to the >>>>> bounds (-E,+E) ? So as long as the error is within the bounds, the >>>>> control signal should be zero. >>>> >>>> For the general plant you run into problems right there, because in >>>> general a plant may well require a control signal to remain in place >>>> (this is usually the job of the integrator if you're doing control >>>> with a PID). >>> >>> Right, and freezing the integrator says "Steady as she goes." >>> >>> ... >>> >>> Jerry >> "the controller output is disabled, the integrator state is frozen" >> >> Freezing the integrator says "steady as she goes", but "disabling the >> controller output" says "anything goes". >> >> Vladimir explained quite well why he wanted it to do what it does -- >> it's a set of requirements that are off the beaten track, hence the >> solution needs to be as well. > > Freezing the integrator until the error goes out of the designated > deadband has worked for me. That's quite different from pulling the plug > on the controller. What have I missed? >
Vladimir wants to pull the plug on the controller any time the error is inside of the defined band. In general that's not a good idea, because you can't count on the plant not requiring some push to stay still. In his case, at least as stated, it'll work because the plant generally stays in bounds, except for the exceptional disturbance. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
On Aug 30, 8:28&#4294967295;am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> The classic closed loop system tries to minimize the error wrt some > criteria. &#4294967295;But what if the requirement is to limit the error to the > bounds (-E,+E) ? So as long as the error is within the bounds, the > control signal should be zero. > > Consider the PID controller and just the upper bound of error E. > Initially, the error is below the bound, so the control signal is set to > 0 and the controller state is set to zero also. Then the error drifts > up, and when it crosses the bound E, the controller is enabled and it > tries to keep the error at E. So far so good. > > Eventually the error goes down below E. At this moment, the controller > output is disabled, the integrator state is frozen, the differentiator > memory is updated normally. When the error goes above E again, the > controller is enabled again. > > The problem is what to do with the integrator. Since the error is always > non negative, the integrator will grow up indefinitely. If the > integrator is set to zero every time when the error goes below E, then > the control is not going to be optimal. A solution could be multiplying > the integrator by a factor of A (less then unity) when crossing E on the > way down. Then what should be the rational way for determining A. > > I am sure that the problem is not unusual, so there should be a good > solution for it. Can you suggest an idea or a book with the treatment of > that sort of problem? > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com
I am surprised that no one has asked what you are truly controlling. Is it the torque or the velocity loop or just the position loop. This makes a big difference. If just controlling the position loop then just a little error will cause the inner loops to wind up and zeroing the outer loops does not limit or zero the control output of the inner loops. Even if you force the output of the position and velocity loop to 0 there may be a inner torque loop that maintains a current due to its integrator. It appears like you need to get down to what controls the current and zero or limit that. Peter Nachtwey
Tim Wescott wrote:
> Jerry Avins wrote: >> Tim Wescott wrote: >>> Jerry Avins wrote: >>>> Tim Wescott wrote: >>>>> Vladimir Vassilevsky wrote: >>>>>> >>>>>> The classic closed loop system tries to minimize the error wrt >>>>>> some criteria. But what if the requirement is to limit the error >>>>>> to the bounds (-E,+E) ? So as long as the error is within the >>>>>> bounds, the control signal should be zero. >>>>> >>>>> For the general plant you run into problems right there, because in >>>>> general a plant may well require a control signal to remain in >>>>> place (this is usually the job of the integrator if you're doing >>>>> control with a PID). >>>> >>>> Right, and freezing the integrator says "Steady as she goes." >>>> >>>> ... >>>> >>>> Jerry >>> "the controller output is disabled, the integrator state is frozen" >>> >>> Freezing the integrator says "steady as she goes", but "disabling the >>> controller output" says "anything goes". >>> >>> Vladimir explained quite well why he wanted it to do what it does -- >>> it's a set of requirements that are off the beaten track, hence the >>> solution needs to be as well. >> >> Freezing the integrator until the error goes out of the designated >> deadband has worked for me. That's quite different from pulling the >> plug on the controller. What have I missed? >> > Vladimir wants to pull the plug on the controller any time the error is > inside of the defined band. > > In general that's not a good idea, because you can't count on the plant > not requiring some push to stay still. > > In his case, at least as stated, it'll work because the plant generally > stays in bounds, except for the exceptional disturbance.
The systems I built all has the integrator as the only element in the forward path. (Proportional and derivative in the feedback path only.) So freezing the integrator freezes the controller output. Incidentally, bounding the controller's output by diddling the integrator prevents windup and can get the controller close to bang-bang. (Yes. That again.) Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins wrote:

> > The systems I built all has the integrator as the only element in the > forward path. (Proportional and derivative in the feedback path only.) > So freezing the integrator freezes the controller output. > Incidentally, bounding the controller's output by diddling the > integrator prevents windup and can get the controller close to > bang-bang. (Yes. That again.) > Jerry
The ones I built were bang-bang at the actuator and we decided to see what would happen if we provided an off state as well. The feedback was proportional and we didn't have any rate feedback - although a very similar system did have rate feedback, we didn't ever try an actuator with zero as an input on that one. Everything before this attempt ran in a limit cycle of course. The system with the off-state really didn't have a limit cycle, just correcting blips at the actuator. Vladimir's problem is a bit different in that he wants to put a nonlinearity in the feedback path (well, really the forward path I think) to limit the effective fedback error to zero, around zero. That's a lot like backlash in the output sensor isn't it? Something like this to limit the correction to situations where the error is greater than some threshold magnitudes. +----------------+ | /| | / | +------------+ | / | | | | / | | | | / | | System | ---------->+ ------>| ------ |-->| |---+------> Ref Input - error | / | | | | Output ^ | / | | | | | | / | +------------+ | | | / | | | |/ | | | +----------------+ | | | | | +----------------------------------------------+ But, I wonder... A proportional control is easier to deal with and easier to implement. And the amount of energy expended near zero error may be smaller than when well away from zero error. So, is the objective justified or would a linear control be just as effective? Only Vladimir knows.. Fred
"Tim Wescott" <tim@seemywebsite.com> wrote in message 
news:AoCdnW5gELkosSfVnZ2dnUVZ_h2dnZ2d@web-ster.com...

> Vladimir wants to pull the plug on the controller any time > the error is inside of the defined band. > > In general that's not a good idea, because you can't count on > the plant not requiring some push to stay still. > > In his case, at least as stated, it'll work because the plant > generally stays in bounds, except for the exceptional > disturbance. >
I remember a controller in one of the DDC systems that I used to maintain that had exactly this option (I'm sorry, I forget what the option was called--"dead band", maybe?). It was primarily recommended for level controls on things like the boiler at the bottom of a distillation column where it could be very difficult to get an accurate, stable level indication. It had a relative where the error signal was calculated as E=(S-R)*ABS(S-R) where R was the process measurement and S was the setpoint. For small errors, E was very small and caused little change in output. For larger errors, E increased according to a square-law and so had disproportionately more effect on the output. One nuance: I recall that all such controllers used a velocity-mode algorithm. That is, the output of the integrator was the controller output. This design facilitates the implementation of such features as allowing the operator to pre-set the output open-loop, stabilize the process, and then put the controller in control with a "bumpless transfer".