宇航计测技术

• 论文 • 上一篇    下一篇

基于STM32的直流电机调速新方法

司开波1;黄健1;吕林涛1   

  1. 1、西京学院,西安 710123
  • 出版日期:2018-04-25 发布日期:2018-04-25
  • 作者简介:司开波(1982-),男,讲师,主要研究方向:嵌入式开发技术及信号处理。
  • 基金资助:
    陕西省教育厅资助项目(16JK2239)基于数字图像处理的三坐标测量机开发;陕西省科学计划课题(2016GY141)基于图像内容的网络不良图像智能过滤系统;陕西高等教育教学改革研究项目(17BY118)大数据时代下计算机科学与技术专业应用型人才培养模式改革与实践;西安市科技计划项目(201787CG/RC050(XJCY001))基于云计算的433无线智能抄表安全验证系统;西京学院教学改革研究项目(JGYB1718):“单片要原理”第二课堂建设与大学生创新能力培养的研究。

A New Method of DC Motor Speed Regulation based on STM32

SI Kai-bo1;HUANG Jian1;LV Lin-tao1   

  1. 1、XiJing University,Xi′an 710123,China
  • Online:2018-04-25 Published:2018-04-25

摘要: 为满足不同的需求,经常使用PWM波调整直流电机的转速。但在实际应用中,即使是一个固定的PWM值,直流电机的转速也未必恒定。为了解决这个问题,通常用PID算法控制电机的转速,使其达到一个稳定值。但PID算法比较复杂,要进行建模、参数整定等。提出一种简单、可行的方法,在很短的定时时间内,测试电机的转速,将其与设定转速值进行比较,得到误差。根据误差值的正负,调整PWM波中的正脉宽的宽度,以达到对电机转速的快速、实时调整。经过实测:采用STM32微处理器,能够快速调整电机转速,并使其很快达到一个稳定值。

关键词: 直流电机, 调速, PWM, PID算法

Abstract: In order to meet different requirements, the PWM wave is often used to adjust the speed of DC motor. However, in practical applications, even a constant PWM value, DC motor speed may not be stable value. In order to solve this problem, the PID algorithm is often used to control the motor speed to achieve a stable value. However, the PID algorithm is more complex, to modeling, parameter tuning, etc.. A simple and feasible method is proposed to test the motor speed in a short time. According to the positive and negative values of the error, the width of the positive pulse width is adjusted to achieve the fast and real-time adjustment of the motor speed. After the measurement: using STM32 microprocessor, can quickly adjust the motor speed, and it will soon reach a stable value.

Key words: DC motor, Speed regulation, PWM, PID algorithm