Quadruped robot virtual model control method based on BP neural network optimization

By introducing BP neural network into virtual model control, optimizing the mechanical parameters of virtual components, the problem of lack of theoretical guidance and adaptive adjustment capabilities in the existing technology is solved, and more efficient and flexible control effects are achieved.

CN119846965AActive Publication Date: 2025-04-18NAT UNIV OF DEFENSE TECH
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing virtual model control methods lack theoretical guidance when selecting the mechanical parameters of virtual components, and the parameter adjustment is very random, making it difficult to achieve the optimal control effect, and the parameters cannot be adjusted adaptively, and the control adaptability is limited.

Method used

Using the optimization method based on BP neural network, the BP-VMC control framework is constructed, and the virtual component mechanical parameters are self-learning and training and optimization are used to realize real-time adaptive adjustment of parameters.

Benefits of technology

Through BPNN's self-learning training, the mechanical parameters of virtual components are optimized, and the adaptive adjustment of the virtual component model is realized, local optimal problems are avoided, global optimal results are ensured, and control performance and adaptability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119846965A_ABST
    Figure CN119846965A_ABST
Patent Text Reader

Abstract

The invention relates to a quadruped robot virtual model control method based on BP neural network optimization. According to the method, a BP-VMC control framework is constructed, in the control framework, after a BPNN structure is determined according to control characteristics and input and output requirements of the quadruped robot, mechanical parameters of virtual components are continuously optimized through self-learning training of the BPNN, real-time self-adaptive adjustment of the mechanical parameters of the virtual components in a VMC controller is achieved, and the control performance of the VMC controller is improved. And meanwhile, a learning rate and a momentum factor are introduced into the BPNN training algorithm, so that the local optimum problem can be effectively avoided, and the final output is ensured to be a 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 method for controlling a virtual model of a quadruped robot based on BP neural network optimization. Background Art

[0002] Virtual model control (VMC) is an intuitive control method. Based on the kinematic analysis of the robot, appropriate virtual mechanical components, such as springs, dampers, bearings, etc., are selected to connect the body (internal action point) with the external environment (external action point) so that the virtual force generated can drive the robot to achieve the corresponding action. Then, according to the principle of virtual work, the force and torque of the workspace are mapped into the torque of the joint space using the Jacobian matrix as the output target of the joint motor. It cleverly uses the Jacobian matrix to directly link the motion requirements with the driving force control requirements, realizing direct force control. At the same time, virtual model control avoids dependence on the dynamic model. It only needs to reasonably change the composition of the virtual components and the selection of the mechanical parameters of the virtual components according to the characteristics of the moving parts of the robot system to achieve accurate control of the robot's motion.

[0003] Due to the neglect of dynamic factors, virtual model control has obvious deficiencies in control accuracy. At the same time, how to select the optimal mechanical parameters of virtual components to make the control system have the best performance has always been a key issue restricting the development of virtual model control methods. Traditional virtual model control methods use empirical trial and error to determine the mechanical parameters of virtual components. Through repeated experiments and parameter adjustments, a set of parameters that meet the control requirements are finally determined. This method lacks specific theoretical guidance, the parameter adjustment is highly random, and it is difficult to achieve the optimal control effect. Moreover, after the mechanical parameters of the virtual components are selected, they remain fixed in motion control, and the parameters cannot be adjusted according to the actual motion changes, which has limitations in control adaptability. In response to these problems, existing studies have introduced fractional-order dampers to refine the performance of virtual model controllers and achieve more accurate parameter adjustment; or by adopting fuzzy optimization algorithms, the mechanical parameters of virtual components are adaptively adjusted by formulating fuzzy rules.

[0004] Fractional-order VMC adds fractional-order dampers to traditional VMC. Although it improves the accuracy and robustness of VMC controllers to a certain extent, it also increases the number of mechanical parameters of virtual components, further increasing the difficulty of parameter setting, and cannot achieve adaptive adjustment of parameters during motion control. Fuzzy VMC achieves adaptive adjustment of mechanical parameters of virtual components by formulating fuzzy rules, and the membership judgment in fuzzy rules is mainly based on experience. The final parameter result can only be said to be the optimal result based on the rules used. It is difficult to ensure that it is the optimal result of the entire system and is prone to fall into local optimality. 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 is constructed, which includes a quadruped robot model, a trajectory generator, and a VMC controller. The VMC controller is composed of a virtual parameter generator including BPNN and virtual component model modules, and a Jacobian matrix.

[0008] According to the quadruped robot model, the actual foot position and driving joint angle information of the quadruped robot are output in real time;

[0009] Generate the desired trajectory of the quadruped robot according to the trajectory generator and output the desired position of the foot end in real time, and obtain the foot end error signal by comparing the desired position of the foot end with the actual position of the foot end;

[0010] In the VMC controller, the foot end desired position, the foot end actual position and the foot end error signal are first input into the BPNN, and the BPNN optimizes and outputs the virtual component mechanical parameter matrix of the quadruped robot according to the preset control law of the VMC controller; then, the virtual component mechanical parameter matrix and the foot end error signal are input into the virtual component model module to calculate the output 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; wherein, the BPNN is trained by introducing the 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, and 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 actual foot position and driving joint angle information of the quadruped robot are output in real time according to the quadruped robot model, including:

[0013] The quadruped robot model outputs the actual foot position and driving joint angle information of the quadruped robot 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 calf of the quadruped robot; θ2 is the angle between the thigh and the horizontal direction of the quadruped robot; and the superscript T represents transposition.

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

[0018] The trajectory generator generates a trajectory according to the preset step length S, maximum leg lift height H and movement period T of the quadruped robot. 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) represent 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 is composed of an input layer, a hidden layer, and an output layer; wherein the input and output of the input layer are respectively 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 indicates 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 indicates 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, 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;

[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 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, 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 according to the control law of the preset VMC controller 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 learning and training process of BPNN includes:

[0036] The back propagation algorithm is used to iteratively correct 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 time series number; 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 the 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), we can see that Associated with the quadruped robot model, to further simplify the computational complexity, 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 , we can get 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 neuron, which is 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 neurons in the hidden layer.

[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 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 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, and the virtual force matrix is ​​calculated and output, 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, wherein, in the horizontal direction, I = 0;

[0063] 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 transmitted 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 above-mentioned quadruped robot virtual model control method based on BP neural network optimization constructs a BP-VMC control framework. In this control framework, after the BPNN structure is determined according to the control characteristics and input and output requirements of the quadruped robot, the virtual component mechanical parameters are continuously optimized through BPNN self-learning training, and the real-time adaptive adjustment of the virtual component mechanical parameters in the VMC controller is achieved, thereby improving the control performance of the VMC controller. At the same time, the introduction of learning rate and momentum factor in the BPNN training algorithm can effectively avoid the local optimal problem and ensure 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 It is a flowchart of a method for controlling a virtual model of a quadruped robot based on BP neural network optimization in one embodiment;

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

[0073] Figure 4 A schematic diagram of a 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 of vertical integral compensation in one embodiment;

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

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

[0078] Fig. 9 is a schematic diagram of comparing stride curves in the horizontal direction in one embodiment;

[0079] Fig.10 Schematic diagram of comparison of absolute values ​​of horizontal direction errors in one embodiment;

[0080] Fig.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] Fig.12 A schematic diagram showing a comparison of absolute values ​​of vertical direction errors in an embodiment;

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

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

[0084] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present 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 three degrees of freedom respectively. The principle structure of VMC is as follows Figure 1 As shown, virtual springs and virtual damping components are simultaneously applied 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 the inclination direction of the body’s center of mass; Kx , K z , are the virtual spring stiffness in the horizontal direction, vertical direction and the inclination direction of the body mass center; B x , B z , are the virtual damping coefficients in the horizontal direction, vertical direction and the 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, They 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 direction, vertical direction and inclination direction of the body's center of mass respectively; They are the actual velocities in the horizontal direction, vertical direction and inclination direction of the body's center of mass respectively.

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

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

[0092] Among them, τ0, τ1, τ2 are the joint moments at θ0, θ1, θ2 respectively. And because θ0 is a passive joint, τ0=0.

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

[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 principle of biological nervous systems and have self-learning, self-organization and adaptability. Applying them to the field of control can 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, comprising 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, outputting 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 foot position and driving joint angle information of the quadruped robot 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 calf of the quadruped robot; θ2 is the angle between the thigh and the horizontal direction of the quadruped robot; and the superscript T represents 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 motion step length S, maximum leg lift height H and motion period T of the quadruped robot according to the preset motion step length S, maximum leg lift height H and motion period T of the quadruped robot. 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 expected foot position of the quadruped robot at time t in real time according to the time parameter t, 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 expected 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] Step S4, in the VMC controller, first input the desired foot position, the actual foot position and the foot error signal into the BPNN, and 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, and the output virtual force matrix is ​​calculated; finally, the virtual force matrix and the driving joint angle information output by the quadruped robot model are transmitted to the Jacobian matrix, and the output joint torque is calculated; wherein, 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, 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 mainly involves two stages: forward propagation and back propagation. The function signal is transmitted layer by layer through forward propagation until it reaches the output layer, and the output value is calculated through the synaptic weights between neurons. The error signal is obtained by comparing the network output value with the expected output value, and then the error signal is transmitted layer by layer to the input layer in a back propagation manner. By adjusting the weight matrix between each layer, 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 indicates 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 indicates 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 is selected, 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 as a non-negative sigmoid function, which is expressed as

[0128] In step S4.2, the desired foot position, the actual foot position and the 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 expected 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 according to the control law of the preset VMC controller 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 mechanical parameter matrix of the virtual component finally 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 correct 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 time series number; 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 the 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), we can see that In relation to the quadruped robot model, if accurate calculations are performed in each iterative optimization process, the computational complexity will be greatly increased 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 , we can get 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 neuron, which is 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 neurons in the hidden layer.

[0151] Specifically, in step S4.2, the control law of the VMC controller includes the control law in the horizontal direction and the control law in the vertical direction. The BP-VMC control principle in the horizontal direction is as follows: Figure 5 As shown, Figure 5 Medium d is the desired horizontal coordinate of the quadruped robot and is the input of the system. d Subtract 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 the 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 compared with the robot's current actual horizontal movement speed Subtract and get the velocity error in the horizontal direction Relative The virtual force matrix F is input into the virtual component model module, combined with the previously obtained virtual component mechanical parameter matrices 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 The joint torque τ is multiplied and transmitted 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] It is obtained that 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 are 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, so 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 adjusted through BPNN, without the need for additional parameter adjustment. 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, and 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] Among them, 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, and in the horizontal direction, I=0.

[0162] 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] Step S5, drives the quadruped robot to move along the desired trajectory according to the joint torque, obtains a new actual foot position, and enters the next control cycle to realize complete closed-loop feedback control of the quadruped robot by further comparing the new actual foot position with the new desired foot position to obtain a foot error signal.

[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 condition of fixed stride length and variable step 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] Fig. 9 and Fig.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. Fig. 9 From the comparison diagram of the stride curve in the horizontal direction shown in FIG. 1 , both VMC and BP-VMC can effectively track the desired motion trajectory; Fig.10From the comparison diagram of the absolute value of the horizontal error, it can be seen that the tracking error of BP-VMC is smaller than that of VMC at any time, and it has better trajectory tracking accuracy.

[0171] Fig.11 and Fig.12 The simulation results of VMC and BP-VMC in the vertical direction are shown respectively. Fig.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. Fig.12 As shown in the schematic diagram of 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 show obvious fluctuation or change with the change of the motion cycle, indicating that BP-VMC has better stability while maintaining higher tracking accuracy.

[0172] Fig.13 Figure 2 is a schematic diagram comparing the foot movement trajectories of VMC and BP-VMC. Fig.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 of BP-VMC in each motion cycle is significantly better than that of VMC, indicating that BP-VMC has both higher motion accuracy and motion stability.

[0173] Fig.14 This is a schematic diagram comparing the absolute deviation and instability index of the attitude angle between VMC and BP-VMC. Fig.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 the (Pitch angle) deviation value and the instability index Δ, BP-VMC is significantly lower than VMC, showing better motion control stability.

[0174] The error data obtained from the above simulation comparison experiment are listed in the form of a table, as shown in Table 1. The horizontal root mean square error, the vertical root mean square error and the average tracking error of the foot end trajectory 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 mean 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 mean of instability index of BP-VMC 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 trajectory (m) <![CDATA[1.384×10 -2 ]]> <![CDATA[0.933×10 -2 ]]> Roll angle absolute deviation mean (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 ]]> Yaw angle absolute deviation mean (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. In view of the shortcomings of dynamic performance and control accuracy of VMC due to simplified dynamic factors, BPNN is used to adaptively adjust the mechanical parameters of virtual components in VMC, thereby realizing adaptive adjustment of the virtual component model and compensating for modeling errors. During the motion process, according to the changes in the robot's motion state and motion conditions, BPNN is used to learn and correct the mechanical parameters of the virtual components, thereby optimizing the tracking effect and enhancing 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 autonomously by BPNN to realize the inertia and external error compensation of the system and improve the control accuracy. At the same time, selecting the learning rate and introducing the momentum factor in the BPNN training algorithm can effectively avoid the problem of falling into the local optimum and ensure that the final output is the global optimal result.

[0178] The technical features of the above embodiments may 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A quadruped robot virtual model control method based on BP neural network optimization, characterized in that: The method comprises: A BP-VMC control framework is constructed, 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 (back propagation neural network) and a virtual component model module, and a Jacobian matrix; According to the quadruped robot model, the actual foot position and driving joint angle information of the quadruped robot are output in real time; Generate the desired trajectory of the quadruped robot according to the trajectory generator and output the desired position of the foot end in real time, and obtain the foot end error signal by comparing the desired position of the foot end with the actual position of the foot end; In the VMC controller, the desired foot position, the actual foot position and the foot error signal are first input into the BPNN, and 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 the output virtual force matrix; finally, the virtual force matrix and the driving joint angle information output by the quadruped robot model are transmitted to the Jacobian matrix to calculate the output joint torque; wherein, the BPNN is trained by introducing the learning rate and momentum factor; The quadruped robot is driven to move along the desired trajectory according to the joint torque to obtain a new actual foot position, and a 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.

2. The method according to claim 1, characterized in that 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 outputs the actual foot position and driving joint angle information of the quadruped robot in real time according to the time parameter t, which are respectively expressed as y(t)=[x(t)z(t)] T ; θ(t)=[θ1θ2] T ; 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 calf of the quadruped robot; θ2 is the angle between the thigh and the horizontal direction of the quadruped robot; and the superscript T represents transposition.

3. The method according to claim 2, characterized in that The desired trajectory of the quadruped robot is generated according to 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 movement step length S, maximum leg lifting height H and movement cycle T of the quadruped robot. m , generating the desired trajectories of the quadruped robot in the horizontal and vertical directions, respectively expressed as The trajectory generator outputs the expected foot position of the quadruped robot at time t in real time according to the time parameter t, 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; 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).

4. The method according to claim 1, characterized in that The BPNN consists of an input layer, a hidden layer and an output layer; the input and output of the input layer are respectively represented as 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 indicates 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 indicates the node number in the input layer, and χ 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 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; 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 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.

5. The method according to claim 4, characterized in that The desired foot position, actual foot position and foot error signal are input into BPNN. 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 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 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.

6. The method according to claim 5, characterized in that The learning and training process of the BPNN includes: The back propagation algorithm is used to iteratively correct the synaptic weights of BPNN, and the cost function ε(n) of the network is defined as 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 time series number; 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 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 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 the output layer respectively; represents the local gradient of the output layer neuron, and by the chain differentiation rule, δ l 2 (n) is expressed as 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), we can see that Associated with the quadruped robot model, to further simplify the computational complexity, Approximation as a symbolic function Based on this simplified Expressed as Where g' represents the derivative of the activation function of the output layer neuron; The simplified Substitution The expression of , we can get 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 neuron, which is specifically expressed as 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 neurons in the hidden layer.

7. The method according to claim 5, characterized in that In the horizontal direction, the control law of the VMC controller is expressed as 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 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 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.

8. The method according to claim 6, characterized in that In the vertical direction, the control law of the VMC controller is expressed as 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.

9. The method according to claim 8, characterized in that 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 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 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, wherein, in the horizontal direction, I = 0; 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.

10. The method according to claim 9, characterized in that 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 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 τ(t)=J T F(t); 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).

Citation Information

Patent Citations

  • Hexapod robot autonomous navigation closed-loop controller with fuzzy neural network

    CN104914867A

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

    CN110764415A

  • Robot control method and device based on adaptive fuzzy virtual model

    CN114393579A

  • Quadruped robot virtual model controller parameter control method based on reinforcement learning

    CN114995479A

  • Quadruped robot foot end ground slip rate estimation method based on deep learning

    CN115391680A