Overview of the STM32F103xx ACIM and PMSM motor control software libraries release 2.0

Similar documents
AN3332 Application note

STEVAL-ISQ010V1. High-side current-sense amplifier demonstration board based on the TSC102. Features. Description

AN4014 Application Note Adjustable LED blinking frequency using a potentiometer and STM8SVLDISCOVERY Application overview

EVAL-RHF310V1. EVAL-RHF310V1 evaluation board. Features. Description

STEVAL-ISA005V1. 1.8W buck topology power supply evaluation board with VIPer12AS. Features. Description. ST Components

AN279 Application note

AN3134 Application note

AN2837 Application note

STEVAL-CCA040V1. 4X10 Watt dual/quad power amplifier demonstration board based on the STA540SAN. Features. Description

AN1756 Application note

BD235 BD237. Low voltage NPN power transistors. Features. Applications. Description. Low saturation voltage NPN transistors

BD241A BD241C. NPN power transistors. Features. Applications. Description. NPN transistors. Audio, general purpose switching and amplifier transistors

BD533 BD535 BD537 BD534 BD536

BD243C BD244C. Complementary power transistors. Features. Applications. Description. Complementary NPN-PNP devices. Power linear and switching TO-220

Obsolete Product(s) - Obsolete Product(s)

Obsolete Product(s) - Obsolete Product(s)

2STR2215. Low voltage fast-switching PNP power transistor. Features. Applications. Description

AN2167 Application note

AN2581 Application note

Obsolete Product(s) - Obsolete Product(s)

UM0791 User manual. Demonstration firmware for the DMX-512 communication protocol receiver based on the STM32F103Zx. Introduction

STB High voltage fast-switching NPN power transistor. Features. Applications. Description

D44H8 - D44H11 D45H8 - D45H11

2STC4468. High power NPN epitaxial planar bipolar transistor. Features. Application. Description

2STC5242. High power NPN epitaxial planar bipolar transistor. Features. Application. Description

R 1 typ. = 15 kω. Order codes Marking Polarity Package Packaging. 2N6036 2N6036 NPN SOT-32 Tube 2N6039 2N6039 PNP SOT-32 Tube

TIP2955 TIP3055. Complementary power transistors. Features. Applications. Description

ST26025A. PNP power Darlington transistor. Features. Applications. Description

AN3218 Application note

BUX87. High voltage NPN power transistor. Features. Applications. Description

2STN2540. Low voltage fast-switching PNP power bipolar transistor. Features. Applications. Description

2STA1943. High power PNP epitaxial planar bipolar transistor. Features. Application. Description

Order codes Marking Polarity Package Packaging. MJD44H11T4 MJD44H11 NPN DPAK Tape and reel MJD45H11T4 MJD45H11 PNP DPAK Tape and reel

2STA1695. High power PNP epitaxial planar bipolar transistor. Features. Applications. Description

Obsolete Product(s) - Obsolete Product(s)

MJE182 Low voltage high speed switching NPN transistor Features Applications Description High speed switching NPN device

SPV1001T40. Cool bypass switch for photovoltaic application. Features. Application. Description TO-220

TR136. High voltage fast-switching NPN power transistor. Features. Applications. Description

Obsolete Product(s) - Obsolete Product(s)

2N2219AHR. Hi-Rel NPN bipolar transistor 40 V A. Features. Description

AN2333 Application note

2STC4468. High power NPN epitaxial planar bipolar transistor. Features. Application. Description

Order codes Marking Package Packaging. STX0560 X0560 TO-92 Bag STX0560-AP X0560 TO-92AP Ammopack. December 2010 Doc ID Rev 1 1/9

Obsolete Product(s) - Obsolete Product(s)

2ST2121. High power PNP epitaxial planar bipolar transistor. Features. Applications. Description 1 2 TO-3

BUL39D. High voltage fast-switching NPN power transistor. Features. Application. Description

STD1802T4-A. Low voltage fast-switching NPN power transistor. Features. Description. Applications

STN9260. High voltage fast-switching PNP power transistor. Features. Applications. Description. High voltage capability Fast switching speed

AN440 Application note

R 1 typ. = 15 kω. Order codes Marking Polarity Package Packaging. STX112-AP X112 NPN TO92-AP Ammopack STX117-AP X117 PNP TO92-AP Ammopack

LM723CN. High precision voltage regulator. Features. Description

Obsolete Product(s) - Obsolete Product(s)

2STX2220. High Gain Low Voltage PNP Power Transistor. General features. Description. Internal schematic diagram. Applications.

AN4112 Application note

ST13003D-K High voltage fast-switching NPN power transistor Features Applications Description

BUL38D. High voltage fast-switching NPN power transistor. Features. Applications. Description

BDX53B - BDX53C BDX54B - BDX54C

MD2310FX. High voltage NPN power transistor for standard definition CRT display. Features. Application. Description

STD840DN40. Dual NPN high voltage transistors in a single package. Features. Applications. Description

2STR SOT-23 Tape and reel 2STR1230G 130G SOT-23 Tape and reel

2STD1665. Low voltage fast-switching NPN power transistor. Features. Applications. Description

STN9360. High voltage fast-switching PNP power transistor. Features. Applications. Description. High voltage capability Fast switching speed

STN High voltage fast-switching PNP power transistor. Features. Application. Description. High voltage capability Very high switching speed

AN3116 Application note

STN2580. High voltage fast switching NPN power transistor. Features. Applications. Description. High voltage capability Fast switching speed

MJD122 MJD127 Complementary power Darlington transistors Features Applications Description

BUL743. High voltage fast-switching NPN power transistor. Features. Applications. Description

SD1728 (TH430) RF & Microwave transistors HF SSB application. Features. Description. Pin connection

Order codes Marking Package Packaging. STD2805T4 D2805 DPAK Tape & reel STD D2805 IPAK Tube. June 2007 Rev 1 1/9

3STL2540. Low voltage high performance PNP power transistor. Features. Applications. Description

AN1441 Application note

TDA7233D 1W AUDIO AMPLIFIER WITH MUTE

2STD1360 2STF1360-2STN1360

Part Number Marking Package Packing. MD1802FX MD1802FX ISOWATT218FX Tube. August 2006 Rev 1 1/8

STPS140Z-Y. Automotive power Schottky rectifier. Features. Description

Obsolete Product(s) - Obsolete Product(s)

LM323. Three-terminal 3 A adjustable voltage regulators. Features. Description

MD1802FX. High voltage NPN power transistor for standard definition CRT display. Features. Applications. Description

High voltage NPN Power transistor for standard definition CRT display. R BE =60Ω typ. Order code Marking Package Packing

Order codes Marking Package Packaging 2STF SOT-89 2STN2550 N2550 SOT-223. November 2008 Rev 1 1/8

LET9060C. RF power transistor from the LdmoST family of n-channel enhancement-mode lateral MOSFETs. Features. Description

ST1510FX. High voltage fast-switching NPN Power transistor. General features. Applications. Internal schematic diagram. Description.

STX13005G-AP. High voltage fast-switching NPN power transistor. Features. Applications. Description

Obsolete Product(s) - Obsolete Product(s)

LS1240. Electronic two-tone ringer. Features. Description. Pin connection (top view)

Obsolete Product(s) - Obsolete Product(s)

MD2009DFX. High voltage NPN power transistor for CRT TV. Features. Application. Description

CPL-WB-02D3. Wide-band, directional coupler with integrated 50 ohm loaded isolated port. Features. Applications. Description.

STEVAL-CCA011V1. Filter-free stereo 2x2.5 W Class-D audio power amplifier demonstration board based on the TS2012FC. Features.

Obsolete Product(s) - Obsolete Product(s)

Obsolete Product(s) - Obsolete Product(s)

KF25B, KF33B KF50B, KF80B

High voltage NPN Power transistor for standard definition CRT display. R BE =60Ω typ. Order code Marking Package Packing

1. Drain 2. Gate. Order code Marking Package Packaging. STAC4932F STAC4932F STAC244F Plastic tray. September 2010 Doc ID Rev 3 1/12

Part numbers Order codes Packages Temperature range. LM137 LM137K TO-3-55 C to 150 C LM337 LM337K TO-3 0 C to 125 C LM337 LM337SP TO C to 125 C

Obsolete Product(s) - Obsolete Product(s) Obsolete Product(s) - Obsolete Product(s)

Part Number Marking Package Packing. STC03DE220HV C03DE220HV TO247-4L HV Tube. November 2006 Rev 1 1/8

STC04IE170HV. Monolithic emitter switched bipolar transistor ESBT 1700 V - 4 A Ω. Features. Application. Description

STPSC V power Schottky silicon carbide diode. Features. Description

Order codes Marking Package Packaging

Transcription:

TN0063 Technical note Overview of the STM32F103xx ACIM and PMSM motor control software libraries release 2.0 Introduction The purpose of this technical note is to provide an overview of the main features and performance metrics of the STM32F103xx motor control firmware libraries release 2.0. For the complete documentation, please refer to the two following user manuals: UM0483: STM32F103xx AC induction motor IFOC software library V2.0 UM0492: STM32F103xx permanent-magnet synchronous motor FOC software library V2.0 These documents are available for free upon request to your nearest STMicroelectronics sales office or distributor. For a complete list of ST offices and distributors, refer to the ST website www.st.com. New features in this motor control firmware library package release 2.0 patented single, common DC link shunt-resistor current-sampling method optimized IPMSM (internal permanent-magnet synchronous motor) maximum-torqueper-ampere strategy redesigned closed-loop flux weakening algorithm for PMSMs optional rotor prepositioning before each motor startup in the PMSM sensorless mode optional feed-forward current regulation for PMSM more robust hall-sensor module for PMSM redesigned PID regulation module maximum-modulation-index configuration tool for the single-shunt and three-shunt current-sampling methods supports all members of the STM32F103xx performance line family workspaces for IAR EWARM 5.20, KEIL RVMDK 3.22, Green Hills MULTI 5.03 Companion parameter file generation tool for PMSM (FOCGUI) September 2008 Rev 3 1/7 www.st.com

Presentation of the STM32F103xx AC induction motor IFOC software library V2.0 TN0063 1 Presentation of the STM32F103xx AC induction motor IFOC software library V2.0 The UM0483 user manual describes the AC induction motor IFOC software library, an indirect field oriented control (IFOC) firmware library for 3-phase induction motors developed for the STM32F103xx microcontrollers. These 32-bit, ARM Cortex -M3 cored ST microcontrollers (STM32F103xx) come with a set of peripherals which makes it suitable for performing both permanent magnet and AC induction motors FOC. In particular, this manual describes the STM32F103xx software library developed to control AC induction motors equipped with an encoder or tachogenerator, in both torque and speed control modes. The control of a permanent magnet (PM) motor in sinewave mode with encoder/hall sensors or sensorless is described in the UM0492 user manual. The AC IM IFOC software library is made of several C modules and is fitted out with IAR EWARM 5.20, KEIL RealView MDK 3.22a and Green Hills MULTI 5.03 workspaces. It is used to quickly evaluate both the MCU and the available tools. In addition, when used together with the STM32F103xx motor control starter kit (STM3210B-MCKIT) and an AC induction motor, a motor can be made to run in a very short time. It also eliminates the need for time-consuming development of IFOC and speed regulation algorithms by providing ready-to-use functions that let the user concentrate on the application layer. A prerequisite for using this library is basic knowledge of C programming, AC motor drives and power inverter hardware. In-depth know-how of STM32F103xx functions is only required for customizing existing modules and for adding new ones for a complete application development. Figure 2 shows the architecture of the firmware. It uses the STM32F103xx standard library extensively but it also acts directly on hardware peripherals when optimizations in terms of execution speed or code size are required. Figure 1. ACIM firmware architecture Application layer STM32F103xx standard library Speed, flux and torque PIDs Speed Current IFOC drive SVPWM STM32F103xx motor control library User interface STM32F103xx peripherals ai14767 2/7

TN0063 Presentation of the STM32F103xx AC induction motor IFOC software library V2.0 AC IM IFOC software library V2.0 features (CPU running at 72 MHz) Note: Supported speed : Tachogenerator Quadrature incremental encoder Current sampling method: 2 isolated current sensors (ICS) 3 shunt resistors placed on the bottom of the three inverter legs single, common DC link shunt resistor DAC functionality for tracing the most important software variables Current regulation for torque and flux control: PID sampling frequency adjustable up to the PWM frequency Speed control mode for speed regulation Torque control mode for torque regulation Field weakening 16-bit space vector PWM generation frequencies: PWM frequency can be easily adjusted Centered PWM pattern type 11 bits resolution at 17.6 khz Free C source code and spreadsheet for look-up table generation CPU load below 21% (IFOC algorithm refresh frequency 10 khz) Code size 11.5 KB (three shunt resistors for current reading, tachogenerator for speed ) + 12.6 KB for LCD/joystick management These figures are for information only; this software library may be subject to changes depending on the final application and peripheral resources. Note that it was built using robustness-oriented structures, thus preventing the speed or code size from being fully optimized. Related documents Available on www.st.com: STM32F103xx datasheet ARM -based 32-bit MCU STM32F101xx and STM32F103xx, firmware library user manual STM32F103xx Flash programming manual Available on www.arm.com: Cortex-M3 Technical Reference Manual 3/7

Presentation of the STM32F103xx permanent-magnet synchronous motor FOC software library 2 Presentation of the STM32F103xx permanent-magnet synchronous motor FOC software library V2.0 The UM0492 user manual describes the permanent magnet synchronous motor (PMSM) FOC software library, a field oriented control (FOC) firmware library for 3-phase permanentmagnet motors developed for the STM32F103xx microcontrollers. These 32-bit, ARM Cortex -M3 cored ST microcontrollers (STM32F103xx) come with a set of peripherals that makes it suitable for performing both permanent-magnet and AC induction motor FOC. In particular, this manual describes the STM32F103xx software library developed to control sine-wave driven permanent-magnet motors in both torque and speed control mode. These motors may be equipped with an encoder, with three Hall sensors or they may be sensorless. The control of an AC induction motor equipped with encoder or tacho generator is described in the UM0483 user manual. The PMSM FOC library is made of several C modules, and is fitted out with IAR EWARM 5.20, KEIL RealView MDK 3.22a and Green Hills MULTI 5.03 workspaces. It is used to quickly evaluate both the MCU and the available tools. In addition, when used together with the STM32F103xx motor control starter kit (STM3210B-MCKIT) and PM motor, a motor can be made to run in a very short time. It also eliminates the need for time-consuming development of FOC and speed regulation algorithms by providing ready-to-use functions that let the user concentrate on the application layer. Moreover, it is possible to get rid of any speed sensor thanks to the sensorless algorithm for rotor position reconstruction. A prerequisite for using this library is basic knowledge of C programming, PM motor drives and power inverter hardware. In-depth know-how of STM32F103xx functions is only required for customizing existing modules and for adding new ones for a complete application development. Users are assisted in customizing their PMSM application firmware by a parameter file generation tool (FOCGUI) which, starting from the system parameters, automatically generates all that is needed by the motor control firmware library to quickly run the motor, saving time and easing the development phase. This tool can be downloaded from: http://www.st.com/mcu/. Figure 2 shows the architecture of the firmware. It uses the STM32F103xx standard library extensively but it also acts directly on hardware peripherals when optimizations in terms of execution speed or code size are required. Figure 2. PMSM firmware architecture Application layer STM32F103xx standard library Speed, flux and torque PIDs Speed Current FOC drive SVPWM STM32F103xx motor control library User interface STM32F103xx peripherals ai14812 4/7

TN0063 Presentation of the STM32F103xx permanent-magnet synchronous motor FOC software PMSM FOC software library V2.0 features (CPU running at 72 MHz) Supported speed s: Sensorless 60 or 120 displaced Hall sensors Quadrature incremental encoder Current-sampling method: 2 isolated current sensors (ICS) single, common DC link shunt resistor 3 shunt resistors placed on the bottom of the three inverter lags optimized IPMSM & SM-PMSM drive field weakening feed-forward, high-performance current regulation DAC functionality for tracing the most important software variables Brake resistor management Speed control mode for speed regulation Torque control mode for torque regulation 16-bit space vector PWM frequency can be easily adjusted Centered PWM pattern type 11-bit resolution at 17.6 khz Rules for the a priori determination of all the parameters necessary for firmware customization CPU load below 22% in the 3-shunt/sensorless configuration (10 khz FOC sampling rate) Code size in 3-shunt/sensorless configuration is about 12.5 Kbytes plus 11.5 Kbytes for LCD/joystick management 5/7

Revision history TN0063 3 Revision history Table 1. Document revision history Date Revision Changes 31-Jan-2008 1 Initial release. 04-Sep-2008 2 Motor control firmware library package upgraded (release 2.0). New features in this motor control firmware library package release 2.0 added. AC IM IFOC software library V2.0 features (CPU running at 72 MHz) updated to UM0483 rev. 2. PMSM FOC software library V2.0 features (CPU running at 72 MHz) updated to UM0492 rev. 2. 16-Sep-2008 3 Library release number corrected in Section 2. 6/7

TN0063 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. 2008 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 7/7