AE4610
  • Welcome
  • Experiments
  • Lab 0: MATLAB & SIMULINK
  • Lab 1: Rotary Servo Base
    • A. Integration (Week 1)
    • B. Modeling (Week 1)
    • C. Control Design (Week 2)
    • D. Controller Implementation & Evaluation (Week 3)
  • Lab 2: 3 DOF Gyroscope
    • A & B. Modeling and Control Design (Week 1)
    • C. Controller Implementation (Week 2)
  • Lab 3: Rotary Flexible Link
    • A. System Identification (Week 1)
    • B & C. Control Design and Controller Implementation (Week 2)
  • Lab 4: Rotary Inverted Pendulum
    • A & B. Modeling and Balance Control
    • C. Swing-up Control (Demo)
  • Final Project
  • Archive
    • Old Lab 1 Model Validation
    • Problem Set
    • DC Motor
    • Lab 1: Rotary Servo Base (Older Version)
      • A. Integration (Week 1)
      • B. Modelling (Week 1)
      • C. Position Control (Week 2)
    • Quadcopter
    • Gyroscope
    • Inverted Pendulum
    • 3DOF Helicopter
    • Torsional Pendulum
    • Aero LQR
      • A. System Identification
      • A. System Identification (Week 1) last check
      • B. Control Design & Implementation (Week 2)
    • Rotary Gyro
      • Rotary Gyro
    • 2 DOF AERO
      • A. System Identification
      • B. Control Design
      • C. Controller Implementation
    • Copy of Lab 4: Rotary Inverted Pendulum
      • Week 1
      • Week 2
Powered by GitBook
On this page
  • Background
  • Experiments
  • 1. Pitch Controller (1DOF)
  • 2. Yaw Controller (1DOF)
  • 3. Pitch and Yaw Controllers without Feedforward Control (2DOF)
  • 4. Pitch and Yaw Controllers with Feedforward Control (2DOF)
  • Results for Report
  • (A) Decoupled Pitch Controller
  • (B) Decoupled Yaw Controller
  • (C) Combined Pitch and Yaw Controllers without Feedforward Control
  • (D) Combined Pitch and Yaw Controllers with Feedforward Control
  • Questions for Report

Was this helpful?

Export as PDF
  1. Archive
  2. 2 DOF AERO

C. Controller Implementation

PreviousB. Control DesignNextCopy of Lab 4: Rotary Inverted Pendulum

Last updated 1 year ago

Was this helpful?

Background

In this section, the controller design from section B is implemented on the physical Quanser Aero hardware. We desire to reproduce the simulation results from the controller design section. The performance specifications are identical. Download Part C Aero.zip file and unzip to your folder containing the Control Design setup MATLAB script.

Experiments

1. Pitch Controller (1DOF)

  1. Unlock pitch axis and lock yaw axis.

  2. Open q_aero_2dof_PID.slx.

  3. Set pitch controller PID gains to the values obtained in Step 7 of the section under in . If variables are in the workspace, you may directly put gain values into the variables.

  4. Set yaw controller PD gains and feedforward controller gains to 0.

  5. Apply a pitch-only command ( θd=10°\theta_d = 10 \degreeθd​=10°, ψd=0°\psi_d = 0 \degreeψd​=0°).

  6. Run SIMULINK: To build the model, click down arrow on Monitor & Tune under Hardware tab and then Build for monitoring . This generates the controller code. Click Connect button under Monitor & Tune and then click Start .

  7. GET DATA OUT!!! and save it as pitch_only.mat.

2. Yaw Controller (1DOF)

  1. Unlock yaw axis and lock pitch axis.

  2. Set pitch controller PID gains and feedforward controller gains to 0.

  3. Apply a pitch-only command ( θd=0°\theta_d = 0 \degreeθd​=0°, ψd=30°\psi_d = 30 \degreeψd​=30°).

  4. Run SIMULINK.

  5. GET DATA OUT!!! and save it as yaw_only.mat.

3. Pitch and Yaw Controllers without Feedforward Control (2DOF)

  1. Unlock both pitch and yaw axes to enable the full 2 DOF motion.

  2. Implement the PID and PID gains in pitch and yaw controllers respectively. Set feedforward gains to zero.

  3. Apply simultaneous pitch and yaw commands ( θd=10°\theta_d = 10 \degreeθd​=10°, ψd=30°\psi_d = 30 \degreeψd​=30°).

  4. Run SIMULINK.

  5. GET DATA OUT!!! and save it as pitch_yaw.mat.

4. Pitch and Yaw Controllers with Feedforward Control (2DOF)

  1. Repeat the pitch+yaw experiment with simultaneous pitch and yaw commands ( θd=10°\theta_d = 10 \degreeθd​=10°, ψd=30°\psi_d = 30 \degreeψd​=30°).

  2. Save data as ff_pitch_yaw.mat.

  3. Close SIMULINK. DO NOT SAVE THE CHANGES!

For all the experiments, the data is saved in the following order:

  1. Time (s)

  2. Voltage input to pitch rotor motor VpV_pVp​ or VθV_\thetaVθ​ (V)

  3. Voltage input to yaw rotor motor VyV_yVy​ or VψV_\psiVψ​ (V)

  4. Pitch command angle θc\theta_cθc​ (deg)

  5. Yaw command angle ψc\psi_cψc​ (deg)

  6. Pitch angle response θ\thetaθ (deg)

  7. Yaw angle response ψ\psiψ (deg)

  8. Pitch speed θ˙\dot{\theta}θ˙ (rad/s)

  9. Yaw speed ψ˙\dot{\psi}ψ˙​ (rad/s)

Results for Report

(A) Decoupled Pitch Controller

    • Pitch command, pitch experimental response and pitch simulation response (one figure)

    • Voltage input to pitch rotor motor experiment and simulation results (one figure)

  1. Explain any differences between the experimental and simulation results.

(B) Decoupled Yaw Controller

    • Yaw command, yaw experimental response and yaw simulation response (one figure)

    • Voltage input to yaw rotor motor experiment and simulation results (one figure)

  1. Explain any differences between the experimental and simulation results.

(C) Combined Pitch and Yaw Controllers without Feedforward Control

    • Pitch command, pitch experimental response and pitch simulation response (one figure)

    • Yaw command, yaw experimental response and yaw simulation response (one figure)

    • Pitch rotor motor voltage experiment and simulation results (one figure)

    • Yaw rotor motor voltage experiment and simulation results (one figure)

  1. Explain any differences between the experimental and simulation results.

(D) Combined Pitch and Yaw Controllers with Feedforward Control

    • Pitch command, pitch experimental response and pitch simulation response (one figure)

    • Yaw command, yaw experimental response and yaw simulation response (one figure)

    • Pitch rotor motor voltage experiment and simulation results (one figure)

    • Yaw rotor motor voltage experiment and simulation results (one figure)

  1. Explain any differences between the experimental and simulation results.

Questions for Report

  1. How does introducing feedforward gains affect the response of system? (i.e. compare pitch and yaw response without feedforward control with the responses with feedforward).

  2. Did your controller successfully meet the specifications while running on the Quanser Aero hardware? If not, why?

Implement yaw PD controller using the gains tested in Step 3 of the section under in .

Set the feedforward gains to the values in Step 1 of the section under in .

Note: Some results require simulation response. This would require running a simulation using your SIMULINK model from using the parameter values determined in . The command input will be identical to the step input implemented during the experiment.

Plot and compare the experimental results obtained for the with the corresponding :

Plot and compare the experimental results obtained for the with the corresponding :

Plot and compare the experimental results obtained for the with the corresponding :

Plot and compare the experimental results obtained for the with the corresponding :

Part B: Controller Design
Part B: Controller Design
Part B: Controller Design
decoupled pitch-only case
decoupled yaw-only case
combined pitch and yaw case
combined pitch and yaw case (including feedforward control)
52KB
Part C Aero.zip
archive
Part A System Identification
Decoupled Dynamics with Decoupled Controller
Simulation Modeling and Evaluation
Decoupled Dynamics with Decoupled Controller
Simulation Modeling and Evaluation
Coupled Dynamics with Feedforward Controller
Simulation Modeling and Evaluation
Part B Control Design
decoupled dynamics with decoupled controller simulation results from Part B Control Design
decoupled dynamics with decoupled controller simulation results from Part B Control Design
coupled dynamics without feedforward controller simulation results from Part B Control Design
coupled dynamics with feedforward controller simulation results from Part B Control Design