|
|
|
|
|
by leafario2
1842 days ago
|
|
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. |
|