The controls system is the algorithm that utilizes a variety of sensors to autonomously navigate and control the airplane without any pilot assistance. An overview of the final controls system implemented on the StoRC aircraft is shown below.
The controls system consists of two components: the navigation algorithm (outer loop) and the steady flight algorithm (inner loop). The navigation algorithm compares the airplane's target coordinates to its current location. Based on this information, it determines the appropriate heading, turn rate, and bank angle that are necessary for the plane to reach its target. It then sends these desired parameters to the controls inner loop.
The inner loop attempts to achieve the desired airplane commands that it receives from the navigation outer loop. This algorithm utilizes proportional, integral, and derivative (PID) control to minimize the difference between the desired and the actual values.
Rudder PID control is used to achieve the desired turn rate (since our airplane does not have ailerons to directly control roll). Airplane turn rate is directly proportional to its bank (roll) angle. Therefore, for a given target turn rate, the rudder must deflect appropriately in order to make the plane roll and thus turn. Similarly, throttle PID control is used to achieve a desired climb rate.
Navigation Algorithm
Rudder PID Control
A Simulink controls model was created and developed in conjunction with the MATLAB dynamics model. In the early stages of the project, the controls model was used to determine qualitative effects of control algorithms. However, once the dynamics model was adjusted to very closely simulate real life airplane behavior, as discussed in the Flight Dynamics section, it was used to quantitatively analyze control algorithms and to determine the nominal controls gain values to be used on the aircraft.
On the right is a demonstration of the Simulink controls model. We have given it a set of target coordinates. The controls model runs and continuously adjusts the airplane from its starting trajectory so that it reaches its intended target. Once it reaches the target, it circles around it.