Simplified c172_cruise script: altitude is not hold even with autopilot #378
Replies: 6 comments
-
Is it due to the length of the simulation? Is it due to aircraft fuel capacity? |
Beta Was this translation helpful? Give feedback.
-
This is what I see when I run your script. And zooming in on the altitude it doesn't look like the autopilot is very stable. And looking at the airspeed and elevator. And round the 328s mark things go pear shaped resulting in a stall. So my initial guess is the PID gains aren't very well tuned, and maybe there is an integrator error that builds up eventually resulting in full elevator deflection leading to a stall. I'm not familiar with this particular auto-pilot, so I'm not sure if it used to be more stable in the past and something has changed or whether it's always performed like this. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your help! I'm quite new to JSBSim and to aircraft control and that was the reason why I chose to use the autopilot for a first introduction and the c172x plane seemed to be the most basic/simple one :) . I'm going to have a look into the reference manual if autopilot tuning is tackled. Thanks again and all the best for the new year. |
Beta Was this translation helpful? Give feedback.
-
This issue (#369) has been moved to |
Beta Was this translation helpful? Give feedback.
-
I´m interested in improving the c172 altitude controller. Has anyone solved the issue? |
Beta Was this translation helpful? Give feedback.
-
The autopilot file Just having a quick glance through the discussion above I noticed that both a heading setpoint and an altitude setpoint are set. So I would suggest first testing out the altitude hold without a heading setpoint and see how that performs. Just wondering whether the interplay of trying to change and capture a heading via the heading controller caused havoc. Ideally you should be able to have both active at the same time. But for initial testing and debugging I'd suggest first trying the altitude hold by itself. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Jsbsim community,
In order to learn to use the c172 with autopilot, I a simplified version of the script the c172_cruise_8K.xml, with only heading and altitude autopilot commands.
I expected the altitude to stay constant to 4000ft but it decreases with time. Am I doing something wrong?
Thank you very much for your help.
The script I use:
The graph of the altitude

Beta Was this translation helpful? Give feedback.
All reactions