Jump to content

Towards a better PID controller.


nhnifong
 Share

Recommended Posts

There is an existing mod which allows the user to modify the PID variables in flight: http://kerbalspaceprogram.com/trimmable-asas/

I'd also suggest that problems have both probability and impact. One of the worst features of ASAS as currently implemented is that it wastes RCS fuel. Therefore, ASAS could be improved if it did not use RCS, or ideally, left that to the operator.

Link to comment
Share on other sites

I'd also suggest that problems have both probability and impact. One of the worst features of ASAS as currently implemented is that it wastes RCS fuel. Therefore, ASAS could be improved if it did not use RCS, or ideally, left that to the operator.

One idea that floated around this thread was that the ASAS should only use RCS if it was needed, so big corrections. So it should only uses the reaction wheels for small corrections and the only use the RCS if the reaction wheels (maybe also taking engine gimballing and aerodynamic control surfaces into account) can not provide any more torque. This requires some programming vodoo too make work, a big point being to know beforehand how much torque the RCS can provide, but it should definitely be a big step towards solving the ASAS wobble.

Link to comment
Share on other sites

Constructing an envelope of possible torque vectors resulting from RCS (with or without net force constraints) is a rather simple task. Basically, construct a matrix of individual RCS torques, then invert the matrix, run a unit sphere through it, and then normalize to maximum thrust. Run that back through the matrix and you get the convex hull corresponding to the possible torque values. If you add net force to the matrix and have it set to zero when running the inversion, you'll get a hull that corresponds only to balanced RCS use.

Link to comment
Share on other sites

One idea that floated around this thread was that the ASAS should only use RCS if it was needed, so big corrections. So it should only uses the reaction wheels for small corrections and the only use the RCS if the reaction wheels (maybe also taking engine gimballing and aerodynamic control surfaces into account) can not provide any more torque.

That sounds like a reasonable approach to me, and if it works out correctly that would be fantastic. However, stability is a huge and complex issue and I'm a little bit skeptical that the first release will nail the "Use RCS / Don't Use RCS" decision correctly over the tremendous range of rockets built in the game.

"You should have turned off ASAS's access to RCS" is a much better solution than "Oh, I guess ASAS doesn't handle that well. You're kind of screwed."

Link to comment
Share on other sites

Maybe I don't know the whole PID theory, but I want to ask a question.

From what I know, the derivative term should kill rotation,

the proportional term should turn the ship to the initial attitude,

and the integral term should make constant correction to any lasting disturbing forces.

That means the value, the derivative and the integral from the angle between the current and the initial attitude.

The question is, why, when I manualy set all asas parameters in the .cfg file to 0 and then put in only one of them, the result is not the above, but:

Kp kills rotation, Ki returns orientation, Kd...well I don't even know, but it partly seems to work like Ki. :confused:

Is it because the input value is the angular velosity, not the angle itself? Or why?

Link to comment
Share on other sites

I do not know how it works the official PID exactly. I think it is as you say. Due to the fact that the input value is the angular velcity the parameter that controls the "PID" is the speed but not the angle. Since velocity is the derivative of the angle, in this PID Kp it is equivalent to Kd(it kills the ángular speed), and Ki it is equivalent to Kp (it kills the orientation angle).Whereas Kd kills to the variation of the speed, the angular acceleration.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...