CN106886155A - A kind of quadruped robot control method of motion trace based on PSO PD neutral nets - Google Patents
A kind of quadruped robot control method of motion trace based on PSO PD neutral nets Download PDFInfo
- Publication number
- CN106886155A CN106886155A CN201710295939.9A CN201710295939A CN106886155A CN 106886155 A CN106886155 A CN 106886155A CN 201710295939 A CN201710295939 A CN 201710295939A CN 106886155 A CN106886155 A CN 106886155A
- Authority
- CN
- China
- Prior art keywords
- quadruped robot
- formula
- trunk
- control
- robot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000033001 locomotion Effects 0.000 title claims abstract description 83
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000007935 neutral effect Effects 0.000 title claims 12
- 230000005484 gravity Effects 0.000 claims abstract description 56
- 238000006073 displacement reaction Methods 0.000 claims abstract description 30
- 230000009466 transformation Effects 0.000 claims abstract description 8
- 239000002245 particle Substances 0.000 claims description 92
- 210000002414 leg Anatomy 0.000 claims description 49
- 230000006870 function Effects 0.000 claims description 36
- 238000003062 neural network model Methods 0.000 claims description 35
- 238000005457 optimization Methods 0.000 claims description 31
- 210000004394 hip joint Anatomy 0.000 claims description 26
- 238000004422 calculation algorithm Methods 0.000 claims description 21
- 230000003044 adaptive effect Effects 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 claims description 13
- 210000000629 knee joint Anatomy 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 9
- 230000008859 change Effects 0.000 claims description 7
- 230000005021 gait Effects 0.000 claims description 7
- 210000002569 neuron Anatomy 0.000 claims description 6
- 210000000689 upper leg Anatomy 0.000 claims description 6
- 238000005265 energy consumption Methods 0.000 claims description 4
- 230000001133 acceleration Effects 0.000 claims description 3
- 238000012804 iterative process Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims 2
- 210000004027 cell Anatomy 0.000 claims 1
- 230000008929 regeneration Effects 0.000 claims 1
- 238000011069 regeneration method Methods 0.000 claims 1
- 230000008054 signal transmission Effects 0.000 claims 1
- 238000013528 artificial neural network Methods 0.000 abstract description 28
- 238000010586 diagram Methods 0.000 description 11
- 230000035772 mutation Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 238000011217 control strategy Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000002068 genetic effect Effects 0.000 description 2
- 210000001503 joint Anatomy 0.000 description 2
- 238000013178 mathematical model Methods 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 210000005036 nerve Anatomy 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/04—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
- G05B13/042—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Feedback Control In General (AREA)
- Manipulator (AREA)
Abstract
本发明涉及一种基于PSO‑PD神经网络的四足机器人运动轨迹控制方法,包括:(1)求取机器人在运动轨迹上的目标落点;(2)将目标落点、反馈的躯干重心位置输入PSO‑PD神经网络的输入层;线性变换后进入第一隐含层,比例运算与微分运算;线性变换后进入第二隐含层,得到x方向与y方向上的指导位移;进入第三隐含层,求得指导位移距离、指导躯干朝向;进入第五层,对四足机器人的足端轨迹控制、转向控制;进入第六层,发生扰动时调整四足机器人姿态;进入第七层,求取四足机器人的躯干朝向、躯干重心位置,躯干朝向反馈给第五层,躯干重心位置反馈给输入层。具有更好的非线性解耦控制能力,控制精确,稳定性强,具有较好的抗干扰能力。
The present invention relates to a kind of motion track control method of quadruped robot based on PSO-PD neural network, comprising: (1) finding the target falling point of robot on the moving track; Enter the input layer of the PSO-PD neural network; enter the first hidden layer after linear transformation, proportional operation and differential operation; enter the second hidden layer after linear transformation, and get the guidance displacement in the x direction and y direction; enter the third In the hidden layer, obtain the guide displacement distance and guide the trunk orientation; enter the fifth layer, control the foot trajectory and steering of the quadruped robot; enter the sixth layer, adjust the posture of the quadruped robot when disturbance occurs; enter the seventh layer , to obtain the trunk orientation and the position of the center of gravity of the quadruped robot, the orientation of the trunk is fed back to the fifth layer, and the position of the center of gravity of the trunk is fed back to the input layer. It has better nonlinear decoupling control ability, precise control, strong stability, and better anti-interference ability.
Description
技术领域technical field
本发明涉及一种机器人运动轨迹控制方法,具体涉及一种基于PSO-PD神经网络的四足机器人运动轨迹控制方法。The invention relates to a method for controlling the trajectory of a robot, in particular to a method for controlling the trajectory of a quadruped robot based on a PSO-PD neural network.
背景技术Background technique
随着科学技术的飞速发展,机器人技术也越来越多地应用于复杂环境之中。其中足式机器人相对于轮式或履带式机器人在非结构环境中运动具有一定的优越性。而四足机器人相比于其他多足步行机器人,具有结构简单,运动稳定等优势,因此具有较高的研究意义与应用价值。在复杂环境工作时,机器人沿着预先设定好的运动轨迹运行。能够以最快的速度,最低的能耗经过各个工作点,与此同时还能避开各种障碍等影响运行稳定的因素。因此研究四足机器人的运动轨迹控制对四足机器人的应用于研究具有重大的意义。With the rapid development of science and technology, robotics is increasingly used in complex environments. Compared with wheeled or tracked robots, legged robots have certain advantages in moving in unstructured environments. Compared with other multi-legged walking robots, the quadruped robot has the advantages of simple structure and stable motion, so it has high research significance and application value. When working in a complex environment, the robot runs along a preset trajectory. It can pass through each working point with the fastest speed and the lowest energy consumption, and at the same time avoid various obstacles and other factors that affect the stable operation. Therefore, it is of great significance to study the trajectory control of quadruped robots for the application of quadruped robots.
四足机器人是一个复杂的非线性系统,且躯干朝向与重心位置存在耦合关系,因此四足机器人运动轨迹控制是一个十分复杂非线性解耦控制问题。现有方法只能对四足机器人实现直线轨迹控制,或圆形轨迹控制;或在此基础上通过步态切换实现简单非线性轨迹的控制。但始终无法对机器人实现连续精准的非线性运动轨迹控制。The quadruped robot is a complex nonlinear system, and there is a coupling relationship between the orientation of the torso and the position of the center of gravity, so the trajectory control of the quadruped robot is a very complex nonlinear decoupling control problem. Existing methods can only realize linear trajectory control or circular trajectory control for quadruped robots; or realize simple nonlinear trajectory control through gait switching on this basis. However, it is still impossible to achieve continuous and precise nonlinear motion trajectory control for robots.
一般现有PD神经网络为四层前向神经网络,第一层为输入层,接收控制信号与反馈信号;第二层为比例微分计算层,通过作用函数对误差进行比例计算与微分计算;第三层为控制率输出层,通过对比例微分运算的结果进行线性运算得到控制率;第四层为控制对象。Generally, the existing PD neural network is a four-layer forward neural network. The first layer is the input layer, which receives control signals and feedback signals; the second layer is the proportional differential calculation layer, which performs proportional calculation and differential calculation on the error through the action function; The third layer is the control rate output layer, and the control rate is obtained by performing linear operations on the results of the proportional differential operation; the fourth layer is the control object.
发明内容Contents of the invention
针对现有技术的不足,本发明提供了一种基于PSO-PD神经网络的四足机器人运动轨迹控制方法。Aiming at the deficiencies of the prior art, the present invention provides a motion track control method of a quadruped robot based on a PSO-PD neural network.
本发明中设计了一种专门面向四足机器人运动轨迹控制的PD神经网络,但由于该PD神经网络经网络中存在状态反馈与不连续可导的作用函数无法通过BP学习算法实现神经网络的自适应学习,于是本发明使用改进PSO算法作为PD神经网络的学习算法。改进PSO算法收敛快、精度高且不宜陷入局部最优,能够精准地实现PD神经网络的自适应学习。总之,本发明能够快速精准地实现四足机器人运动轨迹控制,有望在机器人运动控制中得到广泛应用。In the present invention, a kind of PD neural network specially oriented to quadruped robot motion trajectory control is designed, but because there is state feedback and discontinuous derivable action function in this PD neural network, it is impossible to realize the automatic control of neural network by BP learning algorithm. To adapt to learning, the present invention uses the improved PSO algorithm as the learning algorithm of the PD neural network. The improved PSO algorithm has fast convergence, high precision and is not suitable to fall into local optimum, and can accurately realize the adaptive learning of PD neural network. In a word, the present invention can quickly and accurately realize the motion trajectory control of a quadruped robot, and is expected to be widely used in robot motion control.
本发明的技术方案为:Technical scheme of the present invention is:
一种基于PSO-PD神经网络的四足机器人运动轨迹控制方法,包括:A method for controlling motion trajectory of a quadruped robot based on PSO-PD neural network, comprising:
(1)根据四足机器人运动轨迹与预设步长,求取四足机器人重心在该运动轨迹上的目标落点,即四足机器人重心在该运动轨迹上的坐标;是相对于实际结果而言的。(1) According to the trajectory of the quadruped robot and the preset step size, the target landing point of the center of gravity of the quadruped robot on the trajectory is obtained, that is, the coordinates of the center of gravity of the quadruped robot on the trajectory; it is relative to the actual result spoken.
(2)将步骤(1)求取的四足机器人重心在该运动轨迹上的目标落点、实时反馈的躯干重心位置(yx,yy)输入PD神经网络模型的输入层;线性变换后进入PD神经网络模型的第一隐含层,在第一隐含层进行比例运算与微分运算;再次线性变换后进入PD神经网络模型的第二隐含层,在第二隐含层得到x方向与y方向上的指导位移,所处坐标系为四足机器人运动所在的水平平面的坐标系,原点为四足机器人初始重心位置;进入PD神经网络模型的第三隐含层,在第三隐含层求得指导位移距离dr、指导转向角度dθ,指导位移距离dr是指四足机器人从当前这一步到下一步迈出的距离,指导转向角度是指四足机器人从当前这一步到下一步的躯干转向角度;进入PD神经网络模型的第五层,在第五层实现对四足机器人的足端轨迹控制、转向控制;进入PD神经网络模型的第六层,当四足机器人足端发生滑动时,调整四足机器人姿态,保证四足机器人运行稳定;但该过程会使机器人重心发生变化,可视为随机时刻发生的大小随机的扰动,此外还有诸多其他原因造成的扰动,在第六层加入扰动进行模拟,并将加入扰动后的步长作为实际步长反馈给第五层;进入PD神经网络模型的第七层,求取四足机器人的躯干朝向yθ、躯干重心位置(yx,yy),躯干朝向yθ是指当前迈步结束后,躯干的实际朝向,即躯干与X轴的夹角;躯干重心位置(yx,yy)是指四足机器人重心在所述坐标系中的坐标;四足机器人的躯干朝向yθ反馈给PD神经网络模型的第五层,躯干重心位置(yx,yy)反馈给PD神经网络模型的输入层。(2) Input the target landing point of the quadruped robot's center of gravity on the motion trajectory obtained in step (1) and the real-time feedback position of the center of gravity (y x , y y ) of the torso into the input layer of the PD neural network model; after linear transformation Enter the first hidden layer of the PD neural network model, perform proportional operation and differential operation in the first hidden layer; enter the second hidden layer of the PD neural network model after linear transformation again, and obtain the x direction in the second hidden layer The coordinate system is the coordinate system of the horizontal plane where the quadruped robot moves, and the origin is the initial center of gravity of the quadruped robot; enter the third hidden layer of the PD neural network model, in the third hidden layer The guidance displacement distance dr and the guidance steering angle dθ are calculated in the containing layer. The guidance displacement distance dr refers to the distance that the quadruped robot takes from the current step to the next step, and the guidance steering angle refers to the distance from the current step to the next step of the quadruped robot. torso steering angle; enter the fifth layer of the PD neural network model, and realize the foot trajectory control and steering control of the quadruped robot on the fifth layer; enter the sixth layer of the PD neural network model, when the foot end of the quadruped robot When sliding, adjust the posture of the quadruped robot to ensure the stable operation of the quadruped robot; but this process will change the center of gravity of the robot, which can be regarded as random disturbances of random sizes at random times. In addition, there are many disturbances caused by other reasons. Add disturbance to the sixth layer for simulation, and feed back the step size after adding the disturbance as the actual step size to the fifth layer; enter the seventh layer of the PD neural network model to obtain the trunk orientation y θ of the quadruped robot and the position of the trunk center of gravity ( y x , y y ), the orientation of the trunk y θ refers to the actual orientation of the trunk after the current step is completed, that is, the angle between the trunk and the X axis; the position of the center of gravity of the trunk (y x , y y ) refers to the location The coordinates in the above coordinate system; the trunk orientation y θ of the quadruped robot is fed back to the fifth layer of the PD neural network model, and the position of the center of gravity of the trunk (y x , y y ) is fed back to the input layer of the PD neural network model.
根据本发明优选的,采用改进的粒子群优化算法调整PD神经网络模型中多层神经元之间的连接权值,实现面向机器人运动轨迹控制的PD神经网络的自适应学习,包括:Preferably according to the present invention, an improved particle swarm optimization algorithm is used to adjust the connection weights between multi-layer neurons in the PD neural network model, so as to realize the adaptive learning of the PD neural network oriented to robot motion trajectory control, including:
a、将多层神经元之间的连接权值的选取问题转化为最优化问题,最优化问题的目标函数即输出向量与导师信号向量的L2范数,如式(Ⅰ)所示,导师信号即目标落点坐标,输出向量即四足机器人实际重心位置;a. Transform the selection of connection weights between multi-layer neurons into an optimization problem. The objective function of the optimization problem is the L2 norm of the output vector and the tutor signal vector. As shown in formula (I), the tutor signal That is, the coordinates of the target landing point, and the output vector is the actual center of gravity position of the quadruped robot;
式(Ⅰ)中,Error为最优化问题的目标函数,xd(k)、yd(k)分别为四足机器人第k步的重心目标落点的横坐标、纵坐标,yx(k)、yy(k)为四足机器人第k步的重心目标落点的实际横坐标、纵坐标;In formula (I), Error is the objective function of the optimization problem, xd(k) and yd(k) are respectively the abscissa and ordinate of the center-of-gravity target landing point of the quadruped robot at step k, and y x (k), y y (k) is the actual abscissa and ordinate of the center of gravity target landing point of the kth step of the quadruped robot;
b、利用先前经验确定每个连接权值的取值范围,即确定寻优范围;b. Use previous experience to determine the value range of each connection weight, that is, to determine the optimization range;
c、在寻优范围内随机初始化一群粒子,即粒子群,包括初始化粒子的初始位置与初始速度,用位置、速度和适应度这三个指标表示粒子特征,位置表示PD神经网络模型中所有的连接权值取值,速度表示每个粒子演化的方向,适应度值由适应度函数求得,即每个粒子对应的目标函数;而每个粒子都代表上述最优化问题的一个潜在最优解;c. Randomly initialize a group of particles in the optimization range, that is, particle swarm, including the initial position and initial velocity of the initialized particles. The three indicators of position, speed and fitness are used to represent the particle characteristics, and the position represents all the parameters in the PD neural network model. The connection weight value, the speed represents the evolution direction of each particle, and the fitness value is obtained from the fitness function, that is, the objective function corresponding to each particle; and each particle represents a potential optimal solution of the above optimization problem ;
粒子的速度依据粒子的当前位置、当前速度、粒子的历史最佳位置Pbest与粒子群中最优粒子的位置Gbest更新,粒子的速度的更新公式如式(Ⅱ)所示:The speed of the particle is updated according to the current position of the particle, the current speed, the historical best position Pbest of the particle and the position Gbest of the optimal particle in the particle swarm, and the speed of the particle The update formula of is shown in formula (II):
式(Ⅱ)中,id为粒子群中粒子的编号,为第i代粒子的速度,为第i代粒子在第i代之前的历史最佳位置,为第i代粒子群中最优粒子的位置;ω(i)为第i代粒子的惯性权重,其大小决定速度在多大程度上继承上一代粒子的运动速度;%1、%2为加速度因子,取值为非负常数;r1、r2为0到1之间的随机数;是第i代粒子的位置;初始化时ω的取值ωstart为0.9,迭代结束时ω的取值ω34d为0.01,在迭代过程中惯性权重ω加速衰减,初期优先寻优速度,后期着重寻优精度,惯性权重ω的更新公式如式(Ⅲ)所示:In formula (II), id is the number of the particle in the particle swarm, is the velocity of the i-th generation particle, is the historical best position of the i-th generation particle before the i-th generation, is the position of the optimal particle in the i-th generation particle swarm; ω(i) is the inertia weight of the i-th generation particle, and its size determines how much the speed inherits the motion speed of the previous generation particle; % 1 and % 2 are the acceleration factors , the value is a non-negative constant; r 1 and r 2 are random numbers between 0 and 1; is the position of the i-th generation particle; the value ω start of ω is 0.9 at the time of initialization, and the value ω 34d of ω at the end of the iteration is 0.01. During the iteration process, the inertia weight ω accelerates and decays. Excellent precision, the update formula of inertia weight ω is shown in formula (Ⅲ):
式(Ⅲ)中,maxg;n为最大迭代次数;In formula (Ⅲ), maxg; n is the maximum number of iterations;
本发明加入了非线性递减惯性权重ω(i),惯性权重ω(i)决定速度在多大程度上继承上一代的运动速度,在迭代过程中ω(i)越大寻优速度越快,但精度越低;反之则精度越高,速度越低。为达到速度与精度的平衡,惯性权重ω(i)在迭代初期较大,随着迭代进行惯性权重逐步减小。The present invention adds a non-linear decreasing inertia weight ω(i), and the inertia weight ω(i) determines how much the speed inherits the motion speed of the previous generation. In the iterative process, the greater the ω(i), the faster the optimization speed, but The lower the precision; otherwise, the higher the precision, the lower the speed. In order to achieve a balance between speed and accuracy, the inertia weight ω(i) is relatively large at the beginning of the iteration, and gradually decreases as the iteration progresses.
得到更新后的粒子的速度后,更新该粒子的位置,粒子的位置的更新公式如式(Ⅳ)所示:Get the updated particle velocity After that, update the particle's position, the particle's position The update formula of is shown in formula (Ⅳ):
若式(Ⅳ)求取的对应的目标函数小于对应的适应度函数,则反之,同时,更新种群中最优粒子的位置,得到 If formula (Ⅳ) obtained The corresponding objective function is less than The corresponding fitness function, then on the contrary, At the same time, the position of the optimal particle in the population is updated to obtain
如此,进行多次迭代即得到近似最优解,即使PD神经网络模型控制误差最小的近似最优权值。In this way, an approximate optimal solution can be obtained by performing multiple iterations, that is, an approximate optimal weight value with the smallest control error of the PD neural network model.
加入遗传算法中的自适应变异的思想,即粒子位置更新之后,有一定概率发生在取值范围内的变异。自适应变异拓展了在迭代中不断缩小的粒子群搜索空间,使其能够在更大的空间展开搜索,使其跳出局部最优,增加得到全局最优的可能性。每个粒子在位置更新后,会生成一个随机数,如果大于0.9则在寻优范围内重新随机初始化该粒子。如果小于等于0.9则什么都不做。Add the idea of adaptive mutation in the genetic algorithm, that is, after the particle position is updated, there is a certain probability that the mutation will occur within the value range. Adaptive mutation expands the particle swarm search space that is continuously shrinking in iterations, enabling it to search in a larger space, making it jump out of the local optimum and increase the possibility of obtaining the global optimum. After the position of each particle is updated, a random number will be generated. If it is greater than 0.9, the particle will be re-initialized randomly within the optimization range. If less than or equal to 0.9 do nothing.
改进的粒子群优化算法在不易陷入局部最优的同时兼顾收敛速度与寻优精度。用其替代传统PSO粒子群算法实现PSO-PD神经网络的自适应学习。改进的粒子群优化算法,学习时间更短,控制精度更高,因此可以更好的满足四足机器人运动轨迹控制的控制需求。The improved particle swarm optimization algorithm takes into account the convergence speed and optimization accuracy while not easily falling into local optimum. It is used to replace the traditional PSO particle swarm algorithm to realize the adaptive learning of PSO-PD neural network. The improved particle swarm optimization algorithm has shorter learning time and higher control precision, so it can better meet the control requirements of quadruped robot motion trajectory control.
根据本发明优选的,所述步骤(1),根据四足机器人运动轨迹,求取四足机器人在该运动轨迹上的目标落点,设定四足机器人的运动轨迹为正弦曲线,沿正弦曲线运动时,机器人的转弯半径,转弯角度都在不断发生变化,因此可用来证明该控制策略是否广泛适用于绝大多数非线性运动轨迹。设置预设步长L的取值范围为0.38-0.42m,当没有外界扰动时,机器人的重心不会发生变化;求取四足机器人在该运动轨迹上的目标落点的公式如式(Ⅴ)所示:Preferably according to the present invention, said step (1), according to the trajectory of the quadruped robot, obtains the target landing point of the quadruped robot on the trajectory, sets the trajectory of the quadruped robot as a sinusoidal curve, and follows the sinusoidal curve. When moving, the turning radius and turning angle of the robot are constantly changing, so it can be used to prove whether the control strategy is widely applicable to most nonlinear motion trajectories. Set the value range of the preset step length L to 0.38-0.42m. When there is no external disturbance, the center of gravity of the robot will not change; ) as shown:
式(Ⅴ)中,x_1、y_1分别为前一步四足机器人重心的横坐标与纵坐标,x、y分别为当前一步四足机器人重心的横坐标与纵坐标;In formula (Ⅴ), x_1 and y_1 are respectively the abscissa and ordinate of the center of gravity of the quadruped robot in the previous step, and x and y are respectively the abscissa and ordinate of the center of gravity of the quadruped robot in the current step;
x_1、y_1的初始值均为0,求取x、y后,再赋值给x_1、y_1,反复迭代二百次后,得到四足机器人在该运动轨迹上的目标落点。The initial values of x_1 and y_1 are both 0. After calculating x and y, they are assigned to x_1 and y_1. After repeated iterations for 200 times, the target landing point of the quadruped robot on the trajectory is obtained.
进一步优选的,L的取值为0.4m。Further preferably, the value of L is 0.4m.
根据本发明优选的,在第三隐含层求得指导位移距离dr、指导躯干朝向dθ,包括:Preferably according to the present invention, the guidance displacement distance dr and guidance trunk orientation dθ are obtained in the third hidden layer, including:
通过式(Ⅵ)求取指导位移距离dr,式(Ⅵ)如下所示:Calculate the guiding displacement distance dr through formula (Ⅵ), and the formula (Ⅵ) is as follows:
式(Ⅵ)中,dΔx,dΔy为第二隐含层所求得的指导x增量与指导y增量,即x方向与y方向上的指导位移;In formula (VI), dΔx and dΔy are the guidance x increment and guidance y increment obtained by the second hidden layer, that is, the guidance displacement in the x direction and the y direction;
通过式(Ⅶ)求取指导躯干朝向dθ,式(Ⅶ)如下所示:Calculate the guiding trunk orientation dθ through formula (VII), and the formula (VII) is as follows:
根据本发明优选的,实现对四足机器人的足端轨迹控制,四足机器人包括躯干以及与所述躯干连接的四条腿,在四足机器人的一个迈步周期中,在同一对角线上的两条腿以相同运动方式摆动,支撑躯干并推动躯干前进的两条腿称为支撑相,而按照事先设定轨迹进行摆动的另一对角线上的两条腿称为摆动相,包括步骤如下:Preferably, according to the present invention, the foot trajectory control of the quadruped robot is realized. The quadruped robot includes a torso and four legs connected with the torso. One leg swings in the same way, the two legs that support the trunk and push the trunk forward are called the support phase, and the two legs on the other diagonal that swing according to the preset trajectory are called the swing phase, including the following steps :
A、通过分析四足机器人腿部结构,构建四足机器人腿部运动数学模型,包括四足机器人足端位置模型:A. By analyzing the leg structure of the quadruped robot, construct the mathematical model of the leg motion of the quadruped robot, including the position model of the foot end of the quadruped robot:
每条腿包括大腿、小腿;四足机器人的一个迈步周期包括一个支撑相、一个摆动相,躯干坐标系中,x轴表示足端在水平方向上的位移,y轴代表足端高度,原点o为腿髋关节在地面上的投影点,躯干坐标系下足端位置模型如式(Ⅷ)所示:Each leg includes a thigh and a lower leg; a step cycle of a quadruped robot includes a support phase and a swing phase. In the torso coordinate system, the x-axis represents the displacement of the foot in the horizontal direction, the y-axis represents the height of the foot, and the origin o is the projection point of the leg-hip joint on the ground, and the position model of the foot in the torso coordinate system is shown in formula (Ⅷ):
式(Ⅷ)中,px(θ1,θ2)为足端水平位移与θ1、θ2的函数,pz(θ1,θ2)为足端高度与θ1、θ2的函数,L1为机器人大腿的长度,L2为机器人小腿的长度,θ1为机器人髋关节纵向开合角度,取值范围为0°-180°;θ2为膝关节开合角度,取值范围为0°-180°;H为机器人躯干底端到地面的距离;In formula (Ⅷ), p x (θ 1 , θ 2 ) is the function of the horizontal displacement of the foot end and θ 1 , θ 2 , and p z (θ 1 , θ 2 ) is the function of the foot end height and θ 1 , θ 2 , L 1 is the length of the thigh of the robot, L 2 is the length of the lower leg of the robot, θ 1 is the longitudinal opening and closing angle of the robot hip joint, the value range is 0°-180°; θ 2 is the knee joint opening and closing angle, the value range is 0°-180°; H is the distance from the bottom of the robot torso to the ground;
B、采用一种新型正弦对角步态,求取支撑相足端在躯干坐标系下的运动轨迹、摆动相足端在躯干坐标系下的运动轨迹,所述新型正弦对角步态是指:四足机器人的四条腿以对角分为两组,前左腿和右后腿为一组,前右腿和后左腿为一组,两组交替作为支撑相与摆动相;支撑相推动躯干前行,摆动相向前迈步跨越障碍,这些过程均可通过足端轨迹进行解释。尤其是摆动相足端轨迹,直接决定了摆动相以何种方式进行迈步。因此,足端轨迹的选择对机器人运动控制有着十分重要的意义。B, adopt a kind of novel sinusoidal diagonal gait, obtain the motion trajectory of the support phase foot end under the trunk coordinate system, the motion trajectory of the swing phase foot end under the trunk coordinate system, and the new sinusoidal diagonal gait refers to : The four legs of the quadruped robot are divided into two groups diagonally, the front left leg and the right rear leg form a group, the front right leg and the rear left leg form a group, and the two groups alternately serve as the support phase and the swing phase; the support phase pushes The forward movement of the trunk and the swing phase forward step over obstacles can all be explained by foot trajectories. In particular, the trajectory of the foot end of the swing phase directly determines how the swing phase is carried out. Therefore, the choice of foot trajectory is very important for robot motion control.
支撑相足端在躯干坐标系下的运动轨迹如式(Ⅸ)所示:The trajectory of the foot end of the supporting phase in the torso coordinate system is shown in formula (IX):
式(Ⅸ)中,p1x(t)为支撑相足端水平位移关于时间t的函数,p1z(t)支撑相足端高度关于时间t的函数,S为当前迈步周期步长,S_1为上一迈步周期实际步长,t为迈步周期内的时刻,T为迈步周期;In formula (IX), p1 x (t) is the function of the horizontal displacement of the foot end of the support phase with respect to time t, p1 z (t) is the function of the height of the foot end of the support phase with respect to time t, S is the step length of the current step cycle, and S_1 is The actual step length of the previous step cycle, t is the moment in the step cycle, and T is the step cycle;
支撑相支撑躯干并推动其前行,因此,为使机器人平稳运行,支撑相足端在躯干坐标系下运动应尽量保持匀速,且在z轴方向上保持不变。在x0y平面上,支撑相足端进行匀速运动运动距离为d=0.5*(S+S_1)。The support phase supports the torso and pushes it forward. Therefore, in order to make the robot run smoothly, the movement of the foot of the support phase in the coordinate system of the torso should be kept as uniform as possible and kept constant in the z-axis direction. On the x0y plane, the uniform motion distance of the foot end of the strut phase is d=0.5*(S+S_1).
摆动相足端在躯干坐标系下的运动轨迹如式(Ⅹ)所示:The movement trajectory of the foot end of the swing phase in the torso coordinate system is shown in formula (Ⅹ):
式(Ⅹ)中,p2x(t)为摆动相足端水平位移关于时间t的函数,p2z(t)摆动相足端高度关于时间t的函数,h为步高,为摆动相上升过程中达到的最高点;In formula (Ⅹ), p2 x (t) is the function of the horizontal displacement of the foot end of the swing phase with respect to time t, p2 z (t) is the function of the height of the foot end of the swing phase with respect to time t, h is the step height, and is the rising process of the swing phase the highest point reached in
C、控制率的求解C. Solution of control rate
设定步长的取值范围是0.38m~0.42m,精度为1mm,则摆动相足端在躯干坐标系下的运动轨迹有41*41=1681种可能性;The value range of the set step length is 0.38m ~ 0.42m, and the precision is 1mm, then there are 41*41=1681 possibilities for the movement trajectory of the foot end of the swing phase in the torso coordinate system;
将1681种可能性对应的S_1、S带入公式(Ⅹ),求得摆动相足端不同时刻的位置p2x(t)、p2z(t);Put S_1 and S corresponding to 1681 possibilities into the formula (Ⅹ) to obtain the position p2 x (t) and p2 z (t) of the foot end of the swing phase at different times;
将求得摆动相足端不同时刻的位置p2x(t)、p2z(t)代入公式(Ⅷ)中的px(θ1,θ2)、pz(θ1,θ2),得到一非线性方程组,通过MATLAB求解该非线性方程组,并依据关节约束条件筛选得到符合关节约束条件的髋关节纵向开合角度与膝关节开合角度,作为控制摆动相运动的控制率;Substituting the obtained positions p2 x (t) and p2 z (t) of the foot end of the swing phase at different times into p x (θ 1 ,θ 2 ) and p z (θ 1 ,θ 2 ) in formula (Ⅷ), we get A nonlinear equation system, solve the nonlinear equation system by MATLAB, and obtain the longitudinal opening and closing angle of the hip joint and the opening and closing angle of the knee joint that meet the joint constraint conditions according to the joint constraint conditions, as the control rate for controlling the swing phase motion;
将1681种可能性对应的S_1、S带入公式(Ⅹ),求得支撑相足端不同时刻的位置p1x(t)、p1z(t);Put S_1 and S corresponding to the 1681 possibilities into the formula (Ⅹ) to obtain the positions p1 x (t) and p1 z (t) of the foot end of the supporting phase at different moments;
将求得的支撑相足端不同时刻的位置p1x(t)、p1z(t)代入公式(Ⅷ)中的px(θ1,θ2)、pz(θ1,θ2),得到一非线性方程组,通过MATLAB求解该非线性方程组,并依据关节约束条件筛选得到符合关节约束条件的髋关节纵向开合角度与膝关节开合角度,作为控制支撑相运动的控制率;Substituting the obtained positions p1 x (t) and p1 z (t) of the foot end of the supporting phase at different times into p x (θ 1 ,θ 2 ) and p z (θ 1 ,θ 2 ) in formula (Ⅷ), Obtain a nonlinear equation system, solve the nonlinear equation system by MATLAB, and obtain the longitudinal opening and closing angle of the hip joint and the opening and closing angle of the knee joint that meet the joint constraint conditions according to the joint constraint conditions, as the control rate for controlling the movement of the support phase;
D、根据求取的摆动相运动的控制率、支撑相运动的控制率,建立数据库D. Establish a database according to the calculated control rate of the swing phase motion and the control rate of the support phase motion
数据库采用二维地址指针,第一维为S_1,第二维为S,每个地址存有2个2*200的控制矩阵,分别为支撑相关节控制率与摆动相关节控制率;The database adopts two-dimensional address pointers, the first dimension is S_1, the second dimension is S, and each address stores two 2*200 control matrices, which are respectively support-related joint control rate and swing-related joint control rate;
E、通过快速查表法,实现对四足机器人的足端轨迹控制E. Realize the foot trajectory control of the quadruped robot through the fast look-up table method
a、求取S与S_1;a. Calculate S and S_1;
b、根据S_1与S,进行快速查表,从数据库中得到存有支撑相关节控制率的支撑相控制矩阵与存有摆动相关节控制率的摆动相控制矩阵;b. According to S_1 and S, perform a quick table lookup, and obtain the support phase control matrix with the support phase joint control rate and the swing phase control matrix with the swing phase joint control rate from the database;
c、将支撑相控制矩阵传递给支撑相,将摆动相控制矩阵传递给摆动相,依照相应的控制率运动。c. Transfer the control matrix of the support phase to the support phase, and transfer the control matrix of the swing phase to the swing phase, and move according to the corresponding control rate.
根据本发明优选的,实现对四足机器人的转向控制,包括步骤如下:Preferably according to the present invention, realize the steering control to quadruped robot, comprise steps as follows:
F、获取四足机器人前一迈步周期结束时刻的躯干朝向yθ_1、理想情况下迈步周期结束时躯干的朝向θ;F. Obtain the torso orientation y θ _1 at the end of the previous step cycle of the quadruped robot, ideally the orientation θ of the torso at the end of the step cycle;
G、通过式(Ⅺ)求得躯干的转向角度Δθ,式(Ⅺ)如下所示:G. Obtain the steering angle Δθ of the trunk through the formula (Ⅺ), and the formula (Ⅺ) is as follows:
yθ=yθ_1+Δθ(Ⅺ)y θ =y θ _1+Δθ(Ⅺ)
H、在机器人运动过程中,躯干的转向是由支撑相在躯干坐标系下向相反的方向转动相同的角度而实现的。因此,在已知目标转向角度的前提下,就可得到支撑相髋关节横向开合角的控制率,通过式(Ⅻ)求得支撑相髋关节横向开合角的控制率θ14:H. During the movement of the robot, the turning of the torso is realized by the support phase turning in the opposite direction by the same angle in the torso coordinate system. Therefore, on the premise that the target steering angle is known, the control rate of the lateral opening and closing angle of the hip joint in the support phase can be obtained, and the control rate θ1 4 of the lateral opening and closing angle of the hip joint in the support phase can be obtained by formula (Ⅻ):
I、摆动相的胯关节横向开合角要回正,准备状态时,y_θ_1=y_θ_2=0,对式(XIII)进行迭代运算求得摆动相的回正角度为Δθ_1,大小为当前躯干朝向y_θ_1与前一周期初始时刻躯干朝向y_θ_2的差:I. The lateral opening and closing angles of the hip joints in the swing phase should be corrected. In the ready state, y_θ_1=y_θ_2=0. Iteratively calculate the formula (XIII) to get the corrected angle of the swing phase to be Δθ_1, which is the current trunk orientation y_θ_1 The difference from the torso orientation y_θ_2 at the initial moment of the previous cycle:
Δθ_1=yθ_1-yθ_2(XIII)Δθ_1=y θ _1-y θ _2 (XIII)
J、通过式(XIV)求得摆动相髋关节横向开合角的控制率θ24:J. Obtain the control rate θ2 4 of the lateral opening and closing angle of the hip joint in the swing phase by formula (XIV):
K、通过控制率分配,将信号传递给相应的腿组,令其依照控制率变化,实现四足机器人的转向控制。K. Through the control rate distribution, the signal is transmitted to the corresponding leg group, so that it changes according to the control rate, and the steering control of the quadruped robot is realized.
相较于足端轨迹控制,转向控制较为简单,控制率可直接通过方程求得,仅需将控制率分配给相应的腿组即可精确地实现转向控制与摆动相的回正控制。Compared with the foot track control, the steering control is relatively simple, and the control rate can be obtained directly through the equation, and the steering control and swing phase return control can be accurately realized only by assigning the control rate to the corresponding leg group.
根据本发明优选的,当四足机器人发生扰动时,调整四足机器人姿态,保证四足机器人运行稳定,包括步骤如下:Preferably according to the present invention, when the quadruped robot is disturbed, the posture of the quadruped robot is adjusted to ensure the stable operation of the quadruped robot, including the following steps:
当机器人在复杂地面运动时,在迈步结束时,摆动相足端与地面可能会随机发生相对滑动。这会影响机器人运动的稳定性。在迈步周期结束后T/10内,足端轨迹控制单元与转向控制单元协同工作调整机器人姿态,假设随机发生的扰动大小为(Δpx,Δpy),(Δpx,Δpy)是指相较于目标落点的偏差量,包括:When the robot is moving on a complex ground, at the end of the step, the foot end of the swing phase and the ground may randomly slide relative to each other. This affects the stability of the robot's motion. Within T/10 after the end of the step cycle, the foot trajectory control unit and the steering control unit work together to adjust the robot posture. Assume that the size of the random disturbance is (Δp x , Δp y ), (Δp x , Δp y ) refers to the phase The deviation from the target landing point, including:
作为摆动相的腿贴着地面向前挪动,在调整姿态的同时,把能耗降到最低,步长为Δr,通过式(XV)求取:As the swing phase, the legs move forward close to the ground. While adjusting the posture, the energy consumption is minimized. The step size is Δr, which is calculated by formula (XV):
与此同时,支撑相将机器人躯干向前推进同时髋关节横向开合角改变Δθ2,通过式(XVI)求取:At the same time, the support phase propels the robot torso forward At the same time, the lateral opening and closing angle of the hip joint changes by Δθ 2 , which can be obtained by formula (XVI):
经过上述调整,虽然机器人躯干的朝向与重心位置都可能发生变化。但左右腿髋关节连线得以保持在支撑相足端落点与摆动相足端落点的正中间,且同一腿组内的腿姿态相同。这样可使运动过程拥有极高的稳定性。After the above adjustments, although the orientation of the robot torso and the position of the center of gravity may change. However, the connection line between the hip joints of the left and right legs can be kept in the middle of the landing point of the foot end of the support phase and the landing point of the foot end of the swing phase, and the posture of the legs in the same leg group is the same. This results in a very high degree of stability during the movement.
根据本发明优选的,求取四足机器人的躯干朝向yθ、躯干重心位置(yx,yy),求取公式如式(XVII)所示:Preferably, according to the present invention, the torso orientation y θ of the quadruped robot and the position of the center of gravity (y x , y y ) of the torso are calculated, and the calculation formula is shown in formula (XVII):
式(XVII)中,Uθ是指实际躯干转向角度,Ur是指实际四足机器人重心位移距离。In formula (XVII), U θ refers to the actual torso steering angle, and U r refers to the displacement distance of the actual center of gravity of the quadruped robot.
本发明的有益效果为:The beneficial effects of the present invention are:
1、本发明采用PD神经网络进行机器人运动轨迹控制。相较于传统控制方法,PSO-PD神经网络具有更好的非线性解耦控制能力,控制精确,稳定性强,并且具有较好的抗干扰能力。1. The present invention uses the PD neural network to control the trajectory of the robot. Compared with the traditional control method, the PSO-PD neural network has better nonlinear decoupling control ability, precise control, strong stability, and better anti-interference ability.
2、本发明利用改进PSO粒子群优化算法替代传统BP学习算法,由于本发明提出的面向四足机器人运动轨迹控制的PD神经网络中存在状态反馈与不连续可导的作用函数,因此BP学习算法不能实现神经网络的自适应学习,因此采用改进PSO粒子群优化算法作为神经网络的自适应学习算法。该算法收敛速度快,精度高,且不易陷入局部最优,能够较好的实现该PD神经网络的自适应学习,综上所述,本发明提出的基于改进PSO-PD神经网络的四足机器人运动轨迹控制方法高速、精确、稳定。2. The present invention utilizes the improved PSO particle swarm optimization algorithm to replace the traditional BP learning algorithm. Because there are state feedback and discontinuous derivable action functions in the PD neural network facing the quadruped robot motion trajectory control proposed by the present invention, the BP learning algorithm The adaptive learning of the neural network cannot be realized, so the improved PSO particle swarm optimization algorithm is adopted as the adaptive learning algorithm of the neural network. The algorithm has fast convergence speed, high precision, and is not easy to fall into a local optimum, and can better realize the adaptive learning of the PD neural network. In summary, the quadruped robot based on the improved PSO-PD neural network proposed by the present invention The motion trajectory control method is high-speed, precise and stable.
附图说明Description of drawings
图1为四足机器人的运动轨迹以及目标落点示意图;Fig. 1 is a schematic diagram of the trajectory of the quadruped robot and the target landing point;
图2是四足机器人的躯干与腿部结构示意图;Fig. 2 is a schematic diagram of the trunk and leg structure of the quadruped robot;
图3是摆动相足端轨迹示意图;Fig. 3 is a schematic diagram of the trajectory of the foot end of the swing phase;
图4是足端轨迹控制的流程示意框图;Fig. 4 is a schematic block diagram of the process of foot track control;
图5是转向控制的流程示意框图;Fig. 5 is a flow schematic block diagram of steering control;
图6是PD神经网络的网络结构示意图;Fig. 6 is a schematic diagram of the network structure of the PD neural network;
图7是PD神经网络的控制效果图;Fig. 7 is a control effect diagram of the PD neural network;
图8是存在随机扰动时的控制效果图。Figure 8 is a diagram of the control effect when there is random disturbance.
具体实施方式detailed description
下面结合说明书附图和实施例对本发明作进一步限定,但不限于此。The present invention will be further limited below in conjunction with the accompanying drawings and embodiments, but not limited thereto.
实施例Example
一种基于PSO-PD神经网络的四足机器人运动轨迹控制方法,包括:A method for controlling motion trajectory of a quadruped robot based on PSO-PD neural network, comprising:
(1)根据四足机器人运动轨迹与预设步长,求取四足机器人重心在该运动轨迹上的目标落点,即四足机器人重心在该运动轨迹上的坐标;是相对于实际结果而言的。(1) According to the trajectory of the quadruped robot and the preset step size, the target landing point of the center of gravity of the quadruped robot on the trajectory is obtained, that is, the coordinates of the center of gravity of the quadruped robot on the trajectory; it is relative to the actual result spoken.
(2)将步骤(1)求取的四足机器人重心在该运动轨迹上的目标落点、实时反馈的躯干重心位置(yx,yy)输入PD神经网络模型的输入层;线性变换后进入PD神经网络模型的第一隐含层,在第一隐含层进行比例运算与微分运算;再次线性变换后进入PD神经网络模型的第二隐含层,在第二隐含层得到x方向与y方向上的指导位移,所处坐标系为四足机器人运动所在的水平平面的坐标系,原点为四足机器人初始重心位置;进入PD神经网络模型的第三隐含层,在第三隐含层求得指导位移距离dr、指导转向角度dθ,指导位移距离dr是指四足机器人从当前这一步到下一步迈出的距离,指导转向角度是指四足机器人从当前这一步到下一步的躯干转向角度;进入PD神经网络模型的第五层,第五层分别为足端轨迹控制单元与转向控制单元。足端轨迹控制单元接收指导距离与上一周期的实际位移距离,实现四足机器人的足端轨迹控制;转向控制单元接收指导躯干朝向与当前躯干朝向,实现四足机器人的转向控制,在第五层实现对四足机器人的足端轨迹控制、转向控制;进入PD神经网络模型的第六层,当四足机器人足端发生滑动时,调整四足机器人姿态,保证四足机器人运行稳定;但该过程会使机器人重心发生变化,可视为随机时刻发生的大小随机的扰动,此外还有诸多其他原因造成的扰动,在第六层加入扰动进行模拟并将加入扰动后的步长作为实际步长反馈给第五层;进入PD神经网络模型的第七层,求取四足机器人的躯干朝向yθ、躯干重心位置(yx,yy),躯干朝向yθ是指当前迈步结束后,躯干的实际朝向,即躯干与X轴的夹角;躯干重心位置(yx,yy)是指四足机器人重心在所述坐标系中的坐标;四足机器人的躯干朝向yθ反馈给PD神经网络模型的第五层,躯干重心位置(yx,yy)反馈给PD神经网络模型的输入层。该PD神经网络模型的结构如图6所示;(2) Input the target landing point of the quadruped robot's center of gravity on the motion trajectory obtained in step (1) and the real-time feedback position of the center of gravity (y x , y y ) of the torso into the input layer of the PD neural network model; after linear transformation Enter the first hidden layer of the PD neural network model, perform proportional operation and differential operation in the first hidden layer; enter the second hidden layer of the PD neural network model after linear transformation again, and obtain the x direction in the second hidden layer The coordinate system is the coordinate system of the horizontal plane where the quadruped robot moves, and the origin is the initial center of gravity of the quadruped robot; enter the third hidden layer of the PD neural network model, in the third hidden layer The guidance displacement distance dr and the guidance steering angle dθ are calculated in the containing layer. The guidance displacement distance dr refers to the distance that the quadruped robot takes from the current step to the next step, and the guidance steering angle refers to the distance from the current step to the next step of the quadruped robot. The steering angle of the torso; enter the fifth layer of the PD neural network model, the fifth layer is the foot track control unit and the steering control unit. The foot trajectory control unit receives the guidance distance and the actual displacement distance of the previous cycle to realize the foot trajectory control of the quadruped robot; the steering control unit receives the guidance trunk orientation and the current trunk orientation to realize the steering control of the quadruped robot. layer to realize the trajectory control and steering control of the quadruped robot; enter the sixth layer of the PD neural network model, when the foot of the quadruped robot slides, adjust the posture of the quadruped robot to ensure the stability of the quadruped robot; but the The process will change the center of gravity of the robot, which can be regarded as random disturbances of random size at random times. In addition, there are disturbances caused by many other reasons. The disturbance is added to the sixth layer for simulation and the step after adding the disturbance is used as the actual step. Feedback to the fifth layer; enter the seventh layer of the PD neural network model, and obtain the trunk orientation y θ of the quadruped robot and the position of the trunk center of gravity (y x , y y ) . The actual orientation of , that is, the angle between the torso and the X axis; the position of the center of gravity of the torso (y x , y y ) refers to the coordinates of the center of gravity of the quadruped robot in the coordinate system; the orientation of the torso of the quadruped robot y θ is fed back to the PD nerve In the fifth layer of the network model, the position of the center of gravity of the trunk (y x , y y ) is fed back to the input layer of the PD neural network model. The structure of the PD neural network model is shown in Figure 6;
采用改进的粒子群优化算法调整PD神经网络模型中多层神经元之间的连接权值,实现面向机器人运动轨迹控制的PD神经网络的自适应学习,包括:The improved particle swarm optimization algorithm is used to adjust the connection weights between multi-layer neurons in the PD neural network model to realize the adaptive learning of the PD neural network for robot trajectory control, including:
a、将多层神经元之间的连接权值的选取问题转化为最优化问题,最优化问题的目标函数即输出向量与导师信号向量的L2范数,如式(Ⅰ)所示,导师信号即目标落点坐标,输出向量即四足机器人实际重心位置;a. Transform the selection of connection weights between multi-layer neurons into an optimization problem. The objective function of the optimization problem is the L2 norm of the output vector and the tutor signal vector. As shown in formula (I), the tutor signal That is, the coordinates of the target landing point, and the output vector is the actual center of gravity position of the quadruped robot;
式(Ⅰ)中,Error为最优化问题的目标函数,xd(k)、yd(k)分别为四足机器人第k步的重心目标落点的横坐标、纵坐标,yx(k)、yy(k)为四足机器人第k步的重心目标落点的实际横坐标、纵坐标;In formula (I), Error is the objective function of the optimization problem, xd(k) and yd(k) are respectively the abscissa and ordinate of the center-of-gravity target landing point of the quadruped robot at step k, and y x (k), y y (k) is the actual abscissa and ordinate of the center of gravity target landing point of the kth step of the quadruped robot;
b、利用先前经验确定每个连接权值的取值范围,即确定寻优范围;b. Use previous experience to determine the value range of each connection weight, that is, to determine the optimization range;
c、在寻优范围内随机初始化一群粒子,即粒子群,包括初始化粒子的初始位置与初始速度,用位置、速度和适应度这三个指标表示粒子特征,位置表示PD神经网络模型中所有的连接权值取值,速度表示每个粒子演化的方向,适应度值由适应度函数求得,即每个粒子对应的目标函数;而每个粒子都代表上述最优化问题的一个潜在最优解;c. Randomly initialize a group of particles in the optimization range, that is, particle swarm, including the initial position and initial velocity of the initialized particles. The three indicators of position, speed and fitness are used to represent the particle characteristics, and the position represents all the parameters in the PD neural network model. The connection weight value, the speed represents the evolution direction of each particle, and the fitness value is obtained from the fitness function, that is, the objective function corresponding to each particle; and each particle represents a potential optimal solution of the above optimization problem ;
粒子的速度依据粒子的当前位置、当前速度、粒子的历史最佳位置Pbest与粒子群中最优粒子的位置Gbest更新,粒子的速度的更新公式如式(Ⅱ)所示:The speed of the particle is updated according to the current position of the particle, the current speed, the historical best position Pbest of the particle and the position Gbest of the optimal particle in the particle swarm, and the speed of the particle The update formula of is shown in formula (II):
式(Ⅱ)中,id为粒子群中粒子的编号,为第i代粒子的速度,为第i代粒子在第i代之前的历史最佳位置,为第i代粒子群中最优粒子的位置;ω(i)为第i代粒子的惯性权重,其大小决定速度在多大程度上继承上一代粒子的运动速度;%1、%2为加速度因子,取值为非负常数;r1、r2为0到1之间的随机数;是第i代粒子的位置;初始化时ω的取值ωstart为0.9,迭代结束时ω的取值ω34d为0.01,在迭代过程中惯性权重ω加速衰减,初期优先寻优速度,后期着重寻优精度,惯性权重ω的更新公式如式(Ⅲ)所示:In formula (II), id is the number of the particle in the particle swarm, is the velocity of the i-th generation particle, is the historical best position of the i-th generation particle before the i-th generation, is the position of the optimal particle in the i-th generation particle swarm; ω(i) is the inertia weight of the i-th generation particle, and its size determines how much the speed inherits the motion speed of the previous generation particle; % 1 and % 2 are the acceleration factors , the value is a non-negative constant; r 1 and r 2 are random numbers between 0 and 1; is the position of the i-th generation particle; the value ω start of ω is 0.9 at the time of initialization, and the value ω 34d of ω at the end of the iteration is 0.01. During the iteration process, the inertia weight ω accelerates and decays. Excellent precision, the update formula of inertia weight ω is shown in formula (Ⅲ):
式(Ⅲ)中,maxg;n为最大迭代次数;In formula (Ⅲ), maxg; n is the maximum number of iterations;
本发明加入了非线性递减惯性权重ω(i),惯性权重ω(i)决定速度在多大程度上继承上一代的运动速度,在迭代过程中ω(i)越大寻优速度越快,但精度越低;反之则精度越高,速度越低。为达到速度与精度的平衡,惯性权重ω(i)在迭代初期较大,随着迭代进行惯性权重逐步减小。The present invention adds a non-linear decreasing inertia weight ω(i), and the inertia weight ω(i) determines how much the speed inherits the motion speed of the previous generation. In the iterative process, the greater the ω(i), the faster the optimization speed, but The lower the precision; otherwise, the higher the precision, the lower the speed. In order to achieve a balance between speed and accuracy, the inertia weight ω(i) is relatively large at the beginning of the iteration, and gradually decreases as the iteration progresses.
得到更新后的粒子的速度后,更新该粒子的位置,粒子的位置的更新公式如式(Ⅳ)所示:Get the updated particle velocity After that, update the particle's position, the particle's position The update formula of is shown in formula (Ⅳ):
若式(Ⅳ)求取的对应的目标函数小于对应的适应度函数,则反之,同时,更新种群中最优粒子的位置,得到 If formula (Ⅳ) obtained The corresponding objective function is less than The corresponding fitness function, then on the contrary, At the same time, the position of the optimal particle in the population is updated to obtain
如此,进行多次迭代即得到近似最优解,即使PD神经网络模型控制误差最小的近似最优权值。In this way, an approximate optimal solution can be obtained by performing multiple iterations, that is, an approximate optimal weight value with the smallest control error of the PD neural network model.
加入遗传算法中的自适应变异的思想,即粒子位置更新之后,有一定概率发生在取值范围内的变异。自适应变异拓展了在迭代中不断缩小的粒子群搜索空间,使其能够在更大的空间展开搜索,使其跳出局部最优,增加得到全局最优的可能性。每个粒子在位置更新后,会生成一个随机数,如果大于0.9则在寻优范围内重新随机初始化该粒子。如果小于等于0.9则什么都不做。Add the idea of adaptive mutation in the genetic algorithm, that is, after the particle position is updated, there is a certain probability that the mutation will occur within the value range. Adaptive mutation expands the particle swarm search space that is continuously shrinking in iterations, enabling it to search in a larger space, making it jump out of the local optimum and increase the possibility of obtaining the global optimum. After the position of each particle is updated, a random number will be generated. If it is greater than 0.9, the particle will be re-initialized randomly within the optimization range. If less than or equal to 0.9 do nothing.
改进的粒子群优化算法在不易陷入局部最优的同时兼顾收敛速度与寻优精度。用其替代传统PSO粒子群算法实现PSO-PD神经网络的自适应学习。改进的粒子群优化算法,学习时间更短,控制精度更高,因此可以更好的满足四足机器人运动轨迹控制的控制需求。The improved particle swarm optimization algorithm takes into account the convergence speed and optimization accuracy while not easily falling into local optimum. It is used to replace the traditional PSO particle swarm algorithm to realize the adaptive learning of PSO-PD neural network. The improved particle swarm optimization algorithm has shorter learning time and higher control precision, so it can better meet the control requirements of quadruped robot motion trajectory control.
步骤(1),根据四足机器人运动轨迹,求取四足机器人在该运动轨迹上的目标落点,本实施例中四足机器人的运动轨迹为正弦曲线,沿正弦曲线运动时,机器人的转弯半径,转弯角度都在不断发生变化,因此可用来证明该控制策略是否广泛适用于绝大多数非线性运动轨迹。设置预设步长L为0.4m,当没有外界扰动时,机器人的重心不会发生变化,机器人的前进距离即为步长;求取四足机器人在该运动轨迹上的目标落点的公式如式(Ⅴ)所示:Step (1), according to the trajectory of the quadruped robot, obtain the target landing point of the quadruped robot on the trajectory. In this embodiment, the trajectory of the quadruped robot is a sinusoidal curve. Radius, turning angle are constantly changing, so it can be used to prove whether the control strategy is widely applicable to most nonlinear motion trajectories. Set the preset step length L to 0.4m. When there is no external disturbance, the center of gravity of the robot will not change, and the forward distance of the robot is the step length; the formula for finding the target landing point of the quadruped robot on the trajectory is as follows Shown in formula (Ⅴ):
式(Ⅴ)中,x_1、y_1分别为前一步四足机器人重心的横坐标与纵坐标,x、y分别为当前一步四足机器人重心的横坐标与纵坐标;In formula (Ⅴ), x_1 and y_1 are respectively the abscissa and ordinate of the center of gravity of the quadruped robot in the previous step, and x and y are respectively the abscissa and ordinate of the center of gravity of the quadruped robot in the current step;
x_1、y_1的初始值均为0,求取x、y后,再赋值给x_1、y_1,反复迭代二百次后,构成一个200*2的矩阵,得到四足机器人在该运动轨迹上的目标落点。如图1所示。The initial values of x_1 and y_1 are both 0. After calculating x and y, assign them to x_1 and y_1. After repeated iterations for 200 times, a 200*2 matrix is formed to obtain the target of the quadruped robot on the trajectory. Drop point. As shown in Figure 1.
在第三隐含层求得指导位移距离dr、指导躯干朝向dθ,包括:In the third hidden layer, the guidance displacement distance dr and the guidance trunk orientation dθ are obtained, including:
通过式(Ⅵ)求取指导位移距离dr,式(Ⅵ)如下所示:Calculate the guiding displacement distance dr through formula (Ⅵ), and the formula (Ⅵ) is as follows:
式(Ⅵ)中,dΔx,dΔy为第二隐含层所求得的指导x增量与指导y增量,即x方向与y方向上的指导位移;In formula (VI), dΔx and dΔy are the guidance x increment and guidance y increment obtained by the second hidden layer, that is, the guidance displacement in the x direction and the y direction;
通过式(Ⅶ)求取指导躯干朝向dθ,式(Ⅶ)如下所示:Calculate the guiding trunk orientation dθ through formula (VII), and the formula (VII) is as follows:
实现对四足机器人的足端轨迹控制,四足机器人包括躯干以及与所述躯干连接的四条腿,在四足机器人的一个迈步周期中,在同一对角线上的两条腿以相同运动方式摆动,支撑躯干并推动躯干前进的两条腿称为支撑相,而按照事先设定轨迹进行摆动的另一对角线上的两条腿称为摆动相,包括步骤如下:Realize the foot trajectory control of the quadruped robot. The quadruped robot includes a torso and four legs connected to the torso. In one step cycle of the quadruped robot, the two legs on the same diagonal line move The two legs that swing, support the trunk and push the trunk forward are called the support phase, and the two legs on the other diagonal that swing according to the preset trajectory are called the swing phase, including the following steps:
A、通过分析四足机器人腿部结构,构建四足机器人腿部运动数学模型,包括四足机器人足端位置模型:A. By analyzing the leg structure of the quadruped robot, construct the mathematical model of the leg motion of the quadruped robot, including the position model of the foot end of the quadruped robot:
每条腿包括大腿、小腿;四足机器人的一个迈步周期包括一个支撑相、一个摆动相,躯干坐标系中,x轴表示足端在水平方向上的位移,y轴代表足端高度,原点o为腿髋关节在地面上的投影点,躯干坐标系下足端位置模型如式(Ⅷ)所示:Each leg includes a thigh and a lower leg; a step cycle of a quadruped robot includes a support phase and a swing phase. In the torso coordinate system, the x-axis represents the displacement of the foot in the horizontal direction, the y-axis represents the height of the foot, and the origin o is the projection point of the leg-hip joint on the ground, and the position model of the foot in the torso coordinate system is shown in formula (Ⅷ):
式(Ⅷ)中,px(θ1,θ2)为足端水平位移与θ1、θ2的函数,pz(θ1,θ2)为足端高度与θ1、θ2的函数,四足机器人的躯干与腿部结构示意图如图2所示,L1为机器人大腿的长度,L1=300mm,L2为机器人小腿的长度,L2=300mm,θ1为机器人髋关节纵向开合角度,取值范围为0°-180°;θ2为膝关节开合角度,取值范围为0°-180°;H为机器人躯干底端到地面的距离;In formula (Ⅷ), p x (θ 1 , θ 2 ) is the function of the horizontal displacement of the foot end and θ 1 , θ 2 , and p z (θ 1 , θ 2 ) is the function of the foot end height and θ 1 , θ 2 , the schematic diagram of the trunk and leg structure of the quadruped robot is shown in Figure 2, L 1 is the length of the thigh of the robot, L 1 =300mm, L 2 is the length of the lower leg of the robot, L 2 =300mm, θ 1 is the longitudinal direction of the robot hip joint Opening and closing angle, the value range is 0°-180°; θ 2 is the knee joint opening and closing angle, the value range is 0°-180°; H is the distance from the bottom of the robot torso to the ground;
B、采用一种新型正弦对角步态,求取支撑相足端在躯干坐标系下的运动轨迹、摆动相足端在躯干坐标系下的运动轨迹,所述新型正弦对角步态是指:四足机器人的四条腿以对角分为两组,前左腿和右后腿为一组,前右腿和后左腿为一组,两组交替作为支撑相与摆动相;支撑相推动躯干前行,摆动相向前迈步跨越障碍,这些过程均可通过足端轨迹进行解释。尤其是摆动相足端轨迹,直接决定了摆动相以何种方式进行迈步。因此,足端轨迹的选择对机器人运动控制有着十分重要的意义。B, adopt a kind of novel sinusoidal diagonal gait, obtain the motion trajectory of the support phase foot end under the trunk coordinate system, the motion trajectory of the swing phase foot end under the trunk coordinate system, and the new sinusoidal diagonal gait refers to : The four legs of the quadruped robot are divided into two groups diagonally, the front left leg and the right rear leg form a group, the front right leg and the rear left leg form a group, and the two groups alternately serve as the support phase and the swing phase; the support phase pushes The forward movement of the trunk and the swing phase forward step over obstacles can all be explained by foot trajectories. In particular, the trajectory of the foot end of the swing phase directly determines how the swing phase is carried out. Therefore, the choice of foot trajectory is very important for robot motion control.
支撑相足端在躯干坐标系下的运动轨迹如式(Ⅸ)所示:The trajectory of the foot end of the supporting phase in the torso coordinate system is shown in formula (IX):
式(Ⅸ)中,p1x(t)为支撑相足端水平位移关于时间t的函数,p1z(t)支撑相足端高度关于时间t的函数,S为当前迈步周期步长,S_1为上一迈步周期实际步长,t为迈步周期内的时刻,T为迈步周期;In formula (IX), p1 x (t) is the function of the horizontal displacement of the foot end of the support phase with respect to time t, p1 z (t) is the function of the height of the foot end of the support phase with respect to time t, S is the step length of the current step cycle, and S_1 is The actual step length of the last step cycle, t is the moment in the step cycle, and T is the step cycle;
支撑相支撑躯干并推动其前行,因此,为使机器人平稳运行,支撑相足端在躯干坐标系下运动应尽量保持匀速,且在z轴方向上保持不变。在x0y平面上,支撑相足端进行匀速运动运动距离为d=0.5*(S+S_1)。The support phase supports the torso and pushes it forward. Therefore, in order to make the robot run smoothly, the movement of the foot of the support phase in the coordinate system of the torso should be kept as uniform as possible and kept constant in the z-axis direction. On the x0y plane, the uniform motion distance of the foot end of the strut phase is d=0.5*(S+S_1).
摆动相足端在躯干坐标系下的运动轨迹如式(Ⅹ)所示:The movement trajectory of the foot end of the swing phase in the torso coordinate system is shown in formula (Ⅹ):
式(Ⅹ)中,p2x(t)为摆动相足端水平位移关于时间t的函数,p2z(t)摆动相足端高度关于时间t的函数,h为步高,为摆动相上升过程中达到的最高点;摆动相足端轨迹示意图如图3所示。In formula (Ⅹ), p2 x (t) is the function of the horizontal displacement of the foot end of the swing phase with respect to time t, p2 z (t) is the function of the height of the foot end of the swing phase with respect to time t, h is the step height, and is the rising process of the swing phase The highest point reached in ; the schematic diagram of the foot end trajectory of the swing phase is shown in Figure 3.
C、控制率的求解C. Solution of control rate
设定步长的取值范围是0.38m~0.42m,精度为1mm,则摆动相足端在躯干坐标系下的运动轨迹有41*41=1681种可能性;The value range of the set step length is 0.38m ~ 0.42m, and the precision is 1mm, then there are 41*41=1681 possibilities for the movement trajectory of the foot end of the swing phase in the torso coordinate system;
将1681种可能性对应的S_1、S带入公式(Ⅹ),求得摆动相足端不同时刻的位置p2x(t)、p2z(t);Put S_1 and S corresponding to 1681 possibilities into the formula (Ⅹ) to obtain the position p2 x (t) and p2 z (t) of the foot end of the swing phase at different times;
将求得摆动相足端不同时刻的位置p2x(V)、p2z(t)代入公式(Ⅷ)中的px(θ1,θ2)、pz(θ1,θ2),得到一非线性方程组,通过MATLAB求解该非线性方程组,并依据关节约束条件筛选得到符合关节约束条件的髋关节纵向开合角度与膝关节开合角度,作为控制摆动相运动的控制率;Substituting the obtained positions p2 x (V) and p2 z (t) of the foot end of the swing phase at different times into p x (θ 1 ,θ 2 ) and p z (θ 1 ,θ 2 ) in formula (Ⅷ), we get A nonlinear equation system, solve the nonlinear equation system by MATLAB, and obtain the longitudinal opening and closing angle of the hip joint and the opening and closing angle of the knee joint that meet the joint constraint conditions according to the joint constraint conditions, as the control rate for controlling the swing phase motion;
将1681种可能性对应的S_1、S带入公式(Ⅹ),求得支撑相足端不同时刻的位置p1x(t)、p1z(t);Put S_1 and S corresponding to the 1681 possibilities into the formula (Ⅹ) to obtain the positions p1 x (t) and p1 z (t) of the foot end of the supporting phase at different moments;
将求得的支撑相足端不同时刻的位置p1x(t)、p1z(t)代入公式(Ⅷ)中的px(θ1,θ2)、pz(θ1,θ2),得到一非线性方程组,通过MATLAB求解该非线性方程组,并依据关节约束条件筛选得到符合关节约束条件的髋关节纵向开合角度与膝关节开合角度,作为控制支撑相运动的控制率;Substituting the obtained positions p1 x (t) and p1 z (t) of the foot end of the supporting phase at different times into p x (θ 1 ,θ 2 ) and p z (θ 1 ,θ 2 ) in formula (Ⅷ), Obtain a nonlinear equation system, solve the nonlinear equation system by MATLAB, and obtain the longitudinal opening and closing angle of the hip joint and the opening and closing angle of the knee joint that meet the joint constraint conditions according to the joint constraint conditions, as the control rate for controlling the movement of the support phase;
D、根据求取的摆动相运动的控制率、支撑相运动的控制率,建立数据库D. Establish a database according to the calculated control rate of the swing phase motion and the control rate of the support phase motion
数据库采用二维地址指针,第一维为S_1,第二维为S,每个地址存有2个2*200的控制矩阵,分别为支撑相关节控制率与摆动相关节控制率;The database adopts two-dimensional address pointers, the first dimension is S_1, the second dimension is S, and each address stores two 2*200 control matrices, which are respectively support-related joint control rate and swing-related joint control rate;
E、通过快速查表法,实现对四足机器人的足端轨迹控制,如图4所示:E. Realize the foot track control of the quadruped robot through the fast look-up table method, as shown in Figure 4:
a、求取S与S_1;a. Calculate S and S_1;
b、根据S_1与S,进行快速查表,从数据库中得到存有支撑相关节控制率的支撑相控制矩阵与存有摆动相关节控制率的摆动相控制矩阵;b. According to S_1 and S, perform a quick table lookup, and obtain the support phase control matrix with the support phase joint control rate and the swing phase control matrix with the swing phase joint control rate from the database;
c、将支撑相控制矩阵传递给支撑相,将摆动相控制矩阵传递给摆动相,依照相应的控制率运动。c. Transfer the control matrix of the support phase to the support phase, and transfer the control matrix of the swing phase to the swing phase, and move according to the corresponding control rate.
实现对四足机器人的转向控制,如图5所示,包括步骤如下:Realize the steering control of the quadruped robot, as shown in Figure 5, including the following steps:
F、获取四足机器人前一迈步周期结束时刻的躯干朝向yθ_1、理想情况下迈步周期结束时躯干的朝向θ;F. Obtain the torso orientation y θ _1 at the end of the previous step cycle of the quadruped robot, ideally the orientation θ of the torso at the end of the step cycle;
G、通过式(Ⅺ)求得躯干的转向角度Δθ,式(Ⅺ)如下所示:G. Obtain the steering angle Δθ of the trunk through the formula (Ⅺ), and the formula (Ⅺ) is as follows:
yθ=yθ_1+Δθ(Ⅺ)y θ =y θ _1+Δθ(Ⅺ)
H、在机器人运动过程中,躯干的转向是由支撑相在躯干坐标系下向相反的方向转动相同的角度而实现的。因此,在已知目标转向角度的前提下,就可得到支撑相髋关节横向开合角的控制率,通过式(Ⅻ)求得支撑相髋关节横向开合角的控制率θ14:H. During the movement of the robot, the turning of the torso is realized by the support phase turning in the opposite direction by the same angle in the torso coordinate system. Therefore, on the premise that the target steering angle is known, the control rate of the lateral opening and closing angle of the hip joint in the support phase can be obtained, and the control rate θ1 4 of the lateral opening and closing angle of the hip joint in the support phase can be obtained by formula (Ⅻ):
I、摆动相的胯关节横向开合角要回正,准备状态时,y_θ_1=y_θ_2=0,对式(XIII)进行迭代运算求得摆动相的回正角度为Δθ_1,大小为当前躯干朝向y_θ_1与前一周期初始时刻躯干朝向y_θ_2的差:I. The lateral opening and closing angles of the hip joints in the swing phase should be corrected. In the ready state, y_θ_1=y_θ_2=0. Iteratively calculate the formula (XIII) to get the corrected angle of the swing phase to be Δθ_1, which is the current trunk orientation y_θ_1 The difference from the torso orientation y_θ_2 at the initial moment of the previous cycle:
Δθ_1=yθ_1-yθ_2(XIII)Δθ_1=y θ _1-y θ _2 (XIII)
J、通过式(XIV)求得摆动相髋关节横向开合角的控制率θ24:J. Obtain the control rate θ2 4 of the lateral opening and closing angle of the hip joint in the swing phase by formula (XIV):
K、通过控制率分配,将信号传递给相应的腿组,令其依照控制率变化,实现四足机器人的转向控制。K. Through the control rate distribution, the signal is transmitted to the corresponding leg group, so that it changes according to the control rate, and the steering control of the quadruped robot is realized.
相较于足端轨迹控制,转向控制较为简单,控制率可直接通过方程求得,仅需将控制率分配给相应的腿组即可精确地实现转向控制与摆动相的回正控制。Compared with the foot track control, the steering control is relatively simple, and the control rate can be obtained directly through the equation, and the steering control and swing phase return control can be accurately realized only by assigning the control rate to the corresponding leg group.
当四足机器人发生扰动时,调整四足机器人姿态,保证四足机器人运行稳定,包括步骤如下:When the quadruped robot is disturbed, adjust the posture of the quadruped robot to ensure the stable operation of the quadruped robot, including the following steps:
当机器人在复杂地面运动时,在迈步结束时,摆动相足端与地面可能会随机发生相对滑动。这会影响机器人运动的稳定性。在迈步周期结束后T/10内,足端轨迹控制单元与转向控制单元协同工作调整机器人姿态,假设随机发生的扰动大小为(Δpx,Δpy),(Δpx,Δpy)是指相较于目标落点的偏差量,包括:When the robot is moving on a complex ground, at the end of the step, the foot end of the swing phase and the ground may randomly slide relative to each other. This affects the stability of the robot's motion. Within T/10 after the end of the step cycle, the foot trajectory control unit and the steering control unit work together to adjust the robot posture. Assume that the size of the random disturbance is (Δp x , Δp y ), (Δp x , Δp y ) refers to the phase The deviation from the target landing point, including:
作为摆动相的腿贴着地面向前挪动,在调整姿态的同时,把能耗降到最低,步长为Δr,通过式(XV)求取:As the swing phase, the legs move forward close to the ground. While adjusting the posture, the energy consumption is minimized. The step size is Δr, which is calculated by formula (XV):
与此同时,支撑相将机器人躯干向前推进同时髋关节横向开合角改变Δθ2,通过式(XVI)求取:At the same time, the support phase propels the robot torso forward At the same time, the lateral opening and closing angle of the hip joint changes by Δθ 2 , which can be obtained by formula (XVI):
经过上述调整,虽然机器人躯干的朝向与重心位置都可能发生变化。但左右腿髋关节连线得以保持在支撑相足端落点与摆动相足端落点的正中间,且同一腿组内的腿姿态相同。这样可使运动过程拥有极高的稳定性。After the above adjustments, although the orientation of the robot torso and the position of the center of gravity may change. However, the connection line between the hip joints of the left and right legs can be kept in the middle of the landing point of the foot end of the support phase and the landing point of the foot end of the swing phase, and the posture of the legs in the same leg group is the same. This results in a very high degree of stability during the movement.
求取四足机器人的躯干朝向yθ、躯干重心位置(yx,yy),求取公式如式(XVII)所示:Find the trunk orientation y θ of the quadruped robot and the position of the center of gravity (y x , y y ) of the trunk, and the formula is shown in formula (XVII):
式(XVII)中,Uθ是指实际躯干转向角度,Ur是指实际四足机器人重心位移距离。In formula (XVII), U θ refers to the actual torso steering angle, and U r refers to the displacement distance of the actual center of gravity of the quadruped robot.
PD神经网络在足端不发生偏差且没有其他扰动的情况下(即仿真过程中不加入扰动的情况下)的控制效果图如图7所示,运行程序后200步的累积误差为0.1360m,实际重心落点与目标重心落点基本重合,控制效果快速精准。The control effect diagram of the PD neural network when there is no deviation at the foot end and no other disturbances (that is, when no disturbances are added during the simulation process) is shown in Figure 7. The cumulative error of 200 steps after running the program is 0.1360m, The actual center of gravity drop point basically coincides with the target center of gravity drop point, and the control effect is fast and accurate.
摆动相足端在接触到非结构性地面后会发生大小随机的滑动,由于步长的限定最大步长为0.42m,最小步长为0.38m,因此,在x轴、y轴上的最大滑动距离均为0.04m,对机器人重心在x轴、y轴上的最大扰动均为0.02m,考虑到其他原因引起的扰动,将机器人重心在x轴、y轴上的最大扰动均设为0.08m,且扰动随机发生,发生的概率为10%,以测试系统的抗干扰能力。经过程序验证,200步的累积扰动为1.5544m,而控制系统的累积误差为1.8694m,如图8所示,在扰动发生后,控制系统会立即减小或消除误差。可见基于PSO-PD神经网络的四足机器人控制精准,抗干扰能力强,具有极高的实用价值。The foot end of the swing phase will slide randomly in size after touching the non-structural ground. Since the maximum step length is limited to 0.42m and the minimum step length is 0.38m, the maximum sliding on the x-axis and y-axis The distance is 0.04m, and the maximum disturbance of the robot's center of gravity on the x-axis and y-axis is 0.02m. Considering the disturbance caused by other reasons, the maximum disturbance of the robot's center of gravity on the x-axis and y-axis is set to 0.08m , and the disturbance occurs randomly with a probability of 10%, in order to test the anti-interference ability of the system. After program verification, the cumulative disturbance of 200 steps is 1.5544m, while the cumulative error of the control system is 1.8694m. As shown in Figure 8, the control system will immediately reduce or eliminate the error after the disturbance occurs. It can be seen that the quadruped robot based on the PSO-PD neural network has precise control, strong anti-interference ability, and has extremely high practical value.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710295939.9A CN106886155B (en) | 2017-04-28 | 2017-04-28 | Four-legged robot motion trajectory control method based on PSO-PD neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710295939.9A CN106886155B (en) | 2017-04-28 | 2017-04-28 | Four-legged robot motion trajectory control method based on PSO-PD neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106886155A true CN106886155A (en) | 2017-06-23 |
CN106886155B CN106886155B (en) | 2020-01-14 |
Family
ID=59183086
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710295939.9A Active CN106886155B (en) | 2017-04-28 | 2017-04-28 | Four-legged robot motion trajectory control method based on PSO-PD neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106886155B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107871157A (en) * | 2017-11-08 | 2018-04-03 | 广东工业大学 | Data prediction method, system and related device based on BP and PSO |
CN110262244A (en) * | 2019-07-02 | 2019-09-20 | 武汉科技大学 | A kind of self adaptation straightening method for improving FSRBFD |
CN110275441A (en) * | 2019-07-02 | 2019-09-24 | 武汉科技大学 | A Fast Adaptive Decoupling Control Method for PSORBFD |
CN110426959A (en) * | 2019-08-09 | 2019-11-08 | 太原科技大学 | A crawler robot control system |
CN110543100A (en) * | 2019-09-27 | 2019-12-06 | 广东海洋大学 | A trajectory optimization method for large trusses based on the principle of minimum energy consumption |
CN110597267A (en) * | 2019-09-27 | 2019-12-20 | 长安大学 | A local optimal foothold point selection method for a legged robot |
CN110799308A (en) * | 2017-09-22 | 2020-02-14 | 谷歌有限责任公司 | Determining a control strategy for a robot using noise tolerant structured search |
CN110861084A (en) * | 2019-11-18 | 2020-03-06 | 东南大学 | Four-legged robot falling self-resetting control method based on deep reinforcement learning |
CN111045581A (en) * | 2019-11-22 | 2020-04-21 | 安徽听见科技有限公司 | Page sliding control method, device, equipment and storage medium |
CN112327869A (en) * | 2020-11-19 | 2021-02-05 | 山东大学 | Diagonal gait motion control method of quadruped robot based on joint velocity planning |
CN112904884A (en) * | 2021-01-28 | 2021-06-04 | 歌尔股份有限公司 | Method and device for tracking trajectory of foot type robot and readable storage medium |
CN113427482A (en) * | 2021-03-18 | 2021-09-24 | 长安大学 | Method, system, equipment and storage medium for robot to pass obstacle |
CN114489092A (en) * | 2020-10-26 | 2022-05-13 | 腾讯科技(深圳)有限公司 | Method, device, equipment and medium for controlling motion of foot type robot |
EP4261625A4 (en) * | 2021-01-28 | 2024-05-29 | Tencent Technology (Shenzhen) Company Limited | METHOD AND DEVICE FOR ROBOT MOVEMENT CONTROL AS WELL AS ROBOT AND STORAGE MEDIUM |
CN118143955A (en) * | 2024-05-11 | 2024-06-07 | 南京师范大学 | Foot track planning method for foot robot based on pneumatic artificial muscle driving |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009155030A3 (en) * | 2008-05-28 | 2011-03-03 | Georgia Tech Research Corporation | Systems and methods for providing wireless power to a portable unit |
CN102607552A (en) * | 2012-01-11 | 2012-07-25 | 南京航空航天大学 | Industrial robot space grid precision compensation method based on neural network |
CN103487047A (en) * | 2013-08-06 | 2014-01-01 | 重庆邮电大学 | Improved particle filter-based mobile robot positioning method |
CN105527960A (en) * | 2015-12-18 | 2016-04-27 | 燕山大学 | Mobile robot formation control method based on leader-follow |
CN106334283A (en) * | 2016-10-10 | 2017-01-18 | 南京工程学院 | Fire-fighting and rescue robot system and control method |
-
2017
- 2017-04-28 CN CN201710295939.9A patent/CN106886155B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009155030A3 (en) * | 2008-05-28 | 2011-03-03 | Georgia Tech Research Corporation | Systems and methods for providing wireless power to a portable unit |
CN102607552A (en) * | 2012-01-11 | 2012-07-25 | 南京航空航天大学 | Industrial robot space grid precision compensation method based on neural network |
CN103487047A (en) * | 2013-08-06 | 2014-01-01 | 重庆邮电大学 | Improved particle filter-based mobile robot positioning method |
CN105527960A (en) * | 2015-12-18 | 2016-04-27 | 燕山大学 | Mobile robot formation control method based on leader-follow |
CN106334283A (en) * | 2016-10-10 | 2017-01-18 | 南京工程学院 | Fire-fighting and rescue robot system and control method |
Non-Patent Citations (1)
Title |
---|
朱龙英 等: "《基于粒子群优化神经网络自适应控制算法的并联》", 《组合机床与自动化加工技术》 * |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11697205B2 (en) | 2017-09-22 | 2023-07-11 | Google Llc | Determining control policies for robots with noise-tolerant structured exploration |
CN110799308B (en) * | 2017-09-22 | 2022-09-27 | 谷歌有限责任公司 | Determining a control strategy for a robot using noise tolerant structured search |
CN110799308A (en) * | 2017-09-22 | 2020-02-14 | 谷歌有限责任公司 | Determining a control strategy for a robot using noise tolerant structured search |
CN107871157B (en) * | 2017-11-08 | 2020-06-09 | 广东工业大学 | Data prediction method, system and related device based on BP and PSO |
CN107871157A (en) * | 2017-11-08 | 2018-04-03 | 广东工业大学 | Data prediction method, system and related device based on BP and PSO |
CN110262244A (en) * | 2019-07-02 | 2019-09-20 | 武汉科技大学 | A kind of self adaptation straightening method for improving FSRBFD |
CN110275441A (en) * | 2019-07-02 | 2019-09-24 | 武汉科技大学 | A Fast Adaptive Decoupling Control Method for PSORBFD |
CN110275441B (en) * | 2019-07-02 | 2022-04-12 | 武汉科技大学 | A fast adaptive decoupling control method for PSORBFD |
CN110262244B (en) * | 2019-07-02 | 2022-04-01 | 武汉科技大学 | Self-adaptive decoupling control method for improving FSRBFD |
CN110426959B (en) * | 2019-08-09 | 2022-08-26 | 太原科技大学 | Crawler robot control system |
CN110426959A (en) * | 2019-08-09 | 2019-11-08 | 太原科技大学 | A crawler robot control system |
CN110543100A (en) * | 2019-09-27 | 2019-12-06 | 广东海洋大学 | A trajectory optimization method for large trusses based on the principle of minimum energy consumption |
CN110597267A (en) * | 2019-09-27 | 2019-12-20 | 长安大学 | A local optimal foothold point selection method for a legged robot |
CN110861084A (en) * | 2019-11-18 | 2020-03-06 | 东南大学 | Four-legged robot falling self-resetting control method based on deep reinforcement learning |
CN110861084B (en) * | 2019-11-18 | 2022-04-05 | 东南大学 | A self-reset control method for quadruped robot fall based on deep reinforcement learning |
CN111045581A (en) * | 2019-11-22 | 2020-04-21 | 安徽听见科技有限公司 | Page sliding control method, device, equipment and storage medium |
CN111045581B (en) * | 2019-11-22 | 2022-06-07 | 安徽听见科技有限公司 | Page sliding control method, device, equipment and storage medium |
CN114489092A (en) * | 2020-10-26 | 2022-05-13 | 腾讯科技(深圳)有限公司 | Method, device, equipment and medium for controlling motion of foot type robot |
CN114489092B (en) * | 2020-10-26 | 2023-07-18 | 腾讯科技(深圳)有限公司 | Foot robot motion control method, device, equipment and medium |
CN112327869A (en) * | 2020-11-19 | 2021-02-05 | 山东大学 | Diagonal gait motion control method of quadruped robot based on joint velocity planning |
CN112904884A (en) * | 2021-01-28 | 2021-06-04 | 歌尔股份有限公司 | Method and device for tracking trajectory of foot type robot and readable storage medium |
EP4261625A4 (en) * | 2021-01-28 | 2024-05-29 | Tencent Technology (Shenzhen) Company Limited | METHOD AND DEVICE FOR ROBOT MOVEMENT CONTROL AS WELL AS ROBOT AND STORAGE MEDIUM |
CN113427482A (en) * | 2021-03-18 | 2021-09-24 | 长安大学 | Method, system, equipment and storage medium for robot to pass obstacle |
CN118143955A (en) * | 2024-05-11 | 2024-06-07 | 南京师范大学 | Foot track planning method for foot robot based on pneumatic artificial muscle driving |
CN118143955B (en) * | 2024-05-11 | 2024-08-06 | 南京师范大学 | Foot track planning method for foot robot based on pneumatic artificial muscle driving |
Also Published As
Publication number | Publication date |
---|---|
CN106886155B (en) | 2020-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106886155A (en) | A kind of quadruped robot control method of motion trace based on PSO PD neutral nets | |
CN108549237A (en) | Preview based on depth enhancing study controls humanoid robot gait's planing method | |
CN108572553B (en) | Motion closed-loop control method of quadruped robot | |
CN113821045B (en) | Reinforced learning action generating system of leg-foot robot | |
CN114248855B (en) | A method for gait planning and control of biped robot in spatial domain | |
CN104932264A (en) | Humanoid robot stable control method of RBF-Q learning frame | |
CN113485398B (en) | Gesture control method for wheeled biped robot | |
CN109760761B (en) | Four-footed robot motion control method based on bionics principle and intuition | |
CN105965506A (en) | Humanoid biped robot walking posture control method based on genetic algorithm | |
CN110045598B (en) | Method for tracking and controlling underground advancing path of cantilever type heading machine | |
CN107045552A (en) | A kind of quadruped robot motion control method and control device based on sinusoidal diagonal gait Yu quick look-up table | |
CN110989597A (en) | An Adaptive Path Tracing Method with Integrated Fuzzy Neural Network | |
CN106094817B (en) | Intensified learning humanoid robot gait's planing method based on big data mode | |
Palmer et al. | Intelligent control of an experimental articulated leg for a galloping machine | |
CN111290389A (en) | System and method for controlling foot-falling position of biped robot | |
CN114578836A (en) | Jumping control method for double-wheel foot robot | |
Shao et al. | Recent advances on gait control strategies for hydraulic quadruped robot | |
Lipeng et al. | Research on gait switching control of quadruped robot based on dynamic and static combination | |
CN113568422B (en) | Four-foot robot control method based on model predictive control optimization reinforcement learning | |
Jiang et al. | A Neural Network Controller for Trajectory Control of Industrial Robot Manipulators. | |
Dong et al. | On-line gait adjustment for humanoid robot robust walking based on divergence component of motion | |
Yu et al. | Biped robot gait planning based on 3D linear inverted pendulum model | |
Wang et al. | Normalized neural network for energy efficient bipedal walking using nonlinear inverted pendulum model | |
Ma et al. | Trotting gait control of quadruped robot based on Trajectory Planning | |
CN108333971A (en) | The structure of anthropomorphic robot and the cooperative optimization method of movement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 250353 No. 3501, Daxue Road, Jinan City, Shandong Province Patentee after: Qilu University of Technology (Shandong Academy of Sciences) Country or region after: China Address before: 250353 No. 3501, Daxue Road, Jinan City, Shandong Province Patentee before: Qilu University of Technology Country or region before: China |
|
CP03 | Change of name, title or address |