An aircraft controller incorporates several control loops to manage the speed, altitude, and navigation of an airplane. The aircraft pitch control is a vital inner loop for stability augmentation and holds autopilot controllers for the longitudinal dynamics. In this tutorial, we will show how to design a PID tuner for the aircraft pitch control loop
The aircraft pitch system variables are defined in Figure 1. The pitch angle \(\theta\) is the angle between the horizon direction and the x-axis of the aircraft's body. The angle of attack \(\alpha\) is the angle between the aircraft's longitudinal axis and the wind direction \(v\). The pitch angle is manipulated through the deflection in the elevator \(\delta_e\).
Through system identification, we can get the following numerical differential equations for aircraft pitch dynamics:
We can convert the above differential equations into a state-space form:
Before defining the state space model into Collimator, we will add some useful libraries:
The state-space matrices are defined in the Collimator notebook as follows.
A look at the poles and zeros of the aircraft pitch system gives us the following results.
We can see that the system has an integrator. This will make the system marginally stable, though it can get unstable for some bounded signals. The system also has a zero which will make the time-domain characteristics laws unreliable for design considerations.
Now, we will take a look at the open-loop and closed-loop step responses for the pitch control system. For the closed-loop system, we will apply a proportional controller with \(k_p=1\) for comparative reasons.
We can see that the open-loop step response is growing in an unbounded direction. This is due to the shortcomings of the integrator dynamics as we explained earlier, and the closed-loop step response though stable is unsatisfying:
Due to the integrator dynamics, the system exhibits no steady-state error, but it’s very slow in terms of rise time and settling time. In order to ensure satisfactory standards are met, The flight quality performance measures must meet the following design requirements:
A PID controller is added in the loop as depicted in Figure 2.
In the next cell, we will create an interactive PID tuner so that we can see how the step responses change as we update the controller gain. We will start designing the controller by evaluating some empirical PID gains. For this purpose, we will use ipywidgets library within our Collimator notebook. First, we will define a function that computes the step response and time-domain characteristics for the output step response.
We now define the interactive variables for the tuning function. We will assume a range of \(\left[0,10\right]\) for the PID gains.
We can increase the \(P\) gain until we introduce some oscillation to increase the system speed. Then, we will increase the integrator gain to make the controller more aggressive. Finally, we will introduced the derivate gain to maintain system speed while damping the aggressive oscillation.
Now, we can see that the PID gains meet the design requirements.