Error-State LQR Formulation for Quadrotor UAV Trajectory Tracking
Abstract
This article presents an error-state Linear Quadratic Regulator (LQR) formulation for robust trajectory tracking in quadrotor Unmanned Aerial Vehicles (UAVs). The proposed approach leverages error-state dynamics and employs exponential coordinates to represent orientation errors, enabling a linearized system representation for real-time control. The control strategy integrates an LQR-based full-state feedback controller for trajectory tracking, combined with a cascaded bodyrate controller to handle actuator dynamics. Detailed derivations of the error-state dynamics, the linearization process, and the controller design are provided, highlighting the applicability of the method for precise and stable quadrotor control in dynamic environments.
1 Introduction
The control of quadrotor Unmanned Aerial Vehicles (UAVs) presents unique challenges due to their nonlinear dynamics, underactuation, and the need for precise trajectory tracking in dynamic environments. Traditional control techniques often struggle to handle these challenges efficiently while maintaining computational tractability for real-time applications. To address these issues, this work outlines an error-state Linear Quadratic Regulator (LQR) approach, leveraging the compact and singularity-free representation of orientation errors using exponential coordinates.
Exponential coordinates provide a robust way to represent orientation errors without the singularities inherent in other parameterizations such as Euler angles. By formulating the controller in terms of error-state dynamics, this approach avoids the complexity of directly controlling the nonlinear dynamics, focusing instead on minimizing deviations from a nominal trajectory. This is achieved by driving the error-state—which includes position, velocity, and orientation errors—toward zero.
The proposed controller uses an LQR formulation, a well-established concept in classical control theory for linear systems, to minimize a quadratic cost function balancing state deviations and control effort. Although the quadrotor dynamics are nonlinear, the error-state dynamics can be re-linearized about the current tracking error at a sufficiently high frequency, allowing the LQR controller to operate effectively in real time. This iterative re-linearization ensures that the controller remains responsive to changes in the tracking error while maintaining computational efficiency.
2 Definitions and system dynamics
2.1 State and control definition table
The state of the quadrotor UAV is defined as follows, inspired by [1, 4]:
Name | True | Nominal | Error | Composition |
---|---|---|---|---|
Full state | ||||
Position | ||||
Velocity | ||||
Orientation | ||||
Rotation Matrix | ||||
Exponential Vector |
The full state of the quadrotor UAV includes the position and velocity of the center of mass, expressed in the inertial frame, as well as the orientation represented as a unit quaternion:
The error-state contains the -values for these quantities, with the important distinction that the orientation error component is represented in exponential coordinates:
The nominal state of the quadrotor UAV may be derived from trajectory optimization processes or the differential flatness property of quadrotor dynamics [3].
The control of the quadrotor UAV is defined as follows:
Magnitude | True | Nominal | Error | Composition |
---|---|---|---|---|
Full control | ||||
Collective Thrust | ||||
Angular Velocity |
The full control of the quadrotor UAV contains the collective thrust and desired angular velocity expressed in the current body frame, . The error-state contains the -values for these quantities, taking care to ensure that the angular velocity error is represented in the current body frame (with the nominal angular velocity represented in the nominal frame’s coordinates), with .
2.2 The true-state kinematics and dynamics
The true-state kinematics and dynamics follow from the single rigid-body assumption and lumped-mass model of the quadrotor UAV, with thrust acting along the body -axis and gravity acting along the world axis.
(1) |
(2) |
(3) |
2.3 The nominal-state kinematics and dynamics
The nominal-state kinematics and dynamics are identical to those of the true state, with appropriate substitutions:
(4) |
(5) |
(6) |
2.4 The error-state kinematics and dynamics
We now derive the time derivatives of the error-state for each component. Throughout this derivation, we assume the error-state is small, ignore second-order terms, and employ small-angle approximations. First, for the position error:
We next solve for , using the approximation :
(Small angle approximation of ) | ||||
Lastly, we solve for . We note that the angular velocity of a rigid body expressed in the body frame and the exponential coordinates for the body frame orientation are related by:
where is the inverse of the right Jacobian of [5]. Using this fact, we may write:
(Small angle approximation of ) |
3 Linearization of the error-state dynamics
3.1 Approximate linearization derivation
For a nonlinear function , the first-order Taylor approximation of about some point is written as:
Notice that the expression:
is nothing but the first-order Taylor approximation of about evaluated at the point , which we can take to be near-zero for with and a linearization point sufficiently close to 0.
Thus, for and sufficiently close to 0, we may approximate as:
with:
For our purposes, we will write and write the linearized system as:
where is the current error state and is the current error control.
3.2 Jacobians of error-state dynamics
We write out the relevant Jacobians to construct the and matrices of the linearized error-state dynamics. These matrices take the form:
From the above expressions for the error-state dynamics, we take derivatives and arrive at:
4 Error-state LQR controller
4.1 LQR controller formulation
We design an LQR controller to drive the error state to zero, where these quantities are defined in section 2.1. The LQR full-state feedback gain matrix is obtained by minimizing the inifinite-horizon cost function :
for . The cost function is minimized by the control policy . where is given by:
with being the solution to the continuous-time Algebraic Riccati Equation. The full control at time is then given by:
As a practical implementation consideration, one must ensure that the matrix of the linearized error-state system is stable, i.e. for all eigenvalues in the spectrum of . A small amount of regularization may be added to to ensure the ARE has a solution.

4.2 Bodyrate controller formulation
Using the principle of time-scale separation, the LQR controller uses the desired angular velocity as a virtual control input to the system, similar to [2]. In reality, the control inputs are the collective thrust and the body torque.111Often, the inputs are considered to be the four motor speeds, but we will consider the collective thrust and body torque for simplicity. The mapping between motor speeds and collective wrench is usually written as where is the vector of squared motor angular velocities.
In a cascaded fashion, we use a simple bodyrate P-controller with feedback linearization to track the desired angular velocities produced by the LQR controller. The bodyrate controller is given by:
where is the inertia tensor of the quadrotor UAV and is the proportional gain matrix.
References
- [1] Michael Farrell, James Jackson, Jerel Nielsen, Craig Bidstrup, and Tim McLain. Error-state lqr control of a multirotor uav. In 2019 International Conference on Unmanned Aircraft Systems (ICUAS), pages 704–711, 2019.
- [2] Philipp Foehn and Davide Scaramuzza. Onboard state dependent lqr for agile quadrotors. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 6566–6572, 2018.
- [3] Daniel Mellinger and Vijay Kumar. Minimum snap trajectory generation and control for quadrotors. In 2011 IEEE International Conference on Robotics and Automation, pages 2520–2525, 2011.
- [4] Joan Solà. Quaternion kinematics for the error-state kalman filter, 2017.
- [5] Joan Solà, Jeremie Deray, and Dinesh Atchuthan. A micro lie theory for state estimation in robotics, 2021.