• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Autopilot Induced Oscillations

Messages
35
Country
us-connecticut
I'm having a little trouble setting up my project aircraft's autopilot. Specifically the settings to do with flying a heading.

Currently my aircraft will bank towards the set heading but upon arriving reacts too slowly & overshoots. Then it banks back the other way & again overshoots the heading resulting in a continuing oscillation back & forth.

It seems like I need to tell the autopilot to anticipate the heading sooner so that it has time to level out. The best I've been able to do is slow the turn rate way down which helps a little but that's not an ideal solution.

I've played with the settings in the aircraft.cfg [autopilot] section but I don't seem to be getting anywhere. Anyone have any advise on how best to tune an autopilot?
 
Last edited:
Hey Waugh,

Thank you for the response. Unfamiliar with the phrase, I looked up "PID loop" & I have to say initially this looks to be a little, okay way, over my head. Interesting stuff though, which is one of the reasons I got into this hobby. Anyway I'm not willing to give up. Please elaborate, but if I might request, on a more basic level.
 
Last edited:
Well probably best to start here: Tutorial

The math involved is not to complex, but you will have to do some reading.

Basically PID = Proportional, Integral, Derivative and sounds like you have set up a simple proportional system that oscillates, moving back and forth around the setpoint because there's nothing to remove the error when it overshoots.

Also read: Wikipedia

Good luck.
 
Thanks again Waugh. I read both the links you suggested & also did some research on PID Loops & flight sims. I couldn't find anything specifically written about MS Flight Sim though.

Where is the autopilot heading PID Loop tuned exactly? I'd assumed that the following variables in the aircraft.cfg file are used for tuning although when I edited them for the default Cessna to see if I could un-tune it, there was no effect which leads me to believe perhaps these are not what they appear to be:

[autopilot]
max_bank=25.0
max_bank_acceleration=1.8
max_bank_velocity=3.00
nav_proportional_control=9.00
nav_integrator_control=0.25
nav_derivative_control=0.00
nav_integrator_boundary=2.50
nav_derivative_boundary=0.00​

These are the most common settings used for the default FSX aircraft. 12 aircraft all have these exact same settings. I tried this with my aircraft with pretty poor results.

I attempted to tune things by editing the nav_proportional_control value, beginning at 1, testing it then I tried 2 & so on up to 16 which is what the FSX 747 uses. I also played with the nav_integrator_control value some. Again I've not been able to get anything anywhere close to stable.

I'm wondering if the problem might be something completely unrelated to the autopilot. Some flight dynamic that's making the aircraft difficult for the autopilot to deal with? Any ideas?
 
Last edited:
Back
Top