0
$\begingroup$

I am programming an autopilot for a 787 flight sim software and I've been having a problem. I'm trying to simulate a PID that controls the pitch of the aircraft In relation to the vertical speed selected. I'm not sure how to obtain the difference in pitch required to get to a certain vertical speed in fpm and keep it stable there. Any advice and input is appreciated.

Edit: Posted updated question on a more suitable stackexchange forum: https://robotics.stackexchange.com/questions/16249/needed-help-with-pid-for-an-airplane-autopilot-system

$\endgroup$
8
  • $\begingroup$ Is there any particular reason why you can't just iteratively and continually adjust in response to changing conditions? If, for example, the (simulated) aircraft hits an updraft or downdraft (which usually come in close proximity to one another...), then any precomputed value for pitch to vertical speed is very likely useless anyway. $\endgroup$
    – user
    Aug 18, 2018 at 11:03
  • 3
    $\begingroup$ What have you tried? From your question it's very hard to see what your understanding of aircraft dynamics and control design is. I would say that the thing that relates vertical speed to pitch is your (PID) controller. $\endgroup$
    – Sanchises
    Aug 18, 2018 at 12:42
  • $\begingroup$ Yeah, I'm a little confused by your question. Do you know how a PID controller actually works? Because a PID controller is the thing that tells you what pitch is required to attain and maintain a desired vertical speed. If you want, take a look at the flight sim pilot that I wrote, and see how it works: github.com/tswett/WarrigalsAutopilot Look in the Autopilot and Controller classes. $\endgroup$ Aug 18, 2018 at 14:02
  • $\begingroup$ By the way, this question would probably be a better fit on robotics.stackexchange.com, because the information you need is how to implement a PID controller. The Robotics site is the perfect place to get that information. The Aviation site is not such a good place because you don't actually need any aviation-related information here. If you'd like to move your question, click the "flag" link on your question and say that you'd like it to be moved to the Robotics site. $\endgroup$ Aug 18, 2018 at 14:10
  • 1
    $\begingroup$ Okay, so do you need help implementing the PID controller, or have you already implemented the PID controller and now you're having problems with it? If you need help implementing the PID controller, then we need to know what, exactly, you need help with; and if you've already implemented it and now you're having problems, then we need to know what, exactly, the problems are. $\endgroup$ Aug 18, 2018 at 22:37

1 Answer 1

3
$\begingroup$

I'm surprised no-one has attempted to answer this question, as it is mostly a pilot's daily job to guess a pitch change that would give a certain rate of climb. :-)

This will not be a technical answer, but I suspect some of my attempts at controlling the rate can be ported to a PID algorithm.

Keeping math aside, if you draw the lift-drag-thrust-weight diagram, there is probably a tan(x) dependency there between pitch and rate. For the small angles of pitch we are talking here, a linear dependency is good enough on the assumption of tan(x) ~ x . So basically, if I want to half my climb rate, I start by reducing my pitch to half and then I take it from there.

Secondly, the larger planes will still fly by the numbers, so I have a pretty good idea of how 2.5 deg will give me level flight at 250kts, 5 deg will give me around 1000fpm at climb thrust ,etc. I initially pitch to the memorized pitch angle and then adjust as necessary.

Short answer:

Build a table of pitch vs speed vs climb rates with climb thrust, and a table of pitch vs speed vs descent rates at idle thrust. Assume linear dependency between pitch and rate. Adjust PID from there. Voila'!

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .