基于飞思卡尔单片机的智能车控制系统设计 联系客服

发布时间 : 星期六 文章基于飞思卡尔单片机的智能车控制系统设计更新完毕开始阅读a1848c616ad97f192279168884868762cbaebb59

毕业设计(论 文)

基于飞思卡尔单片机的智能车控制系统设计

系 别 专 业 班 级 姓 名 指导教师

自动化工程系

自动化 5060418

王皓明

赵一丁

2010年 6月 16日

东北大学秦皇岛分校毕业设计(论文) 第I页

基于飞思卡尔单片机的智能车控制系统设计

摘 要

本文以第四届全国大学生智能车竞赛为背景,介绍了智能赛车控制系统的软硬件结构和开发流程。该比赛采用组委会规定的标准车模,以Freescale半导体公司生产的16位单片机MC9S12DG128为核心控制器,在CodeWarrior 4.7开发环境中进行软件开发,要求赛车在未知道路上完成快速寻线。

本智能车采用双排光电传感器对赛道进行检测,工作电压能与最小系统工作电压相同,可共用一个电源模块。通过光电传感器提取获得黑线位置,用PID方式对舵机进行反馈控制。同时通过速度传感器获取当前速度,实现速度闭环控制,根据赛道类型预判信息和当前速度信息对速度进行合理控制。整个硬件系统包括车模机械结构调整、稳压电源设计、核心控制电路板设计、后轮电机驱动模块设计和上位机通信设计等等。经过查看各种相关资料,对硬件进行了大量的优化,如针对对各种稳压芯片的测试,确定最优电源电路;测试各种测速方式,最终选用光电管作为测速模块;并在智能车调试过程中不断改进机械结构,使小车运行更加稳定、迅速。软件系统包括程序初始化、数据采集和车体控制的算法。为了提高智能赛车的行驶速度和可靠性,经过多次机械结构调整及电路板设计,并经过不断试验,最终确定了现有的系统机械结构和各项控制的PID参数。

关键词:MC9S12DG128 ,智能车,双排光电传感器,PID

东北大学秦皇岛分校毕业设计(论文) 第II页

Intelligent vehicle control system design based on freescale MCU

Author :Wang Haoming

Tutor :ZhaoYiding

Abstract

Based on the 4th China university of intelligent car race for background, introduces the hardware and software of the control system of intelligent car structure and development process. The game using the standards prescribed by the organizing committee to Freescale semiconductor company models, the production 16-bit single chip MC9S12DG128 for core controller, in CodeWarrior 4.7 development environment in software development and requirement on the road on unknown quick line.

This intelligent vehicle using double row of photoelectric sensor, voltage can work with minimal systems can share the same voltage, a power supply module. Through the intelligent vehicle, with black extracted on the way to the PID feedback control. And through the velocity sensor for current velocity, realize speed closed-loop control circuit, according to the type of information and the speed of anticipation to speed control information. The hardware system including mechanical models ,structure adjustment, manostat design, the core control circuit design, rear motor driver module design and computer communication design etc. After check all relevant information on the hardware, the large amounts of optimization, such as all kinds of pressure in the test chip and the optimum power supply circuit, Testing various ways, finally chooses phototube module as a type of cell, And in the intelligent vehicle commissioning process improvement, the mechanical structure is more stable operation, quick. Software system including the initial procedure, the data acquisition and control algorithm. In order to improve the speed of intelligent cars and reliability, and after many mechanical structure adjustment and circuit design, and finally determined through continuous test, the existing system of the mechanical structure and PID control parameters.

Key words: MC9S12DG128, intelligent vehicle, double row photoelectric sensor, PID

东北大学秦皇岛分校毕业设计(论文) 第III页

目 录

1 绪 论……………………………………………………………………………1

1.1 智能车的背景及意义 ..................................................................................... 1 1.2 智能车竞赛的研究现状 ................................................................................. 2

1.2.1 国外智能车竞赛现状 ......................................................................... 2 1.2.2 国内智能车竞赛现状 ......................................................................... 3 1.3 本文的概况及结构安排 ................................................................................. 7 2 智能车方案设计…………………………………………………………………..8

2.1 智能车设计的基本要求 ................................................................................. 8 2.2 智能车的双排传感器循迹策略方案设计 ..................................................... 8

2.2.1 双排传感器的优势 ............................................................................. 8 2.2.2 传感器阵列布局 ................................................................................. 9 2.2.3 直道识别方式控制策略 ..................................................................... 9 2.2.4 直线稳定控制策略 ........................................................................... 13 2.2.5 弯道控制策略 ................................................................................... 13 2.2.6 实测结果和现象分析 ....................................................................... 14 2.3 车模参数 ....................................................................................................... 15 3 硬件设计…………………………………………………………………………18

3.1 智能车整体结构 ........................................................................................... 18 3.2 MC9SDG128B的最小系统及接口设计 ......................................................... 19 3.3 电源管理及分布 ........................................................................................... 20 3.4 光电传感器布局 ........................................................................................... 21

3.4.1 赛道识别传感器模块 ....................................................................... 21 3.4.2 测速模块 ........................................................................................... 22 3.5 电机驱动模块 ............................................................................................... 23 3.6 舵机驱动模块 ............................................................................................... 24 3.7 拨码开关模块 ............................................................................................... 25 4 机械结构调整……………………………………………………………………27

4.1 一些重要参数对赛车的影响 ....................................................................... 27 4.2 车模底盘参数调整 ....................................................................................... 28 4.3 重心位置对汽车性能的影响 ....................................................................... 30 4.4 汽车侧滑的处理 ........................................................................................... 31 4.5 底盘离地间隙 ............................................................................................... 32 4.6 齿轮传动间距调整 ....................................................................................... 32 4.7 后轮差速机构调整 ....................................................................................... 32 5 智能车软件开发环境及软件设计………………………………………………34

5.1 智能车软件开发环境 ................................................................................... 34