Drone Feedback Controller

Adaptive Q-learning reinforcement learning agent with a nested PID actuation layer for UAV position stabilisation and waypoint navigation.

RoboticsRLControl Systems
# features

Key Features

Core technologies and system features.

Q-Learning Adaptation

Online tabular RL agent that selects optimal PID gains based on real-time flight states.

Nested PID Control

High-frequency PID actuation layer (1000Hz) for precise velocity and attitude tracking.

Wind Disturbance Handling

Adaptive integral clamping and gain scheduling specifically tuned for robust performance in windy environments.

Experience Replay

Stabilizes learning using a 400-sample circular buffer for off-policy TD(0) updates.

# source

Source

Explore the primary logical modules.

EXPLORER
controller.py
srccontroller.py
1def controller(state, target_pos, dt, wind_enabled=False):
2 # State: (dist, yaw_err, wind) -> 96 discrete states
3 # Actions: Selected from 16 pre-tuned PID action profiles
4
5 # Q-learning TD(0) Update
6 reward = (prev_cost - current_cost) - 0.015 * effort
7 Q[s][a] += alpha * (reward + gamma + max(Q[s_next]) - Q[s][a])
8
9 # PID Law
10 vx = kp * ex + ki * integral_x + kd * derivative_x
11 return (vx, vy, vz, yaw_rate)
# simulation

Adaptive RL Control Simulation

Real-time Q-learning simulation with PID gain scheduling.

Drone Simulatorv6
T = 0.0 sDrag / Touch · Pinch zoom
Simulation
Fly to Coordinates
X (±10)
Y (±10)
Z (0–8)
Yaw (±π)
Name (optional)
Velocity
Vx0.00m/s
Vy0.00m/s
Vz0.00m/s
X0.000 m
Y0.000 m
Z0.000 m
Dist · Home
0.000 m
Queue
Auto
Home
(0.0, 0.0, 0.0)
Motor RPM
M15000.00
M25000.00
M35000.00
M45000.00
Avg RPM
5000
# videos

Project Walkthroughs

Click any video to play.

Drone Week-1 trail
3:15

Drone Week-1 trail

Initial drone feedback control session and flight testing.

Drone Week-2 trail
Live

Drone Week-2 trail

UAV adaptive trajectory tracking and simulation demonstration.

Drone Week-3 trail
Live

Drone Week-3 trail

Trajectory tracking and stabilization testing during week 3.

Technical Evaluvation
Live

Technical Evaluvation

UAV adaptive position stabilisation and robust waypoint tracking tests.

# github

GitHub

GitHub repositories for this project.

Drone Feedback Controller Repository

Access the complete source code on GitHub.

Quick Start
$ git clone https://github.com/prathapselvakumar/AMR-Assignment-3
$ cd AMR-Assignment-3
$ pip install -r requirements.txt
$ python run.py