Autopilot PID controller tuning resources: Difference between revisions

Jump to navigation Jump to search
m
Corrected some spelling errors
m (→‎Flightgear PID Controler: and some more spelling errors)
m (Corrected some spelling errors)
Line 1: Line 1:
Flightgear Autopilot is a modular system based on PID controlers. Here are some tips to help in the tuning of such a controler. There is lot of documentation all over Internet about how to tune the parameters, having this you will have to figure out how works the Flightgear PID controler implementation.
Flightgear Autopilot is a modular system based on PID controllers. Here are some tips to help in the tuning of such a controller. There is lot of documentation all over Internet about how to tune the parameters, having this you will have to figure out how works the Flightgear PID controler implementation.


First of all, have a look at the code where you will see the algorythm wich is used for our autopilot. The reading of the existing autopilots in Flightgear aircraft datas will do the rest.
First of all, have a look at the code where you will see the algorithm wich is used for our autopilot. The reading of the existing autopilots in Flightgear aircraft datas will do the rest.


There is actually a doc about filters in Flightgear documentation. Filters can be applied on input or ouput values, in other words, before and after the PID controler.
There is actually a doc about filters in Flightgear documentation. Filters can be applied on input or ouput values, in other words, before and after the PID controller.


=== Flightgear PID Controler ===
=== FlightGear PID Controler ===


Knowing the algorithm is mandatory, certain values are forbidden, for example they can lead to a division by zero. Then you will have to understand where the parameters apply to act on the choosen correction module. See the schema wich is a good reminder while doing the tests.
Knowing the algorithm is mandatory, certain values are forbidden, for example they can lead to a division by zero. Then you will have to understand where the parameters apply to act on the choosen correction module. See the schema wich is a good reminder while doing the tests.
Line 15: Line 15:
=== Getting graphs of Controler action ===
=== Getting graphs of Controler action ===


While it's possible to tune a PID Controler by testing directly the aircraft behaviour under the autopilot control, it can be really usefull to get everything in graphical view.
While it's possible to tune a PID controller by testing directly the aircraft behaviour under the autopilot control, it can be really usefull to get everything in graphical view.


[[Image:pid_cotroler_data_graph.png|thumb|Datas of an Auto-trim PID Controler displayed as graphs]]
[[Image:pid_cotroler_data_graph.png|thumb|Datas of an Auto-trim PID Controler displayed as graphs]]


First of all you'll have to turn the PID Controler's debug mode on. That is in the autopilot.xml you are working on. (I didn't try to turn more than one PID controler's debug at the same time).
First of all you'll have to turn the PID Controler's debug mode on. That is in the autopilot.xml you are working on. (I didn't try to turn more than one PID controller's debug at the same time).


Then you will get 6 new values displayed on the console at each FG loop. You will need to catch them and format the values in one line. Here is an exemple of a parser script written in Perl:
Then you will get 6 new values displayed on the console at each FG loop. You will need to catch them and format the values in one line. Here is an exemple of a parser script written in Perl:
8

edits

Navigation menu