自平衡小车的控制与设计毕业论文

 2021-04-15 12:04

摘 要

两轮自平衡小车是一个多变量、非线性、强耦合的控制系统,其结构简单,价格低廉,易于实现,是检验各种控制方法的有效平台。本文在分析了国内外对两轮自平衡小车的研究现状后,提出了自己的硬软件设计方案。

首先,本文运用牛顿力学法建立了两轮小车模型,在模型的基础上,选取MPU6050模块检测车身姿态,并用互补滤波融合姿态数据;利用编码器检测小车速度;通过IAP15W4K61S4单片机结合PID算法对来自两个姿态检测模块的信息进行处理,然后给出电机控制信号,并传递给电机驱动模块TB6612FNG,以控制电机运转,建立起一个位于底层的、基于传统PID控制算法的两轮自平衡小车系统。

整个系统制作完成后,小车可以在干扰下保持自平衡,验证了此次设计的硬软件控制方案的可行性。

关键词:两轮自平衡小车;互补滤波;PID

The Control and Design of Self-Balanced Vehicle

ABSTRACT

The two-wheel self-balanced vehicle are a multi-variable, non-linear and serious coupling control system with the characteristic of simple structure. It also has the advantages of low cost and easy to implement.Therefore, it is a classic platform to test and validate a variety of control methods. After analyzing the research status in and abroad,this paper presents a design scheme of two-wheel self-balanced vehicle.

Firstly,this essay establishes the model of a two-wheel scooter using Newton mechanics laws. Based on this model, MPU6050 is used to detect the gesture information of the vehicle body,and use complementary filter to fuse the data;The speed of the wheels are detected by encoders. Micro-controller IAP15W4K61S4 and PID control algorithm are used to process the gesture information.Based on gesture signals,the micro-controller output PWM which driver the motors.So far,a bottom system based on the conventional PID control algorithm is established for a two-wheel self-balanced vehicle.

Upon completion of the entire system,the vehicle can be adjusted independently then quickly restore stability when there is a moderate amount of interference.Finally, we verified the system feasibility of the hardware and software by experiment.

Key words:two-wheel self-balanced vehicle;complementary filter;PID

目 录

第1章 绪论 1

1.1研究的背景与意义 1

1.2国内外研究现状 1

1.2.1 国外研究成果 2

1.2.2 国内研究成果 3

1.2.3 国内外研究总结 4

1.3 本文的主要研究内容 5

第2章 自平衡小车原理分析 6

2.1 平衡原理分析 6

2.2 数学建模 6

2.2.1 小车的受力分析 6

2.2.2 建立数学模型 8

2.3 本章小结 9

第3章 自平衡小车硬件电路设计 10

3.1 系统硬件的基本组成 10

3.2 微控制器模块 10

3.2.1 IAP15W4K61S4芯片介绍 10

3.2.2控制电路设计 12

3.3姿态检测模块 12

3.3.1 MPU6050芯片介绍 13

3.3.2 控制电路设计 13

3.4直流电机驱动模块 14

3.4.1TB6612FNG芯片介绍 14

3.4.2 H桥驱动介绍 15

3.4.3 控制电路设计 16

3.5 电源模块 16

3.5.1 电源芯片介绍 17

3.5.2 控制电路设计 18

3.6 速度测量模块 19

3.7 电量检测电路 20

3.8 LED灯指示电路 21

3.9 在系统编程模块 21

3.10 本章小结 22

第4章 自平衡小车软件设计 23

4.1系统主程序流程图 23

4.2 中断服务程序流程图及部分子程序 24

4.3 MPU6050数据采集与处理 26

4.3.1 MPU6050初始化 26

4.3.2 数据采集 27

4.3.3互补滤波 27

4.4 小车运动控制 28

4.4.1 角度环PD控制 29

4.4.2 速度环PI控制 29

4.5 本章小结 30

第5章 自平衡小车系统调试 31

5.1系统硬件电路调试 31

5.2 PID参数整定 31

5.3 死区电压的整定 32

5.4 本章小结 32

结 论 33

致 谢 34

参考文献 35

附录A:小车实物图 36

附录B:总体电路原理图 37

附录C:程序代码 38

  1. 绪论

1.1研究的背景与意义

机器人技术的起步发展可以追溯到上个世纪六十年代。随着时间的推移,这项技术也越来越成熟,运用到的领域也越来越广泛。它将机电学,材料学,控制学等相关学科融为一体,又不断吸收时下最新的技术,形成了一门独立的高科技学科。毫不避讳的说,机器人技术的发展水平在一定程度上可以体现一个国家的科技综合能力。

轮式移动机器人是移动机器人的重要组成部分,是多学科理论与技术集成的产物,对轮式移动机器人的研究与探索一直是移动机器人研究领域的热点,具有很高的理论价值和实用价值[1]。移动机器人的运用领域广泛,遇到的工作环境也会各种各样,诸如在面临狭小空间或者需要大转角的工作场所时,如何才能更好地执行任务,成为了人们最为关心的问题。两轮自平衡机器人就是在这一背景下应运而生的。两轮自平衡小车本来就是一个不稳定的系统结构,车身重心位于车轮轴上,两轮独立驱动,通过前后行走保持自身平衡。正是因为其结构的特殊性,相比于其它的三轮或者四轮小车,它有如下一些优点:

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。