8
AER 715 AVIONICS AND SYSTEMS Laboratory 5 Flight Control – Control System Testing and Analysis Fall 2014 Rev. 1.0 Prepared by: P. Cresnik Reviewed by: G. Liu

AER715 - Lab5 - Rev 1.0

Embed Size (px)

DESCRIPTION

dfgfdgdfg

Citation preview

Page 1: AER715 - Lab5 - Rev 1.0

AER 715 AVIONICS AND SYSTEMS

Laboratory 5

Flight Control – Control System Testing and Analysis

Fall 2014

Rev. 1.0

Prepared by: P. Cresnik Reviewed by: G. Liu

Page 2: AER715 - Lab5 - Rev 1.0

2

Table of Contents

Instructions _________________________________________________________________________ 3

Laboratory 5: Flight Control – Control System Testing _______________________________________ 4

Introduction ______________________________________________________________________ 4

Purpose __________________________________________________________________________ 4

Apparatus ________________________________________________________________________ 4

Weights and Measures ______________________________________________________________ 4

Part A: Testing the Controllers __________________________________________________________ 5

Part B: Testing Your Controllers _________________________________________________________ 6

Part C: Post Lab ______________________________________________________________________ 7

Page 3: AER715 - Lab5 - Rev 1.0

3

Instructions

SAFETY FIRST – DO NOT PUT YOUR FINGERS OR ANY LOOSE ITEMS IN THE SERVOMOTOR GEARS.

This lab is to be done in groups of two (2) or three (3) maximum.

Download the lab manual, worksheet, and files from Blackboard and save them on the Desktop

in a folder called LAB5.

Read the instructions in the laboratory manual carefully and follow the specified procedures.

Answer all questions in the provided worksheet.

At the end of the lab, submit one lab worksheet along with the standard Ryerson Aerospace

Assignment/Laboratory Cover Sheet. Each student must attend the laboratory and sign the

Cover Sheet in order to receive a mark.

Page 4: AER715 - Lab5 - Rev 1.0

4

Laboratory 5: Flight Control – Control System Testing and Analysis

Introduction In Lab 3 we developed a mathematical model for the elevation dynamics of the 3DOF Helicopter using

analytical and experimental techniques. In Lab 4, we developed a control system using the root locus

technique to achieve a desired level of performance for the helicopter. In this lab we take those

designed controllers and test their performance on the real helicopter. You will also compare the

performance of your controllers with a stock controller.

Purpose

The objective of this lab is to test your designed controllers on the real helicopter system and evaluate their performance against themselves and a stock controller.

Apparatus

To complete this lab, the following is required:

Quanser 3-DOF Helicopter.

Quanser UPM-2405 or VoltPAQ-X2 Power Module.

Quanser Q4 data acquisition and control board.

PC equipped with the necessary software.

Weights and Measures

Table 1: 3-DOF Weights and Measures

Symbol MATLAB Description Unit Value

Heli 1 Heli 2 Heli 3 Heli 4

Mh Mh Mass of Heli Body [kg] 1.442 1.422 1.665 1.651

Mc Mc Mass of CW [kg] 1.914 1.916 1.919 1.918

Ma Ma Mass of Heli arm [kg] 0.217 0.218 0.239 0.281

Mb Mb Mass of CW arm [kg] 0.255 0.254 0.271 0.272

La La Distance from Pivot to Helicopter body centre

[in] 26.25 25.75

Lb Lb Distance from Pivot to counterweight centre

[in] 18.125 20.125

Je Je Polar Moment of Inertia [kg-m2] TBD TBD TBD TBD

De De Viscous Damping [N-m-s/rad] TBD

Ke Ke Spring Constant [N-m/rad] TBD

Ft Ft Lift Force @ SLF [N] 1.383 1.177 1.756 1.825

Page 5: AER715 - Lab5 - Rev 1.0

5

Table 2: 3-DOF Other Parameters and Limits

Symbol MATLAB Description Unit Value

Heli 1 Heli 2 Heli 3 Heli 4

Kf Kf Motor-Prop Force Constant

[N/V] 0.140

ε Elevation Range [deg] [~-26 to ~30]

g g Gravity constant [m/s2] 9.81

KE_CNT Encoder Resolution [counts/rev] -4096

KE_RAD Encoder Resolution [rad/count] 1.5340E-2

K_CABLE Amplifier Gain [V/V] 3 5

Part A: Testing the Controllers STEP DESCRIPTION/TASK

1 Download the files for Lab 5 from Blackboard and put them in a Lab5 folder on your desktop.

2 Start “MATLAB 2012b” and change the working directory to Lab5.

3

In the first part of the lab, you will run the helicopter using the stock controller that you will use to

compare against your own developed controllers.

Open the “Heli_Setup.m” file and change the value of the heli to your specific helicopter.

Also change the values of the PID gains provided to you by the TA for the stock controller.

The stock controller gains have been tuned for the specific helicopter, though they may not

be optimal.

4

Next, open up the file “Heli_Controller_Testing.slx” as shown in Figure 1 below and then

change the HIL board for your specific helicopter. Don’t forget to change the gain values.

Figure 1 Simulink model for controller testing

5 Build the Simulink model.

Page 6: AER715 - Lab5 - Rev 1.0

6

6

IMPORTANT: Press-down the E-STOP to de-activate the amplifiers. The helicopter will fly up to the prescribed elevation and settle at SLF. After 25 seconds the helicopter will begin its landing procedure and after 49 seconds the program will stop. Pull-up or turn the E-STOP clockwise to activate the amplifiers. Go to QUARC >> Start to begin the experiment. When the test is complete, depress the E-Stop to turn off the amplifiers.

7 The data will be stored in the variables stockData and stockVolts in the Workspace. The variable stockVolts contains the controller voltage values for the controller gains (Kp, Ki, Kd) and Vsum. Save the data to a MATLAB file.

Part B: Testing Your Controllers In this section you will test each of the controllers that you developed in the last lab.

STEP DESCRIPTION/TASK

1

Change the data storage variables in the Data Recording block as shown in Figure 2. Change stockData to elevData1 and stockVolts to elevVolts1.

Figure 2 Variables in the Data Storage block.

Page 7: AER715 - Lab5 - Rev 1.0

7

2

Compare the values of the gains you developed with those provided by the TA. Discuss with your partner, whether or not your gains make sense. Before running the helicopter with your gain values, confirm with the TA. Re-open the “Heli_Setup.m” file and change the values of the PID gains to those you developed for G#_elev1. NOTE: Vsum is limited to 25 Volts on helicopters 1 and 2 and 30 Volts on helicopters 3 and 4. If your controller Vsum value is larger, it will be clipped by the software for safety.

3

Re-build the Simulink model. Deactivate the E-Stop and keep your hand on the E-Stop in case the helicopter reacts erratically. Go to QUARC >> Start to begin the experiment.

4 Repeat Steps 1 to 3 for G#_elev2 and G#_elev3 but only for appropriate gain values.

5 Save all the variable data to MATLAB files and e-mail them or save them to a USB key for post processing.

Part C: Post Lab STEP DESCRIPTION/TASK

1

In a new script, type the following:

%---------------------------------------------

% AER 715 Introduction to Avionics and Systems

% Lab 5 – “Lab Title”

% Your Full Name(s) & SID(s)

%---------------------------------------------

%

%% Introduction

% Type your introduction in this section

%

%% Post Lab Exercises –

% Put your exercises in this section

%

%% Conclusion

% Write your lab conclusion for the WHOLE lab in this

% section.

%

2

Create a new section called Question 1 using the %% command. Create a plot of the four elevation data tests. Use only the first 20 seconds of data. Also display the controller gain values in the script for each case.

Compare and discuss in order of performance (i.e. best to worst).

Page 8: AER715 - Lab5 - Rev 1.0

8

3

Create a new section called Question 2 using the %% command. For each of the four tests you ran in the lab, create a plot of the voltages produced by each individual gain and the sum of the voltage gains. Relate the output of the controller gains to the performance of the helicopter. Compare and discuss.