Next Article in Journal
Analyzing Sample Size in Information-Theoretic Models
Previous Article in Journal
Improved Genetic Algorithm for Solving Robot Path Planning Based on Grid Maps
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

High-Order Control Lyapunov–Barrier Functions for Real-Time Optimal Control of Constrained Non-Affine Systems

by
Alaa Eddine Chriat
* and
Chuangchuang Sun
Aerospace Engineering Department, Mississippi State University, Starkville, MS 39762, USA
*
Author to whom correspondence should be addressed.
Mathematics 2024, 12(24), 4015; https://doi.org/10.3390/math12244015
Submission received: 13 November 2024 / Revised: 6 December 2024 / Accepted: 20 December 2024 / Published: 21 December 2024
(This article belongs to the Special Issue Advances in Decision Making, Control, and Optimization)

Abstract

:
This paper presents a synthesis of higher-order control Lyapunov functions (HOCLFs) and higher-order control barrier functions (HOCBFs) capable of controlling nonlinear dynamic systems while maintaining safety. Building on previous Lyapunov and barrier formulations, we first investigate the feasibility of the Lyapunov and barrier function approach in controlling a non-affine dynamic system under certain convexity conditions. Then we propose an HOCLF form that ensures convergence of non-convex dynamics with convex control inputs to target states. We combine the HOCLF with the HOCBF to ensure forward invariance of admissible sets and guarantee safety. This online non-convex optimal control problem is then formulated as a convex Quadratic Program (QP) that can be efficiently solved on board for real-time applications. Lastly, we determine the HOCLBF coefficients using a heuristic approach where the parameters are tuned and automatically decided to ensure the feasibility of the QPs, an inherent major limitation of high-order CBFs. The efficacy of the suggested algorithm is demonstrated on the real-time six-degree-of-freedom powered descent optimal control problem, where simulation results were run efficiently on a standard laptop.

1. Introduction

Since the mid-1950s, fast technological advancements have been significantly influenced by the demands of the automotive, robotics, and aerospace industries for precision, reliability, and robustness. With this advancement, modern control theory emerged with multiple techniques to handle complex uncertain systems, leveraging digital computers to perform complex calculations. Unlike classical control theory, which relies heavily on model simplifications and frequency domain techniques, modern control theory focuses on using state-space methods and various estimation techniques like optimal and adaptive control to control complex dynamic systems. Modern techniques were enhanced to be more robust and reliable over time, such as nonlinear model predictive control or model-free adaptive control [1,2,3,4]. Nevertheless, these techniques still have some shortcomings such as model dependency, computational complexity, and implementation challenges.
Researchers have since worked on new forms of model predictive control which leverage the use of a sequence of techniques like linearization and discretization to generate an optimal control problem that can be iteratively solved like model predictive control. These techniques offer excellent reliability and robustness but still suffer from computational cost and complexity in real-time implementation. The work in [5,6,7] synthesizes the second-order cone program (SOCP), conditionally enforced constraints, and linearization and discretization procedures to transform highly complex nonlinear systems with non-convex state and control into a convexified problem and demonstrates its performance on the 6DoF powered descent guidance problem as a feed-forward trajectory generation problem.
Although successive convexification (SCvx) can provide a real-time control solution for complex systems, it has some significant drawbacks. First, linearization and discretization in a real-time implementation abstract the higher-order features of the problem, rendering the convex model inadequate outside the nominal states. This abstraction possibly raises convergence issues, lowers the confidence in maintaining safety constraints, or even leads to unstable control behavior. Second, SCvx can encounter infeasibility and thus requires good initialization, which can be challenging to acquire for some nominal states, especially for systems with fast dynamics, making SCvx vulnerable to disturbances and model uncertainties. Ultimately, as SCvx requires iteratively solving a sequence of convex optimization problems at each step, real-time implementation can impose a significant computational burden when handling complex problems with large state and control spaces, which may lead to delays in decision-making.
In recent years, a new theory emerged that shows the capability of controlling nonlinear systems while ensuring safety despite non-convex constraints. Based on the work in [8,9,10], which lays the mathematical foundation for Lyapunov functions and their application in null-asymptotic controllability, researchers have synthesized a control Lyapunov function and control barrier function approach to design safe, deployable controllers. The work in [11,12] uses barrier functions as a novel methodology for specifying and strictly enforcing safety conditions. When unified with control Lyapunov functions in the context of a quadratic program, CLFs and CBFs provide real-time optimization-based controllers capable of controlling and ensuring the safety of nonlinear dynamics and non-convex safety constraints in conjunction with performance objectives. This approach proved effective in numerous applications, including automotive control problems like adaptive cruise control and lane-keeping. This approach was extended for higher-order systems [13] and infers asymptotic stability by examining the second- and third-order derivatives of the Lyapunov functions and argues the crucial role that higher-order derivatives play in establishing analytical stability. Recently, this result has been adapted and generalized to higher-order derivatives and time-varying systems by parameterizing Lyapunov functions and imposing some conditions on their higher-order derivatives [14], while, for safety, the authors of [15,16] proposed a sequence of time-varying barrier functions to ensure the intersection of all subsets of the safety constraint remains forward invariant. This approach extends the concept of Lyapunov and barrier functions to higher-order control Lyapunov barrier functions (HOCLBFs), designed specifically for safely constraining higher-order systems subject to high-relative-degree constraints.
Adopting the control Lyapunov and barrier functions approach proves advantageous for designing online real-time controllers that can enforce safety constraints and manage non-convex constraints and dynamics, as the control problem reduces solving a straightforward, computationally efficient quadratic program at each time step. Nonetheless, the existing literature requires a control affine system for using CLFs and CBFs. Additionally, the unification of these control functions suffers several limitations when subject to different constraints, which renders the quadratic program infeasible or inaccurate or results in divergent behaviors. Finally, this approach has been adopted for simple low-dimensional problems such as 2D robots or adaptive cruise control and has yet to prove its efficacy in complex systems such as aerospace applications with highly nonlinear dynamics and uncertain environments that demand real-time, adaptive, and reliable control systems.

1.1. Motivation and Contributions

Our motivation in this work is to attract more research on the foundation of the Lyapunov and barrier functions and their feasibility in controlling complex systems, as generalizing the approach to a broader scope of problems such as non-affine systems can reveal more insights into the theory and design of robust controllers in addition to the broader scope of problems that can be tackled using this approach. In this work, we aim to enhance the current advances and overcome the drawbacks of this method. Finally, we aim to demonstrate the feasibility of this approach in controlling a highly complex control problem. In this paper, we start initially by investigating the applicability of CLFs and CBFs to non-affine systems and then contemplate the current forms of CLFs and CBFs and enhance the formulation to require less tunable parameters. Finally, we apply this approach to the 6DoF powered descent problem to showcase the ability of CLFs and CBFs to control high-dimensional complex systems. Our contribution can be summarized in the following:
1.
We establish sufficient conditions for generalizing CLFs and CBFs to non-affine control systems.
2.
We propose a computationally efficient higher-order CLF formulation and address the different infeasibilities that arise from unifying high-order CLFs and CBFs due to the large number of tunable parameters using fewer parameters and a heuristic approach to tune them.
3.
We illustrate the efficacy of our approach by devising an online real-time optimal controller for six-degree-of-freedom powered descent with non-affine inputs, considering a range of non-convex safety constraints.
This work puts an effort toward the unification of the CLF and CBF theory and achieving a concise robust form, inviting more future research in developing robust controllers and coupling these controllers with machine learning algorithms. Figure 1 illustrates the HOCLBF approach in the general context of optimal control theory.

1.2. Organization

The rest of the paper is organized as follows. Section 2 reviews the mathematical background for control Lyapunov and barrier functions. In Section 3, we expand the scope of the CLFs and CBFs beyond control affine systems, suggest a new high-order CLF formulation, synthesize the CLF-CBF approach, and address the potential infeasibility sources using both heuristic and classical approaches. In Section 4, we demonstrate the efficiency of the HOCLBF approach in controlling 6-DOF powered descent, along with numerical simulation results presented in Section 4.1.5. Conclusions and possible future directions of this work are detailed in Section 5.

2. Preliminaries

This section briefly reviews some fundamental definitions of stabilizing control Lyapunov and barrier functions, while we refer the reader to [8,9,10,11,12,13,14,15,16] for a deeper understanding of these concepts. Consider the nonlinear control-affine system:
x ˙ ( t ) = f ( x ( t ) ) + g ( x ( t ) ) u ( t )
where f and g are globally Lipschitz, x R n and u R m are the states and control inputs, respectively, constrained in closed sets, with initial condition x ( t 0 ) = x 0 .
Definition 1
([10,11,12]). A continuous differentiable function V : R n R + is an exponentially stabilizing control Lyapunov function if it is positive, proper, infinitesimally decreasing, and there exists c 1 , c 2 , c 3 > 0 , such that for any solution x ( t ) :
c 1 x 1 2 V ( x ) c 2 x 2 inf u U [ L f V ( x ) + L g V ( x ) u + c 3 V ( x ) ] 0
The Lyapunov function yields a feedback controller that exponentially stabilizes and drives the system to the desired output/zero dynamics, with  c 3 representing the rate of convergence of the solution:
x ( t ) c 2 c 1 e c 3 t 2 x ( 0 ) ,
and this controller is equivalent to a min-norm controller that can be solved via a quadratic program, which proved efficient in experimental application [17,18].
min u U u u s . t . L f V ( x ) + L g V ( x ) u + c 3 V ( x ) 0
Definition 2
([19]). The relative degree of a differentiable function refers to the number of differentiations required to obtain the control input u explicitly shown in the control function.
Since most systems are not first-order in control inputs, we need to ensure stability using the higher-order derivatives of the Lyapunov function. We can infer asymptotic stability by examining up to the third derivative of the Lyapunov function.
Definition 3
([13]). If the function V ( x ) is three times differentiable, and there exist a 1 , a 2 > 0 such that:
a 1 V ( x ) + a 2 V ¨ ( x ) + V ˙ ( x ) 0
then V ( x ) is an asymptotic stabilizing Lyapunov function.
In addition to stability requirements, the nonlinear system (1) is often subject to critical safety measures. These safety measures can be stated as a set C defined by some continuous function h ( x ) as:
C = x R n : h ( x ) 0 𝜕 C = x R n : h ( x ) = 0 Int ( C ) = x R n : h ( x ) > 0
where 𝜕 C is the boundary of the set representing the critical safety limits, and  Int ( C ) is the interior of the set constituting all the permissible/safe states. We can use control barrier functions to ensure the solutions x ( t ) will not leave the safe set C, t 0 [20]. The CBF is a new mathematical technique used to guarantee the safety and stability of a dynamic system while achieving the desired goals. CBFs are scalar functions that quantify the system’s safety in the current state. The control law is then designed to keep the system within the safety region defined by the CBFs. Mathematically, consider the nonlinear control affine system (1).
Definition 4
([12]). If there exists a continuous function α ( ) : [ b , a ] R R that is strictly increasing and α ( 0 ) = 0 , then α belongs to the extended K class functions.
Definition 5
([12]). The function h : R n R is a zeroing barrier function for the safe set C = x R n : h ( x ) 0 if there exists an extended K class function α ( ) such that:
sup u U [ L f h ( x ) + L g h ( x ) u + α ( h ( x ) ) ] 0 inf i n t ( C ) [ α ( h ( x ) ) ] 0 and lim 𝜕 C α ( h ( x ) ) = 0
The existence of the CBF h ( x ) renders the set C forward invariant.
In the same way as Lyapunov functions, control barrier functions require that the control input u appears in h ( x ) . In [16], they propose a higher-order CBF to handle higher-relative-order constraints.
Definition 6
([16]). For the nonlinear system (1) with the m t h differentiable constraint h ( x ) , we define a sequence of functions ψ i starting from ψ 0 = h ( x ) and a sequence of safe sets C i ( t ) associated with each ψ i , with  i { 1 , 2 , . . . , m } :
ψ i ( x , t ) = ψ ˙ i 1 ( x , t ) + α i ψ i 1 ( x , t ) C i ( t ) = x R n : ψ i 1 ( x , t ) 0
The function ψ m is a high-order control barrier function if there exist extended K class functions α i ( ) such that:
sup u U [ L f m h ( x ) + L g L f m 1 h ( x , t ) u + 𝜕 m h ( x , t ) 𝜕 t m + O ( h ( x , t ) ) + α m ( ψ m 1 ( x , t ) ) ] 0
x ( t ) C 1 ( t ) , , C m ( t ) , t > 0 , under the condition that x ( 0 ) C 1 ( 0 ) , , C m ( 0 ) .
Ensuring ψ m 0 guarantees the forward invariance of the set C m + 1 and, subsequently, the forward invariance of all the sets C m i ( t ) , hence ensuring the system’s safety within the set C 1 ( t ) , similar to Definition 5. To guarantee the feasibility of the HOCBF, the authors of [16] suggested multiplying the class K functions α ( ) by a penalty term p i and solving iteratively to relax the problem when needed:
ψ i = ψ ˙ i 1 + p i α i ψ i 1

3. A QP Formulation Based on High-Order Control Lyapunov–Barrier Functions

In this section, we synthesize HOCLFs and HOCBFs to control nonlinear systems. We first establish some conditions to extend the use of CLFs and CBFs for controlling and constraining non-affine nonlinear systems. Next, we propose a new form for higher-order CLFs inspired by the analytical first-order CLF in [10,11,12], explicitly displaying the rate of convergence and the computational high-order CLF proposed in [13] incorporating the higher-order derivative of the Lyapunov function. Finally, we suggest a classical controller to address the contrast between the CLFs and a heuristic approach to handle the infeasibility in the QP arising from CLF and CBF conflicts.
Starting from the first formulation of Lyapunov functions [8], Artstein’s theorem considers a general dynamic system of the form x ˙ = f ( x , u ) and argues its global asymptotic stability under the condition of finding a continuous function V : R n R such that:
V ( 0 ) = 0 x = 0 V ( x ) > 0 x 0 inf u U [ V · f ( x , u ) ] < 0 x 0
A smooth mapping v ( x ) : R U is constructed to achieve the global asymptotic stability of the system with the feedback law x ˙ = f ( x , v ( x ) ) , where v ( x ) belongs to a convex set and U is a convex polytope U = u R m A 0 u b 0 . It is also suggested to consider a piece-wise linear function to ensure Lipschitz continuity and guarantee the existence of a control law v ( x ) . The linearity in input was further established in the work conducted in [9], where a universal Artstein theorem is constructed for systems with affine inputs. Since Artstein’s theorem guarantees the stability of a general dynamic system, we argue that we can use analytical Lyapunov and barrier functions to stabilize non-affine nonlinear systems using convex optimization under certain conditions.
In this work, we consider a general dynamic system of the form:
x ˙ ( t ) = f ( x ( t ) ) + g ( x ( t ) , u ( t ) )
where x R n and u R m are the states and control inputs, respectively. f and g are globally Lipschitz, and g is at least twice differentiable. We also consider a continuously differentiable positive-definite function V : R n R + to be an exponentially stabilizing control Lyapunov function yielding the following controller:
min u U u u s . t . [ V · x ˙ + c V ( x ) ] 0
Theorem 1.
For a general Lyapunov function V : R n R + , the min-norm controller (13) is a convex quadratic program if [ V ( x ) · g ( x , u ) ] is convex, requiring that V ( x ) and g ( x , u ) are both convex and positive functions (or concave and negative) and have the same monotonicity. Since V ( x ) is a function of the states only, it is sufficient that [ V ( x ) · 𝜕 2 g ( x , u ) 𝜕 u 2 ] 0 . That is, V ( x ) is positive and  g ( x , u ) is convex (or negative and concave) in d o m ( V ) d o m ( g ) , respectively.
Proof. 
We prove the first statement by verifying Jensen’s inequality for the product [ V ( x ) · g ( x , u ) ] . If  V ( x ) and g ( x , u ) are positive, convex, and have the same monotonicity, then for 0 θ 1 , we find:
V ( x ) g ( x , θ u 1 + ( 1 θ ) u 2 ) θ V ( x ) g ( x , u 1 ) + ( 1 θ ) V ( x ) g ( x , u 2 )
We prove the second statement by verifying the second-order convexity condition. Taking the first derivative of [ V ( x ) · x ˙ ] with respect to the control input eliminates [ V ( x ) · f ( x ) ] and yields
d [ V ( x ) · x ˙ ] d u = 𝜕 V ( x ) 𝜕 u · g ( x , u ) + V ( x ) · 𝜕 g ( x , u ) 𝜕 u
Taking the second derivative yields
d 2 [ V ( x ) · x ˙ ] d u 2 = 𝜕 2 V ( x ) 𝜕 u 2 · g ( x , u ) + V · 𝜕 2 g ( x , u ) 𝜕 u 2 + 2 𝜕 V ( x ) 𝜕 u · 𝜕 g ( x , u ) 𝜕 u ,
and canceling the term involving 𝜕 V ( x ) , we obtain
𝜕 2 [ V ( x ) · x ˙ ] 𝜕 u 2 = V ( x ) · 𝜕 2 g ( x , u ) 𝜕 u 2 .
Therefore, the convexity of the feasible set in the quadratic program depends on the sign of V ( x ) · 𝜕 2 g ( x , u ) 𝜕 u 2 .    □
Remark 1.
With similar reasoning, we can prove that the CBF in (7) defines a convex feasible set for the quadratic program if [ h ( x ) · 𝜕 2 g ( x , u ) 𝜕 u 2 ] 0 .
Remark 2.
A control affine system is a special case as [ V · 𝜕 2 g ( x , u ) 𝜕 u 2 ] = [ h ( x ) · 𝜕 2 g ( x , u ) 𝜕 u 2 ] = 0 .
Example 1.
The following example demonstrates an extreme case where both [ V ( x ) · g ( x , u ) ] change sign within d o m ( V ) d o m ( g ) while keeping the convexity condition valid. Consider the system
x ˙ = 10 x 2 5 x u
We can drive and stabilize this system from an arbitrary x 0 to the unstable equilibrium point at x f = [ 0 0 ] by using the Lyapunov function V ( x ) = x 2 . This results in
V ( x ) = 2 x , 𝜕 2 g ( x , u ) 𝜕 u 2 = x 4 u 3 .
By examining V ( x ) and 𝜕 2 g ( x , u ) 𝜕 u 2 , we can see a change of sign between x R + n and x R n ; nevertheless, [ V ( x ) · 𝜕 2 g ( x , u ) 𝜕 u 2 ] 0 for x R n . Hence, we conclude controllability via the control Lyapunov function
C L F : = 20 x 3 10 x 2 u + c x 2 0
Figure 2 shows the state trajectory, control trajectory, and phase portrait of the unforced system.
Next, we propose a new computationally efficient form for higher-order CLFs that can exponentially stabilize nonlinear systems. Starting from the HOCLF proposed in [13], we ensure the satisfaction of positiveness and zero dynamics by the initial choice of the Lyapunov function, e.g., taking a quadratic function of the difference between the desired and actual solution guarantees V ( x ) > 0 , t and V ( 0 ) = 0 .
V ( x , x d ) = ( x d e s i r e d ( t f ) x ( t ) ) 2
We also omit the scalars τ i and add the Lyapunov function multiplied by a scalar c that represents the rate of convergence of the CLF to the sum of Lyapunov derivatives and obtain the following HOCLF:
inf u U [ V m + V m 1 + + V ˙ + c V ] 0
Combining high-order Lyapunov and barrier functions can often encounter infeasibilities. The first source of infeasibility comes from the conflicts of goals between the CLFs and CBFs. This problem was overcome in [11,12,21] by adding a relaxing (softening) term δ to the CLFs, which allows them to diverge from the desired states to guarantee the satisfaction of CBF constraints. The second infeasibility arises from the HOCLF and HOCBF coefficients when their constraints conflict with the constraint of the control input bounds. Although [16] suggested an iterative approach to change the parameters until they make the QP feasible, it relaxes the safety constraints and has a marginally incremental impact on computation time and power. Alternatively, we adopt a heuristic approach where the quadratic program solves for approximate solutions when an optimal solution is impractical or impossible to find, and this is achieved by maximizing the rates of convergence for the CLF and the Kappa function coefficients with a tunable upper bound while minimizing the relaxing terms for the CLF. The last infeasibility to overcome stems from conflicts between the multiple goals of CLFs; e.g., a position CLF driving the system towards a desired position conflicts with the velocity CLF trying to attenuate the velocity to zero, resulting in a quadratic program infeasibility. To overcome this issue, we suggest using state-varying desired states. In other words, instead of using the final desired states in the CLFs, we compute intermediate desired states between the initial and final states. We suggest two methods for determining intermediate states.
Navigational Planner: We can use a navigation algorithm between the initial and final states and obtain a sequence of plausible intermediate states; nonetheless, this method has some distinctive drawbacks. Employing the navigation algorithm offline leaves it myopic to the current state and trajectory; therefore, its intermediate states can become unreachable as the current trajectory progresses, especially for highly nonlinear coupled dynamics. On the other hand, using the algorithm online can generate excellent intermediate states; however, it requires significantly higher computational power and time.
PID Planner: We can use an online PID planner to generate the subsequent intermediary desired state based on our current and final state. We can define the error between the current and final state as e x ( t ) = x d e s i r e d ( t f ) x ( t ) , yielding a PID planner as follows:
x d e s i r e d ( t + d t ) = K P e x ( t ) + K I 0 t f e x ( τ ) d τ + K D d e x ( t ) d t
where K P , K I , K D are tunable parameters. We adopt this approach in our work as it provides an exceptional compromise between generating online, plausible, reachable intermediate states and considerable computational efficacy. The final form of the optimal quadratic program controller we suggest is as follows:
min u , δ , q , c : u T H ( x ) u + δ T Q ( x ) δ P T ( x ) q R T ( x ) c s . t : V i m ( x P I D ) + V i m 1 ( x P I D ) + + V ˙ i ( x P I D ) + C i V i ( x P I D ) δ i HOCLF V ˙ j ( x P I D ) + C j V j ( x P I D ) δ j CLFs ψ m , 0 , k ( x P I D ) + ψ m , 1 , k ( x P I D ) + α m , k ψ m 1 , k ( x P I D ) 0 HO - ZCBFs Φ 0 , 0 , p ( x P I D ) + Φ 0 , 1 , p ( x P I D ) + α p Φ 0 ( x P I D ) 0 ZCBFs A 0 u b 0 Control limitation Other DCP constraints
where H , Q , P , and R are weighing coefficients used to tune the system’s behavior.

4. Simulations and Results

4.1. 6-DOF Optimal Powered Descent

To demonstrate the proposed HOCLBF framework on a more complex system, we address the problem of controlling a 6-DOF powered descent. The model we use in this paper is inspired by [7,22,23] but tailored to accommodate our application. In our model, we assume a single 2D gimbal engine that can continuously vary between minimum and maximum thrusts; the rocket is a rigid body with a constant CG and inertia and we neglect any deformations. We assume the dynamics are mainly governed by inertial and thrust forces and neglect aerodynamic forces based on the findings of [7]. Lastly, we ignore planetary motion and assume a constant gravity throughout the rocket trajectory.

4.1.1. Dynamic Model

To fully describe the dynamics of the 6-DOF rocket, similar to [7,23] we assume the fuel dynamics are governed by an affine function of the thrust magnitude and neglect the atmospheric back pressure:
m ˙ ( t ) = α m ˙ T B 2
where α m ˙ = 1 I s p g 0 . I s p is the vacuum specific impulse of the engine, and  g 0 is standard Earth gravity. We describe the translational and rotational dynamics with six differential equations as follows.
r ˙ I ( t ) = C I B ( q I ( t ) ) v b v ˙ B ( t ) = 1 m ( t ) [ T ( t ) + A ( t ) ] + E B I ( q I ( t ) ) g I ω B × v B r ¨ I ( t ) = C I B ( q I ( t ) ) v ˙ B + C ˙ I B ( q I ( t ) ) v B q ˙ I ( t ) = E I B ( q I ( t ) ) ω B ω ˙ B ( t ) = J ˜ B 1 r T , B × T B ( t ) + r c p , B × A ( t ) J ˜ B 1 ω B × J ˜ ω B q ¨ I ( t ) = E I B ( q I ( t ) ) ω ˙ B + E ˙ I B ( q I ( t ) ) ω B
We add the second derivative of the position and attitude in the inertial frame. We make these adjustments to accommodate the Lyapunov approach efficiently.

4.1.2. High-Order Control Lyapunov Functions

To drive the states to the desired ones, we need to formulate positive Lyapunov functions that are twice differentiable as the order of the position dynamics is m = 2 . Hence, we use the following quadratic Lyapunov function which satisfies positiveness and the zero dynamics point and yields:
V i = 1 2 s i ( t ) s i d 2 2 V ˙ i = s ˙ i ( t ) s i ( t ) s i d V ¨ i = s ¨ i ( t ) s i ( t ) s i d + s ˙ i 2 ( t ) C L F : = V ¨ r I + V ˙ r I + c r I V r I δ r I
Position CLF : V ¨ r I = 1 m ( t ) r I ( t ) r d C I B ( q I ( t ) ) T ( t ) + r I ( t ) r d C I B ( q I ( t ) ) [ 1 m ( t ) A ( t ) + E B I ( q I ( t ) ) g I ω B ( t ) × v B ( t ) ] + r I ( t ) r d C ˙ I B ( q I ( t ) ) v B ( t ) + r ˙ I ( t ) 2 Velocity CLF : V ˙ v B = 1 m ( t ) v B ( t ) v d T ( t ) + v B ( t ) v d E B I ( q I ( t ) ) g I ω B ( t ) × v B ( t ) Attitude CLF : V ¨ q I = q I ( t ) q d E B I ( q I ( t ) ) J ˜ 1 r T × T ( t ) + ( q I ( t ) q d ) E B I ( q I ( t ) ) [ J ˜ 1 ( r c p × A ( t ) ω B ( t ) × J ˜ ω B ( t ) ) ] + ( q I ( t ) q d ) E ˙ B I ( q I ( t ) ) ω B ( t ) + q ˙ I ( t ) 2 Angular velocity CLF : V ˙ ω B = ω B ( t ) ω d J ˜ 1 r T × T B ( t ) + ω B ( t ) ω d J ˜ 1 r c p × A ( t ) ω B ( t ) × J ˜ ω B ( t )
Formulating all the Lyapunov functions with the relaxing terms and PID planner ensures convergence to the desired states while maintaining flexibility to diverge when a conflict of goals happens based on the weights of the relaxing terms. Now that smooth convergence is guaranteed, it is crucial to maintain the states within their designated safe spaces, as described by the safety constraints. This is accomplished through implementing control barrier functions without relaxation to enforce forward invariance for the safe sets.

4.1.3. Safety Constraints

To ensure the safety of the descent, we need to ensure the satisfaction of several non-convex constraints; we start by setting a lower bound on the vehicle mass:
m ( t ) m d r y R + + m ( t ) m d r y 0
We also want the rocket to stay inside a glide slope cone with half angle γ g s ( 0 , 90 ] and an origin that coincides with the inertial frame:
e ^ 3 · r I ( t ) cot γ g s H ^ γ r I ( t ) 2 r I M g s r I 0
where H ^ γ : = e ^ 1 , e ^ 2 T and M g s = [ [ c o t ( γ g s ) 2 0 0 ] T [ 0 c o t ( γ g s ) 2 0 ] T [ 0 0 1 ] T ] .
To constrain the angular velocities of the rocket, we set an upper bound ω m a x :
ω B ( t ) 2 ω m a x ω m a x 2 | | ω B ( t ) | | 2 2 0
Since there are physical limitations on the controls, we need to set upper and lower bounds on the thrust generated by the engine and ensure that the thrust remains within a gimbal angle dictated by the engine:
0 T m i n T B 2 T m a x T z cos δ max T B 2
Next, we can specify different boundary conditions reflecting several scenarios for our rocket trajectory. We start from a specified initial rocket mass, position, velocity, and angular velocity:
m ( 0 ) = m i n , r I ( 0 ) = r I i n , v B ( 0 ) = v B i n , ω B ( 0 ) = ω B i n
and we aim to control the rocket to satisfy the desired final conditions:
r I ( t f ) = r I L S , v B ( t f ) = v B L S , q I ( t f ) = q I L S ω B ( t f ) = ω B L S

4.1.4. Safety Constraints as Control Barrier Functions

In this section, we formulate a set of first-order and second-order zeroing control barrier functions to confine the system’s states within the designated safe sets. We define the extended class K function as a linear function of the safety function itself α i ψ j = ψ j with a coefficient of 1, as it will be multiplied by an optimized parameter to ensure feasibility. Formulating the highest order CBF yields:
ψ 1 m : = α m ˙ T B ( t ) 2 p 1 m m ( t ) m d r y ψ 1 ω B : = ω B ( t ) · J ˜ 1 r T × T ( t ) J ˜ 1 ω B ( t ) × J ˜ ω B · ω B ( t ) p 1 ω B 2 ω max 2 ω B 2 2 ψ 2 g s : = 1 m ( t ) r I M g s C I B q I ( t ) T ( t ) r I M g s C I B q I ( t ) ω B ( t ) × v B ( t ) E B I q I ( t ) g I r I M g s C I B q I ( t ) v B r ˙ I M g s r ˙ I p 1 g s 2 + p 2 g s ψ ˙ 0 g s p 1 g s p 2 g s 2 ψ 0 g s
The last step for the barrier functions is replacing the sum and multiplications of parameters p 1 g s 2 + p 2 g s and p 1 g s p 2 g s 2 with single parameters { p 1 g s , p 2 g s } , respectively. That is to keep the barrier functions convex in parameters too, enabling the optimization of the parameters inside the quadratic program. Algorithm 1 summarizes the HOCLBF method of solving a sequence of online convex quadratic programs to control the optimal 6-DOF powered descent in real-time. Model parameters were taken from [7,22,23], with additional parameters either manually tuned or heuristically optimized to ensure adequate performance. Note that we strongly suggest using an adaptive fourth Runge-Kutta for time integration to minimize higher-order truncation errors.
Algorithm 1 HOCLBF for 6-DOF powered descent control.
  1:
Initialize: x = x i n i t i a l , x f i n a l , p i , m i n , c i , m i n , p i , m a x , c i , m a x , d t , ε , K P i , K I i , K D i
  2:
while  ( x f i n a l x 2   ε )   do
  3:
     e x = x f i n a l x
  4:
     x d e s i r e d = K P e x + K I e x d τ + K D d e x d t
  5:
     u * = arg min u , c , δ , p : u T H u + δ T Q δ P T p R T c
  6:
    s.t:
  7:
           V ¨ r I + V ˙ r I + c r I V r I δ r I                                                     ▹ Position HOCLF (22)
  8:
           V ˙ v B + c v B V v B δ V v B                                                                ▹ Velocity CLF (22)
  9:
           V ¨ q I + V ˙ q I + c q I V q I δ q I                                                    ▹ Attitude HOCLF (22)
10:
           V ˙ ω B + c ω B V ω B δ ω B                                                ▹ Angular velocity CLF (22)
11:
           c ( r , v , q , ω ) m a x I 4 c ( r , v , q , ω ) c ( r , v , q , ω ) m a x                           ▹ Convergence rate bounds
12:
           ψ m ˙ , 1 + p 1 m ψ m ˙ , 0 0                                                                ▹ Dry mass CBF (23)
13:
           ψ g s , 2 + p 1 g s ψ g s , 1 + p 2 g s ψ g s , 0 0                                     ▹ Glide slope HOCBF (24)
14:
           ψ ω B , 1 + p 1 ω B ψ ω B , 0 0                                                ▹ Angular velocity CBF (25)
15:
           e ^ 3 · u cos δ max u 2                                        ▹ Gimbal thrust constraint (26)
16:
           A T u b T                                                          ▹ Thrust magnitude bounds (26)
17:
     x = x + x ˙ ( x , u * ) d t or x = x + R K 4 ( x ˙ , x , u * , d t )      ▹ Time propagation (19) and (20)
18:
end while

4.1.5. Numerical Results

In this section, we assess the performance of the HOCLBF in comparison to the base CLF-CBF and the successive convexification approach. Our goal is to demonstrate the advantage of using the HOCLBF in generating feasible solutions compared to the base CLF-CBF with constant parameters, as well as compare its trajectory to the robust SC algorithm. The comparison is carried out under the condition that all other parameters are kept identical to ensure a consistent assessment. We run our algorithm on a standard laptop using a commercial solver “ECOS” [24] suited for embedded applications and obtain an average runtime of less than 1.1 ms. We start by comparing the high-velocity entry and landing between the three approaches, starting from r I ( 0 ) = [ 3.0 , 3.0 , 4.0 ] and landing on a circular pad C ( [ 0 , 0 , 0 ] , ρ v = 0.5 ) in the presence of a 60° glide slope constraint. In Figure 3, we can see that the base CLF-CBF generates infeasible solutions as soon as it gets closer to the glide slope constraint, while the HOCLBF managed to reach the landing site successfully. We can also see some fluctuations in the HOCLBF compared to the smooth SC trajectory.
Figure 4 illustrates the 3D trajectories where we can see that the HOCLBF reaches the landing site successfully, while the base CLF-CBF faces infeasibilities arising from the fixed parameters.
To demonstrate the efficiency of the CBF approach in ensuring the safety of the rocket landing, we generated a trajectory with no glide slope γ g s = 90 , then for γ g s = 45 , 60 , 75 (Figure 5). For the tighter glide slopes, we can see that despite starting outside the safe region, the rocket moves horizontally at a slower descent rate until it enters the safe region and then starts descending faster and successfully reaches the landing site with no infeasibilities in the QP while keeping the safety constraints satisfied.

4.1.6. Limitations and Future Work

In this work, we attempt to generalize the use of high-order CLFs and CBFs to a wider set of problems and demonstrate the potential of HOCLBFs in safely controlling complex high-dimensional problems. In this work, we overcome the infeasibility issues that arise from the coupling of CLFs and CBFs by using heuristic parameters and we obtain successful results comparable to the robust successive convexification algorithm. Nonetheless, this approach still requires adequate analytical design for the Lyapunov and barrier functions, and some parameters still need initial tuning and are prone to diverge in the presence of high disturbances. Therefore, our next goal is to incorporate some machine learning algorithms alongside differentiable optimization to enhance the performance of the HOCLBF and make it robust to parameter tuning and environmental disturbances.

5. Conclusions

In this paper, we generalize control Lyapunov and barrier functions to general nonlinear dynamic systems with convex input under some conditions and suggest a new formulation of the higher-order control Lyapunov function that guarantees convergence for higher-order dynamics. We unite control Lyapunov and barrier functions using a heuristic approach and an online PID planner ensuring the feasibility of the Quadratic Program. We showcase the efficacy of our HOCLBF approach by devising a real-time six-degree-of-freedom powered descent controller as a convex Quadratic Program. Simulation results for different maneuvers under different safety settings were presented to demonstrate the effectiveness of the HOCLBF in controlling a highly nonlinear coupled system while maintaining safety. In this work, we overcome the infeasibility issues that arise from the coupling of CLFs and CBFs by using heuristic parameters, and we obtain successful results comparable to the robust successive convexification algorithm. Nonetheless, this approach still requires an adequate analytical design for the Lyapunov and barrier functions; some parameters still need initial tuning and are prone to diverge in the presence of high disturbances. Therefore, The next phase of this research will focus on leveraging differentiable convex optimization and reinforcement learning approaches to achieve automatic parameter tuning and intelligent safety constraints. We are also looking into distributional robust optimization to make the HOCLBF robust to model uncertainty and environmental disturbances.

Author Contributions

Conceptualization, methodology, writing, A.E.C. and C.S.; formal analysis, software, validation, visualization, writing—original draft preparation, A.E.C.; supervision, project administration, writing—review and editing, C.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

All data can be simulated and reproduced from our dynamics models and control algorithms.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Allgower, F.; Findeisen, R.; Nagy, Z.K. Nonlinear model predictive control: From theory to application. J.-Chin. Inst. Chem. Eng. 2004, 35, 299–316. [Google Scholar]
  2. Findeisen, R.; Allgöwer, F. An introduction to nonlinear model predictive control. In Proceedings of the 21st Benelux Meeting on Systems and Control, Veldhoven, The Netherlands, 19–21 March 2002; Volume 11, pp. 119–141. [Google Scholar]
  3. Åström, K.J. Adaptive control. In Mathematical System Theory: The Influence of RE Kalman; Springer: Berlin/Heidelberg, Germany, 1995; pp. 437–450. [Google Scholar]
  4. Tao, G. Adaptive Control Design and Analysis; John Wiley & Sons: Hoboken, NJ, USA, 2003; Volume 37. [Google Scholar]
  5. Acikmese, B.; Ploen, S.R. Convex programming approach to powered descent guidance for mars landing. J. Guid. Control. Dyn. 2007, 30, 1353–1366. [Google Scholar] [CrossRef]
  6. Mao, Y.; Dueri, D.; Szmuk, M.; Açıkmeşe, B. Successive convexification of non-convex optimal control problems with state constraints. IFAC-PapersOnLine 2017, 50, 4063–4069. [Google Scholar] [CrossRef]
  7. Szmuk, M.; Reynolds, T.P.; Açıkmeşe, B. Successive convexification for real-time six-degree-of-freedom powered descent guidance with state-triggered constraints. J. Guid. Control Dyn. 2020, 43, 1399–1413. [Google Scholar] [CrossRef]
  8. Artstein, Z. Stabilization with relaxed controls. Nonlinear Anal. Theory Methods Appl. 1983, 7, 1163–1173. [Google Scholar] [CrossRef]
  9. Sontag, E.D. A ‘universal construction of Artstein’s theorem on nonlinear stabilization. Syst. Control Lett. 1989, 13, 117–123. [Google Scholar] [CrossRef]
  10. Sontag, E.D. Control-lyapunov functions. In Open problems in Mathematical Systems and Control Theory; Springer: Berlin/Heidelberg, Germany, 1999; pp. 211–216. [Google Scholar]
  11. Ames, A.D.; Grizzle, J.W.; Tabuada, P. Control barrier function based quadratic programs with application to adaptive cruise control. In Proceedings of the 53rd IEEE Conference on Decision and Control, Los Angeles, CA, USA, 15–17 December 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 6271–6278. [Google Scholar]
  12. Ames, A.D.; Xu, X.; Grizzle, J.W.; Tabuada, P. Control barrier function based quadratic programs for safety critical systems. IEEE Trans. Autom. Control 2016, 62, 3861–3876. [Google Scholar] [CrossRef]
  13. Butz, A. Higher order derivatives of Lyapunov functions. IEEE Trans. Autom. Control 1969, 14, 111–112. [Google Scholar] [CrossRef]
  14. Ahmadi, A.A.; Parrilo, P.A. On higher order derivatives of Lyapunov functions. In Proceedings of the 2011 American Control Conference, San Francisco, CA, USA, 29 June–1 July 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 1313–1314. [Google Scholar]
  15. Xiao, W.; Belta, C. Control barrier functions for systems with high relative degree. In Proceedings of the 2019 IEEE 58th Conference on Decision and Control (CDC), Nice, France, 11–13 December 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 474–479. [Google Scholar]
  16. Xiao, W.; Belta, C. High-Order Control Barrier Functions. IEEE Trans. Autom. Control 2022, 67, 3655–3662. [Google Scholar] [CrossRef]
  17. Mehra, A.; Ma, W.L.; Berg, F.; Tabuada, P.; Grizzle, J.W.; Ames, A.D. Adaptive cruise control: Experimental validation of advanced controllers on scale-model cars. In Proceedings of the 2015 American Control Conference (ACC), Chicago, IL, USA, 1–3 July 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1411–1418. [Google Scholar]
  18. Ames, A.D.; Powell, M. Towards the unification of locomotion and manipulation through control lyapunov functions and quadratic programs. In Control of Cyber-Physical Systems; Springer: Berlin/Heidelberg, Germany, 2013; pp. 219–240. [Google Scholar]
  19. Khalil, H. Nonlinear Systems; Prentice Hall: Hoboken, NJ, USA, 2002. [Google Scholar]
  20. Blanchini, F. Set invariance in control. Automatica 1999, 35, 1747–1767. [Google Scholar] [CrossRef]
  21. Romdlony, M.Z.; Jayawardhana, B. Uniting control Lyapunov and control barrier functions. In Proceedings of the 53rd IEEE Conference on Decision and Control, Los Angeles, CA, USA, 15–17 December 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 2293–2298. [Google Scholar]
  22. Lee, U.; Mesbahi, M. Optimal power descent guidance with 6-DoF line of sight constraints via unit dual quaternions. In Proceedings of the AIAA Guidance, Navigation, and Control Conference, Kissimmee, FL, USA, 5–9 January 2015; p. 0319. [Google Scholar]
  23. Lee, U.; Mesbahi, M. Dual quaternions, rigid body mechanics, and powered-descent guidance. In Proceedings of the 2012 IEEE 51st IEEE Conference on Decision and Control (CDC), Maui, HI, USA, 10–13 December 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 3386–3391. [Google Scholar]
  24. Domahidi, A.; Chu, E.; Boyd, S. ECOS: An SOCP solver for embedded systems. In Proceedings of the 2013 European Control Conference (ECC), Zurich, Switzerland, 17–19 July 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 3071–3076. [Google Scholar]
Figure 1. Flowchart representing a control theory overview situated in the general context and explaining the contributions made.
Figure 1. Flowchart representing a control theory overview situated in the general context and explaining the contributions made.
Mathematics 12 04015 g001
Figure 2. (a) The state trajectory starting from x 0 = [ 1 1 ] and reaching x f = [ 0 0 ] for c = 20 . (b) The control trajectory driving the system to x f = [ 0 0 ] . (c) The phase portrait of the unforced system, with blue arrows indicating the existence of an unstable equilibrium point in x e q = [ 0 0 ] .
Figure 2. (a) The state trajectory starting from x 0 = [ 1 1 ] and reaching x f = [ 0 0 ] for c = 20 . (b) The control trajectory driving the system to x f = [ 0 0 ] . (c) The phase portrait of the unforced system, with blue arrows indicating the existence of an unstable equilibrium point in x e q = [ 0 0 ] .
Mathematics 12 04015 g002
Figure 3. Trajectory comparison between base CLBF, HOCLBF, and successive convexification with a 60° glide slope constraint. The red ‘x’ marks solution infeasibility.
Figure 3. Trajectory comparison between base CLBF, HOCLBF, and successive convexification with a 60° glide slope constraint. The red ‘x’ marks solution infeasibility.
Mathematics 12 04015 g003
Figure 4. Three-dimensional trajectory comparison between base CLBF, HOCLBF, and successive convexification with a 60° glide slope constraint.
Figure 4. Three-dimensional trajectory comparison between base CLBF, HOCLBF, and successive convexification with a 60° glide slope constraint.
Mathematics 12 04015 g004
Figure 5. Trajectories for different glide slope angles in blue; The orange dotted line with the green region illustrates the safe area within the prescribed cone.
Figure 5. Trajectories for different glide slope angles in blue; The orange dotted line with the green region illustrates the safe area within the prescribed cone.
Mathematics 12 04015 g005
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chriat, A.E.; Sun, C. High-Order Control Lyapunov–Barrier Functions for Real-Time Optimal Control of Constrained Non-Affine Systems. Mathematics 2024, 12, 4015. https://doi.org/10.3390/math12244015

AMA Style

Chriat AE, Sun C. High-Order Control Lyapunov–Barrier Functions for Real-Time Optimal Control of Constrained Non-Affine Systems. Mathematics. 2024; 12(24):4015. https://doi.org/10.3390/math12244015

Chicago/Turabian Style

Chriat, Alaa Eddine, and Chuangchuang Sun. 2024. "High-Order Control Lyapunov–Barrier Functions for Real-Time Optimal Control of Constrained Non-Affine Systems" Mathematics 12, no. 24: 4015. https://doi.org/10.3390/math12244015

APA Style

Chriat, A. E., & Sun, C. (2024). High-Order Control Lyapunov–Barrier Functions for Real-Time Optimal Control of Constrained Non-Affine Systems. Mathematics, 12(24), 4015. https://doi.org/10.3390/math12244015

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop