Jump to content

[1.3] Pilot Assistant: Atmospheric piloting aids - 1.13.2 (May 28)


Crzyrndm

Recommended Posts

Yeah, I did pay attention to the MM patch - obviously it didn't actually patch... I'll go do that in NP++ just to be sure and then see how it goes. I didn't pay much attention to what it actually did because it appeared to be a solution to a problem I didn't have :P

Edited by Van Disaster
Link to comment
Share on other sites

So, yeah - still can't pin down this "stuck" business, but aside from the occasional complete lack of response, now I'm having a hard time getting any of my aircraft to hit the VS setting ( this is after I put saner easement entries in ). Most of the time they'll sit around +-5m/s of the setpoint for several minutes and eventually wake up and attempt to match the setpoint finally. I think that is probably the same issue to be honest. I've messed with the scalar setting and Ki on a bunch of craft, and got absolutely nowhere.

It looks like horrible integer windup, but my VS controllers generally have an integer gain about 1/20th of the other two at best so I'm really not convinced.

Link to comment
Share on other sites

Alright, looks like I have some digging to do.

This is happening:

  • with WASD control inputs (only?)
  • with the vertical speed control mode

What happens when you change the SP while its stuck?

EDIT

Cleaned up the OP somewhat, added a Issues 101 note


Pilot Assistant 101 - How to fight the wobble

There are two causes for Pilot Assistant making your vehicle oscillate, over-reaction and under-reaction.

Over-reaction results in fast sharp oscillations, and typically happens when your craft has a lot of control authority (high speed, low altitude, lots of control surfaces). Under-reaction results in more of a slow "cartoon drunk" sway and occurs for all the opposite reasons.

The simple fix is to increase or decrease the amount of "reaction" Pilot Assistant has to your problems.

  • First, identify the controller related to the axis that is misbehaving.
  • If you are having problems that look like over-reaction, increase the scalar term slowly.
  • If you are having problems that look like under-reaction, decrease the scalar term slowly.
  • Remember your control situation changes a lot as you fly. A typical SSTO will have you fighting over-compensation at low altitude and under-compensation at high altitudes
  • If problems persist, feel free to ask for advice

Edited by Crzyrndm
Link to comment
Share on other sites

A fairly thorough shakedown has failed to knock anything loose, so I'm going to need as much information as you can get on this

Could be of use:

  • Presets.cfg (and which one of them you've had the issue with)
  • craft file
  • Video or pictures with the AoA controller open (minimise the VSpeed controller)
  • Log file

Add anything you think it may even be remotely related. The more information I get, the more things I can atleast knock things *off* the list of possible causes :D

EDIT

And right after I post that, I get the exact issue, except on the throttle controller... (still looking for more info unless I update that I've found and fixed it)

What I'm seeing is that it gets stuck at a certain offset from the setpoint, so I can change the setpoint and it comes back to the same SP + offset position it was in before.

EDIT2

Alright, it was the silliest little thing and explains quite a few other silly little things that I've been noticing, but bug is found and squashed :)

Edited by Crzyrndm
Link to comment
Share on other sites

No and it's not something I'll add either.


After doing some testing of the stock SAS target modes, I'm seriously considering over-riding them with the stability assistance tuning they're so out of whack.
If you observe the indicators/pips in the bottom left corner while one of the target modes is active, you'll notice that it is extremely jiggly. This is generally a symptom of excessive damping in a PID loop, and sure enough, I can replicate behaviour almost exactly by raising the Kd of the stability SAS mode (by a HUGE amount. Someone may have added an extra zero HUGE amount)

Video to show my testing

0:30-0:45 is stability Assist tweaked to behave terribly, then a target hold for comparison, then stability assist with it's default tuning from 1:10 (all done with infinite RCS so there's no change in mass or anything like that)

Just for comparison:

[TABLE=class: grid, width: 500]

[TR]

[TD][/TD]

[TD]Stability normal[/TD]

[TD]Stability target[/TD]

[/TR]

[TR]

[TD]Kp[/TD]

[TD]15k[/TD]

[TD]20k[/TD]

[/TR]

[TR]

[TD]Ki[/TD]

[TD]0[/TD]

[TD]0[/TD]

[/TR]

[TR]

[TD]Kd[/TD]

[TD]2k[/TD]

[TD]60k[/TD]

[/TR]

[/TABLE]

Seriously considering adding an override to make those modes use the stability settings now

Link to comment
Share on other sites

Hi Cryzrndm,

I'm finding that pilot assistant in vertical speed and heading mode gets some fearsome instability at high altitude and I can't work out why...

It seems to be specifically the heading that's the problem; if I leave heading control on, I get steadily increasing roll and yaw after about 27km altitude until the whole thing pancakes. If I PA's heading control off, put SAS onto prograde, and use only vertical speed option from PA, the plane settles out instantly and flies straight. The latter is the reason that I'm mentioning it here - it doesn't seem to be a fault in the plane design or a lack of control authority/torque. It feels like the heading hold is being a bit too aggressive and overcompensating each time it tries to make a correction.

Any thoughts? ^^;

(Nice one on allowing the stock SAS mode to still work underneath the PA settings, btw, that's more useful than you'd think and it's given me a viable workaround for the moment!)

Link to comment
Share on other sites

This is going to sound counter-intuitive, but it may help to decrease the scalar (increase it's aggresiveness). High altitude wobbles are generally the big and slow type where it isn't reacting early enough, so it gets some significant error and then overcompensates. Increasing Kp on it's own may also help.

PS

I totally agree with how useful stacking SAS and Pilot Assistant can be. Easily one of the best improvements made possible by 0.90.

Link to comment
Share on other sites

That was the downside of making SAS and Asst. control not exclusive. I'm currently over-riding any roll signals that come through so that SAS doesnt get any strange ideas (things got very wierd very fast before I did that...).

I can monitor roll input manually, so I'll get that added in

E: Latest Github build (not a release version) allows roll inputs from the keyboard/controller. Still ignores SAS or inputs coming from other mods on the roll axis.

Edited by Crzyrndm
Link to comment
Share on other sites

Hi Crzyrndm, great mod! I was running into stability issues at high altitude and speeds before downloading your mod, but now it's flying so much smoother- I can leave the controls entirely and it keeps going.

The one issue I'm having right now is the altitude/climb adjustment- once my craft gets to about 15-18km, the PID oscillates between ~-20m/s and 5m/s climb, even when the target climb is anywhere from 5-50m/s. I messed around with the PID parameters but couldn't seem to get it to adjust to a higher attitude to climb. I even kicked in my interplanetary nuclear engine to see if it was just lacking thrust, but it didn't change its oscillations.

I realize this post is probably quite vague- if there is any more specific information I can provide I would be happy to do so.

Link to comment
Share on other sites

  • A screenshot with the VSpeed controller parameters (Kp/i/d/scalar) visible would be very helpful (preferably in flight with the misbehaving craft)
  • Oscillations are sharp and jerky or rather long and slow? If it's the latter, decreasing scalar a little and increasing Kd in the vertical speed controller may get it to behave (a large craft may need to add quite a bit of Kd. The default is ok for a 5-10t craft, while something in the 100+t range may need 6-10+). If it's the former, go the other way (more scalar, less Kd)

I tune Kd using the little pips in the bottom left of the screen. If they are jumpy, it normally means Kd is too high (Note the difference between vibrating and jumpy. Vibrating means regular oscillations and Kp/Ki is probably too high. Jumpy is sharp irregular movements). If they are oscillating for a long time (very low damping), Kd is too low. Getting a good Kd for your craft really helps improve smoothness and control stability :D

Edited by Crzyrndm
Link to comment
Share on other sites

Here are some screenshots: http://imgur.com/a/8aL52

The reason for the numbers jumping around is (1) me trying different values and (2) upon reloading a quicksave all the numbers reset and the PA turns off- is there any way to stop that? When I F9 I end up having to rush to turn them on before my plane gets ripped apart, which is rather frustrating.

Almost every time it stayed around 17,6km oscillating, other than one time I managed to kick it up to ~24km and start the climb.

Link to comment
Share on other sites

Can't do anything about a specific way of reloading resetting things (quick load AFAIK resets the flight scene)

So there are probably a few things at play here.

1) You're probably running into the angle of attack limiter, and the elevator integral limiter.

  • Under options, toggle on show limits and show control surfaces
  • In the VSpeed controller, increase the output limit slightly (this is the angle of attack that PA is clamped to), and probably increase the integral clamp a bit as well.
  • In the elevator controller, increase the integral limit from 0.4 to 0.6 or 0.7

2) Your tuning constants look to be quite high, particularly Ki and Kd. Rule of thumb: Ki should be ~40% of Kp (increasing Ki increases occilatory tendencies more than the others), and a craft that size I'd expect to see a Kd of ~2-3

3cmbMdb.png

Once you have something that works at one altitude/speed, you shouldn't need to drastically alter the balance of Kp/i/d. Just scale the output with scalar when it gets unsteady.

Edited by Crzyrndm
Link to comment
Share on other sites

I really love this mod! Have you considered adding autoland functionality? Sort of like the Mechjeb Spaceplane control feature, but with sensible control (i.e. banking in turns instead of relying strictly on yaw)?

Link to comment
Share on other sites

Sorry but automation at that level is not happening, ever. This mod is a control abstraction that makes certain things easier (particularly long duration tasks). It's not an autopilot in the same sense that Mechjeb is.

Link to comment
Share on other sites

Think I may have found a bug with setting targets. When I put in a new value and click the Target Hdg/Altitude button with the assist already active, the UI updates with the new value but the assist itself doesn't seem to change; I have to nudge it with WSAD for it to respond to the new target value.

Link to comment
Share on other sites

Sounds like you have the "Ease/Easing" set too low for the heading controller. Options -> Show limits => top heading controller -> Easing should be equal to 1

You might want to check the vertical and altitude controllers as well (10 and 100 respectively)

This should only happen if you have some presets from before v1.3. If you don't and/or the easing values are about right (Heading:1, VSpeed:10, Altitude:100, others:don't care) then you've found a bug

Link to comment
Share on other sites

That was it, all my easings would default to 0.1 and Defaults.cfg showed Ease = 0 for each controller. Deleted the cfg, reloaded, and all's good now.

Nice easy fix :D


v1.4.0 released

  • Roll inputs have some impact while Pilot Assistant heading control is active
  • Tooltips added to all parameter inputs (mouse over the labels to see them)
  • Fixed the flickering Assistant window that happened whenever you clicked it
  • Added option to use seperate min and max limits in the Assistant for all controllers
  • Added option to hide the tooltips in the Assistant options (works for SAS tooltips too)
  • All Assistant options are now persistent (scenes, saves, KSP restarts. The selected options won't change)

Suggestions for improving the tooltips are very welcome. They're hard to write when you already understand how things work :D

Edited by Crzyrndm
Link to comment
Share on other sites

v1.4.1

  • Fix for my (GUI) stupidity
  • Fix bank controller calculating twice per physics frame (in real terms, Ki has been halved on the primary heading control)
  • Fix for window default positions being stacked up in the top left corner.
  • Fix for the scroll area's in the Asst window not resizing quite right. Forcibly removed the horizontal scrollbar.
  • General optimising

Link to comment
Share on other sites

Hm, having some hard to quantify issues handing over from SSAS->PA at the moment - will PA ghost whatever control system you're using if it doesn't have control itself? I think maybe it's taking over control expecting a neutral aircraft when it's not actually neutral.

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...