CD00298474_stm32f4_pmsm_foc_sdk使用指南原版.pdf
《CD00298474_stm32f4_pmsm_foc_sdk使用指南原版.pdf》由会员分享,可在线阅读,更多相关《CD00298474_stm32f4_pmsm_foc_sdk使用指南原版.pdf(129页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、November 2012Doc ID 18458 Rev 41/129UM1052User manualSTM32F05xx/STM32F100 xx/STM32F103xx/STM32F2xx/ STM32F4xx PMSM single/dual FOC SDK v3.3IntroductionThis manual describes the Motor Control Software Development Kit (generically called software library) designed for and to be used with STM32F05xx, S
2、TM32F100 xx, STM32F103xx, STM32F2xx or STM32F4xx microcontrollers. The software library implements the Field Oriented Control (FOC) drive of 3-phase Permanent Magnet Synchronous Motors (PMSM), both Surface Mounted (SM-PMSM) and Internal (I-PMSM).The control of an AC induction motor equipped with enc
3、oder or tacho generator is described in the UM0483 user manual.The STM32F family of 32-bit Flash microcontrollers is based on the breakthrough ARM Cortex-M cores: the Cortex-M0 for STM32F05xx, the Cortex-M3 for STM32F1xx and STM32F2xx, and the Cortex-M4 for STM32F4xx, specifically developed for embe
4、dded applications. These microcontrollers combine high performance with first-class peripherals that make it suitable for performing both permanent-magnet and AC induction motor FOC.The PMSM FOC library can be used to quickly evaluate ST microcontrollers and complete ST application platforms, as wel
5、l as to save time when developing Motor Control algorithms to be run on ST microcontrollers. This PMSM FOC library is written in C language, and implements the core Motor Control algorithms (reference frame transformations, currents regulation, speed regulation, space-vector modulation, energy effic
6、iency optimizations) as well as sensor reading/decoding algorithms (three shunts, ST-patented single DC link shunt, isolated current sensors, incremental encoder, hall sensors) and a sensorless algorithm for rotor position reconstruction.When deployed with STM32F103xx High-Density / XL-Density devic
7、es (Flash memory density between 256 and 512 Kbytes / 768 Kbytes and 1 Mbyte), STM32F2xx or STM32F4xx, the PMSM FOC library enables simultaneous dual FOC of two different motors. The library can be customized to suit user application parameters (motor, sensors, power stage, control stage, pin-out as
8、signment) and provides a ready-to-use Application Programming Interface (API). A user project has been implemented to demonstrate how to interact with the Motor Control API. The project provides an LCD User Interface and a USART User Interface, represents a convenient real-time fine-tuning and remot
9、e control tool for the motor control application.A PC Graphical User Interface (GUI), the ST Motor Control Workbench, allows a complete and easy customization of the PMSM FOC library. In conjunction with the ST motor control starter kits, a PMSM motor can be made to run in a very short time using de
10、fault parameters.Basic knowledge of C programming, C+ programming (for customizing the LCD User Interface), PM motor drives and power inverter hardware is necessary for using the software library. Table 1 lists the microcontrollers concerned by this user manual. Table 1.Applicable productsTypeApplic
11、able productsMicrocontrollersSTM32F05xx, STM32F100 xx, STM32F103xx, STM32F2xx, STM32F4xx ContentsUM10522/129Doc ID 18458 Rev 4Contents1MC software development kit architecture . . . . . . . . . . . . . . . . . . . . . . 102Documentation architecture . . . . . . . . . . . . . . . . . . . . . . . . .
12、. . . . . . . . . 132.1Where to find the information you need . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Overview of the FOC and other implemented algorithms . . . . . . . . . . 153.1
13、Introduction to the PMSM FOC drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2PM motor structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.3PMSM fundamental equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.
14、3.1SM-PMSM field-oriented control (FOC) . . . . . . . . . . . . . . . . . . . . . . . . . 193.4PMSM maximum torque per ampere (MTPA) control . . . . . . . . . . . . . . . . 203.5Feed-forward current regulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.6Flux-weakening contro
15、l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.7PID regulator theoretical background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.7.1Regulator sampling time setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.8A priori determinati
16、on of flux and torque current PI gains . . . . . . . . . . . . 263.9Space vector PWM implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.10Detailed explanation about reference frame transformations . . . . . . . . . . 303.10.1Circle limitation . . . . . . . . . . . . . . . .
17、 . . . . . . . . . . . . . . . . . . . . . . . . . . . 324Current sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.1Current sampling in three-shunt topology . . . . . . . . . . . . . . . . . . . . . . . . 344.1.1Tuning delay parameters and sampling s
18、tator currents in three-shunt resistor topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.2Current sampling in single-shunt topology . . . . . . . . . . . . . . . . . . . . . . . . 404.2.1Definition of the noise parameter and boundary zone . . . . . . .
19、. . . . . . . 434.3Current sampling in isolated current sensor topology . . . . . . . . . . . . . . . 465Rotor position/speed feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.1Sensorless algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20、 . 495.1.1A priori determination of state observer gains . . . . . . . . . . . . . . . . . . . . 505.2Hall sensor feedback processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52UM1052ContentsDoc ID 18458 Rev 43/1295.2.1Speed measurement implementation . . . . . . . . . . . . . .
21、 . . . . . . . . . . . . 525.2.2Electrical angle extrapolation implementation . . . . . . . . . . . . . . . . . . . . 545.2.3Setting up the system when using Hall-effect sensors . . . . . . . . . . . . . 555.3Encoder sensor feedback processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
22、5.3.1Setting up the system when using an encoder . . . . . . . . . . . . . . . . . . . 586Working environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606.1Motor control workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616.2MC S
23、DK customization process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636.3Motor control library project (confidential distribution) . . . . . . . . . . . . . . . 656.4Motor control application project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666.5User project
24、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676.6LCD UI project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707MC application programming interface (API) . . . . . . . . . . . . . . . . . . . . 747.1MCIn
25、terfaceClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747.1.1User commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757.1.2Buffered commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CD00298474_stm32f4_pmsm_foc_sdk 使用指南 原版
限制150内