The objective of this experiment is to design a position control system for the Quanser Aero system in the 2 DOF configuration. The angular position controller should meet the following specifications:
Steady-state error to a step command input: (a) = 0 deg (b) = 0 deg
Peak time of response to a step command input: (a) ≤ 2s (b) ≤ 2s
Percent Overshoot of response to a step command input: (a) ≤ 7.5% (b) ≤ 7.5%
No actuator saturation: (a) ≤ 24V (b) ≤ 24V
Download the setup aero file below and fill in the system parameters, control parameters and other necessary values to store in the MATLAB workspace. Use these variables in building Simulink so it is easier for you to put values. Make sure to check your values with TAs before running Simulink.
We will start our controller design by considering first the decoupled system. In this case, the Multiple-Input Multiple-Output (MIMO) system is represented as two separate Single-Input Single-Output (SISO) systems.
The pitch dynamics of the 2D Aero system is a Type 0 system, i.e., no pole at the origin. As such, we will select the PID controller structure for the pitch control design, which will meet the specification of zero steady-state error to a step command input. The yaw dynamics of the 2D Aero system is a Type 1 system, i.e., there is one pole at the origin. As such, we will select the PD controller structure for the yaw control design, which will meet the specification of zero steady-state error to a step command input.
Create a SIMULINK model of the system. (a) Create subsystem blocks representing the plant. Figure 2 shows separate pitch and yaw plants. Note: Plants account for coupling (see Figures 3(a) and 3(b)). (b) Create subsystem blocks representing the decoupled pitch and yaw controllers. Figure 2 shows the input/output structure of these blocks. (c) Using the completed subsystem blocks, finish the diagram of the closed-loop system. Make sure to include pitch and yaw inputs, saturation blocks, and appropriate outputs. Use scopes and To Workspace blocks so that reference, output, and response signals can be tracked. (Make sure to maintain consistency between deg and rad in SIMULINK) (d) Set the sampling time to Fixed-step of step-size 0.002s in Modeling -> Model Settings.
Include a screenshot of the complete SIMULINK model (block diagram). In addition, include the following subsystem block diagram screenshots:
Pitch and Yaw plants
Pitch and Yaw controllers
Mention the chosen design specifications values (Step 1 of Controller Design).
Mention the final yaw PD gains (Step 3).
Mention the final tuned pitch PID gains (Step 7).
Pitch-only command case: Plot the pitch and yaw data (commanded angles, simulation responses and motor input voltages) for pitch-only command (Step 2) and check if the design specifications were met in pitch.
Yaw-only command case: Plot the pitch and yaw data (commanded angles, simulation responses and motor input voltages) for yaw-only command (Step 3) and check if the design specifications were met in yaw.
Note: It is possible that specifications are not met due to coupling between pitch and yaw dynamics.
Mention the feedforward gain values.
Pitch-only command case: Plot the pitch and yaw data (commanded angles, simulation responses and motor input voltages) for pitch-only command (Step 2) and check if the design specifications were met in pitch.
Yaw-only command case: Plot the pitch and yaw data (commanded angles, simulation responses and motor input voltages) for yaw-only command (Step 3) and check if the design specifications were met in yaw.
How does accounting for the coupling affect the performance of the controller? (a) What happens when you neglect the coupling effect (in simulation)? (b) What is a physical explanation for the coupling effect?
Why a PID controller is used for the pitch and a PD controller for the yaw?
Estimate gain and phase margins of the closed loop systems individually with your pitch and yaw controllers. Hint: Use the margin
command in MATLAB. Gain and phase margins
Choose appropriate values for and in both pitch and yaw axes satisfying the design specifications.
For these selected values of and within the design specs, compute the desired values of damping ratio and natural frequency using the following equations:
Using the aforementioned desired values of and and the system parameters calculated in part A, compute the proportional gain and the derivative gain individually for pitch and yaw controllers as follows: Note: Let subscript represent open-loop (actual system parameters), and subscript represent closed-loop (desired parameters). Pitch: Yaw: Note: In the above calculations, use the normalized thrust gains obtained using the steady-state method.
Add an integral term, , to the pitch controller. Choose to be a value in the range of . Caution: Integral feedback, while improving steady-state response, introduces lag. Large values of integral gain, while reducing damping, can lead to loss of stability of the closed loop system.
Initially, set the feedforward gains ( and ) to 0, i.e., ff_py = 0
and ff_yp = 0
in the MATLAB code. Eventually, you will choose appropriate values for the feedforward gains such that the coupling effect is minimized.
For example, choose in Figure 1, to cancel the torque from the pitch rotor, i.e. ,
Likewise, choose to cancel the torque from the yaw rotor, i.e. ,
Feedforward controller minimizes the coupling effects. Use Figure 1 as a reference for how to add the two feedforward paths.
First consider simulation validation of your controller using decoupled dynamics and decoupled controller (i.e., no feedforward between pitch and yaw channels). 1. Set the values of in the pitch plant Simulink block and in the yaw plant Simulink block. This will remove the coupling effects between pitch and yaw dynamics. 2. Set the integral gain of the pitch controller . 3. Simulate the closed loop system response with yaw-only command: and . Save the data. 4. Check whether your controller meets the desired specifications for the yaw command. Since decoupled system dynamics are used in this step, you will likely see a close match between your simulation results and the desired specifications. 5. Set the integral gain of the pitch controller of (refer to Step 4 of Controller Design). 6. Simulate the closed loop system response with pitch-only command: and . Save the data. 7. Check if your pitch controller meets all the desired specifications. If it fails to meet the and specifications, relax the specifications and/or tune the pitch PID controller gains to try to meet the specifications. Save the tuned results.
Next, consider the simulation evaluation of the feedback controller for the system with coupled dynamics. 1. Set the values of in the pitch plant Simulink block and in the yaw plant Simulink block to the estimated values from Part A: System Identification. This accounts for the coupled dynamics. 2. Simulate the closed-loop response of the system with pitch-only command: and . Save the data. 3. Simulate the closed-loop response of the system with yaw-only command: and . Save the data. 4. Simulate the closed-loop response of the system with simultaneous pitch and yaw commands: and . Save the data.
Set the feedforward gains and based on Eqs. 1 and 2 (marked as ff_py
and ff_yp
in the MATLAB code). These gains are different from the normalized cross-thrust torque gains that you set to make the coupled dynamics.
Simulate the closed-loop response of the system with pitch-only command: and . Save the data.
Simulate the closed-loop response of the system with yaw-only command: and . Save the data.
Simulate the closed-loop response of the system with simultaneous pitch and yaw commands: and . Save the data.
Yaw-only command case: State if the design specifications were met, either including figures with design specs marked (Step 3) OR including a table with the , , and values recorded from the response (Step 4).
Pitch-only command case: State if the design specifications were met, either including figures with design specs marked (Step 7) OR including a table with the , , and values recorded from the response (Step 7).
Pitch and yaw combined case: State if the design specifications were met, either including figures with design specs marked (Step 4) OR including a table with the , , , , , , and values recorded from the responses (Step 4).
Pitch and yaw combined case: State if the design specifications were met, either including figures with design specs marked (Step 4) OR including a table with the , , , , , , and values recorded from the responses (Step 4).