An online optimal energy trajectory planning method
By combining neural network prediction with extreme value variational method, the trajectory planning of large inertia rocker arm rotary servo system is optimized, solving the problems of initial value sensitivity and low computational efficiency, and realizing online trajectory planning that can quickly generate energy-optimal trajectory.
Patent Information
- Application Number
- CN202611035674.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-07-13
AI Technical Summary
In existing technologies for large inertia rocker arm rotary servo systems, trajectory planning methods are sensitive to initial values and have low computational efficiency, making it difficult to meet the requirements of online real-time control.
By combining neural network prediction with the extreme value variational method, the initial value of the costate variable is predicted by the neural network, and the nonlinear two-point boundary value problem is solved by combining the shooting method, thus optimizing the trajectory planning method and improving the convergence success rate and calculation speed.
This invention enables the rapid and reliable generation of energy-optimal trajectories in a large-inertia rocker arm rotary servo system, improving computational efficiency and convergence stability, and meeting the requirements of online trajectory planning.
Smart Images

Figure CN122528707B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to velocity trajectory planning technology, specifically an online optimal energy trajectory planning method. Background Technology
[0002] High-inertia rocker arm rotary servo systems have wide applications in industrial automation and robotics, primarily used in processing, handling, assembly, and other scenarios requiring high-precision motion control. Trajectory planning is a crucial step in achieving efficient operation of such systems, and its performance directly affects the system's motion accuracy, response speed, and energy consumption.
[0003] Existing techniques typically rely on optimal control theory to transform trajectory planning into a nonlinear two-point boundary value problem, and then employ the target-shooting method for solution. However, these methods have significant limitations in practical applications: First, nonlinear two-point boundary value problems are highly sensitive to the initial values of costate variables; improper initial value selection can lead to difficulty in convergence or slow convergence speed. Second, for large-inertia rocker arm rotation systems driven by electric cylinders, due to the complexity of system dynamics, traditional target-shooting methods and maximum principle solutions usually depend on excellent initial values to obtain convergent solutions, resulting in low computational efficiency and making it difficult to meet the needs of online real-time trajectory planning.
[0004] Therefore, there is an urgent need for a new online trajectory planning method that can improve computational efficiency while ensuring convergence, so as to meet the application requirements of large inertia rocker arm rotary servo systems in industrial real-time control. Summary of the Invention
[0005] The purpose of this invention is to provide an online optimal energy trajectory planning method for a large inertia rocker arm rotary servo system driven by an electric cylinder. For a given point-to-point motion, this method can quickly generate the corresponding optimal energy trajectory, enabling the electric drive system to minimize energy consumption during motion.
[0006] The technical solution to achieve the purpose of this invention is: an online optimal energy trajectory planning method, comprising the following steps:
[0007] Step 1: Establish the mechanical motion equations of the large inertia rocker arm rotation servo system, taking the position and velocity of the rocker arm as state variables, and the servo motor's... Using shaft current as the control variable, the motion equation is rewritten as a state-space equation. The energy consumption of the large inertia rocker arm rotation servo system is taken as the optimization objective, and acceleration constraints are introduced to construct an optimization control problem.
[0008] Step 2: Solve the optimization control problem with acceleration constraints according to the unconstrained optimal control problem. If the acceleration of the unconstrained optimal trajectory does not exceed the limit during the entire motion process, then the unconstrained optimal trajectory at this time is taken as the optimal solution; otherwise, proceed to step 3.
[0009] Step 3: Set the rocker arm trajectory as an acceleration saturation segment, an unconstrained segment, and a deceleration saturation segment in sequence. By adjusting the switching time points between the acceleration saturation segment and the unconstrained segment, and between the unconstrained segment and the deceleration saturation segment, the boundary state is determined so that the unconstrained segment satisfies the maximum principle solution while ensuring that the acceleration is continuous at the switching time points.
[0010] Compared with existing technologies, the significant advantages of this invention are as follows: Addressing the problems of traditional target-shooting methods in nonlinear energy-optimal trajectory planning, such as high sensitivity to initial values of unknown costate variables, difficulty in initial value selection, and low success rate, this invention combines neural network prediction with extreme value variational methods. First, the neural network rapidly predicts high-quality initial values of unknown costate variables based on given positioning task parameters. Then, these initial values are used as initial guesses for solving the nonlinear two-point boundary value problem using extreme value variational methods. This effectively avoids the problem of relying on manual trial-and-error for initial values in traditional methods, significantly improving the convergence success rate and solution stability of the target-shooting method, while reducing the number of iterations and increasing online computation speed. This enables faster and more reliable online generation of the energy-optimal trajectory for electric drive servo systems. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of a large inertia rocker arm rotary servo system driven by an electric cylinder.
[0012] Figure 2 These are the optimal energy motion trajectory and trapezoidal velocity trajectory of the rocker arm in the first task scenario of this embodiment of the invention.
[0013] Figure 3 These are the optimal energy motion trajectory and trapezoidal velocity trajectory of the motor in the first task scenario of this embodiment of the invention.
[0014] Figure 4 This refers to the optimal energy motion trajectory and trapezoidal velocity trajectory of the rocker arm with acceleration constraints in the second task scenario of this embodiment of the invention.
[0015] Figure 5 This refers to the optimal energy motion trajectory and trapezoidal velocity trajectory of the motor with acceleration constraints in the second task scenario of this invention embodiment. Detailed Implementation
[0016] An online optimal energy trajectory planning method, the specific steps of which are as follows:
[0017] Step 1: Establish the mechanical motion equations of the large inertia rocker arm rotation servo system, taking the position and velocity of the rocker arm as state variables, and the servo motor's... Using shaft current as the control variable, the equation of motion is rewritten as a state-space equation, the energy consumption of the system is taken as the optimization objective, and acceleration constraints are introduced to construct an optimization control problem.
[0018] Specifically, the mechanical motion equations for establishing the large inertia rocker arm rotation servo system are as follows:
[0019]
[0020] in, Let be the moment of inertia of the rocker arm. This is the position of the rocker arm. The rotational speed of the rocker arm. The thrust of the electric cylinder push rod. The mapping coefficient is used to convert the push rod's thrust into the rocker arm's rotational driving torque. The gravitational torque of the rocker arm, Let be the amplitude of the Coulomb friction force. is the viscous damping coefficient.
[0021] The thrust of the electric cylinder push rod can be specifically expressed as:
[0022]
[0023] in, The synchronous belt speed ratio of the electric cylinder. For the lead of the ball screw in the electric cylinder, This refers to the torque coefficient of the servo motor. For servo motors Axis current.
[0024] The expression for the rocker arm's gravitational torque is:
[0025]
[0026] in, For the mass of the rocker arm, It is the acceleration due to gravity. This is the distance from the center of gravity of the rocker arm to the center of gravity of the rotation.
[0027] The position and velocity of the rocker arm are taken as state variables, denoted as... , the motor Shaft current is used as a control variable, denoted as The formula can be The mechanical motion equations of the rocker arm shown can be written in state-space form.
[0028]
[0029] in, , , , .
[0030] Performance metrics can be written as
[0031]
[0032] in, The performance index represents the electrical energy consumed during the motion process. For the system to start from the initial state Move to the target state The change in gravitational potential energy For motor resistance, For exercise time, The control variable represents the motor's Axis current.
[0033] When constructing an optimization control problem, acceleration constraints are usually also considered.
[0034]
[0035] in, For the acceleration of the rocker arm, For acceleration constraints.
[0036] According to the formula The dynamic model shown is, equation The performance indicators and formulas shown Given the constraints, the optimization control problem is defined as follows:
[0037]
[0038] The state equation of the system can be written in affine form as follows:
[0039]
[0040] Step 2, Solve the unconstrained optimization problem: Solve the optimization control problem with acceleration constraints according to the unconstrained optimal control problem. If the acceleration of the unconstrained optimization trajectory does not exceed the limit during the entire motion process, then the unconstrained optimization trajectory at this time is taken as the optimal solution; otherwise, proceed to Step 3.
[0041] In a further embodiment, the specific method for solving the unconstrained optimization control problem is as follows: First, the optimal control law is derived based on the maximum principle, transforming the optimization control problem into a nonlinear two-point boundary value problem; then, a trained neural network is used to predict the initial values of the unknown costate variables, and the nonlinear two-point boundary value problem is solved using a shooting method to obtain the optimal control input and corresponding trajectory that satisfy the boundary conditions. Specifically, as follows:
[0042] Introducing costate variables λ1 and λ2, in a further embodiment, the Hamiltonian variable is defined as:
[0043]
[0044] Based on the defined Hamiltonian, the following costate equation can be obtained:
[0045]
[0046] According to the optimality condition ∂H / ∂u = 0, we can obtain
[0047]
[0048] From the above equation, the optimal control quantity can be obtained as follows:
[0049]
[0050] remember ,but
[0051]
[0052] Substituting the above equation into the state equation And costate equations In this process, a system of Hamiltonian equations can be formed, which is a nonlinear system of ordinary differential equations:
[0053]
[0054] For this system of differential equations, due to the initial values of the costate variables... and Since this is unknown, numerical methods are needed to solve it. Furthermore, the optimal energy trajectory should also satisfy the following boundary conditions:
[0055]
[0056] The Hamiltonian equations and boundary conditions described above form a two-point boundary value problem of a nonlinear ordinary differential equation system. Therefore, solving the optimal energy trajectory planning problem is transformed into solving a nonlinear two-point boundary value problem.
[0057] In a further embodiment, for the Hamilton equations and its corresponding boundary conditions The two-point boundary value problem of the nonlinear ordinary differential equation system constituted by the present invention first uses the task execution time, the initial state of the system and the target state as input to the neural network, and the neural network outputs the initial values of the unknown costate variables λ1 and λ2. After obtaining the initial values, the initial values of the costate variables and the corresponding solution of the nonlinear two-point boundary value problem are solved iteratively by the shooting method to obtain the convergent initial values of the costate variables and the corresponding solution of the nonlinear two-point boundary value problem, thereby realizing high-precision online optimal energy trajectory planning.
[0058] In a further embodiment, the neural network model takes the initial state of the task, the target state, and the task time as inputs, and the initial values of the costate variables as outputs. It is trained using historical task data and used to generate initial value guesses required for online trajectory planning. The specific process is as follows:
[0059] Establish the mapping relationship between the system's task parameters and unknown costate variables.
[0060]
[0061] Then, a neural network model is constructed, and this nonlinear mapping relationship is fitted using a large amount of training data. The specific steps are as follows:
[0062] (1) Construct a neural network model with the initial state parameters of the system, the target state parameters and the task time as inputs and the initial values of unknown costate variables as outputs;
[0063] (2) Based on the shooting method, obtain the initial values of the costate variables corresponding to multiple typical tasks and establish a training dataset, wherein the training data includes task time, system initial state, system target state and the initial values of the costate variables corresponding to each task;
[0064] (3) Train the neural network model to learn the task parameters. , , with initial values of costate variables , The mapping relationship between them is used to obtain a training model that meets the accuracy requirements;
[0065] (4) During the online trajectory planning process, the current system initial state is set. Target state and task time The input is fed into the trained neural network model to obtain the prediction results of the initial values of the costate variables;
[0066] In a further embodiment, the nonlinear two-point boundary value problem is solved using the target shooting method to obtain the optimal control input that satisfies the boundary conditions. and the corresponding rocker arm position trajectory and the speed trajectory of the rocker arm The specific process is as follows:
[0067] Step 21: Combining the prediction results of the initial values of the costate variables, the adaptive Runge-Kutta method is used to perform integration to obtain the position and velocity of the rocker arm as the final state. The specific process is as follows:
[0068] For differential equations In the interval The integration is performed on the upper bound, and an adaptive step-size processing is applied to the fourth-order Runge-Kutta method. The integration step size is automatically adjusted based on local integration errors to improve online computational efficiency while maintaining trajectory integration accuracy. It should be noted that the adaptive step-size integration is an inner-layer integration process; its function is to apply the Hamiltonian equations given initial values of the current costate variables. Numerical integration is performed; the extreme value variational rule belongs to the outer iterative process, and its function is to correct the initial values of the costate variables based on the terminal boundary residuals after a complete integration. The specific steps are as follows.
[0069] (1) Initialize integration parameters. Set the initial step size. Integration error tolerance (tol), minimum step size With maximum step size Hamilton's equations The right-hand side function is denoted as ,in This represents the augmented variable consisting of state variables and costate variables, i.e. For the first Next target shooting iteration, input the current initial conditions. Initial time and termination time Let the current step size and from Start accumulating points.
[0070] (2) Calculation of large step integrals. At the current time and current integral value Below, the standard fourth-order Runge-Kutta formula is used with a step size of Perform one integration to obtain the result of the large step-size integral. ,Right now .in, This indicates that a single-step integration calculation is performed using the fourth-order Runge-Kutta formula.
[0071] (3) Half-step integral calculation and error estimation. To estimate the current step size... The local integration error under the step size Divided into two half steps First from Start, by step length Perform an RK4 integration to obtain an intermediate result. Then from Start, by step length Perform a second RK4 integration to obtain the final result after two half-step integrations. .
[0072] therefore, This is the intermediate integral value. After two and a half steps, in The integral result obtained at time step. The result of a large-step integral. With the results of two half-step integrations By comparison, the local integration error at the current step size can be obtained:
[0073]
[0074] Among them, ||·|| ∞ The infinite norm of a vector is used to characterize the maximum integral deviation among its components.
[0075] (4) Step size acceptance and adjustment. Based on local error With a given error tolerance The size relationship is used to determine whether the current step size is acceptable. If If the current step size meets the accuracy requirements, then the results of two half-step integrations are accepted. And use it as the initial value for the next integration node, that is , Then and Store the trajectory sequence and update the step size for the next integration step based on the error magnitude.
[0076] like If the current step size is too large, the integration result will not be accepted, meaning the current time will not be updated. and current integral value Instead, reduce the step size. And return to step (2) to start again from the same integration node. Start by performing large-step integration and half-step integration until the error meets the requirements.
[0077] The new step size can be calculated using the following formula:
[0078]
[0079] The value of 0.9 is a safety factor used to prevent overly aggressive changes in step size. and These are used to limit the minimum and maximum step size, respectively. This is in case the next integration step might exceed the termination time. season To ensure that the last integration node is reached accurately. .
[0080] (5) Repeat the integration until the endpoint. Starting from the initial time t0, repeat steps (2) to (4) to continuously complete the adaptive integration process of "error estimation - step size judgment - result acceptance or rejection - step size update" until the current time reaches the termination time. After integration, output the time sequence. and the corresponding augmented trajectory sequence The state variable part of the augmented trajectory sequence is the position and velocity trajectory of the rocker arm. After a complete adaptive integration, the terminal state is taken. .
[0081] Step 22: Since the initial value guess of the neural network differs from the true value, the solution to its initial value problem may not satisfy the corresponding boundary conditions. Calculate the terminal state boundary error, specifically expressed as...
[0082]
[0083] in, The terminal state obtained by integration. For the predetermined target terminal state, This is the terminal error vector.
[0084] If the terminal state boundary error is less than the set threshold, the current position and speed of the rocker arm are taken as the optimal solution; otherwise, the initial values of the costate variables are iteratively updated based on the boundary error. The specific update formula is as follows:
[0085]
[0086] in, Let the initial values of the costate variables be for the k-th iteration. The initial values for the updated costate variables, For the corresponding boundary error, This is the Jacobian matrix of the residuals with respect to the initial values of the costate variables, used to reflect the sensitivity of the residuals to the initial values.
[0087] Step 23: Use the iteratively updated initial value of the costate variable as the prediction result of the initial value of the costate variable, and return to step 21 to recalculate.
[0088] Since the initial values of co-state variables predicted by neural networks usually still contain some error, the trajectory obtained by direct integration generally cannot strictly satisfy the given boundary conditions at the terminal time. Therefore, this invention iteratively corrects the initial values of co-state variables based on the terminal boundary error, that is, it uses the extreme value variational method to establish the relationship between the terminal boundary error and the correction amount of the initial co-state value, and continuously updates it. and The initial value is used until the terminal boundary error is less than the preset tolerance. Finally, the optimal control input that satisfies the boundary conditions and its corresponding state trajectory can be obtained.
[0089] If the acceleration of the unconstrained optimized trajectory during the entire motion process does not exceed the limit, then the unconstrained optimized trajectory at this time is taken as the optimal solution; otherwise, proceed to step 3.
[0090] Specifically, "acceleration not exceeding the limit" means that the acceleration corresponding to the unconstrained optimal trajectory must satisfy...
[0091]
[0092] in If the acceleration represents the acceleration corresponding to the unconstrained optimal trajectory, then the unconstrained optimal trajectory is feasible and can be directly used as the optimal trajectory. Otherwise, it means that the acceleration constraint is activated, and an acceleration constraint arc needs to be introduced, and acceleration constraint processing should be performed according to step 3.
[0093] Step 3, Acceleration Constraint Processing: If the unconstrained optimized trajectory obtained in Step 2 exceeds the acceleration limit, acceleration constraint processing is required. For optimal trajectory planning with acceleration constraints, the rocker arm trajectory is first set as an acceleration saturation segment, an unconstrained segment, and a deceleration saturation segment in sequence, and then the time points are switched... and The boundary state is determined, and the switching time point is iteratively adjusted to ensure that the intermediate unconstrained segment satisfies the maximum principle for solution, while ensuring that the acceleration is continuous at the switching time point.
[0094] For the point-to-point localization task studied in this invention, the optimal trajectory under acceleration constraints can be constructed using a three-segment structure. The first segment is the acceleration saturation segment, the second segment is the unconstrained optimal segment, and the third segment is the deceleration saturation segment. Let... and Let represent the switching time points between the constrained segment and the unconstrained segment, respectively. Then, the acceleration curve can be written as:
[0095]
[0096] In the first segment, the rocker arm accelerates at the maximum permissible acceleration. Therefore, the timing of the switch... The state at a location can be represented as:
[0097]
[0098] Similarly, in the final segment, the rocker arm accelerates to the lower bound. Deceleration is performed. The switching time point can be obtained by inverse integration from the terminal state. The state at that point can be represented as:
[0099]
[0100] Therefore, once given and The boundary conditions for the unconstrained arc segment in the middle can be completely determined as follows:
[0101]
[0102] Subsequently, the intermediate segment can be achieved within a time interval. The unconstrained optimal trajectory is obtained by solving the problem, and the solution process follows step 2. Thus, the acceleration-constrained optimal trajectory planning problem is transformed into determining the appropriate switching time point. and The problem.
[0103] To ensure a smooth transition between constrained and unconstrained arc segments, the acceleration at the two switching time points must remain continuous. Therefore, the following matching condition must be met:
[0104]
[0105] Define the switching residual as
[0106]
[0107] Continuously iterate and adjust the switching time until the following conditions are met:
[0108]
[0109] in, and These represent the allowable thresholds for acceleration matching error at the two switching time points, respectively.
[0110] During each iteration, the switching time between the currently set acceleration saturation segment and the unconstrained segment is determined. The switching time point between the unconstrained segment and the deceleration saturation segment Determine the acceleration curve and calculate the boundary states of the unconstrained arcs in the middle, i.e., the switching time points. and switching time points The state of being;
[0111] The unconstrained optimization trajectory on the unconstrained segment is solved using the method in step 2.
[0112] Calculate the acceleration residuals at the two switching time points. If the acceleration residuals at both switching time points are less than a set threshold, then the current two switching time points are taken as the optimal switching time points; otherwise, a numerical iterative method is used to update. and For example, the binary search method, Newton's iteration method, quasi-Newton's iteration method or other numerical iteration methods can be used to achieve this until the acceleration residuals at the two switching time points meet the threshold requirements.
[0113] Example
[0114] The invention will be further described below with reference to the accompanying drawings. This embodiment uses a typical electric cylinder-driven large-inertia rocker arm rotation system as an example for illustration, and its system structure is as follows: Figure 1 As shown in Table 1, the relevant system parameters are listed to more clearly describe the specific configuration and technical features of this embodiment.
[0115] Table 1 System Parameters
[0116] parameter value parameter value Electric cylinder lead screw p 0.01 m angle θ0 0.6744 rad Electric cylinder synchronous belt speed ratio 1 Angle θs 0.1580 rad Electromagnetic torque coefficient K t ]]> 0.6 N∙m / A rocker arm mass 118.527 Kg Motor stator resistance Rs 0.92 Ω Rocker rotational inertia J m ]] <![CDATA[63.0 kg·m 2 ]]> Motor rated torque 4.0 N·m <![CDATA[Viscous damping coefficient B m > 1.2 N·m·s <![CDATA[Length L1]]> 0.26520 m <![CDATA[Coulomb friction F f > 2.0 N·m <![CDATA[Length L2]]> 0.87084 m <![CDATA[Acceleration constraint α lim > <![CDATA[7.0 rad / s 2 ]]> <![CDATA[Distance L from the center of gravity of the rocker arm to the rotation center G > 0.65 m
[0117] Given the following task:
[0118] Table 2 Point-to-point location tasks
[0119] serial number Task 1 The rocker arm moves from 30 degrees to 55 degrees in 1.0 seconds. 2 The rocker arm moves from 30 degrees to 70 degrees in 1.0 seconds.
[0120] In this embodiment, two typical tasks are selected to verify the method. Specific tasks are shown in Table 2. Task 1 involves the rocker arm moving from 30° to 55° within 1.0 s, with both initial and final velocities being 0. Task 2 involves the rocker arm moving from 30° to 70° within 1.0 s, with both initial and final velocities being 0. For the first task, the generated motion trajectory consists entirely of unconstrained motion trajectories, as shown in Figure 2 (rocker arm trajectory) and Figure 3 (servo motor trajectory). For the second task, the generated optimized motion trajectory includes acceleration-constrained segments and unconstrained segments, as shown in Figure 4 (rocker arm trajectory) and Figure 5 (servo motor trajectory). Therefore, considering motion constraints such as acceleration, the optimized motion trajectory effectively satisfies system dynamics constraints while simultaneously achieving the goals of trajectory smoothness and energy consumption optimization.
[0121] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0122] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. An online optimal energy trajectory planning method, characterized in that, Includes the following steps: Step 1: Establish the mechanical motion equations of the large inertia rocker arm rotation servo system, taking the position and velocity of the rocker arm as state variables, and the servo motor's... Using shaft current as the control variable, the motion equation is rewritten as a state-space equation. The energy consumption of the large inertia rocker arm rotation servo system is taken as the optimization objective, and acceleration constraints are introduced to construct an optimization control problem. Step 2: Solve the optimization control problem with acceleration constraints according to the unconstrained optimal control problem. If the acceleration of the unconstrained optimal trajectory does not exceed the limit throughout the entire motion process, then the unconstrained optimal trajectory at this time is taken as the optimal solution; otherwise, proceed to Step 3. The specific method for solving the optimization control problem with acceleration constraints according to the unconstrained optimal control problem is as follows: Based on the maximum principle, the optimal control law is derived, transforming the unconstrained optimization control problem into a nonlinear two-point boundary value problem, namely the Hamiltonian equations. The initial values of unknown costate variables are predicted using a trained neural network, and the nonlinear two-point boundary value problem is solved by combining the shooting method to obtain the optimal control input and corresponding trajectory that satisfy the boundary conditions. The unconstrained optimization control problem is transformed into a nonlinear two-point boundary value problem, specifically expressed as: ; Simultaneously satisfy ; In the formula, This is the position of the rocker arm. The rotational speed of the rocker arm. and For costate variables, For the lead of the ball screw in the electric cylinder, The synchronous belt speed ratio of the electric cylinder. This is the initial state. For the target state, and These represent the initial and end positions of the rocker arm, respectively. and These represent the initial velocity and the end velocity of the rocker arm, respectively. The equivalent input gain term is formed after the thrust of the electric cylinder acts on the rocker arm through the transmission mechanism. This is the equivalent angular acceleration term corresponding to the gravitational torque. This is the equivalent angular acceleration term corresponding to Coulomb friction. This is the equivalent damping term corresponding to viscous damping. These are the coefficients of the optimal control law; The specific method for predicting the initial values of unknown costate variables using a trained neural network is as follows: (1) Construct a neural network model with initial state parameters, target state parameters and task time as inputs and unknown costate variables as initial values as outputs; (2) Based on the shooting method, obtain the initial values of the costate variables corresponding to multiple typical tasks and establish a training dataset, wherein the training data includes task time, system initial state, system target state and the initial values of the costate variables corresponding to each task; (3) Train the neural network model so that the neural network model learns the mapping relationship between the task parameters and the initial values of the costate variables, and obtains a training model that meets the accuracy requirements. The task parameters include the task time, the initial state of the system, and the target state of the system. (4) During the online trajectory planning process, the current system initial state, target state and task time are input into the trained neural network model to obtain the prediction results of the initial values of the costate variables; The specific method for solving nonlinear two-point boundary value problems by combining the target shooting method to obtain the optimal control input and corresponding trajectory that satisfy the boundary conditions is as follows: Step 21: Combining the prediction results of the initial values of the costate variables, the position and velocity of the rocker arm are obtained by integration using the adaptive Runge-Kutta method as the final state; Step 22: Determine the boundary error between the terminal state and the predetermined target terminal state. If the boundary error is less than a set threshold, then the current position and speed of the rocker arm are taken as the optimal solution; otherwise, based on the boundary error, iteratively update the initial values of the costate variables. The specific update formula is as follows: ; in, For the first Initial values of the costate variables in the next iteration. Costate variables , initial value, The initial values for the updated costate variables, For boundary error, The Jacobian matrix of the residuals with respect to the initial values of the costate variables; Step 23: Use the iteratively updated initial values of the costate variables as the prediction results of the initial values of the costate variables, and return to Step 21 to recalculate; Step 3: Set the rocker arm trajectory as an acceleration saturation segment, an unconstrained segment, and a deceleration saturation segment in sequence. By adjusting the switching time points between the acceleration saturation segment and the unconstrained segment, and between the unconstrained segment and the deceleration saturation segment, the boundary state is determined so that the unconstrained segment satisfies the maximum principle solution while ensuring that the acceleration is continuous at the switching time points.
2. The online optimal energy trajectory planning method according to claim 1, characterized in that, The mechanical motion equations of the high inertia rocker arm rotary servo system are as follows: ; in, Let be the moment of inertia of the rocker arm. This is the position of the rocker arm. The rotational speed of the rocker arm. The thrust of the electric cylinder push rod. The mapping coefficient is used to convert the push rod's thrust into the rocker arm's rotational driving torque. The gravitational torque of the rocker arm, Let be the amplitude of the Coulomb friction force. is the viscous damping coefficient.
3. The online optimal energy trajectory planning method according to claim 2, characterized in that, Using the position and velocity of the rocker arm as state variables, the servo motor... The specific method for rewriting the motion equations into state-space equations using shaft current as a control variable is as follows: The position and velocity of the rocker arm are treated as state variables, denoted as... , the motor shaft current As a control variable, it is denoted as The mechanical motion equations of the large inertia rocker arm rotary servo system are rewritten in state-space form: ; in, , , , .
4. The online optimal energy trajectory planning method according to claim 1, characterized in that, The optimization control problem, which takes the energy consumption of the large inertia rocker arm rotation servo system as the optimization objective and introduces acceleration constraints, is as follows: ; In the formula, For the system's state variables, This is the position of the rocker arm. The rotational speed of the rocker arm. To control the quantity, The performance index represents the electrical energy consumed during the motion process. For the system from the initial state Move to the target state The change in gravitational potential energy For motor resistance, For the task time, For acceleration constraints, and These represent the initial and end positions of the rocker arm, respectively. and These represent the initial velocity and the end velocity of the rocker arm, respectively.
5. The online optimal energy trajectory planning method according to claim 1, characterized in that, Combining the prediction results of the initial values of the costate variables, the specific method for obtaining the position and velocity of the rocker arm as the final state by integrating using the adaptive Runge-Kutta method is as follows: (1) Set the initial step size Integral error tolerance Minimum step size With maximum step size The right-hand side function of the Hamiltonian equations is denoted as... ,in This represents the augmented variable consisting of state variables and costate variables, i.e. , This is the position of the rocker arm. The rotational speed of the rocker arm. and Let the current step size be a costate variable. And from the current time Start accumulating points. The initial step size is set. This is the initial time; (2) At the current time and current integral value Below, the standard fourth-order Runge-Kutta formula is used with a step size of Perform one integration to obtain the result of the large step-size integral. ,Right now ,in, This indicates that a single-step integration calculation is performed using the fourth-order Runge-Kutta formula; (3) Adjust the step size Divided into two half steps ,from Start, by step length Perform a standard fourth-order Runge-Kutta integral to obtain intermediate results. ; and then from Start, by step length Perform a second standard fourth-order Runge-Kutta integral to obtain the final result after two half-step integrals. ; This is the intermediate integral value. After two and a half steps, in The integral result obtained at time step; The result of a large step integral With the results of two half-step integrations Compare and determine the local integration error at the current step size: ; in, The infinite norm of a vector is used to characterize the maximum integral deviation among its components. (4) Based on local error With a given error tolerance The size relationship is used to determine whether the current step size is acceptable. If the current step size meets the accuracy requirements, then the results of two half-step integrations are accepted. And use it as the initial value for the next integration node, that is , Then and Store the trajectory sequence and update the step size for the next integration step based on the error magnitude; like If the current step size is too large, the integration result will not be accepted, meaning the current time will not be updated. and current integral value Instead, reduce the step size. And return to step (2) to start again from the same integration node. Start by performing large-step integration and half-step integration until the error meets the requirements; The next step's points may exceed the deadline. season This is to ensure that the last integration node reaches the end time accurately. ; (5) From the initial time Begin by repeating steps (2) through (4) until the current time reaches the end time. After integration, output the time sequence. and the corresponding augmented trajectory sequence The state variable part of the augmented trajectory sequence is the position and velocity trajectory of the rocker arm. After a complete adaptive integration, the terminal state is taken. .
6. The online optimal energy trajectory planning method according to claim 1, characterized in that, By adjusting the switching points between the acceleration saturation segment and the unconstrained segment, and between the unconstrained segment and the deceleration saturation segment, the boundary states are determined. The specific method to ensure that the acceleration is continuous at the switching points while satisfying the maximum principle solution for the unconstrained segment is as follows: Based on the currently set switching time points between the acceleration saturation segment and the unconstrained segment. The switching time point between the unconstrained segment and the deceleration saturation segment Determine the acceleration curve and calculate the boundary states of the unconstrained arcs in the middle, i.e., the switching time points. and switching time points The state of being; The unconstrained optimization trajectory on the unconstrained segment is solved using the method in step 2. Calculate the acceleration residuals at the two switching time points. If the acceleration residuals at both switching time points are less than a set threshold, then the current two switching time points are taken as the optimal switching time points; otherwise, a numerical iteration method is used to update. and This continues until the acceleration residuals at the two switching time points meet the threshold requirements.
Citation Information
Patent Citations
Optimal trajectory tracking control method and device for nonlinear motor servo system
CN119148539A
Method and system for trajectory optimization for nonlinear robotic systems with geometric constraints
WO2021065196A1
