FINAL YEAR PROJECT PLAN
PID-Based Autopilot & Flight
Stabilization System
Design and Implementation of a Real-Time PID Controller for Disturbance Rejection and
Attitude Stabilization of an RC Aircraft
Department of Electrical / Electronics Engineering
Two-Semester Project Roadmap: Design & Bench Validation (Sem 1) → Field Testing & Final
Demonstration (Sem 2)
Item Details
Project Title Custom Autopilot & Flight Stabilization System (PID Controller)
Core Objective Design and implement a PID controller that stabilizes an RC aircraft's roll
& pitch when turbulence/disturbance is sensed
Duration 2 Semesters (Sem 1: Design & Bench Testing | Sem 2: Field Testing &
Final Demo)
Domain Focus Control Systems, Embedded Systems, Sensor Fusion, Aerospace
Stabilization
Team Size 4 members – Shravani Shinde, Nikhil Nigam, Sahil Gaikwad, Krishna
Waghchaure (fill in roles on next page)
Guide / Supervisor Dr. Mini N. Mam
1. Project Overview & Core Objective
As Electrical/Electronics Engineering students, our project's core engineering deliverable is the PID (Proportional–Integral–
Derivative) controller itself — the algorithm and its real-time implementation that keeps the aircraft level (roll = 0°, pitch =
0°) automatically whenever a disturbance (turbulence, gust, manual tilt) is sensed by the IMU.
The airframe, ESC/motor, and RC receiver are supporting hardware; the graded engineering contribution is: sensor fusion →
error computation → PID compensation → actuator (servo) response → measured stabilization performance.
1.1 Problem Statement
RC aircraft are inherently unstable in roll and pitch under external disturbances (wind gusts, turbulence, control surface
flutter). Manual correction is slow and pilot-dependent. This project designs a closed-loop PID control system that senses
angular deviation via an IMU and automatically drives the aileron and elevator servos to restore level flight, reducing pilot
workload and improving flight stability.
1.2 Semester Split (High-Level)
Semester Focus End Goal
Semester 1 Literature review, hardware setup, sensor fusion, PID A working, PID-tuned stabilization
design, bench-top (hand-held) stabilization validation system validated on the bench (no
flight risk)
Semester 2 Ground taxi tests, real flight testing, A flight-validated, quantitatively
disturbance/turbulence trials, data logging, final evaluated autopilot stabilization
tuning, report & demo system + final report/viva
2. Team Roles & Responsibilities
Even though the PID controller is the shared core deliverable, divide sub-systems so each member owns a measurable piece
of the control loop.
Role Owner Responsibility
Control Systems Lead Nikhil-sahil PID algorithm design, tuning strategy,
MATLAB/Simulink modeling, stability analysis
Embedded Firmware Lead Nikhil-Shravani ESP32/Arduino code, sensor drivers, PWM generation,
real-time loop timing
Sensor & Filtering Lead Nikhil-Krushna MPU6050 interfacing, complementary/Kalman filter,
calibration
Mechanical/Integration Lead Shravani-Krushna Airframe, servo/ESC mounting, wiring, vibration
isolation, safety
Testing & Documentation Lead Shravani-Sahil Test plans, data logging, report writing, presentation,
risk log
3. Hardware Checklist
☐ ESP32 Dev Board (main flight controller)
☐ MPU6050 IMU (accelerometer + gyroscope)
☐ 2x Micro/Standard Servos (aileron, elevator)
☐ Brushless (BLDC) motor + ESC + LiPo battery + charger
☐ RC transmitter + receiver (manual override / safety cut-off)
☐ RC airframe / wing platform (foam trainer recommended for Sem 1–2)
☐ Bench test rig / gimbal stand for hand-held & tilt testing
☐ BMP280 barometer (optional — future altitude hold)
☐ Data logging module / SD card or telemetry link (for Sem 2 flight data)
☐ Multimeter, oscilloscope (optional, for PWM/servo signal verification)
☐ Safety gear: propeller guard, fuse/BEC, spare props, first-aid kit for field testing
4. Semester 1 Plan — Design, Build & Bench Validation
Goal for Semester 1: prove the PID control loop works correctly and stabilizes the platform under manual/simulated
disturbance on the bench — before any real flight risk is introduced.
4.1 Phase-wise Breakdown
Phase 1 (Weeks 1–3): Literature Review & Planning
● Study PID control theory, aircraft roll/pitch dynamics, and existing open-source flight controllers (e.g., ArduPilot,
Betaflight) for reference architecture.
● Finalize hardware BOM and place orders.
● Define success metrics for Sem 1: settling time, overshoot %, steady-state error for a given disturbance angle.
● Deliverable: Project proposal document + literature survey chapter.
Phase 2 (Weeks 4–6): IMU Interfacing & Angle Estimation
● Interface MPU6050 with ESP32 over I2C; verify raw accelerometer/gyro readings.
● Implement and validate the complementary filter (98% gyro + 2% accel) for stable roll/pitch estimation.
● Bench-test: manually tilt the IMU board and confirm angle output matches physical tilt (using a
protractor/reference).
● Stretch goal: implement/compare a Kalman filter for improved noise rejection.
● Deliverable: Logged roll/pitch angle vs. known tilt angle accuracy plot.
Phase 3 (Weeks 7–9): Actuator & PWM Interfacing
● Interface aileron and elevator servos; verify correct PWM range (1000–2000 µs) and center trim.
● Confirm correction direction manually (e.g., right roll → left aileron up) before closing the loop — reverse servo
direction in code if needed.
● Interface ESC + BLDC motor on a fixed/idle throttle for now (propulsion is not the focus this semester).
● Deliverable: Servo response test log + wiring diagram.
Phase 4 (Weeks 10–13): PID Controller Design & Closed-Loop Bench Testing
● Implement PID equations for roll and pitch independently in firmware.
● Start with conservative gains (e.g., Kp=2.5, Ki=0.02, Kd=1.2) and iterate.
● Conduct systematic PID tuning: increase Kp until responsive, add Kd to damp oscillation, add small Ki to remove
steady-state offset.
● Simulate 'turbulence' on the bench by hand-tilting the airframe at varying speeds/angles and recording the correction
response.
● Log data (roll, pitch, PID output, servo command, timestamp) via Serial/SD card for every trial.
● Deliverable: Tuned PID gain set + step-response and disturbance-response plots + demo video of bench
stabilization.
Phase 5 (Weeks 14–16): Semester 1 Consolidation
● Integrate all sub-systems into one working bench demonstration.
● Internal dry-run demo in front of guide; collect feedback.
● Prepare Semester 1 report and presentation.
● Define Semester 2 test plan (ground taxi → flight) based on Sem 1 results.
4.2 Semester 1 Weekly Timeline
Week Activity Milestone / Output
1–2 Literature review, requirement finalization Proposal document
3 BOM finalization & procurement Hardware in hand
4–5 MPU6050 interfacing (raw data) Raw sensor logs
6 Complementary filter implementation Validated angle estimation
7–8 Servo + ESC interfacing Verified actuator response
9 Direction/polarity verification (open loop) Correct correction direction
10–11 PID implementation (roll & pitch) First closed-loop response
12–13 Systematic PID tuning & disturbance trials Tuned gains + response plots
14 Full bench-integration demo Working demo
15 Internal review / guide demo Feedback incorporated
16 Sem 1 report & presentation submission Sem 1 deliverables submitted
4.3 Semester 1 Deliverables Checklist
☐ Literature survey & problem statement finalized
☐ Full BOM procured and verified working individually
☐ IMU roll/pitch angle estimation validated against known reference angles
☐ Servo/ESC PWM control verified with correct correction polarity
☐ PID controller implemented in firmware for roll and pitch axes
☐ PID gains tuned using a documented, systematic method (not guesswork)
☐ Bench-top hand-tilt disturbance test shows visible, repeatable auto-correction
☐ Data logging pipeline in place (Serial/SD) capturing angle, error, PID output
☐ Sem 1 report, wiring diagrams, and demo video completed
☐ Sem 2 test/flight plan drafted and approved by guide
5. Semester 2 Plan — Field Testing & Final Validation
Goal for Semester 2: move from bench validation to real ground and flight conditions, quantitatively evaluate disturbance
rejection, refine the controller, and produce the final report and demonstration.
5.1 Phase-wise Breakdown
Phase 6 (Weeks 1–2): Pre-Flight Readiness & Safety Setup
● Re-verify all Sem 1 subsystems after any hardware changes (airframe repairs, new battery, etc.).
● Set up telemetry/logging for flight data capture (onboard SD or wireless link).
● Prepare a safety checklist, propeller guards, fail-safe (loss-of-signal cutoff), and a test site plan.
● Deliverable: Signed-off flight-readiness checklist.
Phase 7 (Weeks 3–4): Ground Taxi Testing
● Run the aircraft on the ground under its own power with stabilization active but airframe not airborne.
● Verify servo response under motor vibration and real ESC/BLDC noise (a key source of sensor noise not present on
the bench).
● Add vibration isolation (foam mounting) or additional filtering if noise is excessive.
● Deliverable: Ground test log with noise/vibration analysis.
Phase 8 (Weeks 5–8): Low-Speed & Assisted Flight Testing
● Conduct short, low-altitude manual flights with an experienced pilot, stabilization running in an assist mode (pilot
input + PID correction).
● Progressively test disturbance rejection: natural wind gusts, prop-wash, and manual disturbance inputs (if safely
simulatable, e.g., brief control surface nudges).
● Log roll, pitch, PID output, and servo commands throughout each flight for later analysis.
● Deliverable: Flight test log set with at least 3–5 successful stabilization trials.
Phase 9 (Weeks 9–10): PID Re-Tuning for Real Flight Conditions
● Analyze logged flight data: settling time, overshoot, steady-state error under real aerodynamic disturbance (different
from bench-tilt disturbance).
● Re-tune Kp/Ki/Kd based on real flight response (real aerodynamics differ from hand-tilt tests).
● Re-test after each tuning iteration; document before/after comparison.
● Deliverable: Final tuned gain set + comparative performance plots (before vs. after retuning).
Phase 10 (Weeks 11–12): Turbulence / Disturbance-Specific Validation
● Design repeatable disturbance test cases (e.g., fixed-angle gust simulation using a fan, or a controlled hand-off
disturbance at a known bank angle) to quantify recovery time and overshoot.
● Compare stabilized vs. stabilization-off flight segments to demonstrate measurable improvement.
● Deliverable: Quantitative disturbance-rejection results table (e.g., '15° roll disturbance recovered in X seconds with
Y% overshoot').
Phase 11 (Weeks 13–14): Data Analysis, Report Writing & Optional Extensions
● Compile all flight/bench data into performance graphs (angle vs. time, PID output vs. time, error vs. time).
● Write the final project report covering design, implementation, testing, and results.
● Optional stretch goals if time permits: yaw stabilization, altitude hold (BMP280), telemetry ground station.
Phase 12 (Weeks 15–16): Final Demonstration & Viva
● Prepare a live or recorded demonstration showing disturbance detection and automatic correction.
● Rehearse viva explanations for PID theory, tuning method, sensor fusion, and results.
● Submit final report, source code, and documentation.
5.2 Semester 2 Weekly Timeline
Week Activity Milestone / Output
1–2 Pre-flight readiness & safety setup Flight-readiness checklist signed
off
3–4 Ground taxi testing Ground test log, noise analysis
Week Activity Milestone / Output
5–6 First low-speed assisted flights Initial flight logs
7–8 Continued flight trials with disturbances 3–5 successful stabilization trials
9–10 Data analysis & PID re-tuning Final tuned gains + comparison
plots
11–12 Controlled turbulence/disturbance test cases Quantitative disturbance-
rejection results
13–14 Report writing, graphs, optional extensions Draft final report
15 Final demo rehearsal & guide review Feedback incorporated
16 Final demonstration, viva, submission Project completed & submitted
5.3 Semester 2 Deliverables Checklist
☐ Flight-readiness and safety checklist completed and signed off
☐ Ground taxi testing completed with vibration/noise mitigation applied
☐ Minimum 3–5 successful assisted flight stabilization trials logged
☐ PID gains re-tuned and validated specifically for real flight conditions
☐ Quantitative disturbance-rejection metrics captured (settling time, overshoot, steady-state error)
☐ Before/after tuning comparison plots produced
☐ Final report completed (design, methodology, results, conclusion, future scope)
☐ Final live/recorded demonstration prepared and rehearsed
☐ Source code, wiring diagrams, and data logs archived for submission
☐ Viva preparation completed (PID theory, tuning rationale, filter choice, results justification)
6. Testing & Validation Strategy
A staged testing approach reduces risk and ensures the PID controller is validated at each level before increasing
risk/complexity.
Stage Semester What is Verified Method
Bench / Hand-held Sem 1 Sensor accuracy, actuator direction, Manual tilt by hand, protractor
basic closed-loop correction reference, Serial/SD logging
Ground Taxi Sem 2 Behavior under real motor Powered ground roll with
vibration/noise, no flight risk stabilization active
Assisted Flight Sem 2 Real aerodynamic disturbance Short low-altitude manual
rejection, pilot + PID cooperation flights, pilot override ready
Controlled Sem 2 Quantitative recovery performance Repeatable gust/tilt disturbance
Disturbance (settling time, overshoot) test cases, before/after
comparison
7. Risk Management & Mitigation
Risk Impact Mitigation
Sensor noise from motor Inaccurate angle Foam mounting for IMU, complementary/Kalman
vibration estimation, jittery servo filtering, low-pass filtering
response
PID oscillation / Unstable, unsafe flight Systematic tuning (P → D → I), test on bench and
overcorrection behavior ground before flight
Servo wiring/direction Positive feedback Mandatory open-loop polarity check before every
reversed instead of correction closed-loop test
(crash risk)
Loss of RC signal during Aircraft becomes Implement fail-safe (throttle cut / return to neutral),
flight test uncontrollable test in open field with spotter
Timeline slippage due to Insufficient flight data Start ground/flight testing early in Sem 2, keep
weather (Sem 2 flight tests) before deadline indoor bench fallback demo ready
Hardware damage during Delay, cost, repeat Use low-cost foam trainer airframe, propeller
flight testing (crash) testing needed guards, spare parts stock
8. Evaluation Criteria (Suggested, Align with Guide/Department Rubric)
Criteria Semester 1 Weight Semester 2 Weight
(Indicative) (Indicative)
Technical correctness of PID design High High
Sensor fusion / filtering quality High Medium
Bench demonstration quality High —
Real flight demonstration & data — High
Quantitative performance analysis Medium High
Documentation & report quality Medium High
Viva / understanding of concepts Medium High
9. Overall Project Success Checklist (Both Semesters)
☐ PID controller stabilizes roll and pitch on the bench (Sem 1)
☐ PID controller demonstrably rejects real disturbance in flight (Sem 2)
☐ Quantitative before/after performance data collected and analyzed
☐ Complete documentation: report, wiring diagrams, code, test logs
☐ Working final demonstration delivered (live or recorded)
☐ Team can clearly explain and defend design/tuning choices in viva
10. References
1. Complementary/Kalman filter theory for IMU sensor fusion (standard control systems & embedded systems literature).
2. Open-source flight controller architectures (e.g., ArduPilot, Betaflight) — for reference design patterns only, not code
reuse.
3. Standard PID tuning methods (Ziegler–Nichols or manual iterative tuning) — refer to your control systems
coursework/textbook.
4. MPU6050, ESP32, and servo/ESC datasheets — for electrical specifications and interfacing limits.