基于倒立摆原理的智能平衡车设计
2018-10-20张奔王鲍刘振超李犇鑫胡博文霍建振
张奔 王鲍 刘振超 李犇鑫 胡博文 霍建振

Abstract: In this paper, a two-wheel balance vehicle control system with high performance-price ratio and strong stability has been designed at the platform of Freescale's MK60FX512VLQ15 microcontroller based on the analysis and innovation of the first-order inverted pendulum theory. The safe driving and smooth steering of the balance car have been controlled by the PID algorithm through the collection of information such as body speed and attitude. At the same time, the data of the current speed, the parameters of the position control and the turning control can be uploaded to the upper computer and saved through the bluetooth module, which facilitates the researchers to master the information of the car and make the system show better robustness.
引言
21世纪以来,面对车辆的全面普及与城市化的潮流态势,交通拥堵的现象时有发生。而随着控制技术与传感器技术等的发展进步与创新融合,双轮平衡小车引起了广泛关注,并取得了较大的突破。因其结构简单,轻便灵活,节能环保,深受上班族与学生的青睐与喜爱。鉴于其便捷、绿色的特点,智能平衡车的应用将日趋广泛[1]。
两轮自平衡车以一级倒立摆理论为基础,具有传统的一阶倒立摆多变量、非线性、强耦合等特点[2],而在设计动力上主要来源于同轴平行连接的2台电机,通过微处理器对车体姿态与速度进行测量,调节2台驱动电机的转速,从而使车体呈现出匀速、转向等不同的姿态。
1总体设计方案
本系统以K60单片机为核心,通过对各种传感器信号的采集分析,利用PID算法[3-4]实现小车的自平衡控制、前行与转向等行为动作。通过按键对直立参数、转向参数等进行调节,并通过OLED实时显示。同时,小车通过蓝牙与上位机通信,并且利用上位机的虚拟示波器对小车的运行状态展开监控。本系统对电机采用MOS全桥驱动,可靠性高、稳定性强。本次研发设计方案则如图1所示。
2系统硬件设计
该系统以MK60FX512VLQ15单片机为平台,通过0.96寸的OLED显示控制参数与传感器的信息。使用MPU6050作为加速度计与陀螺仪,协同融合出小车的姿态。使用龙邱mini512线编码器,通过正交解码对小车的正、反转与电机速度进行测量。同时通过蓝牙模块重点支持实时数据采集,上传到PC上位机,即可对数据启用一定的功能分析。……
