基于单片机的一级倒立摆控制器设计(刘童)

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

湖南文理学院

课程设计报告

课程名称:专业课程设计

专业班级:自动化11101班学号39

学生姓名:刘童

指导教师:王文虎

完成时间:2014年6月12日

报告成绩:

评阅意见:

评阅教师日期

直线一级倒立摆,是由沿直线导轨运动的小车以及一端固定于小车的匀质长杆组成的非线性的、不稳定的系统。系统以C8051F020单片机为主控芯片,包括电源模块、高精度电位器检测模块、L298N电机驱动模块、直流减速电机以及倒立摆本体构成。由高精度电位器检测模块测得小车的位置和摆杆相对垂直方向的角度,作为系统的两个输出量被反馈至单片机。单片机根据PID控制算法,计算出控制量,并转化为相应的电压信号提供给驱动电路,以驱动直流减速电机的运动,从而通过牵引机构带动小车的移动来控制摆杆和保持平衡。借助倒立摆的数学模型加入PID调节来控制它,从而使其成为稳定的系统,通过Matlab对仿真效果的分析,基本上达到了预期的效果。

关键词一级倒立摆;微处理器;增量式PID;伺服电机;Matlab

Linear inverted pendulum system,is the movement of the carriage along the linear guide rail is fixed on the trolley and the uniformity of long rod composed of nonlinear, unstable.The system is mainly controlled by the microcontroller C8051F020, which comprises a power supply module, high precision potentio meter detection module, L298N motor drive module, DC motor and theinverted pendulum. A high precision potentiometer detection module measuredtrolley position and pendulum relative vertical angles, as the two output system isfeedback to the microcontroller. SCM based on PID control algorithm, calculates the volume control, and to provide a corresponding voltage signal to the drive circuit to drive DC motor, motor, and through the traction mechanism to drive thecar to control the movement and balance. With the help of a mathematical model of inverted pendulum with PID regulation to control it, so that it becomes a stable system, through the analysis of the simulation results of the Matlab, basically achieved the expected results.

Keywords:an inverted pendulum; microprocessor; incremental PID; servo motor; Matlab

摘要............................................................................................................................................... I Abstract ......................................................................................................................................... II 第一章绪论.. (1)

1.1 设计要求 (1)

1.2方案设计 (1)

1.2.1 光电编码检测 (2)

1.2.2 高精度电位器检测 (2)

1.2.3方案论证 (2)

第二章一阶倒立摆的数学建模 (4)

2.1 倒立摆模型抽象 (4)

2.1.1 倒立摆微分方程模型 (4)

2.1.2 倒立摆的传递函数模型 (5)

2.2一阶倒立摆的状态空间模型 (6)

第三章基于Matlab的倒立摆PID分析及仿真 (8)

3.1一级倒立摆模型 (8)

3.1.1 一级倒立摆实际参数 (8)

3.1.2系统阶跃响应分析 (9)

3.2一阶倒立摆PID控制器设计 (10)

3.2.1 PID概述 (10)

3.2.2 PID参数设定 (11)

3.3 MATLAB仿真 (12)

3.3.1 MATLAB简述 (12)

3.3.2 MATLAB仿真应用 (14)

第四章一级倒立摆硬件电路设计 (19)

4.1单片机最小系统 (19)

4.2高精度电位器检测模块 (19)

4.3 L298N电机驱动模块 (19)

4.4电源模块 (20)

第五章一级倒立摆软件设计 (21)

5.1 主程序设计 (21)

5.2 比较中断子序设计 (21)

5.3 ADC转换中断程序设计 (21)

参考文献 (21)

总结 (23)

致谢 (24)

附录一硬件电路图 (1)

相关文档
最新文档