Engineers Clinic
AdvancedEngineering trackFP-EC-09

Flight-controller tuning for a survey quadcopter in simulation

Model a quadcopter's roll axis, design the rate and attitude loops with stability margins, then tune PX4 in software-in-the-loop simulation with a heavier payload and wind, and hand over a parameter set with a first-flight safety checklist.

Core EngineeringDrone Technology
6 Guided Steps41h Internship TierSubmit: Python model and design scripts + SITL setup notes + log analysis plots + tuned parameter file with change log + tuning report + first-flight safety checklistVerified CertificateAI Rubric Graded
Program Overview

Industry project · for Skyline Survey, a drone mapping company whose 2.1 kg quadcopter started oscillating after a heavier payload was fitted

Skyline Survey flies a 450 mm X-frame quadcopter weighing 2.1 kg for mapping farms and building sites. The company has fitted a new 450 g sensor payload under the frame. Since then, the drone wobbles in roll at hover, overshoots on every turn and drifts about 2 m in gusty wind, which ruins the mapping overlap. The pilot has been lowering gains by trial and error in the field, and on one flight the drone nearly hit a mast.

The operations lead has banned field tuning. All tuning must now happen in simulation first, with written targets and logs. The targets are: - rate loop phase margin at least 45° and gain margin at least 6 dB in the linear model; - a 10° roll attitude step with no more than 10% overshoot and settling within 0.5 s, in simulation; - position hold within ±0.5 m in steady 8 m/s wind with gusts, in simulation; - no visible oscillation at hover with the payload fitted, and no motor output saturating during the test manoeuvres.

You will write the requirements and test plan, build a linear model of the roll axis from the drone's physical data, design the rate and attitude controllers with Bode and step analysis, set up PX4 software-in-the-loop simulation with a vehicle model changed to match the heavier drone, fly a scripted test sequence, analyse the logs, tune the loops in order, test in wind, and produce a parameter file and a report. You need a computer that can run Ubuntu or WSL2 with PX4 and Gazebo. No drone is needed, and none should be flown as part of this project.

Done looks like a model, plots and logs that show each target met, a parameter file with every change explained, and a first-flight checklist the pilot will follow before the new parameters ever touch the real drone.

Control system designSystem modellingPID tuningFrequency-response analysisFlight log analysisSoftware-in-the-loop testing
What you submit

Python model and design scripts + SITL setup notes + log analysis plots + tuned parameter file with change log + tuning report + first-flight safety checklist

Stack: PX4 Autopilot SITL, Gazebo simulator, QGroundControl, Python (numpy, python-control, pyulog, matplotlib), PX4 Flight Review (optional)

How it is graded
  • Credible model20

    The roll-axis model uses inertia estimated from the mass distribution with the payload, motor time constant and filter delay, with every parameter stated and justified.

  • Sound controller design20

    Rate and attitude loops are designed in the model with Bode plots showing at least 45° phase margin and 6 dB gain margin, and the step response meets targets.

  • Disciplined SITL testing25

    A scripted test sequence is flown in SITL before and after tuning, logs are analysed with step metrics and tracking plots, and loops are tuned inner to outer.

  • Targets met under wind20

    Attitude step and position-hold targets are met in SITL with the payload and 8 m/s wind with gusts, and motor saturation is checked.

  • Safe handover15

    The parameter file lists every change with a reason, and the first-flight checklist covers pre-flight checks, a staged test plan and abort criteria.

Pass 60% · Merit 75% · Distinction 90%

Learning Outcomes
Build a linear model of a multirotor axis including motor lag and filter delay
design cascaded rate and attitude PID loops to stability margins
run PX4 SITL with a modified vehicle model
analyse ULog flight logs for step response, tracking and saturation
tune loops in the right order and verify under wind
Target Audience

Engineering Students

Diploma, B.Tech, B.E., BCA, MCA, or M.Tech students seeking practical experience.

Aspiring Developers

Developers who want to build proof-of-work capstone projects for tech resumes.

Job Seekers

Graduates looking for AI-evaluated code review & verified industry credentials.