Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Applied Control Systems 4: UAV: Quaternions + MPC + PID
Rating: 5.0 out of 5(9 ratings)
99 students

Applied Control Systems 4: UAV: Quaternions + MPC + PID

Master UAV attitude control using quaternions, PID, and MPC with Python implementations and gimbal lock avoidance.
Last updated 7/2026
English
English

What you'll learn

  • Learn the fundamentals of quaternion math in representing an object's attitude in 3D
  • Learn to mathematically model, differentiate, and integrate quaternion-based systems
  • Learn about Euler angle limitations due to Gimbal Lock and its avoidance using quaternions
  • Apply quaternion representation in MPC and PID algorithms in UAV attitude control for tracking trajectories
  • Implement quaternion based MPC and PID controllers in Python in offline simulation
  • Learn to convert Euler angles to quaternions and the challenges associated with it

Course content

6 sections76 lectures11h 29m total length
  • Course overview6:31

    Explore quaternions as the robust 3D rotation representation for UAV attitude control, cover Euler angles, gimbal lock, PID and LPV-MPC in quaternion form, and learn Python simulations.

  • Revision of rotation matrices + mapping10:47

    Explore how rotation matrices map UAV velocity from the body frame to the inertial frame, revisiting Euler angles phi, theta, psi and the X-Y-Z rotation sequence.

  • Fixed inertial VS moving body frames10:08

    Explore how rotation order and inertial versus moving frames yield the same orientation. See fixed-frame XYZ and moving-frame ZYX share the same rotation matrix, with Euler angles and quaternions hinted.

  • Revision of Transfer matrices10:06

    Compare fixed-frame and moving-frame Euler-angle conventions and explain how the transfer matrix maps body-frame angular velocities to Euler-rate derivatives, especially near hover, for attitude control with LPV-MPC.

  • Gimbal Lock14:15

    Examine gimbal lock and Euler angle limitations in uav orientation, showing how theta near 90 degrees collapses a degree of freedom, while quaternions offer accurate orientation.

  • Direction Cosine Matrix6:52

    Learn the direction cosine matrix (DCM) to convert body-frame velocities to the inertial frame and avoid gimbal lock, comparing it to Euler angles and quaternions.

Requirements

  • Applied Control Systems 1: autonomous cars: Math + PID + MPC
  • Applied Control Systems 2: autonomous cars (360 tracking)
  • Applied Control Systems 3: UAV drone (3D Dynamics & control)
  • Basic skills in Python programming

Description

This course provides a comprehensive introduction to using quaternions for UAV (unmanned aerial vehicle) attitude representation and control, with a practical focus on implementing PID and Model Predictive Control (MPC) algorithms in Python. Ideal for engineers, robotics enthusiasts, and control systems students, this course demystifies quaternions, a powerful mathematical tool that resolves issues like Gimbal lock encountered with traditional Euler angles.

You will begin with fundamental concepts of quaternions, learning their algebra, derivatives, and integration techniques crucial for accurately modeling 3D rotational dynamics. The course emphasizes quaternion-based state representation and the benefits it offers in maintaining smooth and singularity-free attitude descriptions.

Building on this foundation, you will explore how to formulate and apply PID controllers on quaternion attitude errors to stabilize UAV orientations effectively. Furthermore, advanced control design using MPC will be covered, demonstrating how to incorporate quaternions into predictive control frameworks for enhanced performance in UAV attitude control.

All control algorithms and quaternion mathematics are implemented step-by-step in Python, with practical coding examples and guidance on simulation and real-time applications. This hands-on approach ensures you gain both theoretical understanding and practical programming skills.

Key highlights include:

  • Comprehensive study of quaternions vs Euler angles and how to avoid Gimbal lock

  • Mathematical modeling and numerical integration of quaternion-based systems

  • PID control design tailored for quaternion attitude errors

  • Model Predictive Control formulation with quaternions for UAVs

  • Python coding tutorials for control algorithms and simulations

  • Applications specifically focused on UAV attitude control systems

By the end of the course, students will be equipped to confidently model, simulate, and control UAV attitude dynamics using quaternions and advanced control methods, making it a perfect fit for professionals and students working in robotics, aerospace, and autonomous systems development.

This course is perfect for those interested in UAV control, robotics, aerospace engineering, nonlinear control, and Python programming for control systems.

Who this course is for:

  • Control Systems engineers
  • Aerospace and Mechanical engineers