基于STC89C52的简易倒立摆控制装置设计
2014-10-14汤燕
汤燕
摘 要: 以全国大学生电子设计竞赛为背景,通过分析简易旋转倒立摆及控制装置系统的任务和基本要求,设计制作了基于单片机为主控芯片的倒立摆控制系统,利用光电编码器传回来的反馈信号采用PID控制调节,并发出控制信号驱动直流电机,实现调速控制。该装置可以使旋转臂适时适当的摆动,准确地让摆杆在短时间内达到题目所需的要求。
关键词: 光电编码器; PID控制; 简易旋转倒立摆; 全国大学生电子设计竞赛
中图分类号: TP29?34 文献标识码: A 文章编号: 1004?373X(2014)20?0160?03
Design of simple inverted pendulum control device based on STC89C52
TANG yan
(Yinchuan Energy Institute, Yinchuan 750105, China)
Abstract: Taking National Undergraduate Electronic Design Contest as a background, an inverted pendulum control system based on single chip microcomputer taking as the main control chip was designed and manufactured by analyzing the tasks and basic requirements of simple rotary inverted pendulum and its control system. PID is used to control and adjust the feedback signal emitted from photoelectric encoder, and send control signal to drive DC motor, so as to achieve speed control. The device can make the rotating arm swing timely, and make the swing bar meet the subject requirements in a short period of time.
Keywords: single chip microcomputer; photoelectric encoder; PID control; simple rotary inverted pendulum; National Undergraduate Electronic Design Contest
0 引 言
在全国大学生电子设计竞赛中,简易倒立摆的控制装置设计具有非常典型的意义,由于其运动特性与日常所见到的各种重心高,支点低的物体稳定问题,及双足步行机器人关节运动等有很大的相似性,因此,对其的研究也一直受到国内外学者的广泛关注[1]。本文采用AT89C52单片机设计的简易旋转倒立摆控制系统,机械装置构造简单、工作可靠、价格低、体积小,是研究控制理论较理想的控制装置,其控制具有高阶次,不稳定、多变量、非线性和强耦合等特性。
1 旋转倒立摆装置的设计
1.1 机械结构设计
旋转倒立摆的结构如图1所示。电动机A固定在支架B上,通过转轴F驱动旋转臂C旋转。摆杆E通过转轴D固定在旋转臂C的一端,当旋转臂C在电动机A驱动下作往复旋转运动时,带动摆杆E在垂直于旋转臂C的平面作自由旋转。
图1 旋转倒立摆结构示意图
由旋转倒立摆的结构示意图,选择做了金属框架,按照示意图所示,安装了简易的倒立摆,由它来完成目标控制任务。……
