The pursuit of stable, precise, and robust autonomous flight for unmanned aerial vehicles (UAVs) represents a significant focus in modern control systems research. Among various UAV configurations, the quadrotor drone has emerged as a quintessential platform due to its mechanical simplicity, vertical take-off and landing (VTOL) capability, and hovering agility. However, the very characteristics that make it versatile—being an underactuated, highly coupled, and nonlinear system—also present formidable challenges for controller design. This article delves into the design and analysis of a sophisticated dual-loop control architecture that synergizes the strengths of Linear Quadratic Regulator (LQR) and Proportional-Integral-Derivative (PID) methodologies to achieve superior attitude stabilization for a quadrotor drone.

Fundamental Dynamics and Modeling of a Quadrotor Drone
At its core, a quadrotor drone consists of a rigid cross-frame equipped with four rotors. The flight mechanics are governed by varying the rotational speeds of these motors. The standard “+” configuration is considered, where motors 1 and 3 rotate counter-clockwise, and motors 2 and 4 rotate clockwise to counterbalance the reactive torque. The primary control actions are generated as follows:
- Vertical/Lift Motion (Thrust): Collective increase or decrease of all four rotor speeds.
- Pitch Motion & X-translation: Differential speed between motor 1 and motor 3.
- Roll Motion & Y-translation: Differential speed between motor 2 and motor 4.
- Yaw Motion: Differential speed between the pair (1,3) and the pair (2,4).
To derive a tractable mathematical model, standard assumptions are made: the quadrotor drone is a rigid and symmetrical body; the center of gravity coincides with the body frame origin; and aerodynamic drag and ground effect are initially neglected for the inner-loop attitude controller design.
Kinematic and Dynamic Equations
Let us define two coordinate frames: the Earth-fixed inertial frame $\{E\}$ and the body-fixed frame $\{B\}$ attached to the quadrotor drone’s center of mass. The attitude is represented by the Euler angles $\boldsymbol{\Theta} = [\phi, \theta, \psi]^T$, denoting roll, pitch, and yaw, respectively. The body angular rates are $\boldsymbol{\omega} = [p, q, r]^T$.
The relationship between the Euler angle derivatives and the body angular rates is given by the kinematic equation:
$$\dot{\boldsymbol{\Theta}} = \mathbf{W} \cdot \boldsymbol{\omega}$$
where
$$
\mathbf{W} = \begin{bmatrix}
1 & \sin\phi \tan\theta & \cos\phi \tan\theta \\
0 & \cos\phi & -\sin\phi \\
0 & \sin\phi / \cos\theta & \cos\phi / \cos\theta
\end{bmatrix}.
$$
For small angle maneuvers near hover, this simplifies to $\dot{\phi} \approx p$, $\dot{\theta} \approx q$, and $\dot{\psi} \approx r$.
The rotational dynamics are derived from Euler’s rotation theorem:
$$\mathbf{J} \dot{\boldsymbol{\omega}} = -\boldsymbol{\omega} \times \mathbf{J} \boldsymbol{\omega} + \boldsymbol{\tau}$$
where $\mathbf{J} = \text{diag}(I_{xx}, I_{yy}, I_{zz})$ is the inertia matrix, and $\boldsymbol{\tau} = [\tau_\phi, \tau_\theta, \tau_\psi]^T$ is the total torque vector applied to the quadrotor drone. The control torques are related to the motor speeds $\Omega_i$ by:
$$
\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_m (\Omega_2^2 + \Omega_4^2 – \Omega_1^2 – \Omega_3^2)
\end{aligned}
$$
where $l$ is the arm length, $k_f$ is the thrust coefficient, and $k_m$ is the drag (moment) coefficient. The total thrust $T$ is $T = k_f (\Omega_1^2 + \Omega_2^2 + \Omega_3^2 + \Omega_4^2)$.
Defining the control input vector $\mathbf{u} = [u_1, u_2, u_3]^T$ where $u_1=\tau_\phi$, $u_2=\tau_\theta$, and $u_3=\tau_\psi$, the nonlinear dynamic model for attitude can be written as:
$$
\begin{aligned}
\dot{p} &= \frac{1}{I_{xx}}[(I_{yy}-I_{zz})qr + u_1] \\
\dot{q} &= \frac{1}{I_{yy}}[(I_{zz}-I_{xx})pr + u_2] \\
\dot{r} &= \frac{1}{I_{zz}}[(I_{xx}-I_{yy})pq + u_3]
\end{aligned}
$$
Linearized State-Space Model for Controller Design
For controller synthesis, we linearize the model around the hover equilibrium point ($\phi, \theta, \psi \approx 0$, $p,q,r \approx 0$). Applying the small-angle approximation and neglecting the Coriolis terms (products $pq, qr, rp$), we obtain a decoupled, linear model. Choosing the state vector $\mathbf{x} = [\phi, \theta, \psi, p, q, r]^T$, the control input $\mathbf{u} = [u_1, u_2, u_3]^T$, and the output $\mathbf{y} = [\phi, \theta, \psi]^T$, the state-space representation is:
$$
\begin{aligned}
\dot{\mathbf{x}} &= \mathbf{A} \mathbf{x} + \mathbf{B} \mathbf{u} \\
\mathbf{y} &= \mathbf{C} \mathbf{x}
\end{aligned}
$$
where
$$
\mathbf{A} = \begin{bmatrix}
\mathbf{0}_{3\times3} & \mathbf{I}_{3\times3} \\
\mathbf{0}_{3\times3} & \mathbf{0}_{3\times3}
\end{bmatrix}, \quad
\mathbf{B} = \begin{bmatrix}
\mathbf{0}_{3\times3} \\
\mathbf{J}^{-1}
\end{bmatrix}, \quad
\mathbf{C} = \begin{bmatrix}
\mathbf{I}_{3\times3} & \mathbf{0}_{3\times3}
\end{bmatrix}.
$$
Here, $\mathbf{J}^{-1} = \text{diag}(1/I_{xx}, 1/I_{yy}, 1/I_{zz})$. Due to decoupling, the design can be performed independently for the roll ($\phi$, $p$), pitch ($\theta$, $q$), and yaw ($\psi$, $r$) channels. The physical parameters for a representative quadrotor drone are summarized in Table 1.
| Parameter | Symbol | Value | Unit |
|---|---|---|---|
| Mass | $m$ | 0.849 | kg |
| Moment of Inertia (X) | $I_{xx}$ | 0.0080 | kg·m² |
| Moment of Inertia (Y) | $I_{yy}$ | 0.0080 | kg·m² |
| Moment of Inertia (Z) | $I_{zz}$ | 0.0200 | kg·m² |
| Arm Length | $l$ | 0.330 | m |
| Thrust Coefficient | $k_f$ | 3.13 × 10⁻⁵ | N·s² |
| Drag Coefficient | $k_m$ | 7.50 × 10⁻⁶ | N·m·s² |
Design of the Hybrid LQR-PID Control Architecture
The proposed control strategy employs a cascaded structure. An inner loop regulates the body angular rates ($p, q, r$) using an LQR controller, which excels in providing optimal performance and robustness against model uncertainties and disturbances within its bandwidth. An outer loop controls the Euler angles ($\phi, \theta, \psi$) using a PID (specifically PI) controller, which is simple, effective at rejecting low-frequency disturbances, and ensures zero steady-state error for attitude tracking. This combination leverages the fast, robust stabilization of the inner LQR loop and the precise setpoint tracking of the outer PID loop.
Inner Loop: Linear Quadratic Regulator (LQR) for Angular Rate Control
We design the inner loop controller for the pitch rate channel ($q$) as an example. From the linear model, the pitch rate subsystem is:
$$
\dot{q} = A_q q + B_q u_2, \quad \text{with } A_q=0, \ B_q = 1/I_{yy}.
$$
To achieve integral action for rejecting constant disturbances, we augment the state with the integral of the tracking error. Define the error $e = q_{des} – q$, where $q_{des}$ is the desired rate from the outer loop. The augmented state vector is $\mathbf{x}_a = [q, \int e \, dt]^T$. The augmented state-space model becomes:
$$
\dot{\mathbf{x}}_a = \mathbf{A}_a \mathbf{x}_a + \mathbf{B}_a u_2 + \mathbf{G} q_{des}
$$
where
$$
\mathbf{A}_a = \begin{bmatrix} A_q & 0 \\ -1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ -1 & 0 \end{bmatrix}, \quad
\mathbf{B}_a = \begin{bmatrix} B_q \\ 0 \end{bmatrix}.
$$
The LQR controller seeks to find a state-feedback law $u_2 = -\mathbf{K} \mathbf{x}_a = -[K_1, K_2] \mathbf{x}_a$ that minimizes the quadratic cost function:
$$
J = \int_0^\infty (\mathbf{x}_a^T \mathbf{Q} \mathbf{x}_a + u_2^T R u_2) \, dt.
$$
Here, $\mathbf{Q} \succeq 0$ and $R > 0$ are weighting matrices that balance state regulation against control effort. The optimal gain matrix $\mathbf{K}$ is given by $\mathbf{K} = R^{-1} \mathbf{B}_a^T \mathbf{P}$, where $\mathbf{P}$ is the solution to the Algebraic Riccati Equation (ARE):
$$
\mathbf{A}_a^T \mathbf{P} + \mathbf{P} \mathbf{A}_a – \mathbf{P} \mathbf{B}_a R^{-1} \mathbf{B}_a^T \mathbf{P} + \mathbf{Q} = \mathbf{0}.
$$
For implementation, we select $R=1$ and $\mathbf{Q} = \text{diag}(Q_1, Q_2)$. Tuning these parameters involves a trade-off: higher $Q_1$ penalizes angular rate deviation, leading to faster response, while higher $Q_2$ penalizes integrated error, improving disturbance rejection. After iterative tuning via simulation, satisfactory parameters for the pitch channel are found to be $Q_1=0.015$, $Q_2=10$, yielding $\mathbf{K} = [0.4103, 3.1623]$. The control law is:
$$
u_2 = -K_1 q – K_2 \int e \, dt.
$$
The structure of the inner LQR loop for the pitch rate of the quadrotor drone is conceptually shown below, where the optimal gain $\mathbf{K}$ feeds back both the measured rate and the integrated error.
Outer Loop: PID Controller for Attitude Angle Control
The outer loop takes the desired Euler angle (e.g., $\theta_{des}$) and generates the desired body rate ($q_{des}$) for the inner loop. A PI controller is typically sufficient:
$$
q_{des}(t) = K_{p}^{outer} e_\theta(t) + K_{i}^{outer} \int e_\theta(t) \, dt
$$
where $e_\theta = \theta_{des} – \theta$. The derivative term is often omitted as the inner rate loop already provides damping.
To analyze the closed-loop performance, we consider the simplified dynamics. The inner LQR-controlled rate loop, with its integral action, can be approximated as a first-order system with unity gain for low frequencies: $q \approx q_{des}$. Therefore, $\dot{\theta} \approx q \approx q_{des}$. Substituting the PI law gives:
$$
\dot{\theta} = K_{p}^{outer} (\theta_{des} – \theta) + K_{i}^{outer} \int (\theta_{des} – \theta) \, dt.
$$
Differentiating both sides:
$$
\ddot{\theta} = K_{p}^{outer} (\dot{\theta}_{des} – \dot{\theta}) + K_{i}^{outer} (\theta_{des} – \theta).
$$
For a constant setpoint $\theta_{des}$, $\dot{\theta}_{des}=0$. Taking the Laplace transform yields the closed-loop transfer function:
$$
\frac{\Theta(s)}{\Theta_{des}(s)} = \frac{K_{p}^{outer} s + K_{i}^{outer}}{s^2 + K_{p}^{outer} s + K_{i}^{outer}}.
$$
This is a standard second-order system. Comparing to the canonical form $s^2 + 2\zeta\omega_n s + \omega_n^2$, we have:
$$
\omega_n = \sqrt{K_{i}^{outer}}, \quad \zeta = \frac{K_{p}^{outer}}{2\sqrt{K_{i}^{outer}}}.
$$
Thus, the outer loop gains can be tuned based on desired second-order response characteristics like settling time $T_s \approx 4/(\zeta\omega_n)$ and percentage overshoot. For a critically damped or slightly underdamped response (e.g., $\zeta=0.7$), and a desired settling time, one can solve for $K_{p}^{outer}$ and $K_{i}^{outer}$. For instance, with $T_s \approx 2$s and $\zeta=0.7$, we get $\omega_n \approx 2.86$ rad/s, leading to $K_{p}^{outer} \approx 4.00$ and $K_{i}^{outer} \approx 0.011$. The complete cascaded control structure for the pitch axis of the quadrotor drone is illustrated in the block diagram below, demonstrating the interconnection between the outer angle PI controller and the inner rate LQR controller.
Simulation Results and Performance Analysis
The proposed hybrid LQR-PID controller was implemented and tested in a MATLAB/Simulink environment using the nonlinear dynamic model of the quadrotor drone. Performance was evaluated for the pitch channel and compared against a conventional, single-loop PID controller for attitude.
Inner Loop (LQR) Performance
The step response of the inner pitch rate loop with the designed LQR controller ($\mathbf{K} = [0.4103, 3.1623]$) is analyzed. The controller demonstrates excellent performance, as quantified in Table 2.
| Metric | Value |
|---|---|
| Rise Time (10-90%) | ~0.2 s |
| Overshoot | ~3.12% |
| Settling Time (2% band) | ~0.4 s |
| Steady-State Error | Zero (due to integral action) |
| Phase Margin (from Open-Loop Bode) | > 60° |
The response is fast and exhibits minimal overshoot. The integral action in the LQR formulation ensures complete rejection of constant disturbances. Furthermore, the robustness of the LQR controller was tested by perturbing the plant parameters ($B_q$, $A_q$) in simulation while keeping the feedback gain $\mathbf{K}$ constant. The closed-loop response remained stable with only minor changes in transient characteristics, confirming the inherent robustness of the LQR design for the quadrotor drone’s inner loop.
Overall Closed-Loop (LQR-PID) Performance
With the outer PI controller gains $K_{p}^{outer}=4.00$ and $K_{i}^{outer}=0.011$, the complete cascaded system was tested for a step change in desired pitch angle. The performance is summarized in Table 3 and compared to a well-tuned, single-loop PID controller directly controlling $\theta$ with $K_p=8$, $K_i=0.5$, $K_d=0.8$.
| Performance Metric | Single-Loop PID | Proposed LQR-PID |
|---|---|---|
| Rise Time | ~0.35 s | ~0.50 s |
| Overshoot | ~12.5% | ~0.8% |
| Settling Time (2%) | ~1.2 s | ~2.0 s |
| Control Effort (Peak) | Higher | Significantly Lower |
| Disturbance Rejection | Moderate | Excellent |
The key advantage of the hybrid scheme is vividly clear: it drastically reduces overshoot by an order of magnitude. While the single-loop PID responds slightly faster, it does so with significant oscillation. The LQR-PID controller provides a much smoother, critically damped-like response. This smoothness is crucial for a quadrotor drone as it minimizes the risk of actuator (motor) saturation, reduces vibration, and leads to more efficient flight. The plots of the step responses show the conventional PID response exhibiting a characteristic overshoot and minor oscillation before settling, whereas the LQR-PID response rises steadily and monotonically towards the setpoint. Similar superior performance was observed for the roll and yaw channels, validating the decentralized design approach.
The frequency-domain analysis of the outer loop shows adequate phase and gain margins, ensuring stability. The bandwidth separation between the faster inner rate loop (≈15-20 rad/s) and the slower outer attitude loop (≈3 rad/s) respects the rule of thumb for cascaded systems, preventing undesirable interactions.
Discussion and Practical Implementation Considerations
The hybrid LQR-PID architecture presents a compelling solution for quadrotor drone control. The LQR inner loop acts as a high-performance stabilizer. By optimally weighting state deviations and control effort, it provides a solid foundation that is less sensitive to variations in the quadrotor drone’s dynamics, such as those caused by battery discharge or minor payload changes. The outer PID loop is simple to implement and tune, focusing solely on accurate attitude tracking. This separation of concerns simplifies the overall design process.
For real-world implementation on a quadrotor drone, several factors must be addressed. The control signals $u_1, u_2, u_3$ (torques) and $u_4$ (collective thrust) must be converted into individual motor commands. This is achieved using the mixing matrix:
$$
\begin{bmatrix}
\Omega_1^2 \\ \Omega_2^2 \\ \Omega_3^2 \\ \Omega_4^2
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & -1 & 1 \\
1 & 1 & 0 & -1 \\
1 & 0 & 1 & 1 \\
1 & -1 & 0 & -1
\end{bmatrix}
\begin{bmatrix}
U_{thrust} \\ U_{\phi} \\ U_{\theta} \\ U_{\psi}
\end{bmatrix}
$$
where $U_{thrust}$ is derived from the altitude controller, and $U_{\phi}, U_{\theta}, U_{\psi}$ are the outputs of the respective LQR-PID attitude controllers scaled by appropriate factors. Furthermore, sensor noise from gyroscopes and accelerometers must be filtered (e.g., using a complementary or Kalman filter) before being used by the controllers. The discrete-time implementation of the controllers must also consider sampling time limitations of the flight controller.
Future work on this control strategy for quadrotor drones could explore adaptive or gain-scheduled LQR weights to handle a wider flight envelope beyond hover. Additionally, incorporating a more sophisticated outer loop, such as a model-based trajectory tracker, could further enhance the autonomous navigation capabilities of the quadrotor drone.
Conclusion
This article presented a detailed study on the design and analysis of a hybrid LQR-PID control system for quadrotor drone attitude stabilization. The cascaded structure, featuring an LQR-optimal controller for the inner angular rate loop and a PID controller for the outer attitude angle loop, effectively combines the robustness and optimality of modern control theory with the simplicity and reliability of classical control. The mathematical modeling from first principles, followed by systematic linearization and controller design, provides a clear engineering methodology. Simulation results conclusively demonstrate that the proposed controller outperforms a conventional single-loop PID controller, particularly in minimizing overshoot and providing smoother control action. This leads to improved flight stability, reduced risk of actuator saturation, and better overall performance, making the LQR-PID hybrid a highly effective and practical choice for advanced flight control systems in quadrotor drones.
