Nonlinear optimization control methods, systems, devices, and readable storage media
By constructing a quadratic programming subproblem and using penalty functions and Lagrange multiplier norms for adaptive adjustment, the infeasible state caused by constraint conflicts in nonlinear constraint optimization is solved, control instructions that conform to physical laws are generated, and the autonomous operation capability and robustness of the system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU UNIV OF SCI & TECH
- Filing Date
- 2026-03-24
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies for handling nonlinear constrained optimization problems suffer from infeasibility due to conflicting constraints, and the introduction of slack variables leads to distortion of the physical model and failure of the solver.
An approximate objective function and approximate constraints are adopted using a quadratic programming subproblem. The optimal search direction is determined by solving the DL-stationary point. An adaptive adjustment mechanism using penalty function and Lagrange multiplier norm is used to ensure that the constraint violation is minimized and to avoid the introduction of slack variables.
It enables the generation of control commands with clear physical meaning even when constraints are not feasible, thereby improving the system's robustness and autonomous operation capabilities and reducing reliance on manual parameter tuning.
Smart Images

Figure CN122085696A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial process control technology, specifically relating to a nonlinear optimization control method, system, device, and readable storage medium. Background Technology
[0002] In engineering and technological fields such as aerospace, process control, and intelligent manufacturing, nonlinear constrained optimization problems are core mathematical models for achieving precise system control and optimal resource allocation. Spacecraft trajectory planning requires finding the optimal control command sequence that minimizes fuel consumption or shortens flight time while satisfying multiple physical boundaries such as complex aerodynamic equations, thrust amplitude limits, and heat flux density constraints.
[0003] Sequential quadratic programming has become one of the mainstream algorithms for solving nonlinear optimization problems due to its local superlinear convergence rate and relaxed requirements on initial points. However, a common technical challenge in practical engineering applications is that even when the current iteration point is close to the optimal solution, subproblems composed of linearization constraints may become infeasible due to conflicting constraints.
[0004] Existing technologies typically address such problems by introducing artificial slack or elastic variables into the constraints, allowing the constraints to be temporarily violated under penalty coefficient control. This approach has significant drawbacks: firstly, the introduction of slack variables destroys the physical reality of the original problem, leading to "virtual control quantities" in the aircraft dynamics equations that violate Newtonian mechanics, making the calculated trajectory unenforceable in actual flight; secondly, the penalty coefficient of the slack variables is highly dependent on the engineer's experience, and is prone to solver failure or outputting physically meaningless control commands due to parameter mismatch during sudden changes in operating conditions. Therefore, to address the aforementioned technical problems, it is necessary to provide a nonlinear optimization control method, system, device, and readable storage medium.
[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this invention is to provide a nonlinear optimization control method, system, device, and readable storage medium that can eliminate the dependence on manual parameter tuning and realize the fully autonomous operation of the control system.
[0007] To achieve the above objectives, the technical solution provided by the present invention is as follows:
[0008] In a first aspect, the present invention provides a nonlinear optimization control method applied to a potentially infeasible problem, comprising:
[0009] At the current iteration point, a quadratic programming subproblem is constructed; the quadratic programming subproblem includes an approximate objective function and approximate constraints; the approximate objective function is a quadratic approximation of the original objective function at the current iteration point, and the approximate constraints are a linear approximation of the original constraints at the current iteration point.
[0010] Solve the quadratic programming subproblem. If the feasible region of the quadratic programming subproblem is an empty set, determine the set of candidate directions that minimizes the constraint violation degree, and determine the direction in the set of candidate directions that minimizes the approximate objective function as the target search direction.
[0011] Based on the target search direction, the iteration step size is determined, and based on the target search direction and the iteration step size, a new iteration point is determined; wherein, the function used to determine the step size is a penalty function that weights and sums the objective function value and the constraint violation degree.
[0012] In one or more embodiments of the present invention, the method further includes:
[0013] If the feasible region formed by the constraints of the quadratic programming subproblem is a non-empty set, then solve the quadratic programming subproblem.
[0014] Based on the solution space of the feasible region, the target search direction for the current iteration is determined.
[0015] In one or more embodiments of the present invention, the method further includes:
[0016] Determine whether the new iteration point satisfies the preset convergence condition;
[0017] If so, output the state parameters corresponding to the current iteration point as the optimal solution;
[0018] If not, then a new quadratic programming subproblem is constructed based on the new iteration point until the state parameters corresponding to the generated iteration point satisfy the preset convergence condition.
[0019] In one or more embodiments of the present invention, determining the iteration step size based on the target search direction includes:
[0020] Determine candidate points after moving a candidate step size from the current iteration point along the target search direction, and calculate the penalty function value of the candidate points;
[0021] If the difference between the penalty function value of the candidate point and the penalty function value of the iteration point is less than or equal to the sum of the products of the preset descent coefficient, the candidate step size, and the directional derivative of the penalty function of the iteration point along the search direction, then the candidate step size is determined as the iteration step size.
[0022] If the difference between the penalty function value of the candidate point and the penalty function value of the iteration point is greater than the sum of the products of the preset descent coefficient, the candidate step size, and the directional derivative of the penalty function of the iteration point along the search direction, then the value of the candidate step size is reduced, and a new candidate point is determined after moving from the current iteration point along the target search direction with a new candidate step size, until the iteration step size is determined.
[0023] In one or more embodiments of the present invention, the method further includes:
[0024] Based on the Lagrange multiplier norm associated with the target search direction, the weights of the constraint violation degrees in the penalty function are determined;
[0025] If the Lagrange multiplier norm of the current iteration point is greater than a preset first threshold, then the weight of the constraint violation degree in the penalty function is increased;
[0026] If the Lagrange multiplier norm of the current iteration point is less than or equal to a preset second threshold, then the weight of the constraint violation in the penalty function is reduced, or the weight of the constraint violation in the penalty function is kept unchanged.
[0027] In one or more embodiments of the present invention, the quadratic programming subproblem can be expressed as:
[0028]
[0029]
[0030] in, The objective function is... , For constraint functions; The gradients corresponding to the aforementioned objective function and constraint function; It is an n-dimensional vector representing the state at the current iteration point. At this point, the direction and magnitude of the system state variables need to be adjusted; Let be the Hessian matrix used to approximate the Lagrangian function of the original problem at the current point.
[0031] In one or more embodiments of the present invention, the method further includes updating the Hessian matrix, specifically including:
[0032] After completing the state update for the current iteration, obtain the changes in state parameters before and after the current iteration, as well as the changes in the gradient of the Lagrange function before and after the current iteration;
[0033] Based on the changes in the state parameters and the changes in the gradient of the Lagrange function, the Hessian matrix used to approximate the curvature of the Lagrange function is updated using a quasi-Newton method.
[0034] The updated Hessian matrix is used as curvature information for constructing quadratic programming subproblems in the next iteration, so that the subproblems in subsequent iterations can more accurately approximate the local curvature characteristics of the original problem.
[0035] Secondly, the present invention provides a nonlinear optimization control system, which applies the aforementioned nonlinear optimization control method and includes:
[0036] The problem construction module is used to construct a quadratic programming subproblem at the current iteration point; the quadratic programming subproblem includes an approximate objective function and approximate constraints; the approximate objective function is a quadratic approximation of the original objective function at the current iteration point, and the approximate constraints are a linear approximation of the original constraints at the current iteration point;
[0037] The direction planning module is used to solve the quadratic programming subproblem. If the feasible region of the quadratic programming subproblem is an empty set, the candidate direction set that minimizes the constraint violation degree is determined, and the direction that minimizes the approximate objective function in the candidate direction set is determined as the target search direction.
[0038] An iteration module is used to determine the iteration step size based on the target search direction, and to determine a new iteration point based on the target search direction and the iteration step size; wherein, the function used to determine the step size is a penalty function that weights and sums the objective function value and the constraint violation degree.
[0039] Thirdly, the present invention provides an electronic device comprising: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the nonlinear optimization control method.
[0040] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the aforementioned nonlinear optimization control method.
[0041] Compared with existing technologies, the nonlinear optimization control method provided by this invention does not introduce any preset relaxation variables, and all constraints are directly derived from the original aerodynamic model and physical boundaries. When a subproblem becomes infeasible due to constraint conflicts, this invention determines the search direction by solving for the DL-stationary point, which minimizes the degree of constraint violation and determines the optimal direction of the target. The entire process maintains the strict validity of the dynamic equations. This makes the final output control command sequence naturally conform to Newton's laws of motion, allowing the aircraft control system to execute it seamlessly and fundamentally eliminating the "pseudo-trajectory" defect.
[0042] This invention employs a two-stage optimization mechanism to automatically search for the control direction that optimizes fuel consumption within the set of states with the smallest deviation from the physical boundary when constraints are infeasible. This means that when the aircraft cannot simultaneously satisfy all safety constraints, the solver will not blindly report errors, but will instead generate a fault-tolerant flight command that minimizes the exceedance of heat flux density or dynamic pressure while conserving as much fuel as possible. This capability enables the flight control system to output a control scheme with clear physical meaning and maximum safety margin even under extreme conditions, significantly improving mission robustness.
[0043] Meanwhile, this invention introduces an adaptive adjustment mechanism for penalty parameters based on the Lagrange multiplier norm, enabling the weights in the penalty function to be automatically optimized according to the sensitivity of the current constraints. The entire optimization process requires no manual intervention, and the control system can operate autonomously and stably in a black-box environment, significantly reducing the parameter adjustment burden and human error risk for ground control personnel. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram illustrating an implementation scenario of the nonlinear optimization control method in one embodiment of the present invention;
[0046] Figure 2 This is a flowchart of a nonlinear optimization control method in one embodiment of the present invention;
[0047] Figure 3 This is a structural block diagram of a nonlinear optimization control system according to another embodiment of the present invention;
[0048] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0049] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0050] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.
[0051] like Figure 1 The diagram illustrates an application scenario of the nonlinear optimization control method provided by an embodiment of the present invention. In this embodiment, the system mainly includes: a data acquisition and initialization module 101, a model construction module 102, a natural direction solution module 103, a step size evaluation and state update module 104, and a convergence verification output module 105. The modules are connected via a communication network, which may include any one or more combinations of wired, wireless, or fiber optic cable connections, and can achieve data transmission and interaction based on a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), or any combination thereof.
[0052] Specifically, the data acquisition and initialization module 101 is used to receive the original problem model data of the system to be optimized. The model data includes at least the objective function, equality constraints, and inequality constraints. Simultaneously, this module is responsible for initializing the iteration counter, setting the initial state parameter nodes, and establishing an initial Hessian matrix for approximating the curvature of the Lagrange function, laying the foundation for subsequent iterative solutions.
[0053] The model building module 102 is communicatively connected to the data acquisition and initialization module 101. It is used to calculate the objective function and constraint function values at the current iteration point and solve for their corresponding gradient vectors. Based on the above calculation results, this module constructs a locally linearized quadratic programming subproblem in memory. This subproblem strictly follows the principle of no pre-set relaxation, that is, it does not introduce any elastic variables or artificial boundary perturbations into any constraint conditions, thereby maintaining the authenticity of the original physical model.
[0054] The natural direction solving module 103, as the core computing engine of the system, is connected to the model building module 102 and is used to receive the quadratic programming subproblem and solve it. When the feasible region of the subproblem is not empty, its optimal solution is directly output as the search direction; when the subproblem is infeasible due to constraint conflicts, this module executes a two-stage optimization strategy, the specific strategy of which will be detailed later.
[0055] The step size evaluation and state update module 104 is connected to the natural direction solution module 103 and is used to perform a line search along the search direction to determine the iteration step size. This module uses a preset line search criterion to backtrack and explore the step size, and evaluates candidate step sizes based on a penalty function. After determining the step size, the module updates the system state parameters and uses the state changes before and after this iteration, along with the Lagrange function gradient changes, to update the Hessian approximation matrix using a preset correction rule, providing accurate curvature information for the next iteration.
[0056] The convergence verification output module 105 is connected to the step size evaluation and state update module 104, and is used to determine whether the updated state parameters meet the preset convergence conditions. The convergence conditions typically include primal feasibility, i.e., the violation degree of the original problem constraints is less than a preset threshold; and dual feasibility, i.e., the Lagrange function gradient norm is less than a preset threshold. If both are met, the algorithm is determined to have converged, and the current state parameters are output as the optimal solution or the best fault-tolerant control instruction; otherwise, the current iteration point is fed back to the model building module 102 to trigger the next round of iteration until the convergence conditions are met.
[0057] Through the coordinated operation of the above modules, this invention can uniformly handle both feasible and infeasible operating conditions without introducing artificial relaxation variables, providing an optimal control scheme for complex engineering systems such as aerospace and petrochemical industries that combines physical realism with autonomous fault tolerance.
[0058] Please refer to Figure 2 The diagram shown is a flowchart of a nonlinear optimization control method according to an embodiment of the present invention. This nonlinear optimization control method specifically includes the following steps:
[0059] S201: At the current iteration point, construct a quadratic programming subproblem;
[0060] Understandably, before starting step S201, the present invention also includes receiving the input nonlinear constrained optimization problem, analyzing the original objective function and original constraints therein, and simultaneously initializing the iteration counter to 0. The initial state parameters of the system are then set. And initialize the positive definite symmetric matrix used to approximate the Hessian matrix of the Lagrange function. Set the convergence accuracy threshold for the algorithm. And hyperparameters related to line search.
[0061] It should be noted that, in the embodiments of the present invention, the original objective function can refer to a mathematical expression of a performance index that needs to be minimized or maximized, determined by the physical nature of the controlled system or the object to be optimized. It is a function relating to system state variables. The nonlinear function is directly derived from physical laws, engineering experience, or economic models. Primitive constraints can include primitive equality constraints and primitive inequality constraints. These constraints describe the physical laws, safety boundaries, or resource limitations that the system must strictly follow, such as Newton's equations of motion, upper limits of heat flux density, and the law of conservation of mass. They are also about... Nonlinear functions.
[0062] Furthermore, the quadratic programming subproblem described in this invention may include an approximate objective function and approximate constraints. The approximate objective function is a quadratic approximation of the original objective function at the current iteration point, that is, at the current iteration point... At this point, for the original objective function The simplified function obtained after local approximation. Similarly, the approximate constraint condition refers to the linear approximation of the original constraint condition at the current iteration point, that is, at the current iteration point... The simplified constraints are obtained by locally approximating the original constraints.
[0063] In a specific embodiment of the present invention, the approximate objective function can be composed of the first-order Taylor expansion of the original objective function at the current iteration point and the sum of a quadratic curvature term, and the approximate constraint conditions can be composed of the first-order Taylor expansion of the original constraint function at the current point. The problem constructed through the above embodiment can approximate the behavior of the original objective function within a local range, while replacing the original nonlinear constraint surface with a linearized tangent plane, thereby transforming the original problem into an easily solvable quadratic programming subproblem.
[0064] The quadratic programming subproblem can be expressed as:
[0065]
[0066]
[0067]
[0068] in, The objective function is... , For constraint functions; The gradients corresponding to the aforementioned objective function and constraint function; It is an n-dimensional vector representing the state at the current iteration point. At this point, the direction and magnitude of the system state variables need to be adjusted; Let be the Hessian matrix used to approximate the Lagrangian function of the original problem at the current point.
[0069] It is important to emphasize that the setting of the quadratic programming subproblem here differs from existing technologies. It strictly adheres to the principle of construction without pre-set relaxation. That is, when the solver constructs the locally linearized quadratic programming subproblem at the current iteration point, it directly bases it on the gradient information of the original objective function and constraints, without introducing any pre-set elastic relaxation variables or virtual control quantities into the constraint equations, nor artificially perturbing or relaxing the constraint boundaries. In other words, the feasible region of the subproblem is entirely formed naturally by the linear approximation of the original constraints at the current point. Its feasibility truly reflects the constraint compatibility of the original problem in that local region, rather than forcibly maintaining solvability through mathematical techniques. This avoids the distortion of the physical model caused by introducing relaxation variables, such as introducing "virtual forces" that violate Newtonian mechanics in spacecraft dynamics. It also eliminates the drawbacks of traditional methods that rely on manually adjusting penalty parameters to balance the degree of relaxation, thereby ensuring that the subsequently generated search direction always has clear geometric meaning and engineering feasibility within the real physical boundaries.
[0070] S202: Solve the quadratic programming subproblem. If the feasible region of the quadratic programming subproblem is an empty set, determine the set of candidate directions that minimizes the constraint violation degree, and determine the direction in the set of candidate directions that minimizes the approximate objective function as the target search direction.
[0071] It is understandable that, for a quadratic programming subproblem, the feasible region refers to the geometry formed by all points that satisfy the constraints. If the feasible region is not empty, it means that there exist points that can completely satisfy all approximate constraints. Therefore, in one implementation, if the feasible region formed by the constraints of the quadratic programming subproblem is non-empty, the quadratic programming subproblem can be solved directly; and then, based on the solution space of the feasible region, the target search direction for the current iteration can be determined.
[0072] However, when the feasible region is empty, it means that no real vector can simultaneously satisfy both the linearized equality and inequality constraints. To address this issue of an empty feasible region, this invention proposes a DL-stationary point solution method. Instead of introducing slack variables to distort the physical model or collapsing due to the unsolvable factor problem, it searches for the direction closest to satisfying all constraints and then finds the optimal solution for the objective function within that set of directions. This allows the solver to output a meaningful and executable optimal solution even when physically infeasible.
[0073] In one exemplary embodiment, the present invention uses constraint violation degree to measure the proximity to all constraints. A set of candidate directions that minimizes the constraint violation degree is determined, and the direction in the candidate direction set that minimizes the approximate objective function is determined as the target search direction.
[0074] Specifically, first, the processor calculates the set of points closest to the linear constraint set, thus determining a set of candidate directions that minimize the linear constraint violation rate (e.g., constraint violation rate under the norm). Then, among these candidate directions with the minimum constraint violation rate, the aforementioned approximate objective function is directly minimized. The processor uses the solution from the two-stage optimization (i.e., the DL-stationary point of the quadratic programming subproblem) as the search direction for the current iteration. This direction, while ensuring the system deviates from the physical constraints to the minimum, indicates the optimal downward trend in the performance index.
[0075] S203: Based on the target search direction, determine the iteration step size, and based on the target search direction and the iteration step size, determine a new iteration point; wherein, the function used to determine the step size is a penalty function that weights and sums the objective function value and the constraint violation degree.
[0076] In an exemplary embodiment, the iteration step size can be confirmed by combining backtracking search with a penalty function evaluation mechanism. This can include: constructing a penalty function to evaluate the quality of the step size. The penalty function is composed of a weighted sum of the approximate objective function at the current iteration point and the constraint violation degree, and its form can be expressed as:
[0077]
[0078] in, The original objective function value, To constrain the degree of violation, The penalty parameter is adaptively adjusted. The penalty function is designed to simultaneously consider the descent of the objective function and the degree of constraint satisfaction, ensuring that the step size selection balances optimality and feasibility. The constraint violation degree can be expressed, for example, as the sum of the absolute values of all equality constraints and the positive parts of all inequality constraints; this invention does not impose specific limitations on this.
[0079] The step size determination process starts with an initial candidate step size, which can be selected from... This serves as an initial trial value. For the current candidate step size... Calculate along the target search direction Candidate points after movement And calculate the penalty function value of the candidate point. .
[0080] Subsequently, it is determined whether the candidate point meets the preset sufficient descent condition. In one implementation, this criterion requires that the penalty function value of the candidate point does not exceed the sum of the penalty function value of the current point and a linear expected descent amount, specifically mathematically expressed as:
[0081]
[0082] in The preset sufficient descent coefficient, For penalty function Along the direction at the current point The directional derivative. Because... Since it represents the descent direction and the directional derivative is negative, this condition essentially requires that the actual descent of the penalty function at least reach the expected linear descent. times.
[0083] If the current candidate step size If the above conditions are met, then the Determined as the final iteration step size And used for state updates.
[0084] If the current candidate step size If the above conditions are not met, it indicates that the step size is too large, causing the penalty function to decrease insufficiently or even increase. In this case, a preset shrinkage factor can be used. Reduce the step size, that is, let This yields new candidate step sizes. Then, the process returns to the previous step, recalculates the new candidate points and their penalty function values, and again checks if the conditions are met. This backtracking process is repeated until a step size satisfying the sufficient descent condition is found. Theoretically, since... The direction is downward. When the step size is small enough, the first-order linear approximation dominates, and the conditions set under the above implementation method must be met. Therefore, the backtracking process terminates within a finite number of steps.
[0085] The iteration step size determined through the above line search process ensures that the penalty function decreases sufficiently while avoiding excessively large step sizes that could lead to overshooting the optimum or entering an infeasible region. Once the step size is determined, the iteration can proceed according to... Update the system status and proceed to the next iteration.
[0086] It should be noted that the penalty parameter in the penalty function... Instead of remaining fixed, the step size evaluation adaptively adjusts based on the Lagrange multiplier norm associated with the current search direction. A larger multiplier norm indicates higher sensitivity to the current constraint, requiring a larger penalty parameter to strengthen feasibility requirements. Conversely, a smaller multiplier norm allows the penalty parameter to be maintained or appropriately reduced to promote a decrease in the objective function. This adaptive mechanism enables the step size evaluation to dynamically adapt to the local characteristics of the problem, further enhancing the algorithm's robustness and automation.
[0087] Furthermore, after each system state update, it is necessary to determine whether the new iteration point satisfies the preset convergence condition. If so, the state parameters corresponding to the current iteration point are output as the optimal solution; otherwise, a new quadratic programming subproblem is constructed based on the new iteration point until the state parameters corresponding to the generated iteration point satisfy the preset convergence condition. The convergence condition can be dynamically adjusted based on different implementation scenarios, and this embodiment of the invention does not impose any restrictions on it.
[0088] For example, in one implementation, the processor evaluates the updated state parameters. .like The stationary point condition for the optimization problem that satisfies the following global minimum constraint violation (i.e., the error is less than the set accuracy threshold) is met. ):
[0089]
[0090] in, This is a metric function for the degree of constraint violation in the system. If the conditions are met, the algorithm is considered convergent, and the output is... If the optimal control parameters or best fault-tolerant state parameters of the system are used, the optimization ends; if the conditions are not met, then let... Return to step S201.
[0091] Specifically, in the aforementioned quadratic programming subproblem, the Hessian matrix serves to provide curvature information of the original problem at the current iteration point. This curvature information determines the degree of bending of the objective function and constraints within a local range, directly affecting the quality of the search direction. Therefore, after updating the system state, if further iterations are still needed, the Hessian approximation matrix also needs to be updated. Specifically, this can include: after updating the state of the current iteration, obtaining the changes in state parameters and the Lagrange function gradient before and after the current iteration; updating the Hessian matrix used to approximate the curvature of the Lagrange function based on the changes in state parameters and the Lagrange function gradient using a quasi-Newton method; and using the updated Hessian matrix as curvature information for constructing the quadratic programming subproblem in the next iteration, so that subsequent iterations of the subproblem can more accurately approximate the local curvature characteristics of the original problem.
[0092] To further illustrate the technical problem solved by this invention and its resulting technical effects, the following is a specific scenario illustrating the implementation process of this invention.
[0093] This example applies the technical solution of the present invention to a batch reactor in a chemical production workshop, used for exothermic chemical reactions. The reactor is equipped with a heating device and a cooling jacket, and the reaction temperature can be controlled by adjusting the heating power and cooling water flow rate. The task is to raise the reactor temperature from an initial temperature of 20°C to a target reaction temperature of 150°C, while strictly controlling all safety parameters during the heating process.
[0094] The heating process is discretized into N=20 time nodes, with each node spaced Δt=30 seconds apart, and the total heating time is 600 seconds.
[0095] Original objective function To minimize the heating time is equivalent to making the terminal temperature as close as possible to the target value for a fixed number of time points: ;when When the temperature reaches 150℃ precisely, the objective function value is 0.
[0096] The original equality constraints are:
[0097]
[0098]
[0099] in, The coefficient of performance is the cooling efficiency. M represents the cooling water temperature, and M represents the mass of the reactants. For specific heat capacity, This is the exothermic term of the reaction (a function of temperature).
[0100] The original inequality constraints are:
[0101] Temperature safety upper limit Maximum heating power Maximum cooling capacity Temperature change rate limit .
[0102] Assuming the current iteration is in its 5th iteration, the current state is... For: temperature =95 Heating power =80 kW; Valve opening =20%. At this point, the controller needs to decide on the direction of the next control command adjustment.
[0103] Based on the gradient described above, we construct a quadratic programming subproblem with respect to the search direction d:
[0104]
[0105]
[0106]
[0107] When solving this subproblem, the following linearization constraints were found to conflict: In order to reach the target temperature as quickly as possible, the linearized target requires an increase in heating power. However, the temperature change rate constraint is linearized to Calculated at the current point, this is equivalent to requiring an increase in heating power. ≤2kW; simultaneously, the upper temperature limit constraint is linearized to After calculation at the current point, it is equivalent to allowing This condition itself is lenient, but when combined with the rate constraint, the intersection of the two constraints is empty. This is because the rate constraint strictly limits the power to only increase slightly, while the target needs to increase the power significantly to heat up quickly, but the rate constraint does not allow this.
[0108] At this point, the feasible region is an empty set, which means that under the current state, there is no control instruction adjustment scheme that can simultaneously meet the two linearized requirements of rapid heating and rate not exceeding limits.
[0109] According to the method of the present invention, when the subproblem is infeasible, instead of introducing slack variables, a two-stage optimization is performed:
[0110] Phase 1: Minimize constraint violations:
[0111] Find the direction that minimizes the violation of linearization constraints. Define the violation function. The absolute value of the rate constraint exceeding the limit:
[0112]
[0113] Solve To obtain the minimum violation degree This means that no matter how it is adjusted, the rate constraint cannot be fully met, and the excess can only be controlled within 0.5℃ at most.
[0114] Phase 2: Optimize the objective on the set of minimum violations.
[0115] Among all candidate directions that can ensure the rate constraint exceedance does not exceed 0.5℃, we search for directions that approximate the objective function. The direction of minimum, denoted as .
[0116] The specific value for this direction is: heating power adjustment amount. Valve opening adjustment amount . The target search direction is to select the control adjustment scheme that minimizes the over-limit and makes the terminal temperature closest to the target value when it is impossible to completely avoid the temperature rate exceeding the limit.
[0117] Subsequently, the Armijo criterion is used for line search, with an initial step size α=1; candidate points are then calculated. The penalty function value Ψ at the current point is compared with the penalty function value at the current point to determine whether the sufficient descent condition is met. In this example, α=1 satisfies the condition, therefore the step size is determined as follows. Update status: New heating power New valve opening Calculate the state change in this iteration. and the change in the gradient of the Lagrange function Update the Hessian matrix using the BFGS formula get This prepares curvature information for the next iteration.
[0118] After multiple iterations, when the point after a certain iteration... Satisfy: Temperature The violation rate of all constraints (temperature limit, power limit, rate limit) is less than [amount missing]. The gradient norm of the Lagrange function is less than If convergence is achieved, a complete sequence of control commands is output to the actuator.
[0119] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned nonlinear optimization control method, one embodiment of the present invention provides a nonlinear optimization control system 300, including: a problem construction module 301, a direction planning module 302, and an iteration module 303.
[0120] It should be noted that the nonlinear optimization control method of this invention can be applied to the nonlinear optimization control system 300 of this invention. This nonlinear optimization control system 300 can be configured on a terminal. The terminal may include, but is not limited to, a PC (Personal Computer), a PDA (Tablet PC), a smartphone, a smart wearable device, etc.
[0121] Specifically, the problem construction module 301 is used to construct a quadratic programming subproblem at the current iteration point; the quadratic programming subproblem includes an approximate objective function and approximate constraints; the approximate objective function is a quadratic approximation of the original objective function at the current iteration point, and the approximate constraints are a linear approximation of the original constraints at the current iteration point; the direction planning module 302 is used to solve the quadratic programming subproblem, and if the feasible region of the quadratic programming subproblem is an empty set, then a set of candidate directions that minimizes the constraint violation is determined, and the direction that minimizes the approximate objective function in the set of candidate directions is determined as the target search direction; the iteration module 303 is used to determine the iteration step size based on the target search direction, and to determine a new iteration point based on the target search direction and the iteration step size; wherein, the function used to determine the step size is a penalty function that weights and sums the objective function value and the constraint violation.
[0122] Please refer to Figure 4 As shown, embodiments of the present invention also provide an electronic device 400, which includes at least one processor 401, a memory 402 (e.g., non-volatile memory), a main memory 403, and a communication interface 404, wherein the at least one processor 401, the memory 402, the main memory 403, and the communication interface 404 are connected together via an internal bus 405. The at least one processor 401 is used to invoke at least one program instruction stored or encoded in the memory 402 to cause the at least one processor 401 to perform various operations and functions of the nonlinear optimization control method described in the various embodiments of this specification.
[0123] In the embodiments of this specification, electronic device 400 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.
[0124] This invention also provides a computer-readable medium carrying computer-executable instructions. When executed by a processor, these instructions can be used to implement various operations and functions of the nonlinear optimization control methods described in the various embodiments of this specification.
[0125] The computer-readable medium in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0126] In this invention, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0127] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0129] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
[0130] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0131] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A nonlinear optimization control method applied to a potentially infeasible problem, characterized in that, include: At the current iteration point, construct a quadratic programming subproblem; The quadratic programming subproblem includes an approximate objective function and approximate constraints; the approximate objective function is a quadratic approximation of the original objective function at the current iteration point, and the approximate constraints are a linear approximation of the original constraints at the current iteration point. Solve the quadratic programming subproblem. If the feasible region of the quadratic programming subproblem is an empty set, determine the set of candidate directions that minimizes the constraint violation degree, and determine the direction in the set of candidate directions that minimizes the approximate objective function as the target search direction. Based on the target search direction, the iteration step size is determined, and based on the target search direction and the iteration step size, a new iteration point is determined; wherein, the function used to determine the step size is a penalty function that weights and sums the objective function value and the constraint violation degree.
2. The nonlinear optimization control method according to claim 1, characterized in that, The method further includes: If the feasible region formed by the constraints of the quadratic programming subproblem is a non-empty set, then solve the quadratic programming subproblem. Based on the solution space of the feasible region, the target search direction for the current iteration is determined.
3. The nonlinear optimization control method according to claim 1, characterized in that, The method further includes: Determine whether the new iteration point satisfies the preset convergence condition; If so, output the state parameters corresponding to the current iteration point as the optimal solution; If not, then a new quadratic programming subproblem is constructed based on the new iteration point until the state parameters corresponding to the generated iteration point satisfy the preset convergence condition.
4. The nonlinear optimization control method according to claim 1, characterized in that, Determining the iteration step size based on the target search direction includes: Determine candidate points after moving a candidate step size from the current iteration point along the target search direction, and calculate the penalty function value of the candidate points; If the difference between the penalty function value of the candidate point and the penalty function value of the iteration point is less than or equal to the sum of the products of the preset descent coefficient, the candidate step size, and the directional derivative of the penalty function of the iteration point along the search direction, then the candidate step size is determined as the iteration step size. If the difference between the penalty function value of the candidate point and the penalty function value of the iteration point is greater than the sum of the products of the preset descent coefficient, the candidate step size, and the directional derivative of the penalty function of the iteration point along the search direction, then the value of the candidate step size is reduced, and a new candidate point is determined after moving from the current iteration point along the target search direction with a new candidate step size, until the iteration step size is determined.
5. The nonlinear optimization control method according to claim 1, characterized in that, The method further includes: Based on the Lagrange multiplier norm associated with the target search direction, the weights of the constraint violation degrees in the penalty function are determined; If the Lagrange multiplier norm of the current iteration point is greater than a preset first threshold, then the weight of the constraint violation degree in the penalty function is increased; If the Lagrange multiplier norm of the current iteration point is less than or equal to a preset second threshold, then the weight of the constraint violation in the penalty function is reduced, or the weight of the constraint violation in the penalty function is kept unchanged.
6. The nonlinear optimization control method according to claim 1, characterized in that, The quadratic programming subproblem can be expressed as: in, The objective function is... , For constraint functions; The gradients corresponding to the aforementioned objective function and constraint function; It is an n-dimensional vector representing the state at the current iteration point. At this point, the direction and magnitude of the system state variables need to be adjusted; Let be the Hessian matrix used to approximate the Lagrangian function of the original problem at the current point.
7. The nonlinear optimization control method according to claim 6, characterized in that, The method also includes updating the Hessian matrix, specifically including: After completing the state update for the current iteration, obtain the changes in state parameters before and after the current iteration, as well as the changes in the gradient of the Lagrange function before and after the current iteration; Based on the changes in the state parameters and the changes in the gradient of the Lagrange function, the Hessian matrix used to approximate the curvature of the Lagrange function is updated using a quasi-Newton method. The updated Hessian matrix is used as curvature information for constructing quadratic programming subproblems in the next iteration, so that the subproblems in subsequent iterations can more accurately approximate the local curvature characteristics of the original problem.
8. A nonlinear optimization control system, employing the nonlinear optimization control method as described in any one of claims 1-7, characterized in that, include: The problem construction module is used to construct a quadratic programming subproblem at the current iteration point; The quadratic programming subproblem includes an approximate objective function and approximate constraints; the approximate objective function is a quadratic approximation of the original objective function at the current iteration point, and the approximate constraints are a linear approximation of the original constraints at the current iteration point. The direction planning module is used to solve the quadratic programming subproblem. If the feasible region of the quadratic programming subproblem is an empty set, the candidate direction set that minimizes the constraint violation degree is determined, and the direction that minimizes the approximate objective function in the candidate direction set is determined as the target search direction. An iteration module is used to determine the iteration step size based on the target search direction, and to determine a new iteration point based on the target search direction and the iteration step size; wherein, the function used to determine the step size is a penalty function that weights and sums the objective function value and the constraint violation degree.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory that stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the nonlinear optimization control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the nonlinear optimization control method according to any one of claims 1-7.