基于神经网络的两轮自平衡代步车的研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
本文旨在对两轮自平衡代步车进行研究。两轮自平衡代步车的想法来源于倒立摆模型,车体结构简单,由车把、踏板和两个平行布置的轮子组成,没有刹车、加速、减速装置。驾驶者只需改变车体角度往前或往后倾,代步车就会根据倾斜的方向前进或后退而速度则与车体倾斜的程度成正比。现代社会交通拥堵已严重影响了人们的出行效率,代步车作为一种小型化、机动灵活、无污染的交通运输工具,将会有着相当广泛的应用前景。
     两轮自平衡代步车平衡与运动的前提条件是快速且准确地获得其姿态信息,常用的传感器为加速度计和陀螺仪,加速度计静态性能好,不适合动态角度测量,陀螺仪动态性能好,却存在累积漂移误差。通过分析惯性传感器在姿态检测系统中的优缺点,采用一种简易互补滤波算法对陀螺仪和加速度计进行数据融合,生成动态倾角信号。应用MATLAB对该滤波器进行仿真,并设计实验进行检测,实验结果表明该方法有效去除加速度计动态情况下的干扰和陀螺仪累积漂移误差,得到比较准确的动态角度值。
     互补滤波能够在动态环境下得到比较准确的角度值,但真实值和测量值实际传递关系尚不清楚。为定量分析和研究真实值和测量值之间的关系,在联合仿真中真实有效的反映代步车实际情况,设计实验测得系统的输入输出数据,通过系统辨识获取整个测量环节的传递函数,并将其应用于MATLAB控制环节中。
     为更加真实的反映代步车的实际情况,对代步车载人情况进行ADAMS和MATLAB联合仿真并介绍其流程,在ADAMS中建立了代步车的虚拟样机,在MATLAB中建立其控制系统,并对代步车进行PID控制。仿真结果表明PID控制范围狭窄,仅适合身高体重相近的人,当人的身高体重发生较大变化时,PID控制效果下降甚至控制失效。
     针对PID控制抗干扰能力差的缺陷,引进BP神经网络对不同身高体重的人进行非线性映射。通过联合仿真获取不同身高体重对应的最佳PID系数,建立BP神经网络。经过训练后的BP网络,输入样本中的数据时,能够得到近似的期望值,输入样本以外的数据,计算输出的PID系数,用于对代步车进行控制仿真可以达到很好的控制效果。设计制作了两轮自平衡代步车样机进行实物实验,证明在PID控制中加入BP网络后,控制范围扩大并且具有自适应性。
The purpose of this thesis is to research the two-wheeled self-balancing scooter. The idea of self-balancing scooter came from inverted pendulum model. It's structure is simple, composed of a pedal, a handle and two paralleled wheels but no brake, accelerate, slow down device. The driver just change the angle of scooter forward or backward, the scooter will go ahead or back up according to the direction of dip and it's speed is in direct proportion to the angle. In modern society traffic jam has seriously affected people's travel efficiency, the two-wheeled self-balancing scooter as a kind of miniaturization, flexible and no pollution transport facility will has a broad prospect of application.
     The premise of the two-wheeled self-balancing scooter keeping balance and moving is quickly and accurately acquiring stance information. Common sensors are accelerometer and gyroscope. The static performance of accelerometer is good but not suitable for dynamic angle measurement and gyroscope is good at dynamic performance but has cumulative drift error. The paper analyzed the advantages and disadvantages of inertial sensors in attitude detection system. Based on this analysis, the author adopted a kind of simple filter algorithm which created dynamic angle signal after fusing the data of gyroscope and accelerometer. MATLAB was employed to make the simulation for the filter and then designed experiments to test. The experimental results show that the dynamic angle sensor effectively removes the interference of accelerometer and the drift error of gyroscope in dynamic circumstances and gets almost accurate dynamic angle.
     In dynamic environment almost accurate dynamic angle was got by complementary filter but the actual transfer relationship between the real value and measured value was not clear. For quantitatively analyzing and researching the relationship between the real value and the measured value and reflecting actual situation of the scooter in the co-simulation really and effectively, the experiments was designed to acquire the input and output data and then transfer function of the whole measurement unit was obtained through identification system.
     In order to reflect the actual situation of self-balancing scooter, ADAMS and MATLAB co-simulation was performed on manned situation of scooter and the processes were introduced in detail. The virtual prototype of scooter was established in ADAMS and its control system in MATLAB. PID was used to control the scooter. The result of simulation shows that PID control is narrow, only suitable for the people who have similar height and weight, when great changes of height and weight have taken place, PID control effect is reduced or even failure.
     For the poor antijamming capability of PID control BP neural network was introduced to carry on the nonlinear mapping. Through co-simulation the corresponding optimal PID coefficient of different height and weight was obtained and then BP neutral network was established. After the BP neural network being trained, when input the data from samples the approximate expectations were got. Even though if input the data which were not in the previous sample, the calculated PID coefficient used to control the virtual prototype of scooter can achieve very good control effect. Designed and manufactured the prototype of two-wheeled self-balancing scooter to conduct practicality experiment. It is concluded that after BP network being imported PID control is self-adaptive and it's control scope is widened.
引文
[1]张莹.风火轮—丰田推出S eg way假想敌Winglet[J].世界汽车,2008(9):92-93.
    [2]Y. Ha and S. Yuta.'Trajectory Tracking Control for Navigation of Self-Contained Mobile Inverse Pendulum',IEEE/RSJ/GI Int. Conf.Advanced Robotic Systems and the Real World.1994, September, vol.3.12-16.
    [3]张志坤.基于模糊神经网络的倒立摆控制技术研究[D].扬州:扬州大学,2009.
    [4]秦宏宇.双轮平行电动车的数学模型建立和总体结构设计[D].洛阳:河南科技大学,2004.
    [5]Felix Grasser, Aldo D'Arrigo, Silvio Colombi, Alfred C. Rufer. JOE:A Mobile,Inverted Pendulum. IEEE Transactions on Industrial Electronics.2002,49(1):107-114.
    [6]袁泽睿.两轮自平衡机器人控制算法的研究[D].哈尔滨:哈尔滨工业大学,2006.
    [7]李红美,李智,高飞.平衡的杰作—赛格威HT两轮平台电动车[J].电器工业,2002(6):19-21.
    [8]http://www.aimotuo.com/thread-222354-1-1.html.
    [9]李垂垂.两轮自走车之设计与实现—以NIOS为核心之基本控制[D].台湾:国立中央大学,2006.
    [10]黄正豪.两轮自走车之设计与实现一以NIOS为核心之行动控制[D].台湾:国立中央大学,2006.
    [11]周烜达.二轮自走车之设计与实现[D].台湾:国立中央大学,2007.
    [12]屠运武,徐俊艳,张培仁等.自平衡控制系统的建模与仿真[J].系统仿真学报,2004,16(4):839-842.
    [13]李洋.基于LQR算法两轮自平衡小车的系统设计与研究[D].太原:太原理工大学,2011.
    [14]http.//www.jiaodong.net/news/system/2010/09/20/010961329.shtml.
    [15]张吉昌.单轴双轮自平衡代步车的设计与研究[D].青岛:中国海洋大学,2009.
    [16]李凡红.两轮自平衡小车系统[D].北京:北京交通大学,2010.
    [17]http://e-book2003.blog.163.com/blog/static/17552073201082995130537/.
    [18]姚文昊.自平衡式两轮电动车运动控制技术研究[D].哈尔滨:哈尔滨工业大学,2010.
    [19]http://blog.qdsang.com/archives/2483.
    [20]The Balance Filter. Web. mit. edu/first/segway.
    [21]姚巍.自行车机器人系统辨识及MATLAB仿真[D].北京:北京邮电大学,2008.
    [22]方崇智,萧德云.过程辨识[M].北京:清华大学出版社,1998年2月.
    [23]杨叔子,杨克冲.机械工程控制基础[M].武汉:华中科技大学出版社,2005年7月.
    [24]陈怀琛,吴大正,高西全.MATLAB及在电子信息课程中的应用[M].北京:电子工业出版社,2003年7月.
    [25]http://wenku.baidu.com/view/aff622ce0508763231121244.html.
    [26]齐晓慧,田庆民,董海瑞.基于Matlab系统辨识工具箱的系统建模[J].兵工自动化,2006,Vo125,No.10:88-90.
    [27]潘立登,潘仰东.系统辨识与建模[M].北京:化学工业出版社,2004年.
    [28]何亚银.基于ADAMS和MATLAB的动力学联合仿真[J].现代机械,2007(5):60-61.
    [29]曹志杰,孙汉旭,贾庆轩.基于ADAMS和MATLAB的双轮虚拟倒立摆的控制仿真[J].机电产品开发与创新,2007(4):88-89.
    [30]李增刚.ADAMS入门详解与实例[M].北京:国防工业出版社,2006年4月.
    [31]赵保亚.基于PMAC的数控系统PID参数调节研究[J].机械设计与制造,2007(10):146-148.
    [32]李尹.PID控制算法及其在风速控制中的应用[D].武汉:华中科技大学,2007.
    [33]高彬娜.数字PID控制在运动控制系统中的应用[J].中国电子科学研究院学报,2006(6):564-567.
    [34]韩力群.人工神经网络理论、设计及应用[M].北京:化学工业出版社,2007年9月.
    [35]丛爽.面向MATLAB工具箱的神经网络理论与应用[M].合肥:中国科学技术大学出版社,1998年11月.
    [36]彭梅香.BP神经网络PID控制[D].上海:华东师范大学,2007.
    [37]彭进.基于神经网络的交通流预测研究[D].天津:河北工业大学,2008.
    [38]张炳发,万威武.企业知识资本对企业绩效影响的BP网络模型研究[J].商业研究,2006(5):43-44.
    [39]罗成汉.基于MATLAB神经网络工具箱的BP网络实现[J].计算机仿真,2004(5):109-111.
    [40]刘君尧,邱岚.基于BP神经网络的函数逼近[J].福建电脑,2009(8):87-88.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700