Physical setup and system equations
Transfer function and state-space
MATLAB representation and open-loop response
Closed-loop transfer function
The equations governing the motion of an aircraft are a very complicated set of six non-linear coupled differential equations. However, under certain assumptions, they can be decoupled and linearized into the longitudinal and lateral equations. Pitch control is a longitudinal problem, and in this example, we will design an autopilot that controls the pitch of an aircraft.
The basic coordinate axes and forces acting on an aircraft are shown in the figure below:
Assume that the aircraft is in steady-cruise at constant altitude and velocity; thus, the thrust and drag cancel out and the lift and weight balance out each other. Also, assume that change in pitch angle does not change the speed of an aircraft under any circumstance (unrealistic but simplifies the problem a bit). Under these assumptions, the longitudinal equations of motion of an aircraft can be written as:
Please refer to any aircraft-related textbooks for the explanation of how to derive these equations. Also, click Variables to see what each variable represents.
For this system, the input will be the elevator deflection angle, and the output will be the pitch angle.
The next step is to set some design criteria. We want to design a feedback controller so that the output has an overshoot of less than 10%, rise time of less than 2 seconds, settling time of less than 10 seconds, and steady-state error of less than 2%. For example, if the input is 0.2 rad (11 degrees), then the pitch angle will not exceed 0.22 rad, reaches 0.2 rad within 2 seconds, settles to 2% of the steady-state within 10 seconds, and stays within 0.196 to 0.204 rad at the steady-state.
Before finding transfer function and the state-space model, let's plug in some numerical values to simplify the modeling equations (1) shown above.
These values are taken from the data from one of Boeing's commercial aircraft.
To find the transfer function of the above system, we need to take the Laplace transform of the above modeling equations (2). Recall from your control textbook, when finding a transfer function, zero initial conditions must be assumed. The Laplace transform of the above equations are shown below.
After few steps of algebra, you should obtain the following transfer function.
Knowing the fact that the modeling equations (2) are already in the state-variable form, we can rewrite them into the state-space model.
Since our output is the pitch angle, the output equation is:
Now, we are ready to observe the system characteristics using MATLAB. First, let's obtain an open-loop system to a step input and determine which system characteristics need improvement. Let the input (delta e) be 0.2 rad (11 degrees). Create an new m-file and enter the following commands.
de=0.2; num=[1.151 0.1774]; den=[1 0.739 0.921 0]; pitch=tf(num,den); step(de*pitch) axis([0 15 0 0.8])Running this m-file in the MATLAB command window should give you the following plot.
From the plot, we see that the open-loop response does not satisfy the design criteria at all. In fact the open-loop response is unstable.
If you noticed, the above m-file uses the numerical values from the transfer function. To use the state-space model, enter the following commands into a new m-file (instead of the one shown above) and run it in the command window.
de=0.2; A=[-0.313 56.7 0; -0.0139 -0.426 0; 0 56.7 0]; B=[0.232; 0.0203; 0]; C=[0 0 1]; D=; pitch=ss(A,B,C,D); step(de*pitch) axis([0 15 0 0.8])You should get the same response as the one shown above.
Note: It is possible to convert from the state-space to transfer function, or vice versa using MATLAB. To learn more about conversions, see Conversions
To solve this problem, a feedback controller will be added to improve the system performance. The figure shown below is the block diagram of a typical unity feedback system.
A controller needs to be designed so that the step response satisfies all design requirements. Several different methods to design a controller are listed at the bottom of this page.