Calculate the amount of torque impulse needed to get to a certain orientation.

Started by
10 comments, last by alvaro 5 years, 6 months ago

I just want to point out that you don't need to use angles for this (or for pretty much anything else). Assuming you are using quaternions to represent attitudes, you can compute the rotation that would bring your current attitude to your desired attitude with one division. The logarithm of this quaternion will give you the angular velocity that you would have to apply for one unit of time to get where you want. That's the P term in your PID controller. The D term is your current angular velocity. I can think of a couple of ways of implementing the I term, but you can start without it and think about it later.

I can put together some sample code for this PID controller if you are having a hard time. Just ask.

There is also a dynamic-programming approach to optimal control theory which would be interesting to apply to this problem, but that's more involved.

 

This topic is closed to new replies.

Advertisement