PID controller-VTOL-throttle Integration for the Control of Force in Satisfying Autopilot-governed Altitudes in Phyics-based Simulations

In my prior post I mentioned the elegant nature of PID controllers as a means for implementing autopilots, in these posts I’ll be specifically talking about altitude autopilots.

I’ve made a few changes since my last post:

  1. the output of the PID is no longer tightly-coupled to the force equation
  2. new components such as Throttle and Thruster introduce an abstraction layer into the System. The Throttle naturally sits in-between the PID and Thruster
  3. the output from the PID is now clamped and normalised
  4. the normalised PID output is connected to the Throttle (also normalised) thus ensuring that the PID is only responsible for determining the amount of throttle
  5. while the Throttle instructs the Thruster the percentage to apply it is the role of the Thruster, given its knowledge of internal max thrust specifications, to both calculate and apply the force in Newtons to satisfy the autopilot

With this in place, the correct size (roughly), mass, max thrust can now be applied to the simulation.

In this video the altitude autopilot has been instructed to fly the visually-crude jet (modelled roughly after the Sea Harrier FA2) to a cautionary altitude of 50 m (164 ft). It does so via a PID which determines how much error exists between the PV (process variable or “current altitude”) and the SP (setpoint or in this case the “desired altitude”).

Low altitude test. Since the error is low, the System takes an anti-aggressive approach to reach the target.

The clamped and normalised error output is connected to a throttle which in turn controls the jet’s VTOL engines by applying the value against the thrust range of the engine, in this case 97 kN, more than enough to lift the model with a mass of 8,000 kg being simulated here.

Near the end of the video you can see a 80.9% throttle being applied; this generates 78,470 N which is exactly the amount to counter gravity for this model.

Note: though drag is being simulated airfoil surfaces and lift are not

In this video the altitude autopilot has been instructed to fly the jet to an altitude of 100 m (300 ft). The slight overshoot at the start is mostly likely due to an over-eager integral term – something I’ll fix one day.

Due to a much higher error, the System exhibits a more aggressive approach with the throttle and reaches the target quite well

One thought on “PID controller-VTOL-throttle Integration for the Control of Force in Satisfying Autopilot-governed Altitudes in Phyics-based Simulations

  1. Pingback: Flight Sim Project Update | MickyD's Random Thoughts

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.