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

MSFS20 Any tips on programming the autopilot PID?

Messages
1,122
Country
australia
I've been having a devil of a time trying to get the autopilot to fly a heading without rolling all over the place.

The first tip I can give is that most of the parameters about the PID in the SDK about the autopilot in the system.cfg do not work in the modern flight model. Those PID parameters have all been moved into the ai.cfg file.

The parameters I am editing is in the [STICKANDRUDDER] section of ai.cfg and I have come up with (by random punching in numbers):

rollPID = 0.5, 0.01, 0.010, 1, 20.0

The parameters are Proportional Control, Integrator Control, Derivative Control, Integrator Boundary, Derivative Boundary

Using these parameters it is mostly working. The AP still wants to dial in a big bank angle (exceeding the max angle) and then settles back down and there is still a bit of hunting when on course but at least I have tamed the wild overshoots.

I was hoping that others would have some tips or perhaps a methodology they use to fine tune the AP parameters.

The other tip I can give is to make sure you open the AP debug in the aircraft editor in MSFS so you can watch in horror as your aircraft tries to fly at a 40% bank angle and overshoots the heading.
 
A temporary answer to my own question.

The wikipedia page on PID controller has some info about manually tuning the PID parameters.


Essentially, start with a P value where the aircraft oscillates and set the I and D values to zero. Then increase the I value to adjust the time of the oscillations and then the D value to decrease the oscillations. The animated graph on that page shows how those 3 steps work to

I still don't know that the Integrator Boundary and Derivative Boundary values do or why some aircraft have values around 10 and some others have them at 100.

I still need to do some more tweaking and testing to figure this out.
 
Back
Top