带有干扰估计的两轮自平衡机器人运动控制研究
Research on Motion Control of Two Wheeled-Self Balancing Robot with Interference Estimation
DOI: 10.12677/pm.2024.147269, PDF, HTML, XML, 下载: 5  浏览: 9 
作者: 刘志民:上海出版印刷高等专科学校基础教学部,上海
关键词: 干扰估计两轮移动机器人运动控制Disturbance Estimation Two-Wheeled Mobile Robots Motion Control
摘要: 本文运用拉格朗日力学理论分析了自平衡两轮机器人的运动学数学模型,设计了一种带有干扰项的滑模控制方法,该控制器可用于两轮自平衡机器人的纵向速度控制和转向控制。针对非线性因素无法精确建模的情况,利用在线干扰估计技术来估计系统中的干扰项,作为前馈补偿项对滑模控制器进行前馈补偿,只需要计算干扰项和其估计误差的上界,系统的精度和鲁棒性都得到了提高。利用李雅普诺夫稳定性理论证明了系统的渐近稳定性,最后,将所提出的控制算法应用于两轮自平衡车,仿真结果表明,在干扰条件下,该控制算法可以使该机器人迅速恢复平衡状态。
Abstract: This article applies Lagrangian mechanics theory to analyze the kinematic mathematical model of a two wheeled-self balancing robot, and designs a sliding mode control method with interference terms. The controller can be used for longitudinal speed control and steering control of two wheeled-self balancing robots. In response to the situation where nonlinear factors cannot be accurately modeled, online interference estimation technology is used to estimate the interference term in the system. As a feed forward compensation term, the sliding mode controller is feed forward compensated. Only the upper bound of the interference term and its estimation error needs to be calculated, and the accuracy and robustness of the system are improved. The asymptotic stability of the system was demonstrated using Lyapunov stability theory. Finally, the proposed control algorithm was applied to a two wheeled-self balancing vehicle. Simulation results showed that under interference conditions, the control algorithm could quickly restore the robot to its equilibrium state.
文章引用:刘志民. 带有干扰估计的两轮自平衡机器人运动控制研究[J]. 理论数学, 2024, 14(7): 41-47. https://doi.org/10.12677/pm.2024.147269

1. 引言

近些年来,两轮自平衡机器人在世界各地的多个控制和机器人研究中心引起了足够的重视[1]。两轮平衡机器人是研究控制系统中各种控制器效果的良好平台[2]。基于倒立摆模型,两轮平衡机器人需要控制作用使自己处于直立位置。目前,两轮平衡机器人的研究者研制了各种类型的控制器,例如线性二次调节器[3] [4]、极点配置控制器[5] [6]、模糊逻辑控制器[7] [8]、比例积分微分控制器[9] [10]。本文旨在设计一种具有在平坦地形上自我平衡能力的两轮平衡机器人的控制器,并研究该控制器在平衡系统中的适用性和性能。利用两个通用测距传感器来检测机器人的当前位置和倾斜角度。整个控制器算法将被编译到C程序中,并存储在微控制器中。机器人的导航由操作员使用RC遥控器进行控制。该机器人能够在平坦的地形上移动和转弯时保持自身平衡。

在控制器设计方面,文献[11]采用PID控制设计了两轮自平衡机器人的控制器,但两轮自平衡机器人具有欠驱动性和较强的耦合性,使得控制效果并不理想。文献[12] [13] [14]采用鲁棒控制与卡尔曼滤波相结合的方法,设计了两轮自平衡车的控制器,该控制器可以随实际情况的变化自适应调节控制参数,在外界干扰较小时取得了较好的控制效果。文献[15] [16]设计了滑模变结构控制器,结合神经网络切换控制,该控制器可以有效克服传统的控制器带来的抖震问题,在两轮自平衡机器人的点镇定,轨迹跟踪等问题上得到了广泛应用。文献[17] [18] [19]设计了一种含有鲁棒项的滑模控制系统,选取机器人的移动位形空间作为积分滑模流形,设计了一种状态反馈积分滑模控制器;文献[20] [21]采用backstepping设计策略,针对滑二轮自平衡移动机器人的自动泊车问题,设计滑模变结构控制器,该控制器把电机电压作为控制输入,使速度可以渐进收敛到期望值。

本文的内容安排如下:第一部分引言介绍了两轮子平衡车的研究现状及其应用场景。第二部分应用拉格朗日力学理论建立了两轮自平衡机器人的动力学模型,第三部分介绍了带有干扰估计的控制器设计方法。第四部分对设定条件下的机器人运行情况进行仿真实验。第五部分对实验结论结果进行了分析。

2. 拉格朗日运动学模型

机器人的框架容纳机器人的两个直流电机、传感器、电路和电池。框架的设计决定了机器人在静止位置或运动时的稳定性和重心。机器人的框架是由原材料铝制成的。使用铝是因为铝材料重量轻、刚性强、坚固耐用,最适合用于平衡机器人。此外,为了使机器人的重心变高,机器人的电池位置将分配在机器人结构的顶部和中心。机器人的轮子是由PE制成的,因为它是一种坚硬而轻便的材料。基于惯性测量获得的测量数据单元(MPU 6050 IMU) IMU提供倾角、当前角速度和加速度读数数据。如图1所示。本文采用文献[16]中所建立的运动学模型。

Figure 1. Two wheeled-self balancing robot coordinate system

1. 两轮自平衡机器人坐标系

由平衡车的非线性性,本文采用拉格朗日动力学模型建立如式(1)所示的方程

( x ˙ RM v ˙ RM θ ˙ r ω ˙ p θ ˙ y ω ˙ y )=( 0 1 0 0 0 0 0 A 22 A 23 0 0 0 0 0 0 1 0 0 0 A 42 A 43 0 0 0 0 0 0 0 0 1 0 0 0 0 0 A 66 )( x RM v RM θ 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)

(1)式中, x ˙ RM 为纵向速度, v ˙ RM 为横向速度, ω p 为和水平方向倾斜角, ω y 为自平衡机器人转向速度, A ij ( i=1,2,,6;j=1,2,,6 ) B ij ( i=1,2;j=1,2,,6 ) 为机器人的固有参数, f i ( i=2,4,6 ) 为外界扰动引起的干扰项。各参数值由下式表示:

A 22 =2 p 1 M P RL ( 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 RL ( 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 ˙ RM v ˙ RM θ ˙ r ω ˙ p θ ˙ y ω ˙ y )=( 0 1 0 0 0 0 0 A 22 A 23 0 0 0 0 0 0 1 0 0 0 A 42 A 43 0 0 0 0 0 0 0 0 1 0 0 0 0 0 A 66 )( x RM v RM θ 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 RM , v RM , θ P , ω P 为前向运动控制系统,用于机器人的速度控制, θ y , ω y 为转向系统。这样,(3)式可以分解为

( x ˙ RM v ˙ RM θ ˙ r ω ˙ p )=( 0 1 0 0 0 A 22 A 23 0 0 0 0 1 0 A 42 A 43 0 )( x RM v RM θ 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)

3. 控制器设计策略

该控制器的设计方法分为两个步骤。

第一步,设计运动子系统和转向子系统的分层滑模控制器,分层滑模控制策略解决内在耦合性控制输入少于控制输出的欠驱动系统是一种行之有效的控制方法,近年来在飞行控制、水下机器人控制等多个领域具有广泛的应用。

第二步,针对非线性因素无法精确建模的情况,利用在线干扰估计技术来估计系统中的干扰项,作为前馈补偿项对滑模控制器进行前馈补偿,只需要计算干扰项和其估计误差的上界,这样系统的精度和鲁棒性都可以提高。

考虑(4)式所代表的运动系统,该系统可分为如下两个子系统:

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

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

x d , v d , θ d , ω d 表示各量的期望值,跟踪误差定义为:

{ e x = x RM x d e v = v RM 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)

然后定义第二层滑模面:

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

沿滑模面 S 1 求导,可得

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

S ˙ 1 =0 ,可以得到

u eq1 = c 1 e ˙ x A 22 v RM A 23 θ p v ˙ d B 21 (11)

同理可得

u eq2 = c 2 e ˙ θ A 22 v RM A 23 θ p v ˙ d B 41 (12)

U PH = u eq1 + u eq2

由式(3)和(4)可知,

v ˙ RM = A 22 v RM + B 21 U P + f 2

ω ˙ p = A 42 v RM + A 43 θ r + B 41 U P + f 4

f 2 f 4 作为系统中的不确定性干扰项很难通过计算来确定,这里通过在线干扰估计 f 2 f 4

f ^ 2 = v ˙ RM ( t ) A 22 v RM ( t ) B 21 U P ( tT )

f ^ 4 = A 42 v RM ( t )+ A 43 θ r ( t )+ B 41 U P ( tT )

U P ( tT ) 为采样时刻控制电压值, f 2 f 4 的估计值为 f ^ 2 f ^ 4 T为离散系统采样周期。T取值应尽可能小。把 f ^ 2 f ^ 4 作为前馈补偿加入到之前设计的分层滑模控制器中。前馈补偿控制器可以设计为 U E = F ^ / ( α B 21 +β B 41 ) F ^ =α f ^ 2 +β f ^ 4 ,令

f ¯ 2 = f 2 f ^ 2 f ¯ 4 = f 4 f ^ 4

则所设计的基于干扰的滑模控制器为

U P = U PH + U E

下面证明所设计的控制器的稳定性:

V= S 2 /2 ,则

V ˙ ( S )=S S ˙ =S( m S 1 +n S 2 ) =S( m( c 1 e ˙ x + e ˙ v )+n( c 2 e θ + e ω ) ) =S( m( c 1 e ˙ x + A 22 v RM + B 21 U P + f 2 )+n( c 2 e θ + A 42 v RM + A 43 θ r + B 41 U P + f 4 ) ) =S( λsign( S )pS F ^ +α f ^ 2 +β f ^ 4 )

=λ S 2 p S 2 +S( α( f 2 f ^ 2 )+β( f 4 f ^ 4 ) ) =λ S 2 p S 2 +S( α f ¯ 2 +β f ¯ 4 ) λ S 2 p S 2 +| S || α f ¯ 2 +β f ¯ 4 |

λ=| α f ¯ 2 +β f ¯ 4 |+δ ,则有

V ˙ ( S )<0

故系统为渐近稳定的。

4. 仿真结果

假设小车的初始位置为0 m,初始速度为0 m/s,初始倾斜角度为0.10,初始角速度为0,小车由静止状态起步,期望信号为 x RMd =sint ,干扰为 f 2 =0.2sint f 4 =0.25cost ,根据本文所设计的控制器仿真,结果如下图2

Figure 2. Two wheeled-self balancing robot position tracking curve over time

2. 两轮自平衡机器人位置跟踪随时间变化曲线

5. 结论

在所设计的带有估计的滑模控制器作用下,在t = 2 s时,系统达到稳定状态,和水平面的夹角保持在0度左右,响应速度较快,在仿真过程中,所加入的干扰也符合实际情形,两轮自平衡机器人能够较好的跟踪所给定的信号,说明所设计的控制器具有良好的效果。

参考文献

[1] 王田苗, 陶永. 我国工业机器人技术现状与产业化发展战略[J]. 机械工程学报, 2014, 50(9): 1-13.
[2] 谭民, 王硕. 机器人技术研究进展[J]. 自动化学报, 2013, 39(7): 963-972.
[3] 朱磊磊, 陈军. 轮式移动机器人研究综述[J]. 机床与液压, 2009, 37(8): 242-247.
[4] 李磊, 叶涛, 谭民, 等. 移动机器人技术研究现状与未来[J]. 机器人, 2002(5): 475-480.
[5] 蔡鹤皋. 对我国机器人产业发展的思考[J]. 集成技术, 2015, 4(5): 1-4.
[6] Wang, S., Cui, L.L., et al. (2021) Balance Control of a Novel Wheel-Legged Robot: Design and Experiments. 2021 IEEE International Conference on Robotics and Automation (ICRA), Xi’an, 30 May-5 June 2021, 6782-6788.
https://doi.org/10.1109/ICRA48506.2021.9561579
[7] Kim, S. and Kwon, S. (2017) Nonlinear Optimal Control Design for Underactuated Two-Wheeled Inverted Pendulum Mobile Platform. IEEE/ASME Transactions on Mechatronics, 22, 2803-2808.
https://doi.org/10.1109/TMECH.2017.2767085
[8] 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
[9] Wang, H., Tian, Y. and Xu, H. (2022) Neural Adaptive Command 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
[10] Shou, Y., Xu, B., Zhang, A. and Mei, T. (2021) Virtual Guidance-Based Coordinated Tracking Control of Multi-Autonomous 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
[11] 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
[12] Du, H., Wen, G., Cheng, Y., Lu, W. and Huang, T. (2020) Designing 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
[13] Quiroz, D. and Cuellar, F. (2019) Design of a Low Cost AUV with Adaptive Backstepping Control System to Monitor the Peruvian Coastline. OCEANS 2019, Marseille, 14 October 2019, 1-6.
https://doi.org/10.1109/OCEANSE.2019.8867249
[14] Dai, S.-L., He, S., Wang, M. and Yuan, C. (2019) Adaptive 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
[15] 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
[16] Wang, Y.-W., Lei, Y., Bian, T. and Guan, Z.-H. (2020) Distributed 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
[17] 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.
[18] 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
[19] Minami, I., Wirianski, A., Harakawa, R., Wakabayashi, N. and Murray, G.M. (2018) The Three-Axial Gyroscope Sensor Detects the Turning Point between Opening and Closing Phases of Chewing. Clinical and Experimental Dental Research, 4, 249-254.
[20] Wimmer, H. and Yoon, V.Y. (2017) Counterfeit Product Detection: Bridging the Gap between Design Science and Behavioral Science in Information Systems Research. Decision Support Systems, 104, 1-12.
[21] Wang, S.G. and Liang, X. (2014) A Parameter Estimation Framework for Multiscale Kalman Smoother Algorithm in Precipitation Data Fusion. Water Resources Research, 50, 8675-8693.