Mechanical system constraint following control method based on historical state information neural network
By combining UK theory and historical state information into a multilayer perceptron neural network, a lumped disturbance estimation model is constructed and low-pass filtered, which solves the problem of chattering in robust control and feature mismatch between data-driven methods in mechanical systems, and realizes high-precision, low-energy constraint-following control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV OF SCI & TECH
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-07
Smart Images

Figure CN122063854B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control technology, and specifically to a constraint-following control method for mechanical systems based on a neural network of historical state information. Background Technology
[0002] Precise control of mechanical systems (such as industrial valve actuators and robotic arms) is a fundamental requirement in modern engineering applications. Essentially, the trajectory tracking problem can be formulated as a constrained following problem, requiring the system to follow a constrained manifold defined by the desired trajectory. Udwadia-Kalaba (UK) theory provides the theoretical foundation for handling constrained motion in analytical mechanics, offering analytical closed-form solutions. However, in practical applications, achieving high-fidelity constrained following is often affected by inherent system uncertainties, including parameter variations (such as mass and stiffness fluctuations), unmodeled dynamics, and external disturbances.
[0003] Existing robust control frameworks (such as sliding mode control or Lyapunov-based minimax strategies) theoretically guarantee bounded error, but require conservative assumptions about disturbance boundaries. This excessive conservatism often necessitates high-gain feedback to maintain stability, which can easily lead to control chattering or excite high-frequency unmodeled dynamics in practice, thus limiting achievable accuracy. On the other hand, while purely data-driven neural network methods can approximate disturbances, a mismatch in step size characteristics between offline deployments and online applications is frequently observed, and direct injection of high-frequency neural network predictions into the control loop can cause signal jitter.
[0004] Therefore, there is a need for a constraint-following control method for mechanical systems based on historical state information neural networks, which has high perturbation estimation accuracy and small tracking error. Summary of the Invention
[0005] The main objective of this invention is to provide a constraint-following control method for mechanical systems based on historical state information neural networks, in order to solve the problems of strong conservatism in robust control, easy chattering caused by high gain, and feature mismatch and signal jitter in pure data-driven methods in the prior art.
[0006] To achieve the above objectives, this invention provides a constraint-following control method for mechanical systems based on historical state information neural networks, specifically including the following steps:
[0007] S1. Establish a dynamic model of the constrained mechanical system and design the nominal control part based on UK theory.
[0008] S2. Establish a lumped disturbance model of the mechanical system, construct a feature vector including the historical state of the mechanical system, and obtain an offline training dataset.
[0009] S3 utilizes a multilayer perceptron neural network to learn inverse dynamic mapping offline and establishes a lumped perturbation estimation model.
[0010] S4 performs low-pass filtering and smoothing on the original predictions of the multilayer perceptron neural network, and combines it with the nominal control force to form a total control law that is applied to the mechanical system.
[0011] S5 is used to simulate and verify the mechanical system.
[0012] Furthermore, step S1 specifically includes the following steps:
[0013] S1.1, the dynamic model of the mechanical system is:
[0014] ;
[0015] in, For the quality matrix, As coordinates, and They are velocity and acceleration, respectively. Given a force under unconstrained dynamic characteristics, For time.
[0016] Considering the desired trajectory as a system constraint, the second-order constraint form is obtained as follows:
[0017] ;
[0018] in, For the constraint matrix, These are constraint terms.
[0019] S1.2, introducing system uncertainties and separating the nominal part, the equations of motion for the actual system are rewritten as follows:
[0020] ;
[0021] in, For the nominal portion, The uncertain part, Represents the uncertainty parameter. To control the input.
[0022] S1.3, Nominal Control Force Ideal constraints based on UK theory and for initial condition deviation feedback composition:
[0023] ;
[0024] ;
[0025] ;
[0026] in, For the nominal mass matrix, To constrain error, Positive control gain, for transpose, The positive definite matrix in the Lyapunov equation The inverse matrix.
[0027] Furthermore, step S2 specifically includes the following steps:
[0028] S2.1, To avoid independently identifying highly coupled parameters, a lumped perturbation is defined. To aggregate all structural mismatches and external forces:
[0029] ;
[0030] in, To define the left-hand side, The actual control force output by the system. The nominal damping matrix, This is the nominal stiffness matrix.
[0031] S2.2, To avoid directly measuring noisy acceleration in real-time control, historical state information is explicitly incorporated into the feature vector. , build Input time:
[0032] ;
[0033] in, For reference position, For reference speed.
[0034] S2.3 uses a fixed-step solver to generate a high-fidelity dataset containing eigenvectors and target set perturbations. ;in, For the input feature vector, For the target lumped disturbance, This represents the total amount of the dataset.
[0035] Furthermore, step S3 specifically includes:
[0036] Using the total number of A layered neural network is used to construct a lumped perturbation estimation model. The forward propagation process of the lumped perturbation estimation model is as follows:
[0037] ; ;
[0038] in, For the first Hidden layer output of the layer, For the first The weight matrix of the layer, For the first Layer bias vector, For activation function, for The lumped perturbation estimate predicted by the neural network at time step. This represents the total number of layers in the neural network.
[0039] Furthermore, step S4 specifically includes the following steps:
[0040] S4.1, To ensure smooth interaction between discrete neural network predictions and continuous physical systems, the original network output is... Through a first-order low-pass filter LPF:
[0041] ;
[0042] in, As a smoothing factor, This is the filtered lumped disturbance compensation value. This is the current control cycle.
[0043] S4.2, the total control torque ultimately applied to the mechanical system is a combination of the nominal UK control force and the learned compensation force:
[0044] ;
[0045] in, For the total control torque, To compensate for the gain, This is the lumped disturbance compensation term after filtering.
[0046] The present invention has the following beneficial effects:
[0047] This invention proposes a hybrid strategy of "learn first, compensate later," combining the rigorous structure of the UK constraint formula with the adaptive capabilities of data-driven learning. First, by explicitly incorporating the historical system states... By incorporating features into the neural network input, the network can implicitly capture acceleration trends, thus significantly improving the accuracy of perturbation estimation during the transient phase. Secondly, by forcing both offline data generation and online deployment to use fixed-step Runge-Kutta (RK4) integrals, the feature mismatch problem is effectively solved. Finally, integrating a first-order low-pass filter (LPF) into the online compensation loop suppresses high-frequency prediction noise without introducing significant phase lag. Even with large parameter deviations of up to 30% in quality and 26% in damping, it ensures extremely smooth constraint following performance and significantly reduces tracking error. Attached Figure Description
[0048] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0049] Figure 1 A flowchart of a constraint-following control method for mechanical systems based on a neural network of historical state information according to the present invention is shown.
[0050] Figure 2 The displacement diagrams for a certain motion trajectory are shown under different control methods.
[0051] Figure 3 The diagram shows the displacement error of different control methods on a certain motion trajectory.
[0052] Figure 4 The error heatmaps of different control methods for a certain motion trajectory are shown.
[0053] Figure 5 The diagram shows the control velocity of different control methods on a certain motion trajectory.
[0054] Figure 6 The diagram shows the velocity error of different control methods on a certain motion trajectory.
[0055] Figure 7 The acceleration diagrams for a certain motion trajectory are shown for different control methods.
[0056] Figure 8 The acceleration error diagrams for a certain motion trajectory are shown for different control methods.
[0057] Figure 9 The input force diagrams for different control methods on a certain motion trajectory are shown.
[0058] Figure 10The cumulative input force diagrams for different control methods on a certain motion trajectory are shown.
[0059] Figure 11 The acceleration error diagrams for a certain motion trajectory are shown for different control methods. Detailed Implementation
[0060] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] like Figure 1 The constraint-following control method for a mechanical system based on a neural network of historical state information, shown below, specifically includes the following steps:
[0062] S1. Establish a dynamic model of the constrained mechanical system and design the nominal control part based on UK theory.
[0063] S2. Establish a lumped disturbance model of the mechanical system, construct a feature vector including the historical state of the mechanical system, and obtain an offline training dataset.
[0064] S3 utilizes a multilayer perceptron neural network to learn inverse dynamic mapping offline and establishes a lumped perturbation estimation model.
[0065] S4 performs low-pass filtering and smoothing on the original predictions of the multilayer perceptron neural network, and combines it with the nominal control force to form a total control law that is applied to the mechanical system.
[0066] S5 is used to simulate and verify the mechanical system.
[0067] Specifically, step S1 includes the following steps:
[0068] S1.1, the dynamic model of the mechanical system is:
[0069] ;
[0070] in, For the quality matrix, As coordinates, and They are velocity and acceleration, respectively. Given a force under unconstrained dynamic characteristics, For time.
[0071] Considering the desired trajectory as a system constraint, the second-order constraint form is obtained as follows:
[0072] ;
[0073] in, For the constraint matrix, These are constraint terms.
[0074] S1.2, introducing system uncertainties and separating the nominal part, the equations of motion for the actual system are rewritten as follows:
[0075] ;
[0076] in, For the nominal portion, The uncertain part, Represents the uncertainty parameter. To control the input.
[0077] S1.3, Nominal Control Force Ideal constraints based on UK theory and for initial condition deviation feedback composition:
[0078] ;
[0079] ;
[0080] ;
[0081] in, For the nominal mass matrix, To constrain error, Positive control gain, for transpose, The positive definite matrix in the Lyapunov equation The inverse matrix.
[0082] Specifically, step S2 includes the following steps:
[0083] S2.1, To avoid independently identifying highly coupled parameters, a lumped perturbation is defined. To aggregate all structural mismatches and external forces:
[0084] ;
[0085] in, To define the left-hand side, The actual control force output by the system. The nominal damping matrix, This is the nominal stiffness matrix.
[0086] S2.2, To avoid directly measuring noisy acceleration in real-time control, historical state information is explicitly incorporated into the feature vector. , build Input time:
[0087] ;
[0088] in, For reference position, For reference speed.
[0089] Based on the state of the previous control cycle and This enables the network to implicitly infer acceleration trends.
[0090] S2.3 uses a fixed-step solver to generate a high-fidelity dataset containing eigenvectors and target set perturbations. ;in, For the input feature vector, For the target lumped disturbance, This represents the total amount of the dataset.
[0091] Specifically, step S3 is as follows:
[0092] Using the total number of A layered neural network is used to construct a lumped perturbation estimation model. The forward propagation process of the lumped perturbation estimation model is as follows:
[0093] ; ;
[0094] in, For the first Hidden layer output of the layer, For the first The weight matrix of the layer, For the first Layer bias vector, For activation function, for The lumped perturbation estimate predicted by the neural network at time step. This represents the total number of layers in the neural network.
[0095] The optimal parameters are obtained by minimizing the mean squared error (MSE) loss function with L2 regularization.
[0096] Specifically, step S4 includes the following steps:
[0097] S4.1, To ensure smooth interaction between discrete neural network predictions and continuous physical systems, the original network output is... Through a first-order low-pass filter LPF:
[0098] ;
[0099] in, As a smoothing factor, This is the filtered lumped disturbance compensation value. This is the current control cycle.
[0100] S4.2, the total control torque ultimately applied to the mechanical system is a combination of the nominal UK control force and the learned compensation force:
[0101] ;
[0102] in, For the total control torque, To compensate for the gain, This is the lumped disturbance compensation term after filtering.
[0103] Step S5 is as follows:
[0104] S5.1, Set the simulation environment and stringent uncertainty parameters:
[0105] The designed control architecture was applied to a valve control system for numerical simulation verification. Actual sensor data of the valve position trajectory, totaling 12 hours, was selected and evenly divided into six 2-hour sub-intervals. Based on this, stringent parameter uncertainty conditions were introduced to verify the system's robustness: the maximum variation in system mass was set to 30% (i.e.,...). The maximum change in damping is 26% (i.e.) The maximum variation in stiffness is 25% (i.e.) The experiment sets up the original UK control method and the traditional robust control method as a comparison benchmark.
[0106] S5.2, perform displacement tracking accuracy verification:
[0107] like Figure 2 and Figure 3 As shown in the displacement and displacement error comparison chart, the hybrid data-mechanism control method (blue line) proposed in this invention achieves displacement tracking performance on all six trajectory segments that is closer to the desired trajectory (red line) than both traditional robust control (green line) and original UK control (yellow line). Combined with... Figure 4 Further analysis of the error heatmap revealed that the original UK control exhibited a large red area (error exceeding 15mm); the traditional robust control showed a blue area (error reaching 10mm); while the error response surface of the method of this invention was predominantly green, with the error consistently remaining strictly within 5mm. Quantitative statistics show that the average RMS position error of the learning-enhanced controller of this invention is... m, compared to traditional control, reduces Compared to traditional robust control ( m) increased by 36.1%.
[0108] S5.3, Verification of velocity tracking and acceleration shock resistance:
[0109] like Figures 5 to 8 As shown, the method of this invention not only achieves optimal alignment in velocity tracking, but also minimizes the magnitude of acceleration error, with the curve closest to the zero axis. Because this invention achieves extremely low acceleration vibration amplitude, the mechanical shock experienced by the valve during actual operation is significantly reduced, thereby greatly improving the physical stability of the system and extending the service life of the equipment.
[0110] S5.4, Verify control torque and overall control cost:
[0111] like Figure 9 As shown in the comparison of control input forces, the input torque fluctuation amplitude of the method of the present invention is similar to that of traditional robust control, and both achieve smoother control input than the original UK control, avoiding high-frequency jitter of the signal. However, as Figure 10 As shown, while maintaining a smooth control signal, the total amplitude of the control input force (i.e., the total control cost) of the method of the present invention is significantly lower than that of traditional robust control. Furthermore, Figure 11 The three-dimensional bar chart comprehensively illustrates the cumulative error across the three dimensions. The method of this invention exhibits the minimum cumulative error across the three core indicators of displacement, velocity, and acceleration. This demonstrates that the present invention effectively reduces the system's control energy consumption and cost while ensuring extremely high trajectory tracking accuracy.
[0112] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A constraint-following control method for mechanical systems based on historical state information neural networks, characterized in that, Specifically, the steps include the following: S1. Establish a dynamic model of the constrained mechanical system and design the nominal control part based on UK theory; S2, Establish a lumped disturbance model of the mechanical system, construct a feature vector including the historical state of the mechanical system, and obtain an offline training dataset; S3. The inverse dynamic mapping is learned offline using a multilayer perceptron neural network to establish a lumped perturbation estimation model. S4 performs low-pass filtering and smoothing on the original predictions of the multilayer perceptron neural network, and combines it with the nominal control force to form a total control law that is applied to the mechanical system. S5 is used for simulation verification of mechanical systems. Step S1 specifically includes the following steps: S1.1, the dynamic model of the mechanical system is: ; in, For the quality matrix, As coordinates, and They are velocity and acceleration, respectively. Given a force under unconstrained dynamic characteristics, For time; Considering the desired trajectory as a system constraint, the second-order constraint form is obtained as follows: ; in, For the constraint matrix, For constraint terms; S1.2, introducing system uncertainties and separating the nominal part, the equations of motion for the actual system are rewritten as follows: ; in, For the nominal portion, The uncertain part, Represents the uncertainty parameter. For control input; S1.3, Nominal Control Force Ideal constraints based on UK theory and for initial condition deviation feedback composition: ; ; ; in, For the nominal mass matrix, To constrain error, Positive control gain, for transpose, The positive definite matrix in the Lyapunov equation The inverse matrix; Step S2 specifically includes the following steps: S2.1, To avoid independently identifying highly coupled parameters, a lumped perturbation is defined. To aggregate all structural mismatches and external forces: ; in, To define the left-hand side, The actual control force output by the system. The nominal damping matrix, This is the nominal stiffness matrix; S2.2, To avoid directly measuring noisy acceleration in real-time control, historical state information is explicitly incorporated into the feature vector. , build Input time: ; in, For reference position, For reference speed; S2.3 uses a fixed-step solver to generate a high-fidelity dataset containing eigenvectors and target set perturbations. ;in, For the input feature vector, For the target lumped disturbance, Total amount of data; Step S3 is as follows: Using the total number of A layered neural network is used to construct a lumped perturbation estimation model. The forward propagation process of the lumped perturbation estimation model is as follows: ; ; in, For the first Hidden layer output of the layer, For the first The weight matrix of the layer, For the first Layer bias vector, For activation function, for The lumped perturbation estimate predicted by the neural network at time step. This represents the total number of layers in the neural network. Step S4 specifically includes the following steps: S4.1, To ensure smooth interaction between discrete neural network predictions and continuous physical systems, the original network output is... Through a first-order low-pass filter LPF: ; in, As a smoothing factor, This is the filtered lumped disturbance compensation value. This is the current control cycle; S4.2, the total control torque ultimately applied to the mechanical system is a combination of the nominal UK control force and the learned compensation force: ; in, For the total control torque, To compensate for the gain, This is the lumped disturbance compensation term after filtering.
Citation Information
Patent Citations
Stepwise uncertainty-aware offline reinforcement learning under constraints
US20230185881A1
Anthropomorphic lane-changing control method and system based on driving risk quantification, and vehicle
US20250304071A1