Simulation & Control

Engineering project

Quadrotor 6-DOF Dynamics & Control Model

Full nonlinear 6-DOF quadrotor model in Simulink with PID, LQR, and MPC controllers validated on Pixhawk 6C HIL.

Quadrotor6-DOFMPCSimulink HIL

Project brief

A complete nonlinear mathematical model of a quadrotor UAV in MATLAB/Simulink, including aerodynamic effects (blade flapping, induced drag), motor dynamics (first-order, with saturation), IMU and barometer sensor models with noise and delay, and wind gust disturbance models. PID, LQR, and MPC controllers are implemented and compared on step response, robustness to wind, and trajectory tracking accuracy.

The case study emphasizes model completeness and controller comparison. Its explanatory flow does not assert new numerical tracking or stability results.

The engineering challenge

Compare quadrotor control strategies using a shared nonlinear model and consistent disturbances.

Engineering approach

  1. Combine rigid-body, rotor, actuator, and sensor effects in the plant model.
  2. Connect PID, LQR, and MPC alternatives to common references.
  3. Use trajectory and disturbance scenarios to support comparable control analysis.

Features & capabilities

  • Full 6-DOF nonlinear quadrotor model: Newton-Euler rigid body + rotor aerodynamics
  • Motor model: first-order lag, ESC linearization, propeller thrust/torque maps
  • Sensor models: IMU (noise, bias, drift), barometer (noise, lag), GPS (noise, fix loss)
  • PID: separate attitude and position loops with anti-windup
  • LQR: linearized model, Q/R weight optimization using GA
  • MPC: 10-step prediction horizon, 50Hz control loop, OSQP solver
  • HIL validation: Simulink → Pixhawk 6C via MAVLink over serial
  • Trajectory tracking: circular, figure-8, minimum snap polynomial

Software & engineering tools

MATLAB R2024a, Simulink, Aerospace Blockset, OSQP (MPC solver), dSPACE and Pixhawk 6C HIL validation