In recent years, the rapid advancement of quadrotor drones has captured significant attention in both academic and industrial circles. These versatile aerial systems, capable of autonomous operation through programmed control, are increasingly deployed in applications such as aerial photography, agricultural monitoring, power grid inspection, and law enforcement. This surge in relevance, coupled with national initiatives promoting innovation and entrepreneurship, has led to a growing interest among university students in quadrotor technology. Consequently, there is a pressing need to integrate practical, hands-on courses into engineering curricula that not only impart theoretical knowledge but also foster innovation capabilities. This article details the design and implementation of a frontier course titled “Control Theory and Design of Quadrotor Drones,” which I have developed and taught. The course aims to bridge the gap between abstract mathematical concepts and tangible engineering practice, guiding students through the complete process of modeling, simulation, control algorithm design, and real-world implementation for a quadrotor drone.
The core philosophy of this course is to move beyond traditional rote learning. Instead, it emphasizes cultivating the ability to discover knowledge through practice. Students are challenged to understand the physical meaning behind mathematical formulas, to construct models, and to validate them through simulation and experimentation. By working in teams to progressively complete a comprehensive mini-project, students develop critical problem-solving skills and learn to efficiently acquire new knowledge as needed—a competency essential for future scientific research. The course is structured into three progressive modules: quadrotor dynamics modeling and simulation, fundamental control theory and methods, and hands-on experiments based on a self-developed flight control platform. Each module features 3-5 course design assignments that build upon previous knowledge, often presented as a “fill-in-the-blank” framework to lower the entry barrier while allowing ample room for creativity and deep exploration.

The foundation of any practical engineering course is the teaching platform. While numerous commercial and open-source quadrotor platforms exist, few are suitable as educational tools. Commercial offerings from companies like DJI, while stable and feature-rich, often have closed-source flight control code, preventing students from modifying core algorithms. Open-source projects like PX4 or APM, though code-accessible, possess complex architectures that can be daunting for beginners to comprehend and modify within a single semester. To address this, I led the development of a dedicated quadrotor drone teaching platform from the ground up, integrating both hardware and software. The platform is designed for clarity and ease of understanding. Its software architecture is straightforward, allowing undergraduate students with a foundation in C language to read, understand, and modify the code. After learning control algorithms, students can flash different parameter sets onto the hardware and observe the direct impact on the quadrotor drone’s flight performance, thereby deepening their understanding of algorithm behavior and the physical significance of mathematical parameters.
The custom-built quadrotor drone teaching aid is lightweight and integrated. The frame and main circuit board are mounted on a carbon fiber plate with an arm length of 300 mm, and the designed takeoff weight is approximately 0.5 kg. It is powered by a 2300mAh, 35C discharge rate lithium polymer battery, providing about 15 minutes of flight time. The flight controller’s main processor is an STM32F417ZGT6 ARM Cortex-M4 chip from STMicroelectronics, operating at 168 MHz and featuring a Floating-Point Unit (FPU) for efficient computation. The sensor suite includes an Inertial Measurement Unit (IMU) with accelerometer and gyroscope, a barometer for altitude estimation, and optionally, a magnetometer. To ensure safety during student flight tests, a dedicated netted enclosure was constructed. This cage surrounds the quadrotor drone with a carbon fiber net, preventing propeller strikes and containing the aircraft if it loses control, thereby allowing for risk-free experimentation.
The first module of the course focuses on establishing the mathematical foundation for the quadrotor drone. We begin by introducing its basic components and flight principles through videos and animations. The key step is dynamical modeling—deriving the relationship between system inputs (forces and torques generated by the four motors) and outputs (attitude, velocity, and position in 3D space). This process requires defining physical parameters such as mass ($m$), moments of inertia ($I_{xx}, I_{yy}, I_{zz}$), arm length ($l$), and the thrust/ torque coefficients ($k_f, k_\tau$) relating motor speed to force and torque.
We establish two coordinate frames: the body-fixed frame {$B$} and the inertial earth frame {$E$}. The attitude of the quadrotor drone is represented by Euler angles ($\phi, \theta, \psi$)—roll, pitch, and yaw—defining the rotation from {$E$} to {$B$} via the rotation matrix $R$.
$$ R = R_z(\psi) R_y(\theta) R_x(\phi) = \begin{bmatrix} c_\psi c_\theta & c_\psi s_\theta s_\phi – s_\psi c_\phi & c_\psi s_\theta c_\phi + s_\psi s_\phi \\ s_\psi c_\theta & s_\psi s_\theta s_\phi + c_\psi c_\phi & s_\psi s_\theta c_\phi – c_\psi s_\phi \\ -s_\theta & c_\theta s_\phi & c_\theta c_\phi \end{bmatrix} $$
where $s_{\cdot}$ and $c_{\cdot}$ denote sine and cosine.
The translational dynamics in the inertial frame are given by Newton’s second law, where the total thrust $T$ acts along the body’s z-axis:
$$ m \ddot{\mathbf{p}} = \begin{bmatrix} 0 \\ 0 \\ -mg \end{bmatrix} + R \begin{bmatrix} 0 \\ 0 \\ T \end{bmatrix} – k_d \dot{\mathbf{p}} $$
Here, $\mathbf{p} = [x, y, z]^T$ is the position, $g$ is gravity, and $k_d$ is a linear drag coefficient (often neglected in basic models). The total thrust $T$ is the sum of individual motor thrusts: $T = \sum_{i=1}^{4} F_i$, with $F_i = k_f \omega_i^2$, and $\omega_i$ is the angular speed of motor $i$.
The rotational dynamics are derived from Euler’s rotation equations:
$$ I \dot{\boldsymbol{\omega}}_b + \boldsymbol{\omega}_b \times (I \boldsymbol{\omega}_b) = \boldsymbol{\tau} $$
where $\boldsymbol{\omega}_b = [p, q, r]^T$ is the angular velocity in the body frame, $I = \text{diag}(I_{xx}, I_{yy}, I_{zz})$ is the inertia matrix, and $\boldsymbol{\tau} = [\tau_\phi, \tau_\theta, \tau_\psi]^T$ is the control torque vector. The torques are generated by differential thrust and rotor drag:
$$ \begin{aligned} \tau_\phi &= l k_f (\omega_4^2 – \omega_2^2) \\ \tau_\theta &= l k_f (\omega_3^2 – \omega_1^2) \\ \tau_\psi &= k_\tau (\omega_1^2 + \omega_3^2 – \omega_2^2 – \omega_4^2) \end{aligned} $$
For control design, we often use a simplified model linearized around hover conditions ($\phi, \theta \approx 0$). The attitude dynamics become:
$$ \begin{aligned} I_{xx} \ddot{\phi} &= \tau_\phi \\ I_{yy} \ddot{\theta} &= \tau_\theta \\ I_{zz} \ddot{\psi} &= \tau_\psi \end{aligned} $$
Students implement this nonlinear model in MATLAB/Simulink for simulation. A key assignment is to write a function that takes motor speeds as input and integrates the equations of motion to output the quadrotor drone’s trajectory. This solidifies their understanding of coordinate transformations and Newton-Euler mechanics. A summary of key model parameters and their typical values used in our course is presented in Table 1.
| Parameter | Symbol | Typical Value | Unit |
|---|---|---|---|
| Mass | $m$ | 0.5 | kg |
| Arm Length | $l$ | 0.3 | m |
| Moment of Inertia (xx) | $I_{xx}$ | 3.0e-3 | kg·m² |
| Moment of Inertia (yy) | $I_{yy}$ | 3.0e-3 | kg·m² |
| Moment of Inertia (zz) | $I_{zz}$ | 5.5e-3 | kg·m² |
| Thrust Coefficient | $k_f$ | 1.5e-5 | N/(rad/s)² |
| Drag Torque Coefficient | $k_\tau$ | 2.5e-7 | Nm/(rad/s)² |
The second module delves into control theory for the quadrotor drone. A fundamental challenge is that the quadrotor is an underactuated system: it has six degrees of freedom (position and orientation) but only four independent control inputs (the four motor speeds). To address this, we employ a hierarchical control structure with a decoupling strategy. The overall control objective is to make the quadrotor drone track desired position ($x_{des}, y_{des}, z_{des}$) and yaw angle ($\psi_{des}$) commands.
The control architecture, as shown in the block diagram below, introduces virtual control inputs. A “Horizontal Position Controller” processes desired $x$ and $y$ to compute desired roll ($\phi_{des}$) and pitch ($\theta_{des}$) angles. An “Attitude Controller” then takes these desired angles along with $\psi_{des}$ to compute the required torque vector $\boldsymbol{\tau}$. A “Height Controller” independently computes the total thrust $T$ from $z_{des}$. Finally, a “Control Allocation” block inverts the motor model to solve for the individual motor speeds $\omega_i$.
$$ \begin{bmatrix} T \\ \tau_\phi \\ \tau_\theta \\ \tau_\psi \end{bmatrix} = \begin{bmatrix} k_f & k_f & k_f & k_f \\ 0 & -l k_f & 0 & l k_f \\ -l k_f & 0 & l k_f & 0 \\ k_\tau & -k_\tau & k_\tau & -k_\tau \end{bmatrix} \begin{bmatrix} \omega_1^2 \\ \omega_2^2 \\ \omega_3^2 \\ \omega_4^2 \end{bmatrix} $$
This matrix is invertible as long as $k_f$ and $k_\tau$ are non-zero, allowing calculation of required squared motor speeds.
For each controller, we primarily teach the ubiquitous Proportional-Integral-Derivative (PID) algorithm due to its simplicity and effectiveness. The continuous-time form of a PID controller is:
$$ u(t) = K_p e(t) + K_i \int_0^t e(\tau) d\tau + K_d \frac{de(t)}{dt} $$
where $e(t)$ is the error signal (e.g., $z_{des} – z$), and $K_p, K_i, K_d$ are tuning gains. In digital implementation on the flight controller, we use the discrete form:
$$ u[k] = K_p e[k] + K_i T_s \sum_{j=0}^{k} e[j] + K_d \frac{e[k] – e[k-1]}{T_s} $$
where $T_s$ is the sampling period.
The attitude controller for the roll channel, for instance, uses a cascaded P or PD controller. First, a desired angular rate $p_{des}$ is generated from the angle error, which then commands a torque:
$$ \begin{aligned} p_{des} &= K_{p,\phi} (\phi_{des} – \phi) \\ \tau_\phi &= K_{p,p} (p_{des} – p) + K_{d,p} (\dot{p}_{des} – \dot{p}) \end{aligned} $$
Similar structures are used for pitch and yaw. Students first tune these controllers in simulation, observing effects like overshoot, oscillation, and steady-state error. They learn that increasing $K_p$ reduces rise time but can cause overshoot; $K_d$ dampens oscillations; and $K_i$ eliminates steady-state error but may lead to windup. Table 2 provides a typical starting point for PID gains in our quadrotor drone simulation.
| Controller | $K_p$ | $K_i$ | $K_d$ | Notes |
|---|---|---|---|---|
| Height (Thrust) | 25.0 | 0.5 | 8.0 | Controls vertical position |
| Roll/Pitch Angle | 5.0 | 0.0 | 0.5 | Inner loop rate control often used |
| Roll/Pitch Rate | 0.15 | 0.0 | 0.02 | Direct torque control |
| Yaw Angle | 3.0 | 0.1 | 0.4 | Slower response typical |
Beyond control, we also cover essential sensor fusion algorithms. The raw data from the IMU’s gyroscope and accelerometer are noisy and prone to drift. To obtain a reliable attitude estimate, we teach complementary filtering and introduce the concept of the Kalman filter. A simple complementary filter for estimating pitch angle $\theta$ fuses gyro rate $q$ and accelerometer-based angle $\theta_{acc}$:
$$ \hat{\theta}[k] = \alpha (\hat{\theta}[k-1] + q[k] T_s) + (1-\alpha) \theta_{acc}[k] $$
where $\alpha$ is a weighting factor close to 1 (e.g., 0.98). This gives students a practical insight into signal processing for the quadrotor drone.
The third module translates theory into practice using the custom flight control hardware. Here, students engage with embedded systems programming in C. Initial assignments involve foundational skills: generating Pulse-Width Modulation (PWM) signals to control motor Electronic Speed Controllers (ESCs), implementing UART communication for ground station telemetry, and reading sensor data via I²C and SPI protocols. The communication protocol, often a simple binary or MAVLink-like structure, is dissected to explain concepts of data framing and parsing.
Subsequently, students integrate their PID controllers from MATLAB into the flight controller code. They learn to handle real-time constraints, sensor reading timing, and actuator updates. A major assignment is to implement attitude stabilization: using the onboard IMU data fused via a complementary filter, the quadrotor drone must maintain level orientation (roll and pitch near zero) when perturbed. This requires careful tuning of the discrete PID gains on the actual hardware, a process that vividly demonstrates the differences between simulation and reality, such as sensor noise and motor dynamics.
The course culminates in a comprehensive team project. Students form groups of 3-5, self-organizing based on interests—some focus on flight testing and piloting, others on algorithm refinement, and others on low-level software or sensor integration. The project goal is open-ended: to enhance the quadrotor drone’s capabilities. Examples from past iterations include implementing a simple waypoint navigation system, designing a vision-based hovering target tracker using an external camera, or developing a failsafe return-to-home function based on estimated position. This project synthesizes all learned components: modeling, control, sensor fusion, and embedded programming. It embodies the problem-based learning approach: students start with a concrete goal, identify what they need to learn (e.g., a new sensor API, a navigation algorithm), research it through literature and documentation, and implement a solution.
Throughout the course, the pedagogical approach is one of guided inquiry. I act as a facilitator, posing questions that lead students to explore the underlying principles. For instance, when discussing the control allocation matrix, I ask, “What happens if one motor fails? How does the matrix change, and can the quadrotor drone still be controlled?” This prompts investigation into fault-tolerant control strategies. Classes are interactive, with students encouraged to ask questions at any time. The team-based structure promotes collaborative learning, where knowledge is shared organically to solve problems.
Assessment is based on a combination of simulation reports, code submissions, flight test demonstrations, and a final project presentation. The emphasis is on the process and understanding rather than just the final result. For example, a team might not achieve perfect tracking in their project, but they receive high marks for a rigorous analysis of why their controller failed and a well-reasoned plan for improvement.
Feedback from students, primarily third-year undergraduates in electronic information engineering, has been insightful. Many enter the course with strong backgrounds in signals and circuits but limited exposure to control theory. Consequently, they often express greater interest in the signal processing aspects, such as Kalman filtering, requesting more depth in those areas. A common revelation, however, is the shift in mindset from “learn everything first, then apply” to “start with the problem, and learn what is necessary to solve it.” They realize that in real-world engineering, one cannot possibly know everything in advance; the key skill is knowing how to find information—through research papers, datasheets, or collaboration—and integrate it effectively. This quadrotor drone course serves as a microcosm of that research and development process.
In conclusion, this practical course on quadrotor drone control theory and design successfully bridges theoretical education and engineering practice. By walking students through the complete cycle from physical modeling and simulation to algorithm implementation and real-world testing on a custom platform, it demystifies the process of scientific inquiry and product development. Students graduate not only with specific knowledge about quadrotor drones but, more importantly, with a fortified ability to tackle complex, open-ended problems, collaborate in teams, and learn autonomously. These are the very competencies required for innovation in modern engineering fields. The quadrotor drone, as a compelling and tangible system, proves to be an excellent vehicle for delivering this essential education.
To further illustrate the interplay between different control loops and their mathematical representation, consider the following consolidated view of the linearized control equations for the quadrotor drone near hover, which students often compile as a reference:
$$ \begin{aligned}
\text{Height:} \quad & T = m(g + \ddot{z}_{des} + K_{p,z} (z_{des}-z) + K_{d,z} (\dot{z}_{des}-\dot{z}) + K_{i,z} \int (z_{des}-z) dt) \\
\text{Position to Attitude:} \quad & \phi_{des} = \frac{1}{g} ( \ddot{x}_{des} + K_{p,x} (x_{des}-x) + K_{d,x} (\dot{x}_{des}-\dot{x}) ) \\
& \theta_{des} = -\frac{1}{g} ( \ddot{y}_{des} + K_{p,y} (y_{des}-y) + K_{d,y} (\dot{y}_{des}-\dot{y}) ) \\
\text{Attitude Control:} \quad & \tau_\phi = I_{xx} ( \ddot{\phi}_{des} + K_{p,\phi} (\phi_{des}-\phi) + K_{d,\phi} (\dot{\phi}_{des}-p) ) \\
& \tau_\theta = I_{yy} ( \ddot{\theta}_{des} + K_{p,\theta} (\theta_{des}-\theta) + K_{d,\theta} (\dot{\theta}_{des}-q) ) \\
& \tau_\psi = I_{zz} ( \ddot{\psi}_{des} + K_{p,\psi} (\psi_{des}-\psi) + K_{d,\psi} (\dot{\psi}_{des}-r) )
\end{aligned} $$
This set of equations, while simplified, encapsulates the core logic that students program into both their simulations and the actual flight controller of the quadrotor drone. Through反复的 iteration between theory, simulation, and physical experiment, the abstract symbols gain concrete meaning, fulfilling the ultimate goal of this frontier educational endeavor.
