Convex optimization problem solving controller with security constraint based on control barrier function
By combining the gradient descent algorithm and control obstacle function framework, a quadratic planning problem solving safety controller is constructed and orthogonal perturbation is introduced, which solves the local optimization and deadlock problems of the convex optimization algorithm when dealing with problems with safety constraints, and realizes efficient optimization and security guarantee of the system.
Patent Information
- Application Number
- CN202510113583.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-06
AI Technical Summary
When dealing with security constraints, existing convex optimization algorithms are prone to falling into local optimization, and may cause jitter in a narrow environment, making it difficult to effectively avoid dangerous areas and solve deadlock phenomena.
Combining the gradient descent algorithm and control obstacle function (CBF) framework, by constructing quadratic planning (QP) problems, solving the safety controller, and introducing orthogonal perturbation to solve the deadlock problem.
It realizes efficient solution to the objective function in a complex dynamic environment, while ensuring system security, avoiding local optimization and jitter, being able to escape from the deadlock state and continuing to perform tasks.
Smart Images

Figure QLYQS_4 
Figure QLYQS_9 
Figure QLYQS_10
Abstract
Description
Technical Field
[0001] The invention belongs to the field of convex optimization algorithms, and in particular relates to a convex optimization problem solving controller with safety constraints based on a control obstacle function. Background Art
[0002] Convex optimization problems with safety constraints are an important research direction in the field of modern control and optimization. The goal is to optimize system performance while satisfying specific safety constraints. Such problems are widely used in fields such as autonomous driving, drone formation, and industrial robot control, and are particularly critical in complex dynamic environments.
[0003] Research in recent years has also shown that the safety constraints of the system can be caused by a variety of factors, such as the task requirements of obstacle avoidance in the intelligent agent path planning, and the physical limit of the maximum turning radius of the vehicle. Therefore, to reasonably deal with these constraints, appropriate methods must be selected. There are many methods currently, such as artificial potential field method, particle swarm optimization algorithm and obstacle function method. However, there are still some problems, such as easy to fall into local optimality and easy to jitter in a small environment.
[0004] At present, the control barrier function (CBF) theory is widely used in the field of designing controllers to ensure system safety and stability. The barrier function was first applied in the field of optimization, which can efficiently solve the safety control problem of nonlinear systems. In the safety control based on the barrier function, the safety analysis of nonlinear systems can be transformed into a convex optimization problem through the barrier function, which can effectively reduce the complexity of the safety analysis; at the same time, for the design of the safety controller, the safety constraints can be added to the quadratic programming problem through the control barrier function, so as to solve the safety controller, which can effectively ensure the real-time performance of the control algorithm. In recent years, the barrier function method has become an important safety analysis and control method, and is widely used in autonomous driving and swarm robots.
[0005] However, there are still many problems in combining the barrier function framework with the convex optimization algorithm. Traditional convex optimization algorithms, such as the gradient descent algorithm, easily cause the path to pass through the dangerous area during the optimization process, while CBF can constrain the optimization path to ensure that the path is always in the safe set. In addition, the "deadlock" phenomenon caused by geometric symmetry may occur in the optimization problem, making the system task unable to complete. In response to the above problems, the present invention proposes an improved algorithm that combines gradient descent with CBF, avoids the dangerous area and solves the deadlock problem through QP solution. Summary of the invention
[0006] In view of the above problems, the purpose of the present invention is to provide a convex optimization problem solving controller with safety constraints, which can optimize the objective function through gradient descent, and use the control barrier function to avoid dangerous areas and ensure path safety. In addition, when the goal of the agent conflicts with the safety constraint, the agent may fall into a deadlock state. In the deadlock state, although the agent remains safe, it cannot complete the task. By introducing orthogonal perturbations, the deadlock problem in the optimization process can be effectively solved.
[0007] In order to achieve the above object, the technical solution of the present invention is as follows:
[0008] S1. Use the gradient descent method to solve the target convex optimization problem. Design the convex optimization problem objective function G(x), initialize the optimization variables, and use the gradient descent algorithm to solve this convex optimization problem;
[0009] S2. Processing safety constraints. In order to ensure that the path is always in the safety set, the CBF framework is used to define the safety area and define the safety set. In order to ensure its safety, the Nagumo invariant set theorem is used to prove its safety, where h(x) is the control obstacle function and satisfies the safety constraints. Through the CBF constraints, it is ensured that the path is always in the safety area and effectively avoids the dangerous area.
[0010] S3. Construct and solve a quadratic programming (QP) problem. By minimizing the deviation between the controller and the nominal controller while ensuring that the CBF safety constraint is satisfied, the QP problem is solved to obtain a safety controller.
[0011] S4. Deadlock detection and resolution. By defining the deadlock condition, it is detected whether the system is in a deadlock state. If so, a disturbance is added to make the system no longer stable, thus getting rid of the deadlock state.
[0012] In S1, the agent system is considered as a gradient system, and the design of the objective function G(x) usually depends on the specific task requirements, such as minimizing energy consumption, shortest path planning, etc.
[0013] In S1, the gradient descent algorithm is used to solve this convex optimization problem and the nominal controller is selected. where u d Designed based on the objective function, it is used to drive the system state toward the solution of the objective function.
[0014] In S2, the present invention considers the set is a continuously differentiable function h: The super level set of gather The forward invariant set is usually used to ensure the security of the system.
[0015] In S2, the present invention assumes that the set is a safe set, for control affine systems and sets If the function h(x): satisfy And it holds for all x∈D, where α is the local Lipschitz extended K-type function, k, c1, c2 are constants, then h(x) is the control barrier function defined on the set D.
[0016] In S2, Nagumo invariant sets require the set Maintain forward invariance and ensure collection is asymptotically stable on the set D.
[0017] In S2, the present invention considers the unsafe area as a convex set. To ensure safety, h(x) is designed as the distance from the agent to the unsafe set. The CBF function form can be designed as Where k, c1, c2 are constants, Represents the distance from the point to the unsafe set.
[0018] In S2, the present invention combines the CBF constraint in
[0014] and h(x) designed in
[0016] to express the safety constraint as
[0019] In S3, in order to ensure that the nominal controller remains as the primary control objective as possible, a quadratic cost term is introduced to penalize the deviation (in the form of least squares) when the control objective and the safety constraint conflict. The minimum norm safety controller is given by the following QP problem: in represents the input constraint, u * To solve the obtained safety controller.
[0020] In S3, the QP problem is solved by the Lagrange multiplier method, and the situation is summarized as the inactivation and activation of the CBF constraint by the Karush-Kuhn-Tucker (KKT) condition, and the solution of the safety controller can be obtained.
[0021] In S4, the definition of deadlock is proposed. When the agent's goal conflicts with the safety constraints, the agent may fall into a deadlock state. In the deadlock state, the agent remains safe but cannot complete the task.
[0022] In S4, the perturbation δ ⊥ =k δ Su dIntroduced in the form of orthogonal perturbation, for this type of deadlock, when introduced with u d When the orthogonal disturbance δ is applied, the solution u=0 of the safety controller will no longer be the optimal control command of the QP controller after the disturbance, and the system state will escape from deadlock.
[0023] The beneficial effects of the present invention are as follows:
[0024] The controller for solving convex optimization problems with safety constraints based on a control barrier function of the present invention is solved by combining the control barrier function, the gradient descent algorithm and the quadratic programming algorithm, which can not only efficiently solve the objective function, but also ensure the safety of the system in a complex dynamic environment. The present invention uses the gradient descent algorithm to optimize the objective function, and ensures that the intelligent agent moves in the direction of the optimal solution by designing a nominal controller; through the control barrier function framework, the present invention defines the safety set of the system and ensures that the path is always located in the safe area through safety constraints; by constructing a quadratic programming problem to minimize the deviation between the safety controller and the nominal controller, it is ensured that the system is as close to the optimization target as possible, while always satisfying the safety constraints; through the deadlock detection mechanism, when it is detected that the system is in a deadlock, an orthogonal perturbation term is introduced to enable the system to escape from the deadlock state and continue to perform the task. The algorithm of the present invention has a fast convergence speed and ensures the safety of the system, and is suitable for various complex optimization problems subject to safety constraints. Its high efficiency, stability and flexibility make it have a wide range of application prospects, especially in the fields of autonomous driving and robot path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The present invention provides a flowchart of a controller for solving a convex optimization problem with safety constraints based on a control obstacle function. DETAILED DESCRIPTION
[0026] The present invention is described below with reference to specific examples. It will be appreciated by those skilled in the art that these examples are only used to illustrate the present invention and are not intended to limit the scope of the present invention in any way.
[0027] As shown in the figure, the present invention discloses a controller for solving convex optimization problems with safety constraints based on a control obstacle function, comprising the following steps:
[0028] (1) Determine the target convex optimization problem;
[0029] (2) Algorithm initialization: solve the convex optimization problem of the icon by gradient descent algorithm and select the nominal controller as Its function is to optimize the control system along the negative gradient direction of the objective function;
[0030] (3) Design safety constraints according to the currently determined safety set and control obstacle function. Through the above safety constraints, it can be ensured that the path is always within the safe area, thereby effectively avoiding the dangerous area and avoiding collision with obstacles;
[0031] (4) According to the above nominal controller and safety constraints, a quadratic programming problem is constructed. When dealing with the conflict between the objective function optimization and the safety constraints, the minimum controller and the nominal controller u are minimized. d The deviation between them is controlled while ensuring that the safety constraints are satisfied;
[0032] (5) Solve the above quadratic programming problem and detect whether the system is in a deadlock state. When it is detected that the system is in a deadlock, introduce orthogonal perturbations to enable the system to escape from the deadlock state.
[0033] (6) According to the above solution algorithm, the safety controller is solved iteratively.
[0034] As a preferred embodiment of the present invention, the gradient descent iterative algorithm process in step (2) is as follows:
[0035] According to the target convex optimization function, the optimization variables and step size parameters are initialized. The design of the objective function usually depends on the specific task requirements. The optimization process is carried out through Iteration, where the selection system is a gradient system and its dynamic system is The nominal controller is
[0036] As a preferred embodiment of the present invention, the derivation process of the safety constraint in step (3) is as follows:
[0037] According to the forward invariance of the selected safe set, the present invention considers making the unsafe set a convex set and designing the obstacle function h(x) as the distance from the agent to the convex set. in Represents the distance from a point to a convex set.
[0038] According to the definition of the control barrier function, h(x) must satisfy Combined with the available safety constraints,
[0039] As a preferred embodiment of the present invention, the process of solving the quadratic programming problem in step (4) is as follows:
[0040] (1) Based on the QP problem in 0, the Lagrange multiplier method is used to solve the problem. Its Lagrange function is
[0041] (2) Apply KKT conditions to solve the Lagrangian function, λ≥0,λ(F h +Lg hu)=0. There are two cases. If the CBF constraint is not activated, then we can get λ=0 and λ(F h +L g hu)>0, solving for u * =u d .
[0042] (3) If the CBF constraint is activated, we can obtain λ≥0 and F h +L g hu=0. The value of λ can be obtained and substituted into the KKT condition to obtain Where ψ(x): = F h +L g h(x)u d .
[0043] As a preferred embodiment of the present invention, the process of detecting the deadlock state in step (5) is as follows:
[0044] According to the KKT condition in 0, the geometric symmetry between the initial position and the target position of the agent limits the speed of the system in the target direction, resulting in deadlock. According to the solution of the QP problem in 0 and 0, the control input can be expressed as When the safety constraint becomes active, the control input u * is corrected, because the obstacle is stationary, the directional gradient of its obstacle function and the nominal controller u d There is a confrontation in the direction of u * is limited to the normal direction of the line between the initial position and the obstacle and the target position. Therefore, the control input u * is constrained to zero.
[0045] According to the deadlock condition, if the system state is detected to be in a deadlock state, an orthogonal perturbation δ is introduced ⊥ =k δ Su d , where S is an antisymmetric matrix. This perturbation provides a matrix that is orthogonal to u d Due to the KKT condition, u=0 will no longer be the optimal control command of the safety controller after the disturbance, and the system state will escape from deadlock.
[0046] It should be understood that the application of the invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the invention.
Claims
1. A controller for solving convex optimization problems with safety constraints based on a control barrier function, characterized in that: The following steps are involved: S1. Use the gradient descent method to solve the target convex optimization problem. Design the convex optimization problem objective function G(x), initialize the optimization variables, and use the gradient descent algorithm to solve this convex optimization problem; S2. Processing safety constraints. In order to ensure that the path is always in the safety set, the CBF framework is used to define the safety area and define the safety set. In order to ensure its safety, the Nagumo invariant set theorem is used to prove its safety, where h(x) is the control obstacle function and satisfies the safety constraints. Through the CBF constraints, it is ensured that the path is always in the safety area and effectively avoids the dangerous area. S3. Construct and solve a quadratic programming (QP) problem. By minimizing the deviation between the controller and the nominal controller while ensuring that the CBF safety constraint is satisfied, the QP problem is solved to obtain a safety controller. S4. Deadlock detection and resolution. By defining the deadlock condition, it is detected whether the system is in a deadlock state. If so, a disturbance is added to make the system no longer stable, thus getting rid of the deadlock state.
2. A controller for solving convex optimization problems with safety constraints based on a control barrier function according to claim 1, characterized in that: In S1, the intelligent agent system is considered as a gradient system, and the design of the objective function G(x) usually depends on the specific task requirements, such as minimizing energy consumption, shortest path planning, etc.
3. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S1, the gradient descent algorithm is used to solve this convex optimization problem and the nominal controller is selected. where u d Based on the objective function design, it is used to drive the system state toward the objective function solution along the gradient descent direction.
4. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S2, the present invention considers the set is a continuously differentiable function The super level set of gather The forward invariant set is usually used to ensure the security of the system.
5. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S2, the present invention assumes that the set is a safe set, for control affine systems and sets If the function satisfy And it holds for all x∈D, where α is the local Lipschitz extended K-type function, k, c1, c2 are constants, then h(x) is the control barrier function defined on the set D.
6. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S2, Nagumo's invariant set theorem requires that the set maintains forward invariance and guarantees that set c is asymptotically stable on set D.
7. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S2, the present invention considers the unsafe area as a convex set. To ensure safety, the present invention designs h(x) as the distance from the agent to the unsafe set. The CBF function form can be designed as Where k, c1, c2 are constants, represents the distance from the point to the set. According to the CBF constraints and the designed h(x), the safety constraint can be expressed as 8. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S3, in order to ensure that the nominal controller remains as the primary control objective as possible, a quadratic cost term is introduced to penalize the deviation (in the form of least squares) when the control objective and the safety constraint conflict. The minimum norm safety controller is given by the following QP problem: in represents the input constraint, u * For safety controller.
9. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S3, the QP problem is solved by the Lagrange multiplier method, and the situation is summarized as the inactivation and activation of the CBF constraint by the KKT condition, and the solution of the safety controller can be obtained.
10. The controller for solving convex optimization problems with safety constraints based on control barrier functions according to claim 1, characterized in that: In S4, the definition of deadlock is proposed. When the goal of the agent conflicts with the safety constraints, the agent may fall into a deadlock state. d When the disturbance δ is orthogonal, the solution u=0 of the safety controller will no longer be the optimal solution of the QP controller after the disturbance, and the system state will escape from deadlock.