控制BLDC资料汇总

来源:互联网 发布:淘宝的高仿篮球鞋 编辑:程序博客网 时间:2024/06/06 09:59

        过去曾由在其它地方发过关于BLDC控制资料的帖子,看起来反映不错,帖子算是自己的原创,整理一下,这里也一并收录到自己的博客中。

 

        最近打算将自己在其它地方发过的一些帖子收集整理一下,算是留个备份,省得自己以后找一些资料也麻烦。这个帖子得原来位置在马达控制应用笔记和参考代码--看看这个帖的访问量能达

 

        真正的技术问题,在ST MCU论坛上还是太少了。不知道是用的人太少,还是ST推广不够……?(怎么觉得好像是骂在自己啊?首先申明我不是ST的)以前在其它网站上曾经有整理贴出来过,既然这里有人问道ST7MC系列,顺手将这些资料转来这里,部分内容稍有删除。

        最近发现突然出现很多人问起如何使用MCU来控制马达,由于工作的原因,一直有在接触ST7MC和dsPIC30F的BLDC变频控制,手上到是有一些这样的资料,分别是ST7MC系列、TI TMS320LF2xxx系列、Microchip PIC18和dsPIC系列、Freescale MC68H和MC56F800系列的马达控制资料。里面有设计简单的马达控制应用,也有用了PI算法的,也有使用空间矢量算法的。我干脆分帖将这些资料列出来。大家一个方便,有需要的自己找自己所需吧。我本人使用过ST7MC、diPIC30F4011、TMS320LF2407、MC56F8156,不过只有ST7MC是现在用的最多的,后面的两个型号很久以前读书时毕业设计用来做UPS并机的,现在都差不多忘光了,只是还留下点资料,也一并整理出来给大家参考,免得需要的时候满大街找,不知到哪有。资料我可不负责更新啊。

        相信大家只要了解电机特性,明白控制理论,用什么单片机都应该是一样的。资料都是英文的,请不要向我要中文的资料,如果我有中文的话,我会尽量提供。PDF格式为应用笔记,ZIP或RAR为参考代码。适当的地方我会加一点中文概述,方便大家。

一、ST7MC部分

ST单片机首页
http://mcu.st.com/mcu/   
这里你可以找到所有ST官方的单片机的资料,包括数据手册、用户手册、应用笔记、参考代码、开发环境

ST7MC的官方网页页面:
http://mcu.st.com/mcu/inchtml.php?fdir=pages&fnam=st7mc

ST7MC的官方应用笔记页面:
http://mcu.st.com/mcu/modules.php?name=mcu&file=familiesdocs&FAM=30#Application%20Note
里面有提及ST92141的,这个型号ST已经不建议在新的设计中使用了,使用ST7MC来替代。

1、ST7MC Three-Phase AC Induction Motor Ccontrol Software Library
http://www.st.com/stonline/books/pdf/docs/10266.pdf
http://www.st.com/stonline/products/support/micro/files/an1904.zip

2、ST7MC Three-Phase BLDC Motor Control Software Library  
http://www.st.com/stonline/books/pdf/docs/10267.pdf
http://www.st.com/stonline/products/support/micro/files/an1905.zip
这个库使用的是三次谐波,PI算法实现电流环或电压环的闭环控制。

3、ST7MC PMAC Sine Wave Motor Control Software Library  
http://www.st.com/stonline/books/pdf/docs/10404.pdf
http://mcu.st.com/mcdfiles/1103128212.zip

4、PFC for ST7MC Starter Kit
http://www.st.com/stonline/books/pdf/docs/10426.pdf

5、PWM Management for 3-Phase BLDC Motor Drives using the ST7FMC  
http://www.st.com/stonline/books/pdf/docs/10691.pdf

6、Back EMF detection during PWM on time by ST7MC
http://www.st.com/stonline/books/pdf/docs/10775.pdf

7、Space Vector Modulation using 8-Bit ST7FMC Microcontroller and AK-ST7FMC Starter Kit  
http://www.st.com/stonline/books/pdf/docs/11367.pdf
用ST7MC实现空间矢量算法,有详细的思路说明,具体的参考代码没有找到

8、ST7MC1 ST7MC2 datasheet
http://www.st.com/stonline/books/pdf/docs/9721.pdf

9、BLDC Sensor Motor Stand Alone library rev 2.0
http://www.st.com/stonline/products/support/micro/files/an1905_3ph_sr_rn.pdf
http://www.st.com/stonline/products/support/micro/files/an1905_3ph_sr.zip

10、BLDC Sensorless Motor Stand Alone Library rev 2.1  
http://www.st.com/stonline/products/support/micro/files/an1905_3ph_sl_rn.pdf
http://www.st.com/stonline/products/support/micro/files/an1905_3ph_sl.zip

11、ST7MC Three-phase AC Induction Motor Control Library Rev 2.0  
http://www.st.com/stonline/products/support/micro/files/an1904_rn.pdf
http://www.st.com/stonline/products/support/micro/files/an1904_sw.zip

12、ST7MC-KIT/BLDC Starter kit Software Suite.  
(includes comprehensive PC Graphical User Interface and C Software libraries for standalone operation of the starter kit)
http://mcu.st.com/mcdfiles/1131027818.exe
这个GUI可以看到调试的时候需要配置那些参数。


13、ST有一些内部培训的材料,下列的资料仅用于技术交流,请勿用于商业用途。如需商业用途,请删除下述这些资料,然后自行与ST联系获取你的需要。希望下载者注意!
AC Induction Motor

AC Induction Motor

1)、AC Induction Motor Advanced.pdf

2)、AC Induction Motor Basics.pdf

3)、AC Motor Control Library Overview.pdf

4)、Use of GUI and stand-alone software.pdf

5)、Working with the AC Motor Control Software Library.pdf
 
6)、Hands-on session exercises.pdf

7)、AC induction motor MTC peripheral exercise.pdf

8)、AC induction motor MTC peripheral,features and associated registers.pdf

9)、Sinewave generation technique.pdf

10)、Sinewave generation technique(Solution).pdf

BLDC Motor

1)、BLDC Motor basics.pdf

2)、ST7FMC2x BLDC Motor Peripheral.pdf

3)、ST7FMC2x Microcontroller.pdf

4)、BLDC START & DRIVE.pdf

5)、BLDC Flowchart.pdf

6)、Starter Kit & GUI.pdf

7)、BLDC MOTOR BASIC.pdf

8)、BLDC motor MTC peripheral exercise.pdf



14、ST7 Flash STICK User Manual   
http://www.st.com/stonline/books/pdf/docs/9133.pdf  

ST7-STICK manufacturing files   
http://mcu.st.com/mdtfiles/1038906884.zip 

 
这是ST7 Stick的PCB gerber和电路原理图文档。这个工具是ST7的并口版编程器,支持目前大多数的ST7系列MCU编程。如果你手上有ST7MC,只要有快这样的板子,你就可以开始开发了。这是官方的资料,既然放出来了,应该是可以自己拿来做的。  

15)、电机控制.pdf
电机控制的概念,工作原理,拓扑 L62xx系列设计参考资料、注意事项,如果需要使用ST的分立马达驱动模块,这是一份非常有用的资料。



二、Ti DSP TMS320LF2xxx部分

Application Software C2000 Apps Software from Texas Instruments
http://focus.ti.com/dsp/docs/dspsupporttoolssoftwareaut.tsp?sectionId=3&tabId=475&familyId=110&toolTypeId=32
里面有几种常见的电机驱动参考代码,DSP的,含F24系列、F28系列。



三、Microchip部分



四、Freescale部分

Freescale有一款DSP,和目前Microchip的dsPIC结构类似,也是MCU+DSP模式,他们是MC56F83xx/DSP56xxx系列。这一款DSP用于马达驱动、变频控制是一个不错的选择。建议大家看了资料以后,需要了解的只是看懂驱动的原理不要太过分沉迷与器件,比如对照C语言的源文件理解空间矢量。个人感觉其实用什么MCU或DSP驱动都是一样,只要资源可以满足要求都是可以使用的。Freescale的资料其实蛮多的,我这里只提供Reference Designs的列表,需要了解的只要下载Reference Manuals基本上就可以了解个大概。我仅列出与马达控制、变频驱动相关的资料列表(凡是有列出内容,但没有详细下载地址的可与我联系grant_jx@163.com,,也可以到Freescale的网站上注册ID后再下载):


1、RD56F801XACIM  
    Design of an ACIM Vector Control Drive using the 56F801X
    1)、Reference Manuals:
    http://www.freescale.com/files/dsp/doc/ref_manual/DRM075.pdf



2、RD56F801XBLDCHS
    3-Phase BLDC Motor Control with Hall Sensor Using 56F801X Digital Signal Controllers    
    1)、Users Guides:
    http://www.freescale.com/files/dsp/doc/user_guide/56F8013BLDCUG.pdf
    2)、Application Notes
    http://www.freescale.com/files/product/doc/AN1916.pdf
    3)、Reports or Presentations
    http://www.freescale.com/files/ftf_2005/doc/reports_presentations/ZMC308_ELEVICH.pdf
    4)、Code Examples
    Code Examples.zip


3、RD56F801XPMSMBLDC
    PMSM and BLDC Sensorless Motor Control using the 56F801X
    1)、Reference Manuals:
    http://www.freescale.com/files/dsp/doc/ref_manual/DRM077.pdf
    2)、Reports or Presentations
    http://www.freescale.com/files/ftf_2005/doc/reports_presentations/ZMC313_HUTCHINGS.pdf


4、RD56F8300OUPS    
    Online UPS using a 56F83xx Device   
    1)、Reference Manuals:
     http://www.
    2)、Schematics  
    OrCAD Schematic Capture design file for the 56F8300 UPS Control Board  
    http://www.freescale.com/files/soft_dev_tools/hardware_tools/schematics/56F8300UPSCBOSCH.zip
    OrCAD Schematic Capture design file for the 56F8300 UPS Power Board   
    http://www.freescale.com/files/soft_dev_tools/hardware_tools/schematics/56F8300UPSPBOSCH.zip


5、RD56F8300SMPS    
    Digital AC/DC Switched-Mode Power Supply using a 56F8300 Digital Signal Controllers    
    1)、Reference Manuals:
    http://www.
    2)、Application Notes
    http://www.freescale.com/files/dsp/doc/app_note/AN3115.pdf
    3)、Training Reference Material
    http://www.freescale.com/files/dsp/doc/train_ref_material/56F8300SMPSMM.zip


6、RDDSCSENSORLESSBLDC    
    3-Phase Brushless DC Motor Sensorless Control using 56F801X   
    1)、Reference Manuals:
    http://www.freescale.com/files/dsp/doc/ref_manual/DRM070.pdf
    2)、Application Software
    http://www.

7、RDDSP56F8ACIMVHD    
    3-Phase ACIM Volt per Hertz Motor Control Using 56F80X or 56F8300 Digital Signal Controllers    
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM021.pdf



8、RDDSP56F8ACVCD    
    3-Phase AC Induction Motor Vector Control Using 56F80X or 56F8300 Digital Signal Controllers  
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM023.pdf
    2)、Application Software
    http://www.


9、RDDSP56F8BLDCAZC    
    3-Phase BLDC Motor Control with Sensorless Back-EMF ADC Zero Crossing Detection Using 56F80X or 56F8300 Digital Signal Controllers   
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM026.pdf
    2)、Application Software
    http://www.


10、RDDSP56F8BLDCE    
    3-Phase BLDC Motor Control with Encoder using 56F80X or 56F8300 Digital Signal Controllers   
    1)、Application Notes :
    http://www.freescale.com/files/dsp/doc/app_note/AN1961.pdf



11、RDDSP56F8BLDCHS    
    3-Phase BLDC Motor Control with Hall Sensor Using 56F80X or 56F8300 Digital Signal Controllers   
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM025.pdf
    2)、Application Software
    http://www.


12、RDDSP56F8BLDCZC    
    3-Phase Sensorless BLDC Motor Control with Back-EMF Zero Crossing Detection using 56F80X or 56F8300 Digital Signal Controllers
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM027.pdf
    2)、Application Software
    http://www.



13、RDDSP56F8PMSDE    
    3-Phase PM Synchronous Motor Control with Quadrature Encoder Using 56F80X Digital Signal Controllers
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM029.pdf
    2)、Application Software
    http://www.

14、RDDSP56F8SMTVC    
    3-Phase PM Synchronous Motor Torque Vector Control Using 56F80X or 56F8300 Digital Signal Controllers
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM018.pdf
    2)、Application Software
    Software Files for 3-Phase PM Synchronous Motor Torque Vector Control Using 56F805
    http://www.
    Software Files for 3-Phase PM Synchronous Motor Torque Vector Control Using 56F8300
    http://www.

15、RDDSP56F8SRDE    
    3-Phase Switched Reluctance Motor Control with Encoder Using 56F80X Digital Signal Controllers
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM031.pdf
    2)、Application Software
    http://www.



16、RDDSP56F8SRDHS    
    3-Phase SR Motor Control with Hall Sensor Reference Design for 56F80X or 56F8300 Digital Signal Controllers
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM032.pdf
    2)、Application Software
    http://www.


17、RDDSP56F8SRDS    
    3-Phase SR Motor Sensorless Control Reference Design using 56F80X or 56F8300 Digital Signal Controllers  
    1)、Reference Manuals:
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM030.pdf
    2)、Application Software  
    http://www.


五、Atmel AT90PWMx  
就是资料太少,看上起在低成本的竞争上性能与配置蛮有优势的,就是不知道价格如何?

AT90PWM2/3 DataSheet
http://www.atmel.com/dyn/resources/prod_documents/doc4317.pdf


Code example for AT90PWM3 - PSC1 in 1 ramp mode Code example in C language for IAR compiler  
http://www.atmel.com/dyn/resources/prod_documents/at90pwm3_psc1_one_ramp.zip

Code example for AT90PWM3 - PSC1 in 1 ramp mode Code example in Assembly language for AVR Studio   
http://www.atmel.com/dyn/resources/prod_documents/at90pwm3_psc1_one_ramp_ass.zip

Code example for AT90PWM3 - PSC1 in 2 ramps mode Code example in C language for IAR compiler   
http://www.atmel.com/dyn/resources/prod_documents/at90pwm3_psc1_two_ramp.zip

Code example for AT90PWM3 - PSC1 in 4 ramps mode Code example in C language for IAR compiler   
http://www.atmel.com/dyn/resources/prod_documents/at90pwm3_psc1_two_ramp.zip

Code example for AT90PWM3 - PSC1 in centered aligned ramp mode Code example in C language for IAR compiler   
http://www.atmel.com/dyn/resources/prod_documents/at90pwm3_psc1_centered.zip

ATAVRMC100 - BLDC Motor Control  Hardware User Guide  
http://www.atmel.com/dyn/resources/prod_documents/doc7551.pdf

AVR440: Sensorless Control of Two-Phase Brushless DC Motor  
http://www.atmel.com/dyn/resources/prod_documents/doc8007.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR440.zip

AVR441: Intelligent BLDC Fan Controller with Temperature Sensor and Serial Interface  
http://www.atmel.com/dyn/resources/prod_documents/doc8004.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR441.zip

AVR442: BLDC Fan Motor Control with ATtiny13  
http://www.atmel.com/dyn/resources/prod_documents/doc8005.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR442.zip

AVR443: Sensor-based control of three phase Brushless DC motor  
http://www.atmel.com/dyn/resources/prod_documents/doc2596.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR443.zip

AVR444: Sensorless control of 3-phase brushless DC motors  
http://www.atmel.com/dyn/resources/prod_documents/doc8012.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR444.zip

AVR448: Control of High Voltage Three-phase BLDC Motor  
http://www.atmel.com/dyn/resources/prod_documents/doc2592.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR448.zip

AVR492: Brushless DC Motor control using AT90PWM3  
http://www.atmel.com/dyn/resources/prod_documents/doc7518.pdf
http://www.atmel.com/dyn/resources/prod_documents/avr492.zip

AVR494: AC Induction Motor Control Using the constant V/f Principle and a Natural PWM Algorithm  
http://www.atmel.com/dyn/resources/prod_documents/doc7545.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR494_AVR495.zip

AVR495: AC Induction Motor Control Using the Constant V/f Principle and a Space-vector PWM Algorithm  
http://www.atmel.com/dyn/resources/prod_documents/doc7546.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR494_AVR495.zip

120度驱动BLDC和180度驱动BLDC的区别

通常对于BLDC所说的6步法驱动:

下图是一个简单的BLDC马达六步法的简单示意图:

按照六步法的每个相的导通次序,我们可以得到每个开关的导通时序:



如果把它的每一相的电压的导通时间以导通角度来做横坐标,我们可以看到:
1、每一相的导通角度是120度;
2、在每一相的导通时间内是使用PWM信号来调制的;

有传感器(霍尔)和无传感器(反电动势BEMF)是两种不同的 转子位置反馈方式。检测到转子的位置目的是为了实现换相。

在第二幅图中我们可以看到:
当BEMF到通过PhaseA、PhaseB、PhaseC中间值(即1/2VCC)时,可以算出转子的位置。
那BEMF又是如何实现?


上图的mx 点即为反电动势过零点,其中 x=1,2,3,4,5,6。对于特定的某一相而言,以 a 相为例, (x=3, 6)所处的60° 扇区即为反电动势过零检测区域。上图横坐标所对应的电压为半电压uN。

这样我们可以知道:
1. 反电动势过零点超前于实际换相点30°
2. 一个电周期内,任一相反电动势有两次过零
3. 检测反电动势过零点等效于检测实际换相点(霍尔位置传感器)
4. 反电动势检测可以简化为反电动势过零检测

这里需要注意的是:反电动势过零检测只是针对任意时刻没有通电的线圈(相/绕组)而言。

  下面这份图时Freescale给出的一个相压和BEMF的关联图:


对于BEMF的取样,同在三个电阻虚拟一个中性点,即虚地:


在PWM导通期间,  中点的电压位HV/2。这样通过三个电阻与每个相线连接,然后连在一起,人为的创建一个虚地点。
ST7MC使用了另一种方式:


这样做的好处?看上面的两种图啊。

120度和180度的区别在与其推动每一相的导通角不一样。



1、每一相的导通角为180;
2、输出的信号为正弦波;


对电流分解有激励电流(D轴)和转矩电流(Q轴)
1、D轴:一般为永磁体磁场方向;
2、Q轴:电枢电流方向,滞后D轴90度;

此类驱动一般都是用矢量控制的方式。下图是TI的一份应用笔记中给出的控制函数模型:


下图是瑞萨给出的一个数学原型:





    对于180的驱动我也不是很懂,只是了解了一点皮毛,仍在琢磨中。
    上述给出的贴图多是来自ST的ST7MC、Freescale、Ti、Microchip的DSP应用笔记,要是对马达驱动有兴趣,可以去这些网站上看看。