Re:PID Controller: A Simple Control Loop Mechanism
by leafario2 on Saturday May 29, 2021 @04:05AM
(#27323769)
1) this is the same problem like controlling the angle of a quad copter, for which I have used PID. You can calculate the error of the position, which is in the range -180..179. Applying one PID stage to the error of the orientation yields a "desired rate of change" - it increases if the error is large or held for a long time and it's sign describes the direction of the rate of change of orientation. You can use another PID stage to give a step count power iteration (how much to turn the object).
2) integral windup is commonly prevented by just capping it. You can also use a smoother capping function which bounds the size of the integral, or lowers it on each iteration.
[ Parent
| on HN ]
Re:PID Controller: A Simple Control Loop Mechanism
by zubspace on Saturday May 29, 2021 @04:17AM
(#27323813)
Capping and/or gradually lowering the the integral part seems like an elegant solution. Thanks for your input! This is something which is never told but should be part of every PID controller resource on the web.