This project I have done focuses on designing a fault-tolerant PID controller for a quadrotor with, tuned using a genetic algorithm (GA), to ensure robust trajectory tracking even when one motor experiences thrust deviation. The core challenge lies in compensating for asymmetric forces caused by motor deviation in XY plane, which disrupts the quadrotor’s stability and path-following capabilities. To address this, I have developed a cascaded PID control structure: an outer loop for position control (translational dynamics) and an inner loop for attitude stabilization (rotational dynamics). The PID gains for both loops were optimized offline using a GA, where the fitness function prioritized minimizing trajectory tracking errors, reducing control effort, and ensuring rapid stabilization after disturbances. The GA’s chromosome encoded the PID parameters, and through iterative selection, crossover, and mutation, the algorithm converged on gains that balanced performance under both nominal and faulty conditions. When a motor thrust deviation occurs, 20 and 30 degrees deviation from vertical and horizontal axes, the control system dynamically redistributes thrust across the remaining motors while relying on the pre-optimized PID gains to maintain stability. This hybrid approach—combining model-based control allocation with data-driven GA tuning—ensures the quadrotor adapts to faults without requiring physical hardware redundancy.
To validate the controller performance, I have simulated three distinct reference trajectories: a circular path (testing smooth, continuous tracking), a square trajectory (evaluating sharp turns and transient responses), and a helical path (combining vertical and horizontal motion).