MechJeb2

MechJeb2

4M Downloads

Smart A.S.S oscillates on yaw and pitch axis

rudi1291 opened this issue · 4 comments

commented

Smart A.S.S (and all MJ modules that use it, like Landing/Ascent guidance) oscillates on the yaw and pitch axis, when holding prograde or retrograde and the craft is under acceleration (=fires its engines)(one of the best places to observe this is using landing guidance on tylo). The oscillations gets worse over time. Stock KSP SAS doesn´t have these oscillation problems.
Screenshot
You can see in the bottom left corner, how Smart A.S.S tries to correct and 'overshoots'.

Dev and stable version have the same behaviour.

commented

Try manipulating the numerical values under the "Attitude Adjustment" tool. I've been seeing MJ overcorrecting pretty much all the time under the default values. I set the Kd = X/Tf and Max Tf values higher and Maximum Relative Angular Velocity lower for RCS maneuvering to reduce oscillations. Unfortunately, manual settings don't seem to stay saved, hence my Issue #936.

commented

I have this one a lot, in different uses of MechJeb.
It is possible to limit those effects "manually", but I failed to define any good number on those I-dont-know-what-they-mean values.

commented

Unfortunately there's not a really simple answer....the generic answer is MechJeb's control algo is a PID controller....and so PID tuning guides and understanding a PID loop can help....unfortunately they're dang complicated and without time based graphing along with trial and error hard to nail down. There are literally volumes written on the subject. For MechJeb's PID implementation I've found most of the time adjusting the Tf (auto tuning) range will help a lot when faced with oscillations, followed by Ki and Kp -- I've found with a lot of my builds it limits out either at the very bottom, or at the very top. If increasing your Tf range doesn't get you close enough start with trying to increase Ki or Kp - try to only muddle with one at a time and see what works.

Oscillations can be caused by interaction between any of the three terms (P, I, D -- MechJeb uses Kp Ki and Kd, same thing). the P and I values are two common causes of oscillation and depending on the exact behavior -- is the oscillation in phase or out....basically is the output at opposite end as the value comes up or is it going the same way (when graphed over time) -- either way the "root" of an oscillation is generally in the P or I terms (Kp or Ki in MechJeb) -- increasing the D term does tend to damp out the oscillations but can cause issues getting to the set point as well.

commented

This is probably fixed by using the HybridController in the AttitudeAdjustment window