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

P3D v5 Autopilot PID tuning offsets...?

Messages
9
Country
hungary
hi Everyone. I looked at this pretty good youtube explanation about PID control in general, but translating this to p3d/fsx im immediately stuck on where is the input error, the output and the process? on which variable or offset? i dont find anything in the SDK nor FSUIPC docs.
obviously these are needed and must be monitored to properly tune the process, and the latter two should be different for the varios lateral or vertical modes
i dont get it, help appreciated thx :p
 

Attachments

  • 2023-01-08 124212.jpg
    2023-01-08 124212.jpg
    87.7 KB · Views: 62
The standard autopilot uses PID control and you can vary the values in the autopilot section of the aircraft.cfg.
nav_proportional_control=11.00
nav_integrator_control=0.20
nav_derivative_control=0.00
nav_integrator_boundary=2.50
nav_derivative_boundary=0.00
gs_proportional_control=9.52
gs_integrator_control=0.26
gs_derivative_control=0.00
gs_integrator_boundary=0.70
gs_derivative_boundary=0.00

It is also possible to write XML PID code that carries out more advanced autopilot functions
Roy
 
The standard autopilot uses PID control and you can vary the values in the autopilot section of the aircraft.cfg.
nav_proportional_control=11.00
nav_integrator_control=0.20
nav_derivative_control=0.00
nav_integrator_boundary=2.50
nav_derivative_boundary=0.00
gs_proportional_control=9.52
gs_integrator_control=0.26
gs_derivative_control=0.00
gs_integrator_boundary=0.70
gs_derivative_boundary=0.00

It is also possible to write XML PID code that carries out more advanced autopilot functions
Roy
i dont understant your answer.
this tells you nothing, u can use this only for trial and error.
also the derivative control behaves very weird, not in line with normal PID definition.
btw its zero for most aircraft.
derivative constants would be the most important for smooth working on an autopilot.

please look at the video or pic I posted above
the aircraft.cfg is NOT enough to tune a pid control, you need the input, the error, the correction, and to see them in real time while flying and tweaking them

"to write XML PID code that carries out"... in a 2000 dollar software the advertise as for professional simulation in the future?
i still dont get it. :scratchch:rolleyes:
would you elaborate?
 
You said you could not find anything about PID controllers, so I pointed you at the one example there is.
The only variables you can write to in the sim are given in the SDK. Most of the sim code is not accessible, so if you want to do something more involved than the standard autopilot PID, you will have to write routines that simulate an autopilot and affect the flight through the accessible variables.
For example, I have done this for helicopters in the sim to where they can hover stationary relative to the ground when in a fairly strong wind.
The picture you posted is just a schematic and you would need a lot more data to write code.
Roy
 
http://www.fsdeveloper.com/forum/threads/ground-speed-control.69176/
Apologies Chris: the search needs to be ground 'speed control', otherwise you end up with a lot of unrelated results.
Search this forum for ground speed control.
hi! idk if im not asking the question clearly or... I understand that you can write a lot of stuff you want, nice code BTW...
my question is: how do you access/trace/monitor the built in autopilot in P5?

for example the below pic I was looking at the real time parameters of carenado phenom300 XML autopilot FLC mode. how it changes as the plane goes rollercoaster etc.
I just want the same with the built in stuff, wanna look under the hood:stirthepo:stirthepo:stirthepo
2023-01-08 211536.jpg
offtopic: btw another thing... if you look at the values you see they simply dont use the integral and the derivative, only the prop... no wonder the acft goes all over the place. why would someone do this?
 
You can't. That's a custom display showing a lot of custom variables at various stages of the AP calculation. The only P3D default variables are those that are in uppercase lettering.
 
You can't. That's a custom display showing a lot of custom variables at various stages of the AP calculation. The only P3D default variables are those that are in uppercase lettering.
i know what display is that, i configured it and put in in the panel as a lua script, thank you...
seems we are talking at cross purposes here
thats carenados AP which is bad, i put it in as an example, trying to explain that i just wanna do the same thing in p3d built in autopilot.
but looking at the above answers from you and others it seems like the important variables for tracing p3d's AP inner workings are not accessible, ergo its a useless "c", again, and not fit for any serious purpose
 
They have never been available, right back to the first official FS SDK which, IIRC, was for FS2000. That's why many developers (including myself) write their own autopilots and only interact with the sim where we absolutely have to, mostly to set the control surfaces and nothing else.
 
Krisz. The comments to Chris were not to you. They were to Chris who has done a lot of work on autopilots and made a comment on 9 Jan a bit up this page.

I said earlier "The only variables you can write to in the sim are given in the SDK. Most of the sim code is not accessible, so if you want to do something more involved than the standard autopilot PID, you will have to write routines that simulate an autopilot and affect the flight through the accessible variables."

If you open the P3D SDK and look for References you should find the section on Simulation Variables. Look there for a subsection about autopilots and you will find all the variables that are available. There are quite a lot but they are not what you are looking for. There is a further section lower down called Event IDs which has an autopilot section that deals with selecting autopilot modes and variables.
Those are the two places where you can see what information is available about the autopilot.

Roy
 
Back
Top