A virtual model control method for quadruped robots based on BP neural network optimization

Through the BP neural network optimized quadruped robot virtual model control method, a BP-VMC control framework is constructed, and BPNN is used for self-learning training of the mechanical parameters of virtual components, which solves the shortcomings of parameter selection and adaptive adjustment in the virtual model control method, realizes real-time adaptive adjustment, and improves the accuracy and stability of the control system.

CN119846965BActive Publication Date: 2025-10-03NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510005065.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-10-03
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

Existing virtual model control methods have deficiencies in parameter selection and adaptive adjustment, making it difficult to achieve optimal control effects. Traditional methods also lack theoretical guidance, have high randomness in parameter adjustment, and are unable to adapt to actual motion changes.

Method used

A virtual model control method for a quadruped robot based on BP neural network optimization is adopted. By constructing a BP-VMC control framework and using BPNN to perform self-learning training on the mechanical parameters of virtual components, real-time adaptive adjustment is achieved, local optimal problems are avoided, and global optimal results are ensured.

Benefits of technology

The control performance of the virtual model controller is improved, the real-time adaptive adjustment of the mechanical parameters of the virtual component is realized, the accuracy and stability of the control system are improved, and the final output is ensured to be the global optimal result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119846965B_ABST
    Figure CN119846965B_ABST
Patent Text Reader

Abstract

This application relates to a method for controlling a virtual model of a quadruped robot based on BP neural network optimization. The method constructs a BP-VMC control framework. Within this framework, after determining the BPNN structure based on the quadruped robot's control characteristics and input and output requirements, the method continuously optimizes the mechanical parameters of virtual components through BPNN self-learning training, enabling real-time adaptive adjustment of the mechanical parameters of virtual components in the VMC controller, thereby improving the control performance of the VMC controller. Simultaneously, the introduction of a learning rate and momentum factor into the BPNN training algorithm effectively avoids local optimality issues and ensures that the final output is the global optimal result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot control technology, and in particular to a quadruped robot virtual model control method based on BP neural network optimization. Background Art

[0002] Virtual model control (VMC) is an intuitive control method based on a kinematic analysis of the robot. Appropriate virtual mechanical components, such as springs, dampers, and bearings, are selected to connect the robot's body (internal action point) with the external environment (external action point). The virtual forces generated by these components drive the robot to perform corresponding movements. Based on the principle of virtual work, the forces and torques in the workspace are mapped into torques in the joint space using the Jacobian matrix, which serves as the output target for the joint motors. This method cleverly uses the Jacobian matrix to directly link motion requirements with driving force control requirements, achieving direct force control. At the same time, virtual model control avoids reliance on dynamic models. Accurate control of the robot's motion can be achieved by simply varying the composition of the virtual components and selecting their mechanical parameters based on the characteristics of the robot system's moving parts.

[0003] Due to its neglect of dynamic factors, virtual model control suffers from significant shortcomings in control accuracy. Furthermore, selecting the optimal virtual component mechanical parameters to achieve optimal control system performance has been a key issue hindering the development of virtual model control methods. Traditional virtual model control methods employ an empirical trial-and-error approach to determine the mechanical parameters of virtual components, repeatedly experimenting and adjusting parameters to ultimately determine a set of parameters that meet control requirements. This approach lacks specific theoretical guidance, resulting in significant randomness in parameter adjustment and difficulty achieving optimal control. Furthermore, once the virtual component mechanical parameters are selected, they remain fixed during motion control and cannot be adjusted based on actual motion changes, resulting in limited control adaptability. To address these issues, existing research has refined the performance of virtual model controllers by introducing fractional-order dampers, enabling more precise parameter adjustment. Alternatively, fuzzy optimization algorithms have been employed to adaptively adjust the mechanical parameters of virtual components by formulating fuzzy rules.

[0004] Fractional-order VMC adds a fractional-order damper to traditional VMC. While this improves the accuracy and robustness of the VMC controller to a certain extent, it also increases the number of mechanical parameters of virtual components, further increasing the difficulty of parameter tuning and preventing adaptive adjustment of parameters during motion control. Fuzzy VMC achieves adaptive adjustment of the mechanical parameters of virtual components through the formulation of fuzzy rules. However, the membership determination within fuzzy rules is primarily based on empirical assumptions, resulting in only optimal parameter results based on the rules used. This is difficult to guarantee optimal results for the entire system and can easily lead to local optima. Summary of the Invention

[0005] Based on this, it is necessary to provide a quadruped robot virtual model control method based on BP neural network optimization to address the above technical problems. It can continuously optimize the mechanical parameters of virtual components through self-learning training of neural networks, realize adaptive adjustment of the mechanical parameters of virtual components, and avoid falling into local optimality, so that the final output is the global optimal result.

[0006] A method for controlling a virtual model of a quadruped robot based on BP neural network optimization, the method comprising:

[0007] A BP-VMC control framework was constructed, which includes a quadruped robot model, a trajectory generator, and a VMC controller. The VMC controller consists of a virtual parameter generator containing BPNN and virtual component model modules, as well as a Jacobian matrix.

[0008] Output the actual foot position and driving joint angle information of the quadruped robot in real time according to the quadruped robot model;

[0009] The desired trajectory of the quadruped robot is generated by the trajectory generator and the desired foot position is output in real time. The foot error signal is obtained by comparing the desired foot position with the actual foot position.

[0010] In the VMC controller, the desired foot position, actual foot position, and foot error signal are first input into the BPNN. The BPNN then optimizes and outputs the mechanical parameter matrix of the virtual component of the quadruped robot according to the preset VMC controller control law. The virtual component mechanical parameter matrix and the foot error signal are then input into the virtual component model module to calculate and output the virtual force matrix. Finally, the virtual force matrix and the driving joint angle information output by the quadruped robot model are transferred to the Jacobian matrix to calculate the output joint torque. The BPNN is trained by introducing a learning rate and momentum factor.

[0011] The quadruped robot is driven to move along the desired trajectory according to the joint torque to obtain a new actual foot position. The foot error signal is obtained by further comparing the new actual foot position with the new desired foot position to enter the next control cycle to achieve complete closed-loop feedback control of the quadruped robot.

[0012] In one embodiment, the real-time output of the actual foot position and driving joint angle information of the quadruped robot based on the quadruped robot model includes:

[0013] The quadruped robot model outputs the actual position of the quadruped robot's foot and the driving joint angle information in real time according to the time parameter t, which are expressed as

[0014] y(t)=[x(t)z(t)] T ;

[0015] θ(t)=[θ1θ2] T ;

[0016] Where y(t), x(t), and z(t) represent the actual foot position, actual horizontal coordinate, and actual vertical coordinate of the quadruped robot at time t, respectively. θ(t) represents the driving joint angle information of the quadruped robot at time t. θ1 is the angle between the thigh and shank of the quadruped robot. θ2 is the angle between the thigh and the horizontal direction of the quadruped robot body. The superscript T indicates transposition.

[0017] In one embodiment, a desired trajectory of a quadruped robot is generated by a trajectory generator and a desired foot position is output in real time, and a foot error signal is obtained by comparing the desired foot position with the actual foot position, including:

[0018] The trajectory generator is based on the preset quadruped robot's movement step length S, maximum leg lift height H and movement period T m , generating the desired trajectories of the quadruped robot in the horizontal and vertical directions, respectively expressed as

[0019]

[0020] The trajectory generator outputs the expected foot position of the quadruped robot at time t in real time according to the time parameter t, which is expressed as r(t) = [x d (t)z d (t)] T ; where x d (t) and z d (t) represents the expected horizontal coordinate and expected vertical coordinate of the quadruped robot at time t, respectively;

[0021] By comparing the desired foot position r(t) with the actual foot position y(t), a foot error signal is obtained, which is expressed as e(t)=r(t)-y(t).

[0022] In one embodiment, the BPNN consists of an input layer, a hidden layer, and an output layer; wherein the input and output of the input layer are represented as

[0023]

[0024] Among them, x i (n) is the input vector of BPNN, n is the number of time series; the input of the input layer The output of the input layer The superscript of represents the network layer corresponding to the signal, 0, 1, and 2 refer to the input layer, hidden layer, and output layer respectively, the subscript i represents the node number in the input layer, and χ is the number of nodes in the input layer;

[0025] The induced local domain and output of the hidden layer are expressed as

[0026]

[0027] in, represents the induced local domain of the hidden layer, represents the output of the hidden layer, is the synaptic weight of the hidden layer neuron, subscript j represents the node number in the hidden layer, β is the number of nodes in the hidden layer, and h represents the activation function of the hidden layer neuron;

[0028] The induced local domain and output value of the output layer are expressed as

[0029]

[0030] in, represents the induced local domain of the output layer, represents the output of the output layer, is the synaptic weight of the output layer neurons, the subscript l represents the node number in the output layer, γ is the number of nodes in the output layer, and g represents the activation function of the output layer neurons.

[0031] In one embodiment, the desired foot position, the actual foot position, and the foot error signal are input into a BPNN. The BPNN optimizes and outputs a virtual component mechanical parameter matrix of the quadruped robot according to a preset VMC controller control law, including:

[0032] The expected foot position r(t), actual foot position y(t) and foot error signal e(t) of the quadruped robot at time t are taken as input vector x i (n), input to BPNN, BPNN according to the output of its output layer The virtual component mechanical parameter matrix is ​​optimized and trained with the preset VMC controller control law to obtain the final output vector, which is expressed as

[0033]

[0034] Wherein, u(n) represents the final output vector of BPNN, that is, the mechanical parameter matrix of the virtual component finally output by BPNN; P l represents the VMC parameter weight matrix, x l (n) is the error matrix in the VMC controller.

[0035] In one embodiment, the BPNN learning and training process includes:

[0036] The back propagation algorithm is used to iteratively modify the synaptic weights of BPNN, and the cost function ε(n) of the network is defined as

[0037]

[0038] Where e(n) = x in (n)-y out (n) is the input vector x of BPNN in (n) and y out (n), n is the number of time series; y out (n) = F VMC (u(n)) represents the final output vector u(n) of BPNN substituted into the quadruped robot model F VMC The output value obtained after

[0039] Correct the synaptic weights of the output layer neurons of BPNN according to the gradient descent method That is, the negative gradient direction of the synaptic weight coefficient is searched and adjusted according to ε(n), and an inertia term is added to make the search converge quickly, which is expressed as

[0040]

[0041] Among them, η is the learning rate, α is the momentum factor, for The correction amount, represents the output of the hidden layer of BPNN, and the subscripts j and l represent the node numbers in the hidden layer and output layer respectively; represents the local gradient of the output layer neuron, and by the chain differentiation rule, Expressed as

[0042]

[0043] in, represents the induced local domain of the output layer, Represents the output of the output layer, u(n) is the final output vector of BPNN; according to u(n) and y out (n) can be seen from the relationship between In order to further simplify the computational complexity, the quadruped robot model is associated with Approximation as a symbolic function Based on this simplified Expressed as

[0044]

[0045] Where g' represents the derivative of the activation function of the output layer neuron;

[0046] The simplified Substitution The expression of , gets the synaptic weight of the output layer neuron The correction formula is

[0047]

[0048] Similarly, the synaptic weights of the hidden layer neurons The correction formula is

[0049]

[0050] in, express The correction amount, is the output of the input layer of BPNN, is the local gradient of the hidden layer neurons, specifically expressed as

[0051]

[0052] in, represents the induced local domain of the hidden layer, γ is the number of nodes in the output layer, and h' represents the derivative of the activation function of the hidden layer neurons.

[0053] In one embodiment, in the horizontal direction, the control law of the VMC controller is expressed as

[0054]

[0055] Where τ represents the joint torque, J T represents the transpose of the Jacobian matrix, F represents the virtual force matrix, K(n) and B(n) represent the virtual spring stiffness matrix and virtual damping coefficient matrix output by BPNN respectively, δx represents the position error of the quadruped robot in the horizontal direction, represents the velocity error of the quadruped robot in the horizontal direction, The virtual component mechanical parameter matrix that BPNN finally outputs in the horizontal direction is composed of K(n) and B(n), x d represents the desired horizontal coordinate of the quadruped robot, and n is the number of time series.

[0056] In one embodiment, in the vertical direction, the control law of the VMC controller is expressed as

[0057]

[0058] Among them, I(n) represents the integral compensation coefficient matrix finally output by BPNN, δz represents the position error of the quadruped robot in the vertical direction, represents the velocity error of the quadruped robot in the vertical direction, t is the time parameter, The mechanical parameter matrix of the virtual component finally output by BPNN in the vertical direction is composed of K(n), B(n) and I(n), zd represents the desired vertical coordinate of the quadruped robot.

[0059] In one embodiment, the virtual component mechanical parameter matrix and the foot end error signal are input into the virtual component model module to calculate and output the virtual force matrix, including:

[0060] The virtual component mechanical parameter matrix finally output by BPNN and the foot-end error signal e(t) of the quadruped robot at time t are input into the virtual component model module, and the virtual force matrix F(t) of the quadruped robot at time t is calculated and output, which is expressed as

[0061]

[0062] Wherein, K, B and I represent the virtual spring stiffness matrix, virtual damping coefficient matrix and integral compensation coefficient matrix in the virtual component mechanical parameter matrix, respectively. In the horizontal direction, I = 0;

[0063] Among them, the virtual component model module includes three groups of virtual component models obtained by simultaneously applying virtual springs and virtual damping components in the horizontal direction, vertical direction and center of mass inclination direction of the quadruped robot.

[0064] In one embodiment, the virtual force matrix and the driving joint angle information output by the quadruped robot model are transferred to the Jacobian matrix to calculate the output joint torque, including:

[0065] The virtual force matrix F(t) of the quadruped robot at time t and the driving joint angle information θ(t) output by the quadruped robot model are transferred to the Jacobian matrix. The joint torque τ(t) of the quadruped robot at time t is calculated and output according to the Jacobian matrix, which is expressed as

[0066] τ(t)=J T F(t);

[0067]

[0068] Among them, J T represents the transpose of the Jacobian matrix J, θ1 is the angle between the thigh and shank of the quadruped robot, θ2 is the angle between the thigh and the horizontal direction of the quadruped robot, l1 is the length of the shank of the quadruped robot, l2 is the length of the thigh of the quadruped robot, sθ 1-2 is the abbreviation of sin(θ1-θ2), cθ 1-2 It is a shorthand for cos(θ1-θ2).

[0069] The aforementioned virtual model control method for a quadruped robot based on BP neural network optimization constructs a BP-VMC control framework. Within this framework, after determining the BPNN structure based on the quadruped robot's control characteristics and input and output requirements, the BPNN self-learning training continuously optimizes the mechanical parameters of the virtual components, enabling real-time adaptive adjustment of the virtual component mechanical parameters within the VMC controller, thereby improving the control performance of the VMC controller. Furthermore, the introduction of a learning rate and momentum factor into the BPNN training algorithm effectively avoids local optimality and ensures that the final output is the global optimal result. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 A schematic diagram of the VMC principle structure in one embodiment;

[0071] Figure 2 1 is a flow chart of a method for controlling a virtual model of a quadruped robot based on BP neural network optimization in one embodiment;

[0072] Figure 3 Schematic diagram of BP-VMC control framework in one embodiment;

[0073] Figure 4 A schematic diagram of the BP neural network structure in one embodiment;

[0074] Figure 5 A block diagram of the BP-VMC control principle in the horizontal direction in one embodiment;

[0075] Figure 6 A block diagram of the BP-VMC control principle for vertical integral compensation in one embodiment;

[0076] Figure 7 is the motion period T in one embodiment m Schematic diagram of the change curve;

[0077] Figure 8 A schematic diagram of a desired trajectory in one embodiment;

[0078] Figure 9 Schematic diagram of comparison of stride curves in the horizontal direction in one embodiment;

[0079] Figure 10 2. A schematic diagram showing a comparison of absolute values ​​of horizontal errors in one embodiment;

[0080] Figure 11 A schematic diagram of the vertical height comparison between the foot end and the center of mass of a quadruped robot in one embodiment;

[0081] Figure 12 2. A schematic diagram showing a comparison of absolute values ​​of vertical errors in one embodiment;

[0082] Figure 13 Schematic diagram of foot end motion trajectory comparison in one embodiment; wherein, Figure 13 (a) is the foot end motion trajectory diagram of VMC, Figure 13 (b) is the foot end motion trajectory diagram of BP-VMC;

[0083] Figure 14 FIG. 1 is a schematic diagram showing a comparison between the absolute deviation of the attitude angle and the instability index in one embodiment; wherein, Figure 14 (a) is a schematic diagram of the comparison of the absolute deviation of the roll angle. Figure 14 (b) is a schematic diagram of the comparison of absolute deviation of pitch angle. Figure 14 (c) is a schematic diagram of the comparison of absolute deviation of yaw angle, Figure 14 (d) is a schematic diagram for comparing instability indicators. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0085] The core idea of ​​virtual model control is to analyze the main effective forces based on the overall motion control target of the robot, then ignore the actual driving structure of the robot, select the corresponding virtual mechanical components to achieve the effect of generating equivalent forces, and obtain virtual forces. With the help of the Jacobian matrix, the virtual forces are converted into actual driving torques to simplify the robot motion control model.

[0086] The motion control of the robot mainly involves the control of the forward speed (v) in the horizontal direction, the height control of the center of mass in the vertical direction, and the inclination control around the center of mass. Therefore, three sets of virtual component models are constructed to connect the external action point (environment) and the internal action point (body) to realize the control of the three degrees of freedom respectively. The principle structure of VMC is as follows Figure 1 As shown, virtual springs and virtual damping components are applied simultaneously in the horizontal direction, vertical direction and body mass center inclination direction.

[0087] Let the desired state of the quadruped robot be Current status: From the current state to the desired state, the virtual torque F generated is

[0088]

[0089] Among them, F x 、F z 、 are the virtual moments in the horizontal direction, vertical direction and inclination direction of the body’s center of mass respectively; Kx , K z 、 are the virtual spring stiffness in the horizontal direction, vertical direction and inclination direction of the body’s center of mass respectively; B x 、B z 、 are the virtual damping coefficients in the horizontal direction, vertical direction and inclination direction of the body mass center respectively; x d 、z d 、 are the expected horizontal coordinates in the horizontal direction, vertical direction and the inclination direction of the body's center of mass; x, z, are the actual horizontal coordinates in the horizontal direction, vertical direction and the inclination direction of the body's center of mass; are the expected velocities in the horizontal, vertical and inclination directions of the body's center of mass respectively; are the actual velocities in the horizontal, vertical and inclination directions of the body's center of mass, respectively.

[0090] like Figure 1 As shown in the figure, the motion of the quadruped robot's legs involves three joint angles θ0, θ1, and θ2. θ0 is the angle between the calf and the ground; θ1 is the angle between the thigh and the calf; and θ2 is the angle between the thigh and the horizontal direction of the body. The desired torque of each joint is

[0091] τ d =[τ0τ1τ2] T ;

[0092] Where τ0, τ1, and τ2 are the joint moments at θ0, θ1, and θ2, respectively. Since θ0 is a passive joint, τ0 = 0.

[0093] The length of the quadruped robot's calf is l1, the length of its thigh is l2, and the distance from the hip joint to the center of mass is l0. From kinematic analysis, we can get the Jacobian matrix J from the foot end to the robot's center of mass:

[0094]

[0095] According to τ=J T F, yes

[0096]

[0097] From the above formula, we can get

[0098]

[0099] Further substitution gives

[0100]

[0101] This application considers that neural networks are machine learning methods that simulate the working principles of biological nervous systems and have self-learning, self-organization and adaptability. By applying them to the field of control, it is possible to achieve adaptive control of complex systems with uncertainty, severe nonlinearity, time variation and hysteresis. Since the essence of the VMC algorithm is to adjust the control input through the error value between the desired state and the actual state, and the error back propagation neural network (BPNN) is also guided by the error signal, the weights and biases of the neuron nodes are corrected through the back propagation of the error signal to minimize the output error. Therefore, by combining VMC and BPNN and training the mechanical parameter matrix of the virtual component through the back propagation algorithm, the VMC controller can be adaptively adjusted to adapt to different systems and environments.

[0102] Based on this, in one embodiment of the present application, Figure 2 As shown, a quadruped robot virtual model control method based on BP neural network optimization is provided, which includes the following steps:

[0103] Step S1, constructing a BP-VMC control framework, which includes a quadruped robot model, a trajectory generator, and a VMC controller; wherein the VMC controller is composed of a virtual parameter generator including a BPNN and a virtual component model module, and a Jacobian matrix.

[0104] Among them, the BP-VMC control framework is as follows Figure 3 shown.

[0105] Step S2: output the actual foot position and driving joint angle information of the quadruped robot in real time according to the quadruped robot model.

[0106] Among them, step S2 specifically includes the following steps: the quadruped robot model outputs the actual position of the quadruped robot's foot end and the driving joint angle information in real time according to the time parameter t, which are respectively expressed as

[0107] y(t)=[x(t)z(t)] T ;

[0108] θ(t)=[θ1θ2] T ;

[0109] Where y(t), x(t), and z(t) represent the actual foot position, actual horizontal coordinate, and actual vertical coordinate of the quadruped robot at time t, respectively. θ(t) represents the driving joint angle information of the quadruped robot at time t. θ1 is the angle between the thigh and shank of the quadruped robot. θ2 is the angle between the thigh and the horizontal direction of the quadruped robot body. The superscript T indicates transposition.

[0110] Step S3, generating the desired trajectory of the quadruped robot according to the trajectory generator and outputting the desired foot position in real time, and obtaining the foot error signal by comparing the desired foot position with the actual foot position.

[0111] Wherein, step S3 specifically includes the following steps:

[0112] Step S3.1: The trajectory generator first calculates the trajectory of the quadruped robot according to the preset step length S, maximum leg lift height H and movement period T. m , generating the desired trajectories of the quadruped robot in the horizontal and vertical directions, respectively expressed as

[0113]

[0114] Step S3.2: The trajectory generator outputs the desired foot position of the quadruped robot at time t in real time according to the time parameter t, which is expressed as r(t) = [x d (t)z d (t)] T ; where x d (t) and z d (t) represent the expected horizontal coordinate and expected vertical coordinate of the quadruped robot at time t, respectively.

[0115] Step S3.3, by comparing the desired foot position r(t) with the actual foot position y(t), a foot error signal is obtained, which is expressed as e(t) = r(t) - y(t).

[0116] In step S4, in the VMC controller, the desired foot position, actual foot position, and foot error signal are first input into the BPNN. The BPNN optimizes and outputs the virtual component mechanical parameter matrix of the quadruped robot according to the control law of the preset VMC controller. Then, the virtual component mechanical parameter matrix and the foot error signal are input into the virtual component model module to calculate and output the virtual force matrix. Finally, the virtual force matrix and the driving joint angle information output by the quadruped robot model are passed to the Jacobian matrix to calculate the output joint torque. Among them, the BPNN is trained by introducing the learning rate and momentum factor.

[0117] Wherein, step S4 specifically includes the following steps:

[0118] Step S4.1, construct the BPNN network architecture. Figure 4As shown in the figure, a BPNN consists of an input layer, a hidden layer, and an output layer. Each neuron is connected to all neurons in the previous layer. Signal transmission involves two main stages: forward propagation and backpropagation. The function signal is forward propagated layer by layer until it reaches the output layer, where the output value is calculated using the synaptic weights between neurons. The network output value is compared with the expected output value to generate an error signal. This error signal is then propagated layer by layer through backpropagation to the input layer. By adjusting the weight matrices between layers, the error is reduced and the training target is gradually approached.

[0119] Among them, the input and output of the input layer are represented as

[0120]

[0121] Among them, x i (n) is the input vector of BPNN, n is the number of time series; the input of the input layer The output of the input layer The superscript of represents the network layer corresponding to the signal, 0, 1, and 2 refer to the input layer, hidden layer, and output layer respectively. The subscript i represents the node number in the input layer, and χ is the number of nodes in the input layer.

[0122] The induced local domain and output of the hidden layer are expressed as

[0123]

[0124] in, represents the induced local domain of the hidden layer, represents the output of the hidden layer, is the synaptic weight of the hidden layer neuron, the subscript j represents the node number in the hidden layer, β is the number of nodes in the hidden layer, and h represents the activation function of the hidden layer neuron, specifically the hyperbolic tangent function, which is expressed as

[0125] The induced local domain and output value of the output layer are expressed as

[0126]

[0127] in, represents the induced local domain of the output layer, represents the output of the output layer, is the synaptic weight of the output layer neuron, the subscript l represents the node number in the output layer, γ is the number of nodes in the output layer, and g represents the activation function of the output layer neuron. Considering that the mechanical parameter matrix values ​​K and B of the virtual component in this application are non-negative values, the activation function of the output layer neuron is specifically selected to be a non-negative sigmoid function, which is expressed as

[0128] In step S4.2, the desired foot position, actual foot position, and foot error signal are input into the BPNN, and the BPNN optimizes and outputs the mechanical parameter matrix of the virtual component of the quadruped robot according to the control law of the preset VMC controller.

[0129] Specifically, based on the constructed BPNN network architecture, the desired foot position r(t), the actual foot position y(t) and the foot error signal e(t) of the quadruped robot at time t are taken as the input vector x i (n), input to BPNN, BPNN according to the output of its output layer The virtual component mechanical parameter matrix is ​​optimized and trained with the preset VMC controller control law to obtain the final output vector, which is expressed as

[0130]

[0131] Among them, u(n) represents the final output vector of BPNN, that is, the virtual component mechanical parameter matrix output by BPNN; considering that the output range of the activation function is [0,1], P is further defined l represents the VMC parameter weight matrix, x l (n) is the error matrix in the VMC controller.

[0132] Among them, the learning and training process of BPNN specifically includes:

[0133] The back propagation algorithm is used to iteratively modify the synaptic weights of BPNN, and the cost function ε(n) of the network is defined as

[0134]

[0135] Where e(n) = x in (n)-y out (n) is the input vector x of BPNN in (n) and y out (n), n is the number of time series; y out (n) = F VMC (u(n)) represents the final output vector u(n) of BPNN substituted into the quadruped robot model F VMC The output value obtained after

[0136] Correct the synaptic weights of the output layer neurons of BPNN according to the gradient descent method That is, the negative gradient direction of the synaptic weight coefficient is searched and adjusted according to ε(n), and an inertia term is added to make the search converge quickly, which is expressed as

[0137]

[0138] Among them, η is the learning rate, α is the momentum factor, for The correction amount, represents the output of the hidden layer of BPNN, and the subscripts j and l represent the node numbers in the hidden layer and output layer respectively; represents the local gradient of the output layer neuron, and by the chain differentiation rule, Expressed as

[0139]

[0140] in, represents the induced local domain of the output layer, Represents the output of the output layer, u(n) is the final output vector of BPNN; according to u(n) and y out (n) can be seen from the relationship between In relation to the quadruped robot model, if the calculation is accurate in each iterative optimization process, the computational complexity will increase significantly and the response speed of the controller will also be affected. Therefore, in order to further simplify the computational complexity, Approximation as a symbolic function The error caused by simplified calculation can be compensated by adjusting the learning rate appropriately.

[0141] Based on this simplified Expressed as

[0142]

[0143] Where g' represents the derivative of the activation function of the output layer neuron;

[0144] The simplified Substitution The expression of , gets the synaptic weight of the output layer neuron The correction formula is

[0145]

[0146] Similarly, the synaptic weights of the hidden layer neurons The correction formula is

[0147]

[0148] in, express The correction amount, is the output of the input layer of BPNN, is the local gradient of the hidden layer neurons, specifically expressed as

[0149]

[0150] in, represents the induced local domain of the hidden layer, γ is the number of nodes in the output layer, and h' represents the derivative of the activation function of the hidden layer neurons.

[0151] Specifically, in step S4.2, the control law of the VMC controller includes the control law in the horizontal direction and the vertical direction. In the horizontal direction, the BP-VMC control principle is as follows: Figure 5 As shown, Figure 5 Medium x d is the desired horizontal coordinate of the quadruped robot and is the input of the system. d Differ from the current actual horizontal coordinate x of the quadruped robot to obtain the horizontal position error δx. d The virtual spring stiffness matrix K(n) and virtual damping coefficient matrix B(n) are obtained through BPNN training, and K(n) and B(n) are passed to the virtual component model module. d Differentiate to get the desired horizontal speed And the current actual horizontal movement speed of the robot Subtract and get the velocity error in the horizontal direction Compare δx with The virtual force matrix F is input into the virtual component model module, combined with the previously obtained virtual component mechanical parameter matrix K(n) and B(n), and the virtual force matrix F is output. The transpose J of the virtual force matrix F and the Jacobian matrix T Multiplying the joint torque τ, the joint torque is transferred to the quadruped robot model to realize gait motion control, and the new horizontal coordinate x and horizontal motion speed are obtained. Achieve complete closed-loop feedback control.

[0152] As a result, in the horizontal direction, the control law of the VMC controller is expressed as

[0153]

[0154] in, The virtual component mechanical parameter matrix representing the final output of BPNN in the horizontal direction is composed of K(n) and B(n).

[0155] Furthermore, when building the VMC controller, the mass characteristics of the robot itself were actually ignored. Due to the influence of the robot's own weight, there is an obvious deviation in the height control in the vertical direction. By observing the control law, it can be found that the essence of the VMC controller is equivalent to the PD (proportional-differential) controller, so it is difficult to eliminate the deviation in the actual control process. Therefore, it is proposed to introduce an error compensation amount in the vertical direction controller to compensate for the robot's own weight. However, considering that in the actual operation of the quadruped robot, the required compensation amount varies according to the motion state and external interference, the integral compensation method is adopted to accumulate and output the error, and adjust the control system output in real time, thereby eliminating the steady-state error and improving the accuracy of motion control. At the same time, the integral coefficient involved in the integral compensator can also be adaptively tuned through BPNN, without the need for additional parameter tuning. Therefore, based on Figure 5 The BP-VMC control principle block diagram in the horizontal direction is shown as follows: Figure 6 The BP-VMC control principle block diagram with integral compensation in the vertical direction is shown in the figure. As a result, the control law of the VMC controller in the vertical direction is expressed as

[0156]

[0157] Among them, I(n) represents the integral compensation coefficient matrix finally output by BPNN, δz represents the position error of the quadruped robot in the vertical direction, represents the velocity error of the quadruped robot in the vertical direction, t is the time parameter, The mechanical parameter matrix of the virtual component finally output by BPNN in the vertical direction is composed of K(n), B(n) and I(n), z d represents the desired vertical coordinate of the quadruped robot.

[0158] Step S4.3: Input the virtual component mechanical parameter matrix and the foot end error signal into the virtual component model module to calculate and output the virtual force matrix.

[0159] Specifically, the virtual component mechanical parameter matrix finally output by BPNN and the foot-end error signal e(t) of the quadruped robot at time t are input into the virtual component model module, and the virtual force matrix F(t) of the quadruped robot at time t is calculated and output, which is expressed as

[0160]

[0161] Wherein, K, B and I represent the virtual spring stiffness matrix, the virtual damping coefficient matrix and the integral compensation coefficient matrix in the virtual component mechanical parameter matrix respectively, wherein, in the horizontal direction, I=0.

[0162] Among them, the virtual component model module includes three groups of virtual component models obtained by simultaneously applying virtual springs and virtual damping components in the horizontal direction, vertical direction and center of mass inclination direction of the quadruped robot.

[0163] Step S4.4, transfer the virtual force matrix and the driving joint angle information output by the quadruped robot model to the Jacobian matrix to calculate the output joint torque.

[0164] Specifically, the virtual force matrix F(t) of the quadruped robot at time t and the driving joint angle information θ(t) output by the quadruped robot model are transferred to the Jacobian matrix, and the joint torque τ(t) of the quadruped robot at time t is calculated and output according to the Jacobian matrix, which is expressed as

[0165] τ(t)=J T F(t);

[0166]

[0167] Among them, J T represents the transpose of the Jacobian matrix J, θ1 is the angle between the thigh and shank of the quadruped robot, θ2 is the angle between the thigh and the horizontal direction of the quadruped robot, l1 is the length of the shank of the quadruped robot, l2 is the length of the thigh of the quadruped robot, sθ 1-2 is the abbreviation of sin(θ1-θ2), cθ 1-2 It is a shorthand for cos(θ1-θ2).

[0168] In step S5, the quadruped robot is driven to move along the desired trajectory according to the joint torque to obtain a new actual foot position, and the foot error signal obtained by further comparing the new actual foot position with the new desired foot position is entered into the next control cycle to realize the complete closed-loop feedback control of the quadruped robot.

[0169] In order to verify the beneficial effects of the method proposed in this application, a simulation comparison experiment was further conducted. The following experimental results were obtained under the working conditions of fixed stride length and variable stride frequency. The fixed motion step length is set to S = 0.15m, and the motion period is T m The change curve of Figure 7 As shown, the expected trajectory is Figure 8 shown.

[0170] Figure 9 and Figure 10 The simulation results of VMC and BP-VMC in the horizontal direction are shown respectively, and Ref in the figure represents the reference curve. Figure 9 From the comparison diagram of the stride curve in the horizontal direction shown in FIG, it can be seen that both VMC and BP-VMC can effectively track the desired motion trajectory; Figure 10From the comparison diagram of the absolute value of the horizontal error shown in the figure, the tracking error of BP-VMC is smaller than that of VMC at any time, and it has better trajectory tracking accuracy.

[0171] Figure 11 and Figure 12 The simulation results of VMC and BP-VMC in the vertical direction are shown respectively. Figure 11 From the vertical height comparison diagram between the foot end and the center of mass of the quadruped robot shown in the figure, both VMC and BP-VMC can track effectively, but the height fluctuation of VMC is significantly greater than that of BP-VMC when in the support phase. Figure 12 As shown in the diagram for the comparison of the absolute values ​​of the vertical errors, the error value of BP-VMC is much smaller than that of VMC, and the error value of BP-VMC does not fluctuate or change significantly with the change of the motion cycle, indicating that BP-VMC has better stability while maintaining higher tracking accuracy.

[0172] Figure 13 The figure is a comparison diagram of the foot movement trajectory of VMC and BP-VMC. Figure 13 As shown in the figure, the foot trajectory of BP-VMC has a higher degree of overlap with the reference expected motion trajectory compared with VMC. At the same time, the similarity between the motion trajectories within each motion cycle of BP-VMC is significantly better than that of VMC, indicating that BP-VMC has both higher motion accuracy and motion stability.

[0173] Figure 14 This is a comparison diagram of the absolute deviation and instability index of attitude angles between VMC and BP-VMC. Figure 14 As shown, at the roll angle σ α (Roll angle) and yaw angle σ γ In terms of yaw angle, there is no significant difference between VMC and BP-VMC, and the deviation values ​​are similar; in terms of pitch angle σ β In terms of the (Pitch angle) deviation value and instability index Δ, BP-VMC is significantly lower than VMC, showing better motion control stability.

[0174] The error data obtained from the above simulation comparison experiments are listed in the form of a table, as shown in Table 1. The horizontal root mean square error, vertical root mean square error and foot end trajectory average tracking error represent the trajectory tracking accuracy. The three values ​​of BP-VMC are 77.59%, 43.05% and 67.41% of VMC respectively. BP-VMC shows higher control accuracy and smaller tracking error. The absolute deviation mean of roll angle, pitch angle and yaw angle and the average of instability index represent the motion stability during the control process. The absolute error mean of roll angle and yaw angle of BP-VMC is similar to that of VMC, while the absolute error mean of pitch angle and the average of instability index are 63.38% and 79.56% of VMC respectively. Overall, the BP-VMC proposed in this application has better control stability.

[0175] Table 1 Correlation error data under variable step frequency conditions

[0176] VMC BP-VMC Horizontal root mean square error (m) <![CDATA[1.245×10 -2 ]]> <![CDATA[0.966×10 -2 ]]> Vertical root mean square error (m) <![CDATA[8.701×10 -3 ]]> <![CDATA[3.746×10 -3 ]]> Average tracking error of foot end trajectory (m) <![CDATA[1.384×10 -2 ]]> <![CDATA[0.933×10 -2 ]]> Mean absolute deviation of roll angle (rad) <![CDATA[1.692×10 -2 ]]> <![CDATA[1.596×10 -2 ]]> Mean absolute deviation of pitch angle (rad) <![CDATA[1.259×10 -2 ]]> <![CDATA[0.798×10 -2 ]]> Mean absolute deviation of yaw angle (rad) <![CDATA[2.005×10 -4 ]]> <![CDATA[2.137×10 -4 ]]> Mean instability index <![CDATA[2.353×10 -2 ]]> <![CDATA[1.872×10 -2 ]]>

[0177] In summary, the present application provides a method for controlling a virtual model of a quadruped robot based on BP neural network optimization. This method aims to address the shortcomings of dynamic performance and control accuracy of VMC due to simplified dynamic factors. By using BPNN to adaptively adjust the mechanical parameters of virtual components in VMC, the adaptive adjustment of the virtual component model is achieved, compensating for modeling errors. During the motion process, according to the changes in the robot's motion state and motion conditions, the mechanical parameters of the virtual components are learned and corrected by BPNN, which optimizes the tracking effect and enhances the adaptability of the controller. At the same time, an error integral compensator is introduced into the vertical height controller, and the integral coefficient is calibrated independently by BPNN to achieve compensation for the system's inertia and external errors, thereby improving control accuracy. At the same time, selecting a learning rate and introducing a momentum factor in the BPNN training algorithm can effectively avoid the problem of falling into a local optimum, ensuring that the final output is the global optimal result.

[0178] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0179] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A quadruped robot virtual model control method based on BP neural network optimization, characterized in that: The method comprises: Constructing a BP-VMC control framework, which includes a quadruped robot model, a trajectory generator, and a VMC controller; wherein the VMC controller is composed of a virtual parameter generator including BPNN and virtual component model modules, and a Jacobian matrix; Output the actual foot position and driving joint angle information of the quadruped robot in real time according to the quadruped robot model; The desired trajectory of the quadruped robot is generated by the trajectory generator and the desired foot position is output in real time. The foot error signal is obtained by comparing the desired foot position with the actual foot position. In the VMC controller, the desired foot position, actual foot position, and foot error signal are first input into the BPNN. The BPNN then optimizes and outputs the virtual component mechanical parameter matrix of the quadruped robot according to the preset VMC controller control law. The virtual component mechanical parameter matrix and the foot error signal are then input into the virtual component model module to calculate and output the virtual force matrix. Finally, the virtual force matrix and the driving joint angle information output by the quadruped robot model are transferred to the Jacobian matrix to calculate the output joint torque. The BPNN is trained by introducing a learning rate and momentum factor. The quadruped robot is driven to move along a desired trajectory according to the joint torque, a new actual foot position is obtained, and a foot error signal is obtained by further comparing the new actual foot position with the new desired foot position, thereby entering the next control cycle to achieve complete closed-loop feedback control of the quadruped robot; The BPNN consists of an input layer, a hidden layer, and an output layer; the input and output of the input layer are represented as ; in, is the input vector of BPNN, n is the time series number; the input of the input layer The output of the input layer The superscripts represent the network layers corresponding to the signals, 0, 1, and 2 refer to the input layer, hidden layer, and output layer, respectively. i represents the node number in the input layer, is the number of nodes in the input layer; The induced local domain and output of the hidden layer are expressed as ; in, represents the induced local domain of the hidden layer, represents the output of the hidden layer, is the synaptic weight of the hidden layer neurons, subscript j represents the node number in the hidden layer, is the number of nodes in the hidden layer, represents the activation function of the hidden layer neurons; The induced local domain and output value of the output layer are expressed as ; in, represents the induced local domain of the output layer, represents the output of the output layer, is the synaptic weight of the output layer neuron, subscript l represents the node number in the output layer, is the number of nodes in the output layer, represents the activation function of the output layer neurons; The desired foot position, actual foot position, and foot error signal are input into the BPNN. The BPNN optimizes and outputs the mechanical parameter matrix of the virtual component of the quadruped robot according to the control law of the preset VMC controller, including: The quadruped robot t Expected foot position at this moment , actual foot position and foot-end error signal As input vector , input to BPNN, BPNN according to the output of its output layer The virtual component mechanical parameter matrix is ​​optimized and trained with the preset VMC controller control law to obtain the final output vector, which is expressed as ; in, Represents the final output vector of BPNN, that is, the mechanical parameter matrix of the virtual component finally output by BPNN; represents the VMC parameter weight matrix, is the error matrix in the VMC controller.

2. The method according to claim 1, wherein According to the quadruped robot model, the actual position of the quadruped robot's foot and the driving joint angle information are output in real time, including: The quadruped robot model is based on the time parameter t , which outputs the actual foot position and driving joint angle information of the quadruped robot in real time, respectively expressed as ; ; in, 、 and They represent the quadruped robot in t The actual position of the foot end at the moment, the actual horizontal coordinate and the actual vertical coordinate, Indicates that the quadruped robot is t The driving joint angle information at each moment, is the angle between the thigh and calf of the quadruped robot, is the angle between the thigh of the quadruped robot and the horizontal direction of the body, T Indicates transpose.

3. The method according to claim 2, wherein The desired trajectory of the quadruped robot is generated by the trajectory generator and the desired foot position is output in real time. The foot error signal is obtained by comparing the desired foot position with the actual foot position, including: The trajectory generator is based on the preset motion step length of the quadruped robot. S , Maximum leg lift height H and movement cycle , generating the desired trajectories of the quadruped robot in the horizontal and vertical directions, respectively expressed as ; The trajectory generator is based on the time parameter t , real-time output of the quadruped robot in t The expected foot position at the moment is expressed as ;in, and They represent the quadruped robot in t The expected horizontal coordinate and the expected vertical coordinate of the time; By comparing the foot end desired position Actual position of the foot , and the foot-end error signal is obtained, which is expressed as .

4. The method according to claim 1, wherein The learning and training process of the BPNN includes: The back propagation algorithm is used to iteratively modify the synaptic weights of BPNN and define the cost function of the network , expressed as ; in, is the input vector of BPNN and difference, n is the time series number; Indicates that the final output vector of BPNN Substitute the quadruped robot model The output value obtained after Correct the synaptic weights of the output layer neurons of BPNN according to the gradient descent method , that is, press The negative gradient direction search of the synaptic weight coefficient is adjusted, and an inertia term is added to make the search converge quickly, which is expressed as ; in, is the learning rate, is the momentum factor, for The correction amount, Represents the output of the hidden layer of BPNN, subscript j and l Represent the node numbers in the hidden layer and output layer respectively; represents the local gradient of the output layer neuron, and by the chain differentiation rule, Expressed as ; in, represents the induced local domain of the output layer, represents the output of the output layer, is the final output vector of BPNN; according to and The relationship between the two can be seen, In order to further simplify the computational complexity, the quadruped robot model is associated with Approximation as a symbolic function , based on this simplified Expressed as ; in, represents the derivative of the activation function of the output layer neuron; The simplified Substitution The expression of , gets the synaptic weight of the output layer neuron The correction formula is ; Similarly, the synaptic weights of the hidden layer neurons The correction formula is ; in, express The correction amount, is the output of the input layer of BPNN, is the local gradient of the hidden layer neurons, specifically expressed as ; in, represents the induced local domain of the hidden layer, is the number of nodes in the output layer, Represents the derivative of the activation function of the hidden layer neurons.

5. The method according to claim 1, wherein In the horizontal direction, the control law of the VMC controller is expressed as ; in, represents the joint torque, represents the transpose of the Jacobian matrix, represents the virtual force matrix, and They represent the virtual spring stiffness matrix and virtual damping coefficient matrix finally output by BPNN, represents the horizontal position error of the quadruped robot, represents the velocity error of the quadruped robot in the horizontal direction, The mechanical parameter matrix of the virtual component finally output by BPNN in the horizontal direction is represented by and composition, represents the desired horizontal coordinate of the quadruped robot, n is the time series number.

6. The method according to claim 4, characterized in that In the vertical direction, the control law of the VMC controller is expressed as ; in, Represents the integral compensation coefficient matrix of the final output of BPNN, represents the position error of the quadruped robot in the vertical direction, represents the velocity error of the quadruped robot in the vertical direction, t is the time parameter, The mechanical parameter matrix of the virtual component finally output by BPNN in the vertical direction is represented by 、 and composition, represents the desired vertical coordinate of the quadruped robot.

7. The method according to claim 6, wherein The virtual component mechanical parameter matrix and the foot end error signal are input into the virtual component model module to calculate and output the virtual force matrix, including: The virtual component mechanical parameter matrix output by BPNN is compared with the quadruped robot in t Foot error signal at the moment Input to the virtual component model module, calculate and output the quadruped robot t Virtual force matrix at the moment , expressed as ; in, 、 and Respectively represent the virtual spring stiffness matrix, virtual damping coefficient matrix and integral compensation coefficient matrix in the virtual component mechanical parameter matrix, where, in the horizontal direction, ; The virtual component model module includes three groups of virtual component models obtained by simultaneously applying virtual springs and virtual damping components in the horizontal direction, vertical direction and center of mass inclination direction of the quadruped robot.

8. The method according to claim 7, wherein The virtual force matrix and the driving joint angle information output by the quadruped robot model are transferred to the Jacobian matrix to calculate the output joint torque, including: The quadruped robot t Virtual force matrix at the moment And the driving joint angle information output by the quadruped robot model Transfer to the Jacobian matrix, calculate the output of the quadruped robot according to the Jacobian matrix t Joint torque at time , expressed as ; ; in, represents the Jacobian matrix J The transpose of is the angle between the thigh and calf of the quadruped robot, is the angle between the thigh of the quadruped robot and the horizontal direction of the body, is the length of the quadruped robot’s lower leg, is the thigh length of the quadruped robot, for The abbreviation of for 's abbreviation.

Citation Information

Patent Citations

  • Gait planning method for leg movement of four-legged robot

    CN110764415A

  • Mobile manipulation control method and system of quadruped robot with operation arm

    US20230311320A1