Autopilot PID controller tuning resources: Difference between revisions

Jump to navigation Jump to search
m
Robot: Automated text replacement (-Flight Gear +FlightGear)
m (Robot: Cosmetic changes)
m (Robot: Automated text replacement (-Flight Gear +FlightGear))
Line 77: Line 77:
The following part describes the visualization of the debug output with [http://www.live-graph.org Live Graph]. Live-Graph is a GPL'd Graph Plotter for Windows systems available at Sourceforge.org.
The following part describes the visualization of the debug output with [http://www.live-graph.org Live Graph]. Live-Graph is a GPL'd Graph Plotter for Windows systems available at Sourceforge.org.


After installing it start Live-Graph and set the Data file to your output logfile (e.g. "my_file"). Be aware that you don't have an output file before you did not start the process of debug output at least one time. In this case start Flight Gear first and activate the AP function on the autopilot where you activated the debug=true output. Back to Live-Graph: The update frequency works fine with updates at 1 Hz or 2 Hz (every 1 or 2 seconds). Activate "Show tail data" so that your graph will not be overcrowding during the time and keep caching data active or you will experience loss of data which will make your tests useless.
After installing it start Live-Graph and set the Data file to your output logfile (e.g. "my_file"). Be aware that you don't have an output file before you did not start the process of debug output at least one time. In this case start FlightGear first and activate the AP function on the autopilot where you activated the debug=true output. Back to Live-Graph: The update frequency works fine with updates at 1 Hz or 2 Hz (every 1 or 2 seconds). Activate "Show tail data" so that your graph will not be overcrowding during the time and keep caching data active or you will experience loss of data which will make your tests useless.


Next you need to define the visual output: set the viewport on the Y-axis from min. -1.5 to max. +1.5. Leaving the scaling to "auto" will create a graph which will not be very easy to read. X-axis set to auto on both sides. It's quite handy to set the horizontal grid (I prefer a grid size of 0.2 to 0.5). And last but not least on X-Axis set "Dataset numbers" as type for the input.
Next you need to define the visual output: set the viewport on the Y-axis from min. -1.5 to max. +1.5. Leaving the scaling to "auto" will create a graph which will not be very easy to read. X-axis set to auto on both sides. It's quite handy to set the horizontal grid (I prefer a grid size of 0.2 to 0.5). And last but not least on X-Axis set "Dataset numbers" as type for the input.
Line 85: Line 85:


== Alternative Method ==
== Alternative Method ==
As an alternative to using the controller's debug output you can use the built in logging system of Flight Gear. This can be configured through the preferences.xml file, or at runtime via the File->Logging menu option.
As an alternative to using the controller's debug output you can use the built in logging system of FlightGear. This can be configured through the preferences.xml file, or at runtime via the File->Logging menu option.


To tune a controller you would typically display the setpoint property and the controlled property in the same graph. Another property that is interesting too look at is the actuating property, which can be for example the aileron control or the elevator control.
To tune a controller you would typically display the setpoint property and the controlled property in the same graph. Another property that is interesting too look at is the actuating property, which can be for example the aileron control or the elevator control.


[[Category:Resource]]
[[Category:Resource]]

Navigation menu