Main Content

Tuning of Airframe Autopilot Gains

This example shows how to apply Simulink® Design Optimization™ to optimize the autopilot gains of an airframe to control its fin deflection. The model uses blocks from Aerospace Blockset™.

The autopilot controller consists of an inner pitch loop and outer vertical acceleration loop. Both controllers are integral only controllers. The gains of both the controllers are tuned to satisfy a 2 second rise-time step response characteristic.

Open the nlairframe_demo model using the command below and run the simulation. The simulation produces an unoptimized vertical acceleration of the airframe and the initial data for optimization.

open_system('nlairframe_demo')

Double-click the az Response Scope block to view the unoptimized vertical acceleration az of the airframe.

Double-click the q Response Scope block to view the unoptimized rotation rate q of the airframe.

Double-click the Model block to view the details of the subsystem. It includes an Atmosphere model and Aerodynamics and Equations of Motion model.

Double-click the Desired az Response block to view constraints on the vertical acceleration of the airframe. These constraints are used to simultaneously tune the gains of the two integral controllers. The first segment of the upper bound constraint represents an overshoot. Note that this is a soft constraint and can be violated.

You can launch the Response Optimizer using the Apps menu in the Simulink toolstrip, or the sdotool command in MATLAB®. You can launch a pre-configured optimization task in Response Optimizer by first opening the model and by double-clicking on the orange block at the bottom of the model. From the Response Optimizer, press the Plot Model Response button to simulate the model and show how well the initial design satisfies the design requirements.

We start the optimization by pressing the Optimize button from the Response Optimizer. The plots are updated to indicate that the design requirements are now satisfied.

The darker curve shows the final optimized response of the airframe.

% Close the model.
bdclose('nlairframe_demo')