Automated Pilot Control Automated Pilot Control Assistance for a Micro-Scale Assistance for a Micro-Scale HelicopterHelicopterParker Evans Parker Evans Jeffrey HudsonJeffrey HudsonCollin WeberCollin Weber
Cornell University Laboratory for Intelligent Machine Cornell University Laboratory for Intelligent Machine SystemsSystems
GoalsGoals
Initial Goal: Stabilized hoverInitial Goal: Stabilized hover– Altitude and yaw controlled autonomouslyAltitude and yaw controlled autonomously– Stable in pitch and roll axesStable in pitch and roll axes– Greatly simplifies operator control of vehicleGreatly simplifies operator control of vehicle– AchievedAchieved
Additional Goals: Advanced ManeuversAdditional Goals: Advanced Maneuvers– On-board wireless video relay (Achieved)On-board wireless video relay (Achieved)– Improved flight control (Achieved)Improved flight control (Achieved)
Altitude input by operator, held constantAltitude input by operator, held constant Movement in constant-altitude plane controlled by stickMovement in constant-altitude plane controlled by stick
Future Goals: Rangefinder-based obstacle Future Goals: Rangefinder-based obstacle avoidance and path redirectionavoidance and path redirection
PreviouslyPreviously
Integrated all sensors into codeIntegrated all sensors into code Implemented two separate PID loops Implemented two separate PID loops
for altitude and yaw.for altitude and yaw.– Used magnetometer, gyroscope and sonarUsed magnetometer, gyroscope and sonar
Board RevsBoard Revs
IssuesIssues– Timer conflict with input and output of Timer conflict with input and output of
PWM signalsPWM signals Helped give more stable signal for absoluter Helped give more stable signal for absoluter
control of altitude and yawcontrol of altitude and yaw
– Added battery level measurementAdded battery level measurement– Gyro solder joint was breakingGyro solder joint was breaking
Created two new boards that are fully Created two new boards that are fully populatedpopulated
Board Revs Cont.Board Revs Cont.
Fully Populated Board
Stencil and Unpopulated Board
Hot air rework station
Oven
Magnetometer Magnetometer CalibrationCalibration
Found that a multipoint calibration procedure was Found that a multipoint calibration procedure was necessary for magnetometer datanecessary for magnetometer data
Used PNI Application Note for calibrationUsed PNI Application Note for calibration Graphs show data with both before and after dataGraphs show data with both before and after data
New Piloting TechniquesNew Piloting Techniques
Developed Pilot Intuitive ControlsDeveloped Pilot Intuitive Controls Manual Altitude AdjustmentManual Altitude Adjustment
– Height, not throttle, is controlled by left stickHeight, not throttle, is controlled by left stick– Range of the stick is relative to height off the Range of the stick is relative to height off the
groundground Manual Heading AdjustmentManual Heading Adjustment
– Shifting the throttle stick left and right will yaw Shifting the throttle stick left and right will yaw the helicopter until the stick is re-centeredthe helicopter until the stick is re-centered
– New heading is maintained until pilot changes New heading is maintained until pilot changes the desired heading. the desired heading.
In Flight DataIn Flight Data
Gumstix integrated to record in flight Gumstix integrated to record in flight datadata
Future teams could use this to tune Future teams could use this to tune control systemcontrol system
Test capturing data taken during a Test capturing data taken during a disturbance in the systemdisturbance in the system
Altitude, gyro and motor values shown Altitude, gyro and motor values shown nextnext
Wireless Video CameraWireless Video Camera
Pro Series Wireless CameraPro Series Wireless Camera– Full Color – 250k PixelsFull Color – 250k Pixels– Transmits up to 300 feetTransmits up to 300 feet– Cost - $200Cost - $200– 18 x 34 x 17 mm18 x 34 x 17 mm
Uses battery power fromUses battery power fromhelicopterhelicopter 34
mm
ConclusionsConclusions
Proof of concept of assisted flightProof of concept of assisted flight– Independent control to stabilize altitude and Independent control to stabilize altitude and
yawyaw On-board video allows for real world applications On-board video allows for real world applications Won AIAA Student Conference Region I Paper Won AIAA Student Conference Region I Paper
CompetitionCompetition Future workFuture work
– Gumstix integration will allow for higher level Gumstix integration will allow for higher level mathematical operationsmathematical operations
– Additional sensor integration to be used in Additional sensor integration to be used in obstacle avoidanceobstacle avoidance
AcknowledgmentsAcknowledgments
Cornell University Department of Cornell University Department of Mechanical EngineeringMechanical Engineering– Professor Ephrahim GarciaProfessor Ephrahim Garcia– Professor Thomas AvedisianProfessor Thomas Avedisian– Professor Mark CampbellProfessor Mark Campbell– Rob MacCurdyRob MacCurdy
Cornell University Laboratory for Cornell University Laboratory for Intelligent Machine SystemsIntelligent Machine Systems
Funding provided by United Funding provided by United Technologies CorporationTechnologies Corporation
OverviewOverview
Project GoalsProject Goals System ConstraintsSystem Constraints Hardware SelectionHardware Selection Yaw Control Development and ImplementationYaw Control Development and Implementation Altitude Control SimulationAltitude Control Simulation Altitude Control ImplementationAltitude Control Implementation
Hardware: VehicleHardware: Vehicle
Blade CX HelicopterBlade CX Helicopter– Widely available, Widely available,
common hobby helicoptercommon hobby helicopter Permits fast, low-cost Permits fast, low-cost
replacement of componentsreplacement of components
– Counter-rotating bladesCounter-rotating blades Choice removes Choice removes
complexities added by tail complexities added by tail rotorrotor
– $200 price point$200 price point– Gross take-off weight: Gross take-off weight:
310 grams310 grams
Hardware: On-Board Hardware: On-Board ElectronicsElectronics Custom-built microcontroller boardCustom-built microcontroller board
– Designed in-house for this applicationDesigned in-house for this application– $200 cost (small run), 20 gram mass$200 cost (small run), 20 gram mass– Microcontroller: TI MSP430Microcontroller: TI MSP430
16 bits16 bits Low cost, low power, widely usedLow cost, low power, widely used
– Sensors: Magnetometer, accelerometers, sonar, Sensors: Magnetometer, accelerometers, sonar, gyroscopegyroscope
Additional electronics: 4-channel receiver, Additional electronics: 4-channel receiver, wireless video camera, Gumstix Linux computerwireless video camera, Gumstix Linux computer– Gumstix allows for future work: in-flight data capture Gumstix allows for future work: in-flight data capture
and high-level mathematics and high-level mathematics
Design ConstraintsDesign Constraints
Imposed by choice of platformImposed by choice of platform– 7.4V 800 mAh Lithium Polymer battery7.4V 800 mAh Lithium Polymer battery
Only sufficient for 3-4 minutes sustained flightOnly sufficient for 3-4 minutes sustained flight
– 90 gram payload capacity90 gram payload capacity– 1 foot rotor diameter1 foot rotor diameter
Low system cost essentialLow system cost essential– Required use of commercial, off-the-shelf Required use of commercial, off-the-shelf
componentscomponents– MEMS components key driver of low-cost sensor MEMS components key driver of low-cost sensor
packagepackage Inherent issues: sensor noise and unpredictabilityInherent issues: sensor noise and unpredictability
Control Loop Block Control Loop Block DiagramDiagram
U(s) = Command, E(s) = Error, N(s) = Sensor Noise, X(s) = U(s) = Command, E(s) = Error, N(s) = Sensor Noise, X(s) = Plant Output (ex. Height for Altitude Control)Plant Output (ex. Height for Altitude Control)
Diagram of one control loop (altitude or yaw)Diagram of one control loop (altitude or yaw) Single-input, single-output systemSingle-input, single-output system
Microcontroller CodeMicrocontroller Code
Control calculations are done in fixed-Control calculations are done in fixed-point to save timepoint to save time
Magnetometer heading determination Magnetometer heading determination algorithm uses binary search and a lookup algorithm uses binary search and a lookup table (rather than trig and floating point)table (rather than trig and floating point)
Mixing algorithm for motor control (takes Mixing algorithm for motor control (takes yaw and throttle, produces power for each yaw and throttle, produces power for each motor)motor)
Etc.Etc.
AccelerometerAccelerometer
Kionix KXR94-2353 Three AxisKionix KXR94-2353 Three Axis +/- 5g sensivity+/- 5g sensivity SPI interfaceSPI interface Low pass filtered to 40 HzLow pass filtered to 40 Hz
Sensors: MagnetometerSensors: Magnetometer
PNI Micromag3PNI Micromag3– Reads X, Y, and Z-axis magnetic field dataReads X, Y, and Z-axis magnetic field data
Allows for determination of orientation within a Allows for determination of orientation within a static magnetic field (i.e. that of the Earth)static magnetic field (i.e. that of the Earth)
– Found to be affected by environmentFound to be affected by environment Large ferrous metal objectsLarge ferrous metal objects Emitters of electromagnetic fieldsEmitters of electromagnetic fields
Length: 1.0”
Integrated Electronics - Integrated Electronics - OverviewOverview
Z Axis Gyro
Magnetometer
XY Axes Gyro
Accelerometer
Microcontroller
Length: 4.5”
Magnetometer Motor Magnetometer Motor TestTest
EMI TestEMI Test– Collected magnetometer data at fixed radial increments Collected magnetometer data at fixed radial increments
(45(45°)°)– Performed with and without helicopter motors runningPerformed with and without helicopter motors running– Proved that motor operation does not affect ability to Proved that motor operation does not affect ability to
sense change in heading with respect to fieldsense change in heading with respect to field
Sensors: Z–Axis Sensors: Z–Axis GyroscopeGyroscope
Analog Analog Devices ADIS Devices ADIS 1610016100
Automatic Automatic calibration at calibration at startupstartup
Low steady Low steady state drift state drift over observed over observed time scalestime scales
Gyro output (blue) and temperature (red) versus time (50 second test)
From Analog Devices ADIS16100 Datasheet
Sensors: Ultrasonic Sensors: Ultrasonic RangefindersRangefinders
GPS not an option for indoor useGPS not an option for indoor use Maxbotics LV-MaxSonar-EZ0Maxbotics LV-MaxSonar-EZ0
– Allows for ranging to obstacles, walls, and Allows for ranging to obstacles, walls, and groundground
– Operational range of 0.15 to 6.4 metersOperational range of 0.15 to 6.4 meters– Calibrates on startupCalibrates on startup– ““Dead zone”: returns value of 6” for objects Dead zone”: returns value of 6” for objects
<=6” away<=6” away
Length: 0.8”
Ultrasonic Rangefinder Ultrasonic Rangefinder TestingTesting
120 samples collected per 5-inch increment120 samples collected per 5-inch increment Confirmed linear response beyond dead zoneConfirmed linear response beyond dead zone Predictable, constant values inside of 6”Predictable, constant values inside of 6”
Pressure SensorPressure Sensor
VTI’s SCP1000VTI’s SCP1000 Resolution of 10 cmResolution of 10 cm Sampling at 1.8 HzSampling at 1.8 Hz
– Allows low frequency altitude Allows low frequency altitude signals, at high sensitivitysignals, at high sensitivity
– Digital output of absolute pressure Digital output of absolute pressure using temperature sensorusing temperature sensor
Servo Control and Servo Control and Operator Radio Operator Radio Command LinkCommand Link Castle Creations Berg 4L Castle Creations Berg 4L
ReceiverReceiver Helicopter comes with 72 MHz Helicopter comes with 72 MHz
transmitter and integrated transmitter and integrated receiver, gyro and motor control receiver, gyro and motor control unitunit
Recevier inputs PWM signals Recevier inputs PWM signals from servos and motors to the from servos and motors to the microcontrollermicrocontroller
Total weight = 4 gTotal weight = 4 g
Control System OverviewControl System Overview
Flight behavior broken down into Flight behavior broken down into componentscomponents– Altitude and yaw separately controlled Altitude and yaw separately controlled – PID Control implemented on each control PID Control implemented on each control
looploop– Classical controlClassical control
Easily implemented on microcontrollerEasily implemented on microcontroller Performs well in discrete-time operationPerforms well in discrete-time operation
Kp = Proportional Gain KI = Integral Gain KD = Derivative Gain
Yaw Control SystemYaw Control System
Based on data from magnetometer and Z-axis Based on data from magnetometer and Z-axis gyrogyro– Uses Proportional-Derivative-Integral (PID) ControlUses Proportional-Derivative-Integral (PID) Control– Magnetometer provides direct measurement of error Magnetometer provides direct measurement of error
signal (deviation from desired heading)signal (deviation from desired heading) Recalibrates and obtains initial heading upon startupRecalibrates and obtains initial heading upon startup
– Gyro measures rotation rate; derivative of error signalGyro measures rotation rate; derivative of error signal
Magnetometer Input
Actual Heading
Desired Heading
Error
Z-Axis Gyro Input
Z-axis
Rotation Rate
Yaw Implementation Yaw Implementation DetailsDetails Counter-rotating blades couple yaw and liftCounter-rotating blades couple yaw and lift
– Net thrust is sum of thrust from each bladeNet thrust is sum of thrust from each blade– Difference in blade speeds produces yaw Difference in blade speeds produces yaw
(unbalanced angular momentum)(unbalanced angular momentum)– Reduction in blade speed, however, also lowers total Reduction in blade speed, however, also lowers total
liftlift Decoupling of throttle and yaw controlDecoupling of throttle and yaw control
– Desired difference in blade speed distributed Desired difference in blade speed distributed between the two motorsbetween the two motors
– Result is no loss of lift during yawResult is no loss of lift during yaw– Allowed implementation of independent control Allowed implementation of independent control
loops for altitude and yawloops for altitude and yaw
Motor MixingMotor Mixing
Two port systemTwo port system Limitations at Limitations at
extreme valuesextreme values– Maximum thrust Maximum thrust
cannot be achieved cannot be achieved with a yawwith a yaw
– Must drop one Must drop one motors thrust to motors thrust to generate the full generate the full yawyaw
Altitude Control Altitude Control SimulationSimulation Discrete-time MATLAB modelDiscrete-time MATLAB model
– Single degree-of-freedom: vertical positionSingle degree-of-freedom: vertical position– Based on system time step length (40ms)Based on system time step length (40ms)– Simulated sonar input basis for modelSimulated sonar input basis for model
Discretized integer input values correspond to Discretized integer input values correspond to altitudealtitude
Change in value over time step produces Change in value over time step produces derivative of errorderivative of error
Sonar noise modeled with small random integerSonar noise modeled with small random integer
– Quadratic drag modelQuadratic drag model– System parameters (mass, max thrust, etc.) System parameters (mass, max thrust, etc.)
empirically determinedempirically determined
Altitude Simulation
Note simulated sonar noise inputNote simulated sonar noise input Tuning of model generated preliminary KTuning of model generated preliminary KPP, K, KII, K, KDD
valuesvalues
Implementation of Implementation of Altitude ControlAltitude Control
Gain values from model matched Gain values from model matched system values wellsystem values well
Take-off routine developed and Take-off routine developed and implementedimplemented– Slow throttle ramp to takeoff thrustSlow throttle ramp to takeoff thrust– Ramp of altitude input up to desired valueRamp of altitude input up to desired value
Minimizes overshoot and lessens settling timeMinimizes overshoot and lessens settling time Results in less erratic flightResults in less erratic flight
Altitude SimulationAltitude Simulation
Ramping command in simulationRamping command in simulation Less overshoot, slower dynamicsLess overshoot, slower dynamics
Sonar Rangefinder IssuesSonar Rangefinder Issues
Initial CalibrationInitial Calibration– Requires 14” clearance for startup calibrationRequires 14” clearance for startup calibration– Mandates startup from platformMandates startup from platform
Dead ZoneDead Zone– Take-off routine designed to require no input Take-off routine designed to require no input
at low altitudesat low altitudes Downwash errorsDownwash errors
– Pressure waves from blades affect readingsPressure waves from blades affect readings– Sonar moved to tail to correct thisSonar moved to tail to correct this
MicrocontrollerMicrocontroller
Texas Instrument’s MSP430F2618Texas Instrument’s MSP430F2618 Small, low power, flash based Small, low power, flash based
microcontrollersmicrocontrollers Multiple time modules for PWM I/O Multiple time modules for PWM I/O
outputoutput Together with board it sets sample Together with board it sets sample
rates, performs FIR filtering, receives rates, performs FIR filtering, receives R/C inputs and implements control R/C inputs and implements control loops.loops.
Microcontroller Microcontroller
MSP430 cannot handle matrix MSP430 cannot handle matrix conversions and Kalman filtering for conversions and Kalman filtering for future progress.future progress.
Board designed to mate with small Board designed to mate with small Linux based computer from GumstixLinux based computer from Gumstix– 8 gram board, 400 MHz processor, with 8 gram board, 400 MHz processor, with
128 MB RAM, 32 MB flash memory128 MB RAM, 32 MB flash memory– Communicate with RS232 link with the Communicate with RS232 link with the
Gumstix providing output for motors and Gumstix providing output for motors and servosservos