基于控制系统的机器人运动研究
Research on Robot Motion Based on Control System
DOI: 10.12677/PM.2023.1310300, PDF, HTML, XML, 下载: 145  浏览: 197 
作者: 刘志民:上海出版印刷高等专科学校,基础教学部,上海
关键词: 控制系统移动机器人运动控制Control System Mobile Robot Motion Control
摘要: 本文针对欠驱动自平衡两轮车的运动学和动力学特征,设计了一种解耦分层滑模模态控制方法,根据被控系统的拉格朗日力学模型,把系统的运动和动力学模型分为两个子系统,速度控制子系统和转向控制子系统,针对速度控制子系统,提出了分层滑模控制策略,针对转向控制子系统,设计了有限时间滑模控制策略,所设计的控制系统具有全局稳定性。可以较好地实现运动控制和转向控制。最后,将所提出的控制算法应用于两轮自平衡车,仿真结果表明了良好的收敛性和性能。
Abstract: According to the kinematics and dynamics characteristics of the under-driven self-balancing two-wheeled vehicle, a decoupling layered sliding mode control method is designed. According to the Lagrange mechanics model of the controlled system, the motion and dynamics model of the system is divided into two subsystems, the speed control subsystem and the steering control sub-system. For the speed control subsystem, a layered sliding mode control strategy is proposed. For the steering control subsystem, a finite-time sliding mode control strategy is designed, and the de-signed control system has global stability. Motion control and steering control can be well realized. Finally, the proposed control algorithm is applied to the two-wheel self-balancing vehicle, and the simulation results show good convergence and performance.
文章引用:刘志民. 基于控制系统的机器人运动研究[J]. 理论数学, 2023, 13(10): 2934-2941. https://doi.org/10.12677/PM.2023.1310300

1. 引言

近年来,两轮自平衡机器人已得到广泛应用 [1] 。这种类型的运动体本质上是强耦合、非线性的以及不稳定的系统 [2] [3] 。它一般具有左右两侧的两个车轮,为了完成预定任务,需要施加适当的控制以使机器人保持平衡 [4] 。在干扰影响下,随着前向运动和倾斜角度存在的条件下,欲使机器人保持平衡,必须对机器人进行控制 [5] [6] 。

由于两轮自平衡机器人是内在不稳定的系统,需要对其进行主动控制保持其直立位置 [7] 。为了满足这一要求,其轮子被独立驱动以确保机器人均衡 [8] 。为此,设计了各种线性和非线性控制器。使用的线性控制器主要有基于PID (比例积分微分)、LQR (线性二次调节器)、LQG (线性高斯控制)和极点放置方法及其组合 [9] [10] [11] [12] 。此外,非线性控制器已用于两轮自平衡机器人。常用的非线性控制器包括反推和滑模控制 [13] [14] ,模糊逻辑控制 [15] [16] ,神经网络 [17] ,Lyapunov控制函数 [18] ,非线性最优控制 [19] 和强化学习 [20] 。这些控制器可以确保两轮机器人的跟踪控制与稳定。近年来,滑模控制发展迅速,滑模控制具有控制精度高,鲁棒性强,抗干扰性强等优点,已广泛应用于各种控制系统。本文基于滑模控制理论,针对欠驱动自平衡两轮车的运动学和动力学特征,设计了一种解耦分层滑模模态控制方法,根据被控系统的拉格朗日力学模型,把系统的运动和动力学模型分为两个子系统,速度控制子系统和转向控制子系统,针对速度控制子系统,提出了分层滑模控制策略,针对转向控制子系统,设计了有限时间滑模控制策略。

本文的内容安排如下:第一部分引言介绍了研究对象的应用背景。第二部分建立了被控对象的数学模型,推导出了两轮平衡车的动力学模型。第三部分介绍了控制器的设计策略。第四部分对所建立的模型进行了仿真。第五部分对仿真结果进行了分析和讨论。

2. 控制对象运动数学模型

本文所研究的自平衡车的机械结构由两个轮子由两个步进器驱动的机器人本体电机(SKU955965)。电机由Arduino产生的电信号控制Uno微控制器(PWM信号),由L298H驱动器(H桥电路)产生控制信号,基于惯性测量获得的测量数据单元(MPU 6050 IMU)IMU提供倾角、当前角速度和加速度读数数据。如图1所示。本文采用文 [16] 中所建立的运动学模型。

Figure 1. Schematic diagram of the actual two-wheeled balancing vehicle and its coordinate system

图1. 两轮平衡车实物和坐标系示意图

平衡车的动力学模型可以由公式(1)表示

( x ˙ R M v ˙ R M θ ˙ r ω ˙ p θ ˙ y ω ˙ y ) = ( 0 1 0 0 A 22 A 23 0 0 0 0 0 0 0 0 0 1 0 0 0 A 42 A 43 0 0 0 0 0 0 0 0 0 0 0 1 0 0 A 66 ) ( x R M v R M θ r ω p θ y ω y ) + ( 0 0 B 21 0 0 0 B 41 0 0 0 0 B 62 ) ( U L U R ) + ( 0 f 2 0 f 4 0 f 6 ) (1)

式中, x ˙ R M 为小车沿 x R M 方向的速度, v ˙ R M 为小车沿 x R M 方向的加速度, ω p 为小车倾斜角速度, ω y 为小车转向角速度, A i j ( i = 1 , 2 , , 6 ; j = 1 , 2 , , 6 ) B i j ( i = 1 , 2 ; j = 1 , 2 , , 6 ) 为系统的动力学参数, f i ( i = 2 , 4 , 6 ) 为系统干扰项。各参数由下面表达式给出:

A 22 = 2 p 1 M P R L ( L + R ) / m 2 p 1 J p θ R / m

A 23 = M P 2 L 2 R 2 g / m

A 42 = 2 p 1 / ( J p θ + L M P )

A 43 = L M P / ( J p θ + L M P )

B 21 = p 2 M P R L ( L + R ) / m + 2 p 2 J p θ R / m = B 22

B 41 = p 2 / ( J p θ + L M P ) = B 42

又因为

U L = k m ( U P θ ˙ ) / r m U R = k m ( U y θ ˙ ) / r m

其中 k m 为转矩常数, r m 为电枢电阻。根据本研究对象的参数值,有

( U L U R ) = ( 1 2 1 2 1 2 1 2 ) ( U P U y ) (2)

把(2)式代入(1)式,有

( x ˙ R M v ˙ R M θ ˙ r ω ˙ p θ ˙ y ω ˙ y ) = ( 0 1 0 0 A 22 A 23 0 0 0 0 0 0 0 0 0 1 0 0 0 A 42 A 43 0 0 0 0 0 0 0 0 0 0 0 1 0 0 A 66 ) ( x R M v R M θ r ω p θ y ω y ) + ( 0 0 B 21 0 0 0 B 41 0 0 0 0 B 62 ) ( U P U y ) + ( 0 f 2 0 f 4 0 f 6 ) (3)

在(3)式中,变量 x R M , v R M , θ P , ω P 构成纵向运动控制系统,用于平衡车的速度控制和平衡,变量 θ y , ω y 构成转向控制系统。 U P U y 可以分别看做是纵向运动和转向运动的控制输入。这样,(3)式可以解耦为

( x ˙ R M v ˙ R M θ ˙ r ω ˙ p ) = ( 0 1 0 0 A 22 A 23 0 0 0 0 0 1 0 A 42 A 43 0 ) ( x R M v R M θ r ω p ) + ( 0 B 21 0 B 41 ) U P + ( 0 f 2 0 f 4 ) (4)

( θ ˙ y ω ˙ y ) = ( 0 1 0 A 66 ) ( θ y ω y ) U y + ( 0 f 6 ) (5)

由(4)可以看出,平衡车纵向位移与摆杆倾角构成了四阶非线性系统,其控制问题难度较大。由(5)式可以看出,平衡车转向运动为具有独立输入的双积分系统,其控制问题已经得到较好的解决。

3. 控制器设计策略

滑模控制是一种非线性控制方法,应对系统不确定性和外部干扰非常有效。分层滑模控制策略是在传统滑模控制的基础上发展起来的,分层滑模控制策略主要用来解决多阶耦合欠驱动系统。本文研究对象平衡车的纵向控制系统式(4)就是欠驱动的耦合系统,一个独立输入要控制四个状态变量,这四个状态变量可以分为如下两个系统:

{ x ˙ R M = v R M v ˙ R M = A 22 v R M + B 21 U P + f 2 (6)

{ θ ˙ r = ω p ω ˙ p = A 42 v R M + A 43 θ r + B 41 U P + f 4 (7)

下面来设计分层滑模控制器

x d 表示期望位移, v d 表示期望速度, θ d 表示期望倾角, ω d 表示期望倾角速度,定义跟踪误差如下

{ e x = x R M x d e v = v R M v d e θ = θ r θ d e ω = ω p ω d (8)

针对系统(6)和(7),定义如下滑模面

{ S 1 = c 1 e x + e v S 2 = c 2 e θ + e ω (9)

(9)式中, c 1 c 2 为可调节的系统参数,且均为正数,基于这两个滑模面,定义第二层滑模面:

S = m S 1 + n S 2 (10)

其中, m , n 为控制增益,可控制系统向滑模面的收敛性能。

沿滑模面 S 1 求导,可得

S ˙ 1 = c 1 e ˙ x + e ˙ v = c 1 e ˙ x + ( v ˙ R M v ˙ d ) = c 1 e ˙ x + A 22 v R M + A 23 θ p + B 21 U e q 1 v ˙ d

S ˙ 1 = 0 ,可以得到

u e q 1 = c 1 e ˙ x A 22 v R M A 23 θ p v ˙ d B 21 (11)

同理可得

u e q 2 = c 2 e ˙ θ A 22 v R M A 23 θ p v ˙ d B 41 (12)

U P H = u e q 1 + u e q 2 + u s w

其中 u s w = ( m B 21 u e q 1 + n B 41 u e q 2 + η f a l ( S , ρ , σ ) η s )

f a l ( S , ρ , σ ) = { | S | ρ s i g n ( S ) , | S σ | S / σ ρ 1 , | S < σ | (13)

其中 0 < ρ < 1 , 0 < σ < 1

为验证所设计的控制器的稳定性,利用李雅普诺夫理论,设计李雅普诺夫函数如下

V 1 = 1 2 S 2

V ˙ 1 = S S ˙ = S ( m S ˙ 1 + n S ˙ 2 )

V ˙ 1 = x ˙ e x e + y ˙ e y e = ( ω d y e v + v d ) x e ω d x e y e = k 0 ω d x e s i g n ( ω d ) x e ω d x e y e = k 0 x e 2 ω d s i g n ( ω d ) k 0 y e 2 ω d s i g n ( ω d ) 0

故系统为渐近稳定的。

4. 仿真结果

假设小车的初始倾斜角度为3度,小车由静止状态起步,在所设计的控制器的作用下,小车的运动轨迹通过matlab simulink进行仿真,仿真结果如下:

Figure 2. The curve of the inclination angle of the balancing vehicle changing with time

图2. 平衡车倾斜角随时间变化曲线

Figure 3. Balance car speed change curve with time

图3. 平衡车速度随时间变化曲线

Figure 4. Voltage variation curve with time

图4. 电压随时间变化曲线

5. 结论

图2可以看出,小车的倾斜角度较快的收敛到平衡状态,经过约1.8 s的时间,超调量较小。由图3可以看出,小车的速度由10 m/s减至0 m/s,速度变化较为平稳,收敛时间快,至平衡状态误差小于0.01 cm,精度较高。由图4可以看出,电压变化比较平滑,比较容易控制。仿真结果表明,所设计的控制器具有较好的控制性能。

参考文献

[1] Tayebi, A., Tadjine, M. and Rachid, A. (2001) Invariant Manifold Approach for the Stabilization of Nonholonomic Chained Systems: Application to a Mobile Robot. Nonlinear Dynamics, 24, 167-181.
https://doi.org/10.1023/A:1008318423148
[2] Sankaranarayanan, V. and Mahindrakar, A.D. (2009) Switched Control of a Nonholonomic Mobile Robot. Communications in Nonlinear Science and Numerical Simulation, 14, 2319-2327.
https://doi.org/10.1016/j.cnsns.2008.06.002
[3] Wang, Y., Miao, Z., Zhong, H. and Pan, Q. (2015) Simultaneous Stabilization and Tracking of Nonholonomic Mobile Robots: A Lyapunov-Based Approach. IEEE Transactions on Control Systems Technology, 23, 1440-1450.
https://doi.org/10.1109/TCST.2014.2375812
[4] Urakubo, T. (2015) Feedback Stabilization of a Nonholonomic System with Potential Fields Application to a Two- Wheeled Mobile Robot among Obstacles. Nonlinear Dynamics, 81, 1475-1487.
https://doi.org/10.1007/s11071-015-2082-5
[5] Morin, P. and Samso, C. (2001) A Characterization of the Lie Algebra Rank Condition by Transverse Periodic Functions. SIAM Journal on Control and Optimization, 40, 1227-1249.
https://doi.org/10.1137/S0363012900366054
[6] Fierro, R. and Lewis, F.L. (1997) Control of a Nonholonomic Mobile Robot: Backstepping Kinematics into Dynamics. Journal of Robotic Systems, 14, 149-163.
https://doi.org/10.1002/(SICI)1097-4563(199703)14:3<149::AID-ROB1>3.0.CO;2-R
[7] Tanner, H.G. and Kyriakopoulos, K.J. (2002) Discontinuous Backstepping for Stabilization of Nonholonomic Mobile Robots. Proceedings 2002 IEEE International Conference on Robotics and Automation, Washington, DC, USA, 11-15 May 2002, 3948-3953.
https://doi.org/10.1109/ROBOT.2002.1014346
[8] Do, K.D., Jiang, Z.P. and Pan, J. (2004) A Global Output-Feedback Controller for Simultaneous Tracking and Stabilization of Unicycle-Type Mobile Robots. IEEE Transactions on Robotics and Automation, 20, 589-594.
https://doi.org/10.1109/TRA.2004.825470
[9] Yan, Z., Yang, H. and Zhang, W. (2022) Robust Nonlinear Model Predictive Control of a Bionic Underwater Robot with External Disturbances. Ocean Engineering, 263, 111310.1-111310.14.
https://doi.org/10.1016/j.oceaneng.2022.111310
[10] Zhu, Y.K., Qiao, J.Z. and Guo, L. (2019) Adaptive Sliding Mode Disturbance Observer-Based Composite Control with Prescribed Performance of Space Manipulators for Target Capturing. IEEE Transactions on Industrial Electronics, 66, 1973-1983.
https://doi.org/10.1109/TIE.2018.2838065
[11] Yang, X., Yan, J., Hua, C. and Guan, X. (2021) Trajectory Tracking Control of Autonomous Underwater Vehicle with Unknown Parameters and External Disturbances. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 51, 1054-1063.
https://doi.org/10.1109/TSMC.2019.2894171
[12] Wang, H., Tian, Y. and Xu, H. (2022) Neural Adaptive Com-mand Filtered Control for Cooperative Path Following of Multiple Underactuated Autonomous Underwater Vehicles Along One Path. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 52, 2966-2978.
https://doi.org/10.1109/TSMC.2021.3062077
[13] Wang, J., Wang, C., Wei, Y. and Zhang, C. (2020) Neuroadaptive Sliding Mode Formation Control of Autonomous Underwater Vehicles With Uncertain Dynamics. IEEE Systems Journal, 14, 3325-3333.
https://doi.org/10.1109/JSYST.2019.2938315
[14] Shou, Y., Xu, B., Zhang, A. and Mei, T. (2021) Virtual Guid-ance-Based Coordinated Tracking Control of Multi-Auto- nomous Underwater Vehicles Using Composite Neural Learning. IEEE Transactions on Neural Networks and Learning Systems, 32, 5565-5574.
https://doi.org/10.1109/TNNLS.2021.3057068
[15] Liu, X., Zou, Y., Meng, Z. and You, Z. (2020) Coordinated Attitude Synchronization and Tracking Control of Multiple Spacecraft over a Communication Network with a Switching Topology. IEEE Transactions on Aerospace and Electronic Systems, 56, 1148-1162.
https://doi.org/10.1109/TAES.2019.2925512
[16] Du, H., Wen, G., Cheng, Y., Lu, W. and Huang, T. (2020) De-signing Discrete-Time Sliding Mode Controller with Mismatched Disturbances Compensation. IEEE Transactions on Industrial Informatics, 16, 4109-4118.
https://doi.org/10.1109/TII.2019.2957002
[17] Quiroz, D. and Cuellar, F. (2019) Design of a Low Cost AUV with Adaptive Backstepping Control System to Monitor the Peruvian Coastline. OCEANS-Marseille, Marseille, France, 17-20 June 2019, 1-6.
https://doi.org/10.1109/OCEANSE.2019.8867249
[18] Dai, S.-L., He, S., Wang, M. and Yuan, C. (2019) Adap-tive Neural Control of Underactuated Surface Vessels with Prescribed Performance Guarantees. IEEE Transactions on Neural Networks and Learning Systems, 30, 3686-3698.
https://doi.org/10.1109/TNNLS.2018.2876685
[19] Chen, W., Wen, C., Hua, S. and Sun, C. (2014) Distributed Cooperative Adaptive Identification and Control for a Group of Continuous-Time Systems with a Cooperative PE Condition via Consensus. IEEE Transactions on Automatic Control, 59, 91-106.
https://doi.org/10.1109/TAC.2013.2278135
[20] Wang, Y.-W., Lei, Y., Bian, T. and Guan, Z.-H. (2020) Distrib-uted Control of Nonlinear Multiagent Systems with Unknown and Nonidentical Control Directions via Event-Triggered Communication. IEEE Transactions on Cybernetics, 50, 1820-1832.
https://doi.org/10.1109/TCYB.2019.2908874