1、 学士学位论文 基于 MCU 的通用控制器设计 院 系: 学 号: 专业名称 : 学 生 姓 名: 指 导 老 师: 起 讫 日 期: 设 计 地 点: 基于 MCU 的通用控制器设计 摘要:电机控制器的发展朝着集成化和通用化的方向发展着。 目前, 电机控制专用集成电路芯片技 术已经比较成熟,电机控制专用集成电路芯片的种类也十分齐全,但在通用性上还显得不足。而 且,电机控制专用集成电路品种规格繁多,产品资料和应用资料丰富,但是又很分散,需要花时 间收集整理、分析消化,研究电机的通用控制器很有必要。 本次设计先用 MATLAB 对 PID 控制器进行仿真,计算,包括参数整定,加深对控制器和离散算
2、 法的认识,再进一步探索双闭环反馈的控制器算法。然后在基于 STM32 的电机控制电路中进行检 验,以便进一步优化算法。 这次设计的通用控制器其通用性主要体现在两个方面:一是 PID 控制器结构的通用性即可以 选择单闭环,双环,甚至三环控制,对不需要的控制只需要将该参数设置为 0;二是 PID 参数的 通用性,即可以很方便的对 PID 参数进行调整,以适应实际的需求。 就目前的研究结果来看,理论研究基本完成,亦根据实际情况拟合出了电机转速与占空比之 间的函数关系,将这种关系应用在简单的单闭环控制中取得了很好的效果,在不使用这种关系, 亦对 PID 参数进行了整定,还需要进一步检验 PID 算法
3、对实际电机控制的效果,提高其通用性。 关键词;STM32;通用控制器;PID;MATLAB 仿真 Design of MCU Based Universal Controller Abstract: The motor controller is becoming more and more integrated and universal . At present, the technology of motor control ASIC chip is relatively mature, the types are also very complete, but it lacks uni
4、versality partly. Moreover, there are varieties specifications, product information and application data but very scattered, it takes lots of time to collect and analyze them.So the study of the universal motor controller is necessary. In the design , firstly the MA TLAB is used to emulate the PID controller, including parameter calculation, to achieve a better understanding on the controller and the discrete algorithm, and then an algorithm of double closed-loop control system is explored.