Safe Online Learning Tracking Control for Quadrotors under Wind Disturbances

09/04/2020 ∙ by Lei Zheng, et al. ∙ SUN YAT-SEN UNIVERSITY 0

Enforcing safety on precise trajectory tracking is critical for aerial robotics subject to wind disturbances. In this paper, we present a learning-based safety-preserving cascaded quadratic programming control (SPQC) for safe trajectory tracking under wind disturbances. The SPQC controller consists of a position-level controller and an attitude-level controller. Gaussian Processes (GPs) are utilized to estimate the uncertainties caused by wind disturbances, and then a nominal Lyapunov-based cascaded quadratic program (QP) controller is designed to track the reference trajectory. To avoid unexpected obstacles when tracking, safety constraints represented by control barrier functions (CBFs) are enforced on each nominal QP controller in a way of minimal modification. The performance of the proposed SPQC controller is illustrated through numerical validations of (a) trajectory tracking under different wind disturbances, and (b) trajectory tracking in a cluttered environment with a dense time-varying obstacle field under wind disturbances.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Safe trajectory tracking is an essential requirement for autonomous aerial vehicles, where an aerial vehicle is required to track a reference trajectory and avoid unexpected obstacles. To achieve high-accuracy tracking and avoid obstacles, the typical approach utilizes a high-level planner to generate a safe trajectory, and a low-level controller running at a much higher frequency than the planner to track the planned trajectory.

In practice, for high-speed quadrotor tracking in a clutter scenario with dense obstacles and limited sensing range, it is challenging for a planner to replan a safe trajectory in real-time. On the other hand, it is difficult to obtain an accurate model for the low-level tracking controller due to wind disturbances, which may cause the safety-critical quadrotor system to deviate from the planned trajectory and even collide with obstacles. These challenges show an urgent need for designing a safe tracking controller that ensures both obstacle avoidance and accurate trajectory tracking for a quadrotor with a limited sensing range and under uncertain wind disturbances.

In recent years, for safe trajectory tracking, the cascaded architecture [1, 2] using control barrier functions (CBFs) to ensure safety has shown great potential for addressing these challenges with practical feasibility. CBFs [3] have been widely used to enforce safety constraints, and has proved to be an effective strategy to avoid obstacles for safety-critical systems. In [4], a learning-based CBF is presented to constrain a quadrotor within a static ellipsoid safe region under wind disturbances. In [2], a cascaded quadratic program (QP) safety-critical controller incorporating CBFs and control Lyapunov functions (CLFs) is proposed. In this work, the quadrotor with a limited sensing range can asymptotically track a reference trajectory by constructing stability constraints (represented by CLFs), and simultaneously avoid obstacles by constructing safety constraints (represented by CBFs). Although this controller can handle time-varying constraints, a precise model of the system is required to enforce the constraints.

Fig. 1:

The cascaded controller consists of a position-level QP and an attitude-level QP. Reference inputs are provided to position and attitude controllers. The GPs estimate the wind disturbances and generate a high confidence interval bound

. With the , the position controller generates the desired thrust , and the attitude controller generates the desired body rotational rates .

Alternatively, Model Predictive Control (MPC) [5] is an effective finite-horizon optimal control method to handle constraints naturally in a safe tracking control problem. For instance, [6] proposes a Nonlinear Model Predictive Control (NMPC) for safe trajectory tracking with obstacle avoidance capacity under constant disturbances. Considering varying disturbances, an adaptive MPC is proposed in [7], which combines a robust MPC with a feedback adaptive controller for safe and high-accuracy tracking. Although these methods can efficiently deal with obstacles when tracking a trajectory, the considered obstacles are assumed to be static.

Considering the limitations of current approaches, a safe tracking controller is desirable to be developed for a quadrotor subject to a limited sensing range to ensure accurate trajectory tracking and enforce safety constraints under wind disturbances. Particularly, it should drive the quadrotor back to the predefined reference trajectory after safely avoiding unexpected static and dynamic obstacles.

In this paper, drawing inspiration from the cascaded architecture [2], we propose a learning-based safety-preserving cascaded QP control (SPQC) approach composed of a position-level controller and an attitude-level controller, as illustrated in Fig. 1. We utilize the Gaussian Process (GP) to estimate a high confidence interval accounting for the model uncertainties caused by wind disturbances. Then, a local motion planning (LMP) method is designed based on the to generate a reference orientation for the attitude controller. In each QP controller, a stability constraint based on CLF is formulated to develop a nominal Lyapunov-based cascaded tracking controller for accurate tracking. Considering safety, the Iterative Regional Inflation by Semidefinite programming (IRIS) algorithm [8] is adopted to construct a time-varying obstacle-free safe region and then use this safe region to design two CBFs to enforce safety constraints both on the position level and the attitude level for the nominal cascaded tracking controller. Finally, the safety constraints are enforced to minimally modify the Lyapunov-based tracking controller to formulate the SPQC controller.

The of this paper are presented as follows:

  • A learning-based SPQC controller consists of a position-level and an attitude-level controller is presented for quadrotors to safely track the reference trajectory with obstacle avoidance capacity under wind disturbances. An LMP algorithm is designed for the attitude-level controller for accurate tracking under wind disturbances.

  • Two CBFs are designed to enforce safety constraints on the position and attitude level for the quadrotor to minimally modify the controls generated by the nominal tracking controller via constrained QPs.

  • The proposed SPQC controller is validated through numerical simulations on a quadrotor in a cluttered environment under varying wind disturbances.

This paper is organized as follows: Section II presents the preliminaries used in this paper. The problem statement is introduced in Section III. Section IV illustrates the proposed SPQC controller. Section V shows simulation results to validate and clarify our SPQC controller. Finally, conclusions are drawn in Section VI.

Ii Preliminaries

In this section, we provide a review of CBFs [3], quadrotor dynamics, and the Gaussian Process [9].

Ii-a Control Barrier Function

Consider a control affine system

(1)

where , denote the state and the control input of the system, respectively. The function and are Lipschitz continuous.

The of the system can be defined by

(2)

where is a continuously differentiable function related to state constraints.

Definition 2. The set is called , if for every , for all .

To ensure forward invariance of , e.g. quadrotors stay in the collision-free safety set at all times, we consider the following definition.

Definition 3 (Definition 5 of [3]). For the dynamical system (1), given a set defined by (2) for a continuously differentiable function , the function is called a defined on the set with , if there exists an extended class function ( and strictly increasing) such that

(3)

where represents the Lie derivatives. To be more specific:

(4)

ZCBF is a special control barrier function that comes with asymptotic stability [10]. The existence of a ZCBF implies the asymptotic stability and forward invariance of as proved in [10].

Ii-B Dynamics of Quadrotor

The motion of the quadrotor can be described by six degrees of freedom: The translational position

in the inertial coordinate system and attitude represented by Euler angles (roll , pitch , and yaw ). The vehicle attitude is defined by the rotation matrix  [4] from the vehicle coordinate system to the inertial coordinate system .

Considering the unknown wind force caused by wind disturbances [11], we adopt the following model to describe the nonlinear quadrotor dynamics,

(5)

where , is the gravity acceleration. and denote the mass and inertia of the quadrotor, respectively. , , and stand for , , and , respectively. The control inputs of the quadrotor are denoted by the body rotational rates and the thrust force along the body axis in the vehicle coordinate system. is unknown wind force acting on the quadrotor.

In this paper, we consider the following state-space nonlinear control affine quadrotor system with partially unknown dynamics, i.e.,

(6)

where and denote the state and control input, respectively. and compose a priori model representing our knowledge of the actual system, and is the model error representing the effects of wind disturbances acting on the quadrotor.

Ii-C Gaussian Processes

We use the Gaussian process (GP) to learn the evolving model error caused by wind disturbances . A GP is a nonparametric regression method that can estimate complex functions and their uncertain distribution [9]. Given observations

, the mean and variance of

at the query state can be given by

(7)
(8)

respectively, where

is the observed vector subject to a zero mean Gaussian noise

. is the covariance matrix with entries, where , , and is the kernel function. , and

is the identity matrix.

With the system model error learned by GPs, a reliable high confidence interval on the uncertain dynamics can be obtained by designing the constant .

(9)

For instance, and confidence are achieved at and , respectively.

Iii Problem Statement

The safe trajectory tracking problem considered herein can be described as follows. Let the quadrotor with a limited sensing range have an initial state (consisting of initial position , velocity , attitude , , ), and the reference yaw . The quadrotor should track a given reference trajectory in a varying wind field while avoiding unexpected static and dynamic obstacles. If it deviates from the reference trajectory due to a sudden wind disturbance or after avoiding obstacles, it should rapidly converge to .

Iv Methodology

In this section, we describe the proposed learning-based safety-preserving cascaded QP control (SPQC) for the system (6) that exploits the disturbance model to provide accurate tracking with safety and input constraints.

We follow a cascaded approach described in [2]. The cascaded controller consists of two QP controllers: a position-level QP controller and an attitude-level QP controller, as illustrated in Fig. 1. The position-level QP controller generates the desired thrust , and the attitude-level QP controller utilizes this thrust together with the high confidence uncertainty interval estimated via GPs to compute the desired body rotational rates . Besides, a corresponding safety constraint is designed to minimally modify each nominal QP controller to keep the quadrotor within the obstacle-free region and avoid unexpected obstacles when the quadrotor is tracking the reference trajectory.

Iv-a Nominal Lyapunov-based Cascaded QP Controller

A nominal Lyapunov-based cascaded QP controller is proposed for trajectory tracking based on CLFs and GPs without the consideration of obstacle avoidance. We first construct a position-level QP controller to track the position of the quadrotor. Then, an attitude-level QP controller with a local motion planning strategy is designed to adjust the attitude of the quadrotor.

Iv-A1 Position-level QP controller

Given a reference trajectory , we can construct the following CLF:

(10)

where , , is the current position of the quadrotor. The values of and are chosen specifically to make the quadratic.

Considering wind disturbances, GPs are employed to estimate the model uncertainties in terms of the predicted mean and variance of the model error through (7) and (8). As shown by our previous work [12], stability constraints can be constructed based on the CLF to ensure stable high tracking performance for the uncertain dynamical system (6). Hence, based on our previous work [12], we can construct a position-level QP controller to compute a nominal thrust for tracking as follows:

(11)
s.t.
(Stability constraints)
(Control constraints)

where is the upper bound of thrust, and is a positive constant. , , and is a slack variable to ensure there is no conflict among the stability constraints and control constraints in (11). and denote the Lie derivatives of with respect to and , respectively.

Remark 1. Note that the optimization (11) is not sensitive to the parameter as long as it is large enough (e.g. ), such that stability constraints violation is heavily penalized.

Iv-A2 Local motion planning (LMP)

During trajectory tracking, a quadrotor may deviate from the reference trajectory due to a sudden wind disturbance or unexpected obstacles. In this study, we proposed an LMP algorithm to obtain a reference attitude for the quadrotor to drive it back to its reference trajectory under wind disturbances. The LMP method is described from the view of discrete control with a control period of .

Let and denote the position of a quadrotor and the target waypoint of reference trajectory at time , respectively. We use GPs to estimate the mean wind disturbances at position level, and at velocity level based on (7). Hence, we can get the next nominal position and velocity of the quadrotor based on the nominal thrust generated by the position-level QP controller (11).

To generate the desired orientation of the quadrotor for tracking, we can adjust the orientation of thrust at time to obtain the desired thrust direction at position level as illustrated in Fig. 2. The desired direction of the thrust at the velocity level at can be obtained in a similar way to that of the desired thrust direction at the position level, and we do not show it in Fig. 2 due to lack of space.

Fig. 2: The local motion planning algorithm. , and are three adjacent target waypoints in a reference trajectory. and are the next nominal position and velocity predicted via GPs, respectively. The blue line is the offset vector of the quadrotor at position level at , and the red line is the desired thrust direction of the quadrotor at the position level.

The desired direction of the thrust at position level at time can be denoted as follows:

(12)

The desired direction of the thrust at velocity level at time can be denoted as follows:

(13)

Then, we can obtain the desired attitude at position level and the desired attitude at velocity level by solving (12) and (13). Thus, we can obtain the desired attitude as follows:

(14)

where is a weight coefficient.

Hence, we can construct a CLF based on the desired attitude as follows:

(15)

where , , , and the values of and are chosen specifically to make the quadratic.

Iv-A3 Orientation-level QP controller

A procedure similar to design the position-level QP controller (11) can be used for the formulation of the attitude-level QP controller as follows:

(16)
s.t.
(Stability constraints)
(Control constraints)

where is the upper bound of body rotational rates, is positive definite, is a positive constant. is a slack variable for stability constraints, .

Remark 2. Note that the optimization (16) is not sensitive to the parameter as long as it is large enough (e.g. ), such that stability constraints violation is heavily penalized.

With the Lyapunov-based cascaded QP controller composed of (11) and (16), the quadrotor can accurately track the reference trajectory even under wind disturbances.

Iv-B Safety Barrier Scheme with a Limited Sensing Range

Fig. 3: The illustration of quadrotor obstacle avoidance. The success of quadrotor obstacle avoidance depends both on its position and orientation. The quadrotor is in the safe state if it stays in the obstacle-free ellipsoid, and this can be captured through the condition: . The quadrotor Q2 is more capable of avoiding the obstacle than quadrotor Q1, and this can be captured through the condition: .

In practice, for quadrotor tracking in cluttered environments, the reference trajectory becomes unsafe when there exist unexpected obstacles in or near the trajectory. The quadrotor should sacrifice its tracking performance and adjust its attitude to avoid unexpected obstacles in real-time as shown in Fig. 3.

Iv-B1 Safety obstacle-free region

An ellipsoid safe region can be obtained in real-time for the quadrotor with a limited sensing range based on the IRIS algorithm [8]. The IRIS algorithm is efficient in quickly computing the largest ellipsoidal regions of obstacle-free space through semidefinite programming. For a quadrotor tracking task, when there exist obstacles within its sensing region, a maximum ellipsoid in mathematical form can be constructed by utilizing the distance from the quadrotor to the obstacles in each direction.

Remark 3. Note that the quadrotor has a limited sensing range , such that a point on an obstacle is detected only when , where is the current position of the quadrotor in the inertial coordinate system .

We represent the inscribed ellipsoid as an image of the unit ball:

(17)

where , denotes a unit ball, denotes the mapping matrix, and denotes the offset vector. The matrix and can be obtained for specific polyhedrons (e.g. obstacles) based on the IRIS algorithm. Then, we can get the following equation via equivalent transformation:

(18)

Finally, we can construct a ZCBF at the position level by taking the inscribed ellipsoid as the safe region of the quadrotor:

(19)

where is the current position of quadrotor.

Remark 4. Note that shows that the quadrotor stays within the safety ellipsoid region .

We can construct another ZCBF to drive the direction of the quadrotor thrust toward the center of the obstacle-free ellipsoid to avoid obstacles as illustrated in Fig. 3:

(20)

where , .

Iv-B2 Safety-preserving cascaded QP control (SPQC)

A minimally modified SPQC controller can be designed to avoid obstacles based on these two ZCBFs and the estimated high-confidence interval (9) accounting for wind disturbances. The SPQC is designed to modify the nominal tracking controller in a way of minimally modified. GPs are employed to estimate the wind disturbances in terms of the predicted mean and variance of the model error through (7) and (8).

As shown by our previous work [12], safety constraints can be enforced on the uncertain system (6) based on the ZCBF to keep the quadrotor’s position in the safe region . Hence, the position-level safety constraints can be enforced as follows:

Position-level QP: Minimally modification

(21)
s.t.
(Safety constraints)
(Control constraints)

where is the thrust generated by the nominal position-level controller (11), , and is a slack variable.

To avoid obstacles, a safe attitude-level QP based on the ZCBF is designed to construct the attitude-level safety constraints as follows:

Attitude-level QP: Minimally modification

(22)
s.t.
(Safety constraints)
(Control constraints)

where is the body rotational rates generated by the nominal attitude-level controller (16), , and is a slack variable.

Remark 5. Note that the solution and to the QP in (21) and (22) are always feasible because the slack variables and can ensure no conflict among the safety and control input constraints. Furthermore, the weights and are set large values (e.g. , ) to penalize safety violation, and hence, the optimizations in (21) and (22) are not sensitive to the and parameters.

Remark 6. Note that the safety constraints in (21) and (22) are utilized to minimally modify the nominal controls generated by the Lyapunov-based cascaded QP controller composed of (11) and (16) via constrained QPs.

V Experiments

We built a simulator with Python 3.6 to numerically validate the performance of the proposed SPQC controller. The python library CVXOPT [13] is utilized to solve the QP problem. The simulation time is set to be 20 , and the control frequency is 50 . The quadrotor model is a crazyflie 2.0 with a two-meter sensing range. The mass of the quadrotor , the maximum thrust , and the body rotational rate .

V-a Experimental setup

(a) Tracking error
(b) Estimated disturbance
Fig. 4: Trajectory tracking result of the SPQC controller under wind disturbances. Note that the jumps in Zone C of 4(a) are caused by a sudden gust disturbance. The wind disturbance estimated via GPs is shown in 4(b).
Uncertainty Wind Disturbance NMPC [14] SPQC-N SPQC
Zone A Constant 0.0499 0.0724 0.0198
Zone B Changing 0.0409 0.0883 0.0003
Zone C Sudden 0.0485 0.0867 0.0137
TABLE I: Root Mean Square (RMS) Tracking Error (in meter) in Each Zone for Different Controllers on the Quadrotor
(a) Snapshot at t = 2s.
(b) Snapshot at t = 8s
(c) Snapshot at t = 20s
(d) Tracking error
Fig. 5: Numerical validation of the quadrotor flight through a densely cluttered obstacle field under varying wind disturbances. Snapshots of the simulation are shown in 5(a)5(b) and 5(c), respectively. The red solid line and the black dashed line denote the actual and reference trajectory, respectively. The red and blue obstacles denote the dynamic and static obstacle crossing the reference trajectory, respectively. The tracking error in each axis between the actual and reference trajectory is shown in 5(d).When the reference trajectory violates the safety constraint (by passing through an obstacle), the controller automatically re- laxes trajectory tracking to strictly enforce safety constraints. Simulation video: https://youtu.be/zNFtJq7yJ2Q.

In the experiments, we assess two aspects of the proposed SPQC controller: (i) trajectory tracking performance under different wind disturbances, and (ii) trajectory tracking with obstacle avoidance under varying wind disturbances. The reference trajectory is given as a spiral curve and . The initial state of the quadrotor is , , , , , , , ,  .

We use GPs to learn the uncertainty vector (6

). Each GP uses the same mixture of linear and radial basis function (RBF) kernels to capture the model uncertainties that result from wind disturbances. Each GP uses the past

observations collected at 50 . To generate high confidence intervals to estimate wind disturbances, we use , where , as high confidence intervals (9).

V-B Trajectory Tracking under Different Wind Disturbances 

As shown in Fig. 4(b), we define zones A, B and C with different wind disturbances. In zone A, the wind disturbance is constant: . In zone B, a varying wind field , where and is added to . In zone C, gusts is added to on the system from to to simulate a sudden wind gust.

It can be seen from Fig. 4(a), the position error converges to zero in each zone. The sudden gust pushes the quadrotor away from the trajectory when the quadrotor travels in zone C, and the SPQC controller enables the quadrotor back to the trajectory after the gust. Fig. 4(a) shows that the actual wind disturbance lies within the uncertainty interval estimated via GPs when the quadrotor is in zone A and zone B. Besides, the actual wind disturbance lies within the uncertainty interval after the sudden wind blow in zone C.

We compare the SPQC controller with the NMPC [14] and an SPQC-N controller, where the SPQC-N is an ablation version of SPQC without estimated model uncertainties. The Root Mean Square Error (RMSE) of position tracking for each controller is shown in Table. I. In each zone, the SPQC method achieves a smaller tracking error than the NMPC and SPQC-N controller.

V-C Trajectory Tracking with Obstacles 

In the second experiment, the quadrotor is commanded to track the same dynamic time-varying trajectory under a varying wind disturbance. The wind disturbance . The reference trajectory is surrendered by several static obstacles. Two dynamic obstacles fly to the quadrotor along the reference trajectory with a speed of when the quadrotor is tracking the .

Figure 5(d) shows the tracking error between the quadrotor position and the reference trajectory . When there are no obstacles along the trajectory, the tracking error converges to zero. Furthermore, at about 2.5, 7, 14, and 16 seconds in the simulation time, the tracking errors rise to high values which indicates that the quadrotor has changed its trajectory to avoid collision with the detected obstacles. Fig. 5 shows that the SPQC controller stably tracks the reference trajectory when the trajectory is safe, while the controller relaxes tracking the reference when avoiding obstacles. This simulation results indicate that the SPQC controller can mediate the trade-off between safety and tracking performance.

Vi Conclusion

This paper presents a novel learning-based SPQC scheme that achieves high-accuracy tracking performance while guaranteeing safety for the quadrotor with a limited sensing range and under wind disturbances. The proposed SPQC scheme consists of a nominal tracking controller and the safety constraints based on ZCBFs. In this control scheme, the GPs are exploited to online estimate the uncertainties of the wind disturbances, and an LMP algorithm is designed to generate the desired tracking attitude. By minimally modifying the nominal tracking controls, the quadrotor can avoid unexpected obstacles while staying within the safety region represented by ZCBFs. The proposed SPQC algorithm was shown to improve tracking performance compared with an NMPC [14] method under different disturbances. Numerical simulation results show that the SPQC controller was capable of performing the trajectory tracking task with obstacle avoidance capacity under varying wind disturbances.

References

  • [1] M. Khan, M. Zafar, and A. Chatterjee, “Barrier functions in cascaded controller: Safe quadrotor control,” in 2020 American Control Conference (ACC).   IEEE, 2020, pp. 1737–1742.
  • [2] G. Wu and K. Sreenath, “Safety-critical control of a 3d quadrotor with range-limited sensing,” in Dynamic Systems and Control Conference, vol. 50695.   American Society of Mechanical Engineers, 2016, p. V001T05A006.
  • [3] A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs for safety critical systems,” IEEE Transactions on Automatic Control, vol. 62, no. 8, pp. 3861–3876, 2016.
  • [4] L. Wang, E. Theodorou, and M. Egerstedt, “Safe learning of quadrotor dynamics using barrier certificates,” 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 2460–2465, 2018.
  • [5] D. Q. Mayne, J. B. Rawlings, C. V. Rao, and P. O. M. Scokaert, “Constrained model predictive control: Stability and optimality,” Automatica, vol. 36, pp. 789–814, 2000.
  • [6] J. C. N. Pereira, V. J. S. Leite, and G. V. Raffo, “Nonlinear model predictive control on se(3) for quadrotor trajectory tracking and obstacle avoidance,” 2019 19th International Conference on Advanced Robotics (ICAR), pp. 155–160, 2019.
  • [7] K. Pereida and A. P. Schoellig, “All models are wrong: Robust adaptive model predictive control for safe and high accuracy trajectory tracking in the presence of model errors.”
  • [8] R. Deits and R. Tedrake, “Computing large convex regions of obstacle-free space through semidefinite programming,” in WAFR, 2014.
  • [9]

    C. E. Rasmussen and C. K. I. Williams, “Gaussian processes for machine learning,” in

    Adaptive computation and machine learning, 2005.
  • [10] X. Xu, P. Tabuada, J. W. Grizzle, and A. D. Ames, “Robustness of control barrier functions for safety critical control,” in ADHS, 2015.
  • [11] L. Qian and H. H. T. Liu, “Path-following control of a quadrotor uav with a cable-suspended payload under wind disturbances,” IEEE Transactions on Industrial Electronics, vol. 67, pp. 2021–2029, 2020.
  • [12] L. Zheng, J. Pan, R. Yang, H. Cheng, and H. Hu, “Learning-based safety-stability-driven control for safety-critical systems under model uncertainties,” 2020.
  • [13] M. S. Andersen, J. Dahl, and L. Vandenberghe, “Cvxopt: A python package for convex optimization, version 1.1. 6,” Available at cvxopt. org, vol. 54, 2013.
  • [14] M. I. Owis, S. El-Bouhy, and A. El-Badawy, “Quadrotor trajectory tracking control using non-linear model predictive control with ros implementation,” 2019 7th International Conference on Control, Mechatronics and Automation (ICCMA), pp. 243–247, 2019.