基于PID算法的小车速度控制系统设计毕业论文

 2021-04-15 12:04

摘 要

过去20年间,由于经济的发展和科技的提升,人们的生活质量也渐渐提高,汽车的数量也随之上升。但事故的频发成了一个大问题,大部分的交通事故都是由于车辆驾驶时速度控制不好,无法及时减速,及时加速造成的。本次毕业设计应用PID算法来解决智能小车速度控制,以减少事故的发生。

我的毕设硬件部分主要由小车的底板、四个直流电机、一个STC89C52RC单片机、L293D电机驱动芯片、LM7805稳压集成电路、总电源和两个光电测速编码器组成。调速的地方运用了增量式PID算法,此算法的目的是为了使小车更加快速和精确的调速。

本设计能够实现小车“前进”、“加速”两种运行方式,并将设定的期望速度和左、右轮的实际速度显示到液晶显示屏上。

经过多次实验表明,小车基本能按照要求完成PID调速,在不同的期望值下,使实际值接近期望值,并匀速行驶,但由于误差关系,无法准确到期望值不变。

关键词智能小车;PID算法;单片机;光电测速编码器

The Design of Intelligent Car Based on PID Algorithm

Abstract

Nowadays, due to the development of traffic and the improvement of science and technology level, people's consumption level has also been improved, the number of private cars also increased. It brings people to the convenience of life at the same time, followed by traffic congestion and frequent accidents, which seriously threaten people's safety. Most of the traffic accidents are due to vehicle speed control is not good, can not be timely deceleration, timely acceleration caused. The graduation design application PID algorithm to solve the intelligent car speed control to reduce the occurrence of the accident.

The hardware part of the intelligent car mainly by the car chassis, two DC gear motor, STC89C52RC microcontroller, L293D motor drive module, LM7805 regulator module, power module, two photoelectric speed encoder. The speed control part uses the incremental PID algorithm, its parameters are set and optimized, the purpose of this algorithm is to make the car speed control system more quickly and accurately.

The design can achieve the car "forward", "accelerated" two modes of operation, and set the desired speed and the actual speed of the left and right wheel display to the LCD screen.

After several experiments show that the basic car can be completed in accordance with the requirements of PID speed, at different expectations, the actual value close to the expected value, and uniform speed, but because of the error relationship, can not be accurate to the expected value of the same.

Key words:smart car, PID algorithm, single-chip microcomputer, photoelectric speed code plate

目 录

摘 要 2

Abstract 3

第1章 绪论 6

1.1 课题研究的目的及意义 6

1.2 国内外研究现状 6

1.3 本课题研究内容 8

1.4 章节安排 8

第2章 智能小车方案设计与论证 9

2.1 智能小车整体设计方案 9

2.2 小车驱动模块 9

2.2.1 电机的选定 9

2.2.2 电机驱动模块的选定 10

2.3 控制器模块 10

2.4测速模块 10

2.5智能小车模块框图 11

3.1 智能小车总体设计图 12

3.2 单片机最小系统电路 12

3.3 电源模块 13

3.4 直流电机驱动模块 14

3.5 光电式对射开关 15

3.6 液晶显示屏 16

3.7 系统硬件电路调试 16

第4章 智能小车软件设计 18

4.1智能小车流程图 18

4.2按键流程图 19

4.3测速流程图 19

4.4液晶显示流程图 20

4.5 电机驱动模块部分子程序 21

4.6 PID算法设计 23

4.7其他程序 24

4.8 系统软件调试 24

第5章 实验结果 25

第6章 结论与展望 26

6.1 结论 26

6.2 展望 26

致 谢 27

参考文献 28

附 录 29

1 智能小车系统总原理图 29

2 智能小车系统总程序 30

第1章 绪论

1.1 课题研究的目的及意义

智能化,是借助电子技术、计算机技术和制造技术等前沿科技,根据提前设定的模式在无人管理的情况下能够实现自动的运作,实现预定目标,甚至是更高的目标[1]。此次设计研究的智能小车,也叫轮式机器人,是具有独特运行方式的机器人。通过软件编程来实现小车“前进”、“加速”等目的,通过修改小车的程序来控制其行驶方式。轮式机器人具有规划路径、控制行驶姿态等多种功能,其在工业、农业、服务业有着广泛的应用[2]

轮式器人所面临的最重要的难题就是速度的控制,而实现轮式机器人速度控制必须解决两个问题:其一要准确利用PID调节PWM占空比来改变速度值,其二要能处理输入信息并把它转化为控制信息[3]。随着机器人技术广泛地深入,智能小车的运行环境也变得更加复杂,想要让小车正常工作,必须正确调节其速度。控制小车车轮的转速,使其能匀速向前行驶。

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

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