Sei sulla pagina 1di 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

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

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.

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

Mh
Mc
Ma
Mb

Mh
Mc
Ma
Mb

La

La

Lb

Lb

Je
De
Ke
Ft

Je
De
Ke
Ft

Description
Mass of Heli Body
Mass of CW
Mass of Heli arm
Mass of CW arm
Distance from Pivot to
Helicopter body centre
Distance from Pivot to
counterweight centre
Polar Moment of Inertia
Viscous Damping
Spring Constant
Lift Force @ SLF

Unit
[kg]
[kg]
[kg]
[kg]

Heli 4
1.651
1.918
0.281
0.272

[in]

26.25

25.75

[in]

18.125

20.125

[kg-m2]
[N-m-s/rad]
[N-m/rad]
[N]

Heli 1
1.442
1.914
0.217
0.255

Value
Heli 2
Heli 3
1.422
1.665
1.916
1.919
0.218
0.239
0.254
0.271

TBD

1.383

TBD

TBD
TBD
TBD
1.177
1.756

TBD

1.825

Table 2: 3-DOF Other Parameters and Limits

Symbol

MATLAB

Description

Unit

Value
Heli 2
Heli 3

Heli 1
Kf

Motor-Prop Force
Kf
Constant
Elevation Range
g
Gravity constant
KE_CNT Encoder Resolution
KE_RAD Encoder Resolution
K_CABLE Amplifier Gain

[N/V]

0.140

[deg]
[m/s2]
[counts/rev]
[rad/count]
[V/V]

[~-26 to ~30]
9.81
-4096
1.5340E-2
3

Heli 4

Part A: Testing the Controllers


STEP
1
2

DESCRIPTION/TASK
Download the files for Lab 5 from Blackboard and put them in a Lab5 folder on your desktop.
Start MATLAB 2012b and change the working directory to Lab5.
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.
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. Dont forget to change the gain values.

Figure 1 Simulink model for controller testing

Build the Simulink model.


5

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.
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
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.

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.
2

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.
Re-build the Simulink model.

4
5

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.
Repeat Steps 1 to 3 for G#_elev2 and G#_elev3 but only for appropriate gain values.
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
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.
%
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).
7

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.

Potrebbero piacerti anche