Trim, Linearization, and Control Design for an Aircraft - MATLAB & Simulink
Video Player is loading.
Current Time 0:00
Duration 5:50
Loaded: 2.83%
Stream Type LIVE
Remaining Time 5:50
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    Video length is 5:50

    Trim, Linearization, and Control Design for an Aircraft

    Linearize and design a controller for an aircraft model in Simulink. The Model Linearizer makes it easy to trim and linearize around operating points. Once the aircraft has been linearized, the Control System Designer makes it convenient to design a Controller for a Single Input Single Output system using both graphical and automated tuning methods. The controller can then be exported back to Simulink, allowing for confirmation of design through simulation.

    Published: 24 Mar 2023

    In this video, you will learn how to trim, linearize, design, and implement a pitch rate controller for an airframe model in Simulink. The model that we employ here is a model of the de Havilland Beaver airframe with elevator, aileron, rudder, and constant throttle inputs and angles, angular rates, and position outputs.

    When we run the model and look at the simulation results, we can see that the system is not in steady state. The plane is turning as well as descending. So the first thing that we want to do is trim the model. To do that, we go into the Apps tab and from the dropdown, select the Model Linearizer from the Simulink Control Design toolbox. With this app, we can trim the model. It is important to note that if you would only like to trim the model, another option is the steady state manager. However, we will leave that to another video.

    First, we specify the trim conditions. In this example, we want our plane to be flying level and straight. So we want our angles, angular rates, and velocities of the airframe, and the body coordinate frame to be in steady state. We will allow the exposition to vary, but both y and z should be in steady state. An altitude z should be trimmed at a known value.

    Now, let's go ahead and trim the model with these specifications. A new operating point optrim1 is created and added to the workspace. When we open this variable, we can see the desired state derivatives, which are all zeros for the states that we want it to be in steady state. You also can see that for those states, the actual derivatives are very small. So, indeed, we have calculated a good trim point.

    To further convince ourselves, let's use this operating point to initialize our model. When we run the simulation with the new initial conditions, we can see that our plane state is only changing longitudinally. Y and h are flat while x is changing at a constant rate. Roll, pitch, and yaw, as well as their angular rates are flat, and the angle of attack and side slip angles are flat. So we can indeed use this trim point to linearize the model.

    To do that, let's go back to the model linearizer and linearize the model around this operating point. We must first specify the input output signals for linearization. We already have some linearization inputs and outputs specified in the model, but here we will select a subset. We'll only use elevator as an input and q pitch rate as an output. We do that because we want to design a pitch rate controller. Or in other words, we want to use the measured pitch rate to command the elevator to the desired deflection angle.

    Now, let's go ahead and linearize our model and compute the Bode plot. Here it is. The linear system has been calculated and placed in this variable linsys1. We can now take this variable and copy it to our MATLAB workspace, and from there, we can begin our control design. Here, we can look at linsys1 as a transfer function. This is a relatively complex transfer function with many poles and zeros.

    In order to simplify our representation of the system for easier controller design and implementation, we can use the minreal command from the control system toolbox to find and cancel pull zero pairs. Finally, we can use the Control System Designer app to design a controller. The Control System Designer is useful for designing controllers for single input, single output systems such as ours.

    This can be done through graphical or automated tuning methods like root locus, Bode plot, and PID tuning. The app opens with the Bode editor, root locus editor, and a step response plot. For now, we will just keep the Bode editor for editing the controller. Currently, the response of our controller has quite a bit of steady state tracking error and lots of oscillations.

    To eliminate the steady state tracking error, we can add an integrator. Now, we reduce the gain a little bit to make the system stable, but some oscillations are still present. There is a resonant peak which can cause controller instability at this frequency, so we can employ a notch filter to cancel it out. Now, we see we must increase the gain in order to make the system response faster.

    The Control System Designer app allows us to see formal performance characteristics for controllers. The Bode plot shows us phase and gain margin while the step response plot shows characteristics like rise and settling times. We now have a nice, stable step response with zero steady state error. Here, you can see that we have a nonminimal phase behavior which is common for aerospace systems.

    If we like this design, we can export it to the MATLAB workspace, where it is now available for further analysis and implementation in Simulink. Now, we would like to implement and test our controller design in Simulink.

    First, we create two linear time invariant blocks, one for the linear representation of our plant, linsys1, and another for the controller, C. Next, we use a sun block to create a feedback loop, then we add our command. In this case, a step function. And finally, we add a scope to see if we've constructed our loop properly.

    When we run the simulation, we see the same results from our design, so we know our implementation is correct. If you would like to try this on your own, navigate to the related resources tab below and download the necessary files.

    View more related videos