Jump to content

Adjusting ASAS PID Values...


Reblet

Recommended Posts

... otherwise known as defeating ASAS wobbly-wob of death.

Although I've only been building KSP rockets for a short while, I've already noticed that ASAS, while very useful for keeping a rocket pointing approximately straight up, does have a tendency to... overcorrect. Even with smaller rockets using gimballed engines there's a distinct wobble and the mainsail can make some rockets look more like snakes. I'm sure most players will recognise this. :)

Now, I decided to tune the ASAS PID values a bit and came up with the following:

Ki = 0.015
Kp = 0.075
Kd = 0.015

This is pretty different from the default values:

Ki = 1
Kp = 0.6
Kd = 1

Even so, this modified ASAS was able to take my Alpha II rocket (about 50 tonnes, pictures below) straight up, without any significant wobble. Even after unbalancing the rocket with a few RCS tanks one side, the modified ASAS took her pretty much straight up. An added bonus of the low ASAS strength is that you can 'push through' the controls for minor course corrections with ASAS enabled.

Unfortunately, according to the wiki, the ASAS input is angular momentum, which makes the optimal PID values dependent on the (distribution of) mass in the rocket. Thus, there are currently no single optimal set of values; however my values should provide a useful starting point for optimising ASAS for your particular rocket. Probably, lighter/smaller rockets should have higher PID values (with Kp being the most important parameter), whereas bigger ones should have lower ones, but more experimentation is needed. If you find some good PID values for your craft, please share.

Perhaps one of the devs reading this can clarify why they chose to use angular momentum, rather than angular velocity? I think if angular velocity is the input for the controller, it should be possible to come up with a set of PID values that gives stable (not wobbly) behaviour for a very broad range of craft.

As promised, some pictures:

asaspids1.jpg

Stats for the test craft.

asaspids2.jpg

Unsurprisingly, turning off ASAS for an unbalanced rocket doesn't end well.

asaspids3.jpg

With the modified ASAS, the rocket keeps pretty much pointing straight up. The pitch control stays stable at about -5/8, to counteract the unbalance in the rocket. With the normal ASAS, the pitch would swing back and forth wildly.

Thank you for reading and may your rockets launch straight up, without wobble!

Disclaimer: No Kerbals were harmed in the production of this post.

Edited by Reblet
typo
Link to comment
Share on other sites

Interesting.

According to http://wiki.kerbalspaceprogram.com/wiki/Advanced_S.A.S._Module it is angular momentum. The page on the normal S.A.S. module also states: 0.11.0 (undocumented) SAS now use angular momentum instead of angular velocity - takes into account inertia momentum of the ship. This suggests that an early version did, in fact, use angular velocity, but this was changed in 0.11.0.

I just tested with a very small ship and there the PID values from the standard ASAS do give a stable output, which suggests the input is indeed angular momentum.

Link to comment
Share on other sites

  • 1 year later...

Hello guys,

I am looking for information on what these values mean, how the affect the SAS systems. Where can I read up on the definitions of:

Kp

Ki

Kd

And maybe even:

Scalar

I Clamp Lower

I Clamp Upper

(from pilot assistant mod).

Google keeps redirecting me to these forums but I might be blind or something. :-/

Thanks in advance!

Answers have been found:

http://forum.kerbalspaceprogram.com/threads/100073-0-90-Pilot-Assistant-Atmospheric-piloting-aids-0-9-6-0-%28Dec-20%29?p=1631866#post1631866

Edited by Behemoth1702
Link to comment
Share on other sites

PID values used to be in the part cfg's with ModuleSAS, but they are no longer there since 0.90.

Also now that Kerbal pilots perform (A)SAS functions, i suppose tuning their PID is not possible in stock. Those PID values might even be linked to Kerbal's character traits.

Edited by rkman
Link to comment
Share on other sites

Reblet, that post is from May 2013, those values were exposed in the part.cfg files at that time, but they are now in the module for SAS which is not so easily edited by the player.

You can learn more about PID controllers here, unfortunately to use them you would have needed Regex's PID tuner which is no longer available.

The tuner probably won't work on the 0.90.0 module anyway as it was changed to include the SAS hold modes.

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.

×
×
  • Create New...