基于STM32微控制器的旋转式倒立摆控制系统设计

摘要随着自动化技术的不断发展,控制理论已经应用于各个领域。特别是上世纪80年代之后,人工智能、航空航天技术的迅猛发展为智能控制、非线性控制技术的研究提供了动力。但是由于前沿领域的设备过于昂贵,许多控制技术的研究者因无法购买设备进行实验而最终只能放弃研究。于是,就迫切地需要一个实验模型去代替昂贵的实验设备。这样,倒立摆系统就应用而生并且因其具有非线性、多变量、固有的不稳定性特点以及其低廉的价格而成为理想的实验平台。

本设计是基于STM32微控制器的旋转式倒立摆控制系统,运用摆杆的起摆与平衡的控制算法来解决其不稳定、非线性的问题。设计的控制系统包括一个微控制器、两个编码器、一个电机、倒立摆支架以及配套的电路。本设计最核心的部分是倒立摆的起摆与平衡控制算法的设计。通过对算法的设计和调试。我们能够克服倒立摆系统本身所具有的滞后性、不稳定性和非线性问题。因为倒立摆系统的特性与火箭发射和机器人的系统具有相似性,所以倒立摆算法的研究对于火箭发射和机器人系统的应用具有重要的借鉴意义。

 

关键字:倒立摆系统;实验平台;起摆和平衡控制算法

 

 

 

Control System Design of Rotary Inverted Pendulum Based on the Core of STM32

Abstract: With the continuous development of automation, Control theory has been being applied in various fields. Especially since 80’s last century, the rapid development of artificial intelligence and aerospace have motivated the massive research to improve the intelligent control technology and nonlinear control technology. But the research equipment applied in the frontier field was so expensive that many researchers who were dedicated into control technology could only give up the research for intelligent control and aerospace control at last because of the inability to purchase such equipment. As a result, an experimental model able to replace expensive laboratory equipment was urgently needed. In this way, the inverted pendulum system was designed and became an perfect experimental platform due to its nonlinear, multi-variable, inherent instability and its low price.

本设计是基于STM32微控制器的旋转式倒立摆控制系统,根据研究摆杆的起摆与平衡的控制算法来解决其不稳定、非线性的问题。设计的控制系统包括一个微控制器、两个编码器、一个电机、倒立摆支架以及配套的电路。本设计最核心的部分是倒立摆的起摆与平衡控制算法的设计。通过对算法的设计和调试克服倒立摆系统本身所具有的滞后性、不稳定性和非线性问题。因为倒立摆系统的特性与火箭发射和机器人的系统具有相似性,所以倒立摆算法的研究对于火箭发射和机器人系统的应用具有重要的借鉴意义。

This design is the rotary inverted pendulum control system based on the core of STM32, using swing-up and balance control algorithm to solve its unstable and nonlinear control problem. The control system design consists of a microcontroller, two encoders, a motor, the load gear of inverted pendulum and matching circuit. The most important part of this design is the programming of swing-up and balance control algorithm of the inverted pendulum. Through writing and debugging the code, we can solve the hysteresis, instability and nonlinear problem of the inverted pendulum system. Because the control characteristics of the inverted pendulum system is similar to the system of the rocket and robot, the research of the inverted pendulum has important significance for the study of the rocket and robot system.

 

Keywords: Inverted pendulum system; Experimental platform; Control algorithm of swing-up and balance

 

目  录

第 1 章 绪论… 1

1.1         研究背景… 1

1.2         课题目前研究现状… 2

1.3         设计意义… 3

第 2 章 系统整体的设计方案… 4

2.1 电路设计方案… 4

2.2 机械结构设计方案… 5

第 3 章 旋转式倒立摆系统的数学模型分析… 6

3.1 欧拉-拉格朗日方程式… 7

3.2 系统的运动学分析… 8

3.2.1 过渡矩阵… 9

3.2.2 倒立摆的运动学分析… 11

3.3 求出拉格朗日因子… 13

3.3.1 系统总动能… 13

3.3.2 系统总势能… 14

3.3.3 拉格朗日算子… 14

3.4 运动的非线性方程… 14

3.4.1 倒立摆运动的非线性等式… 14

3.4.2 欧拉-拉格朗日公式的矩阵形式… 15

3.5 倒立摆控制系统的线性状态空间表达式… 16

3.5.1 倒立摆运动方程式的线性化… 16

3.5.2 获得最终的线性状态空间表达式… 17

第 4 章 倒立摆控制器的设计… 19

4.1 倒立摆平衡控制器的设计… 19

4.2 倒立摆起摆控制器设计… 21

第 5 章 倒立摆硬件系统设计… 23

5.1 系统的硬件设计框图… 23

5.2  STM32F10X最小系统… 23

5.2.1  STM32F10X的优势… 24

5.2.2  STM32的内部构成和外设资源… 24

5.3 电机驱动… 25

5.4 系统电源模块… 26

5.5 传感器模块… 27

5.5.1 欧姆龙500线两相编码器… 27

5.5.2 光电码盘… 27

第 6 章 倒立摆软件系统设计… 29

6.1 系统运行的总体流程图… 29

6.2 起摆控制器的设计… 30

6.2.1 基于角度反馈的起摆控制算法… 30

6.2.2 基于能量的起摆控制算法… 32

6.3 平衡控制器的设计… 33

6.3.1 双环PID平衡控制器的设计… 33

6.3.2 基于LQR的平衡控制器设计… 34

总结… 35

致谢… 36

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。

最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。 若排除这种情况,可在对应资源底部留言,或联络我们。

对于会员专享、整站源码、程序插件、网站模板、网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。

如果您已经成功付款但是网站没有弹出成功提示,请联系站长提供付款信息为您处理

源码素材属于虚拟商品,具有可复制性,可传播性,一旦授予,不接受任何形式的退款、换货要求。请您在购买获取之前确认好 是您所需要的资源