Motor Control using NXP s LPC2900

Similar documents
Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

RL78 Motor Control. YRMCKITRL78G14 Starter Kit. Renesas Electronics Europe. David Parsons Application Engineering Industrial Business Group.

RX23T inverter ref. kit

ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION

TMS320F241 DSP Boards for Power-electronics Applications

Brushless 5 click. PID: MIKROE 3032 Weight: 25 g

Implementation of Brushless DC motor speed control on STM32F407 Cortex M4

Sensorless Vector Control with RL78G14

Design of double loop-locked system for brush-less DC motor based on DSP

32-bit ARM Cortex-M0, Cortex-M3 and Cortex-M4F microcontrollers

BLDC Motor Control on Z8FMC16 Series MCUs Using Sensored Sinusoidal PWM Modulation

Designing with STM32F3x

AN Sensorless single-shunt FOC on LPC2900. Document information. LPC2900, FOC, SVPWM, SMC, current observer, PMSM, single shunt DC-link

Three-Phase BLDC Sensorless Motor Control Using the MKV4x In Quadcopter Application

Hardware Platforms and Sensors

Application Note, V1.0, Oct 2006 AP08019 XC866. Sensorless Brushless DC Motor Control Using Infineon 8-bit XC866 Microcontroller.

STM32 PMSM FOC SDK v3.2. 蒋建国 MCU Application Great China

VORAGO Timer (TIM) subsystem application note

Analog Devices: High Efficiency, Low Cost, Sensorless Motor Control.

Dual FOC Servo Motor Control on i.mx RT

National Infotech. Electrical Drive Trainers. Developed By: : Authorized Dealer : Embedded System Solutions

ELCT 912: Advanced Embedded Systems

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its

EE152 Final Project Report

Developer Day. XMC technical presentation & Introduction to DAVE. Cristian Zaharia Field Application Engineering Industrial MCU June, 2014

Sensorless PMSM Field-Oriented Control on Kinetis KV and KE

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS

F²MC-8FX/16LX/16FX/FR FAMILY BLDC DRIVE WITH THE PPG

Speed Control of Brushless DC Motors-Block Commutation With Hall Sensors. User s Guide

A Practical Primer On Motor Drives (Part 13): Motor Drive Control Architectures And Algorithms

AP CANmotion. Evaluation Platform with BLDC Motor featuring XC886CM Flash Microcontroller Version 2007/10. Microcontrollers

ZKit-51-RD2, 8051 Development Kit

Design of Joint Controller Circuit for PA10 Robot Arm

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

TMC603EVAL MANUAL Evaluation board for the TMC603 three phase motor driver with BLDC back EMF commutation hallfx

CHAPTER 2 VSI FED INDUCTION MOTOR DRIVE

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

Generating DTMF Tones Using Z8 Encore! MCU

IRT Mini Evo. Technical Manual. quality IN MOTION. quality IN MOTION

Sensorless Vector Control with RL78G14

Hybrid Controller. 3-Phase SR Motor Control with Hall Sensors Reference Design. Designer Reference Manual. Freescale Semiconductor, I

Engineer-to-Engineer Note

CHAPTER 4 HARDWARE DEVELOPMENT OF STATCOM

Speed Control of BLDC Motor Using FPGA

DRM100 Designer Reference Manual. Devices Supported: 56F801X

AVR42778: Core Independent Brushless DC Fan Control Using Configurable Custom Logic on ATtiny817. Features. Introduction. AVR 8-bit Microcontroller

Triscend E5 Support. Configurable System-on-Chip (CSoC) Triscend Development Tools Update TM

Motor Control Development Kit

DASL 120 Introduction to Microcontrollers

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

Motor Control Solutions

Stellaris ARM Cortex -M4F Training. Peripheral Overview

Sensorless Vector Control and Implementation: Why and How

Design and Implementation of AT Mega 328 microcontroller based firing control for a tri-phase thyristor control rectifier

MCU Product Selection Guide

The Development and Application of High Compression Ratio Methanol Engine ECU

Critical Design Review: M.A.D. Dog. Nicholas Maddy Timothy Dayley Kevin Liou

Unit level 5 Credit value 15. Introduction. Learning Outcomes

THE PERFORMANCE TEST OF THE AD CONVERTERS EMBEDDED ON SOME MICROCONTROLLERS

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

32-bit Microcontroller for Home

CS/ECE/EEE/INSTR F241 MICROPROCESSOR PROGRAMMING & INTERFACING MODULE 8: I/O INTERFACING QUESTIONS ANUPAMA KR BITS, PILANI KK BIRLA GOA CAMPUS

User Guide Introduction. IRMCS3043 System Overview/Guide. International Rectifier s imotion Team. Table of Contents

Cortex-M3 based Prepaid System with Electricity Theft Control

Characteristic Sym Notes Minimum Typical Maximum Units Operating Frequency Range MHz Operating Frequency Tolerance khz

Using Z8 Encore! XP MCU for RMS Calculation

Fully Integrated FPGA-based configurable Motor Control

3-Phase Switched Reluctance Motor Control with Encoder Using DSP56F80x. 1. Introduction. Contents. Freescale Semiconductor, I

STELLARIS ERRATA. Stellaris LM3S8962 RevA2 Errata

Single Phase Two-Channel Interleaved PFC Operating in CrM Using the MC56F82xxx Family of Digital Signal Controllers

Training Schedule. Robotic System Design using Arduino Platform

Unit-6 PROGRAMMABLE INTERRUPT CONTROLLERS 8259A-PROGRAMMABLE INTERRUPT CONTROLLER (PIC) INTRODUCTION

Firmware plugin for STSW-ESC001V1 board with ST Motor Control FOC SDK

Sensorless BLDC Motor Control Using FRDM-KE02Z Based on Tower Board

Figure 1: Functional Block Diagram

VC7300-Series Product Brief

Low Voltage Solutions for DC & BLDC Motors in Industrial Applications

Index Terms IR communication; MSP430; TFDU4101; Pre setter

CHAPTER 6 CURRENT REGULATED PWM SCHEME BASED FOUR- SWITCH THREE-PHASE BRUSHLESS DC MOTOR DRIVE

Practical Exercise. STM32F4 Discovery. Alessandro Palla

3-in-1 Air Condition Solution

Open Loop Speed Control of Brushless DC Motor

dspic30f Quadrature Encoder Interface Module

USB4. Encoder Data Acquisition USB Device Page 1 of 8. Description. Features

Sensorless PMSM Control on MKV46F256 Using Kinetis SDK

EIE/ENE 334 Microprocessors

Using the TMS320C24X DSP Controller for Optimal Digital Control

Stellaris Brushless DC (BLDC) Motor Control Reference Design Kit with Ethernet and CAN. User s Manual. Copyright Texas Instruments

Zilog Motor Control Technologies

Sensors and Sensing Motors, Encoders and Motor Control

Automotive Control Solution for Brushless DC Motors

Hands-on Workshop: Motor Control Part 4 - Brushless DC Motors Made Easy

BLuAC5 Brushless Universal Servo Amplifier

AVR443: Sensorbased control of three phase Brushless DC motor. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

MSP430 Family Mixed-Signal Microcontroller Application Reports

Motor Control Demonstration Lab

SNIOT702 Specification. Version number:v 1.0.1

Hello, and welcome to this presentation of the STM32 Digital Filter for Sigma-Delta modulators interface. The features of this interface, which

Vector CONTROLLERS for BLDC Motors. State of Art Technology Most Reliable - High Efficiency Smooth control - Programmable

Transcription:

Motor Control using NXP s LPC2900

Agenda LPC2900 Overview and Development tools Control of BLDC Motors using the LPC2900 CPU Load of BLDCM and PMSM Enhancing performance LPC2900 Demo BLDC motor 2

LPC2900 Block diagram 3

LPC2900 Summary ARM968E core 125 MHz operation Vectored Interrupt Controller Power Management Unit Clock Generation Unit Embedded Trace with 8 KB buffer Memories Up to 768 KB Flash Up to 48 KB SRAM (+ 8KB) Up to 32 KB I- & D- TCM 16 KB EEPROM (Byte) External Memory Controller Analog Peripherals Two 3.3 V 10-bit/8-ch ADC s One 5V 10-bit/8-ch ADC s Serial Peripherals USB 2.0 full-speed device/host/otg controller with on-chip PHY Two LIN 2.0 master controllers Up to four UARTs with baud rate generation, LIN and RS-485 support Two CAN 2.0B controllers Three Q-SPI controllers Two I 2 C-bus interfaces Other Peripherals General Purpose DMA controller Motor control PWM and Quadrature Encoder Interface to support threephase motors Six 32-bit timers Up to 148 General Purpose I/O 4

LPC2900 Series Details 5

LPC2900 Development Tools Evaluation Boards Hitex and Keil AC and DC Motor Control Add On Compilers/Debuggers Keil, IAR, GreenHills Code bundles Hardware Debuggers All Standard ARM JTAG hardware debuggers work with the LPC2900 devices 6

Overview Brushless DC EC Motors There are two main EC-Motor types: Brushless Direct Current Motor (BLDCM) Permanent Magnet Synchronous Motor (PMSM) EC-Motors consist of stator windings and a permanent-magnet rotor. The stator windings are controlled (commutated) by external electronics. The winding currents produce torque by interacting with the permanent magnet of the rotor and this keeps the Motor running. 7

Brushless Motor Commutation There are two main commutation methods: Sine-wave Six-step or block commutation Sine-wave commutation is used for PMSM Six Step Commutation is used BLDC Motors Drives channel current into only two windings at any one time Use PWM to control drive circuitry 8

Back EMF The main characteristics of BLDCMs are the square current waveforms and trapezoidal back-emf. The amplitude of the current determines the torque of the motor. In practice switching the supply to the motor with a PWM pattern and adjusting its duty cycle control the effective amplitude 9

BLDCM control BLDCM control mechanism via commutation point detection A timer measures the interval between commutation points Actual speed of motor is calculated P-controller adjusts PWM pulse width to control motor speed Desired Speed = P-Controller PWM pulse width EC-Motor Actual revolution time (speed equivalent) 10

Six Step Commutation Closed Loop control M S C S S LPC2900 11

Startup Open Loop - Hard Commutation When the motor is halted the is no Hall sensor activity (interrupt) The control must use hard commutation for a predefined time. Use GPIO Switch the port function from PWM capture to GPIO By the appropriate applied commutation a Hall sensor interrupt is generated which makes hard commutation unnecessary. 12

MSCSS Block diagram 13

MSCSS features for Motor Control The MSCSS provides useful features for motor control applications, making software implementation of motor control algorithms easier: Dual edge control PWM Synchronization delay ADC compare interrupt Carrier input of PWM block Update PWM register through a timer match event These features off-load the CPU 14

PWM Dual edge and synchronization delay 15

ADC compare interrupt 8 Channel 10bit ADC Configurable resolution: 2 to 10bit The ADC compare interrupt is a feature of the ADC. Interrupt when the conversion result is > or < a predefined threshold. It reduces the interrupt load as no polling of the ADC result is required. 16

Carrier input of PWM block This feature allows the PWM to be modulated by the MSCSS Timer This mechanism is used to generate triangular signals, which represent approximated sine wave signals with little software overhead 17

Update PWM register via Timer match event Update of PWM register value can be triggered by MSCSS timer 0 Use this feature to update PWM settings After a preprogrammed time the PWM will be automatically updated This reduces CPU overhead 18

Hall Sensor Some motors have integrated Hall sensors for position measurement. Hall sensors directly indicate the commutation point. The control software has to switch to the next conduction phase on every edge of the sensor output. Connect to MSCSS PWM Capture inputs for control of motor 19

ADC measurement of Hall sensor output ADC compare interrupt is used to detect the signal changes of the Hall sensor signals. Therefore the compare threshold has to be programmed with respect to the conduction state. With Hall sensors position information is always available even if the motor is standing still. Start Use GPIO Run Use as ADC The motor starts operation and an ADC compare interrupt is generated when a change on a Hall sensor signal is detected. 20

PWM capturing of Hall sensor output This method uses an additional PWM block. ADC replaced by the PWM in capture mode. The start position is also derived from the GPIO pins. The capture ISR executes the control function and updates the PWM 21

Quadrature Encoder 3 signals, Indx, PhA and PhB, for position, direction & speed Programmable Digital filtering capability Direction and Position capture Velocity capture and compare feature Quadrature Encoder Three outputs Doesn t give absolute position Gives 6 events per electrical revolution Hall Sensors Three outputs Gives absolute position Gives 6 events per electrical revolution 22

Enhancing performance using TCM The LPC29xx devices come with up to 32KB of ITCM and DTCM Using tools like Keil uvision3 simplifies this ISR Routines in TCM Frequently called code Whole application! 23

CPU load of BLDCM (and PMSM) The CPU load was measured for a motor running at 6000 rpm For all control algorithms the CPU load was reasonably low. BLDCM control the CPU load was only about 1%. PMSM motor control requires significantly more CPU time (16%). 24

CPU Load Measurements Block Sine Position Measurement Method ADC measure of BEMF ADC measure of Hall sensor output PWM capturing of Hall sensor output CPU Load 1.4 1.4 1 PWM capturing of Hall sensor output 12.2 8.7 Time required for interrupt service +2 [us] 23 22 14.5 3.2+9.5 2.3+6.8 Location of application code Flash Flash Flash Flash ITCM 25

LPC29xx DC and AC Motor control Demo AC and DC motors Examples PID Controller implementation Application note detailing implementation Full board schematics Complete software (Keil, HiToP + more) Source code for PC GUI 26

Demonstration of EC Motor Control using the LPC2900 27

28

Additional Product Details 29

LPC2900 32-bit ARM968E-S processor State-of-the-Art ARM968E-S industry standard RISC core @ 125 MHz High performance (1.1MIPS/MHz) with low power consumption Peripherals connected via multilayer Advanced High-performance Bus (AHB-lite) NXP Vectored Interrupt Controller (VIC) with 63 sources and 16 priority levels 16-bit THUMB instruction set for increased code density 30

Memories / interfaces Static RAM Up to 32KB Tightly Coupled Memory (TCM) for Data and Instruction 56 KB Total SRAM 32 KB general purpose SRAM Independent additional 16 KB SRAM 8KB of ETB SRAM can be used by CPU Memory shadowing from Flash to SRAM supported Enabling faster interrupt execution from SRAM External Bus Interface for 4 memory banks 24-bit Address and 32-bit data path Up to 4 banks with 16MB can be addressed Data bus configurable as 8-, 16- or 32-bit width Unused data bus pins become general purpose I/O 31

Tightly coupled memory Fast memory, local to processor : High speed performance without system bus (AMBA) access Smaller die size penalty compared to equivalent amount of cache Fixed location in memory map Code and data TCM: to be initialised before execution require extra code execution for initialization Predictable real-time performance (a cache may miss.) Could be seen as an alternative approach to caches Can easily be controlled by a small footprint embedded OS Cache requires a MUCH larger OS to manage it efficiently 32

Fast flash memory 768 KB embedded Flash Memory 8 small sectors with 8 KB and 11 sectors with 64 KB Flash security Robust 2-transistor Flash concept Self timed programming/erasing preventing over/under-burn/erase On-chip program/erase generation Writing in page-mode supported Flash 128-bit wide interface accelerator enables high speed operation Programming features Very fast programming at >2Mb/s, with source code protection features Initial JTAG Programming and In-Application Programming supported 33

CAN interfaces 2 CAN Controllers Featuring receive FullCAN mode and Triple Transmit Buffers Data rates up to 1 Mb/s, CAN 2.0B & ISO 11898 compatible Error and System Diagnostics Support, Self Reception Mode & Listen Only Mode Advanced Hardware Acceptance Filter to reduce CPU load Certified CAN conformance 34

UART interfaces 2 industry standard 16C550 UARTs 16 bytes FIFO message buffer for transmit and receive Receiver FIFO trigger points at 1byte, 4bytes, 8bytes and 14bytes Register locations conform to 550 industry standard Built-in baud-rate generator RS-485 Support LIN Support 35

SPI & I 2 C interfaces 3 Full-duplex Queued-Quad SPI (Q-SPI) Master or slave operation Supports up to 4 slaves in Sequential Multi Slave operation Programmable clock bit rate and pre-scale, based on SPI source clock from the CGU Max. clock rate in master mode 40MHz, in slave mode 20MHz Separate transmit and receive FIFO buffers, 16-bit wide, 32 locations deep Programmable choice of interface operation: Motorola (SPI) or Texas Instruments (SSI) Programmable data frame size from 4 to 16 bits Internal loop back test mode 2 I 2 C buses 400 KHz transfer rates Supports monitor mode Supports multiple address recognition from one port. 36

Fast A/D Converter Two 3.3V A/D Converters 8 channels each Configurable resolution: 10-bit..2-bit High accuracy: ±1LSB (±5mV, full scale ±20mV) 400k samples/s at 10bit resolution, 1.500k samples/s at 2bit resolution Conversion time 2.5 µs per channel Automatic scan mode Single or continuous, with interrupt at end of scan Internal & external trigger start options Zero-crossing detection Programmable reference level with an interrupt to CPU 5V A/D Converter 8 channels 37

PWM Module 4 PWM modules Each module with 6 channels Configurable resolution: 16-bit..2-bit (plus a 16-bit pre-scaler) Frequency range up to 58kHz (at 10bit) Double edge PWM generation 3 capture/compare inputs Support brushless DC motor Burst mode (e.g. 50kHz modulation) to reduce switching current Trap input signal 38

Timers Watchdog Timer, with timer change protection Internal chip reset when not triggered periodically Debug mode with interrupt instead of reset By default enabled with fixed time-out for watchdog configuring Watchdog time period change protected with access sequence 4 x 32-bit Counter/Timers with programmable 32-bit prescalers Up to four 32-bit Match Registers per counter/timer Up to four 32-bit Capture Channels per counter/timer External Capture and Match I/O supported 39

Miscellaneous Dual power supply CPU operating at 1.8V ± 5% I/O operating at 2.7V to 3.6V, 5V tolerant LQFP100/144/208 packages Multiplexed outputs, unused pins become general purpose I/O pins Boundary scan test supported via JTAG interface Operating temperature range -40 to +85 degree C 40

41

Basic EC-Motor Control System LPC2900 MSCSS is used to control the motor power stage. Six Pulse Width Modulation (PWM) signals are fed to the power stage to control the six MOSFETs of the 3-phase inverter circuit. M S C S S LPC2900 3-phase Inverters consist of two half bridges for each motor phase. These half bridges consist of two power MOSFETs or IGBTs 42

Sensorless Control CH1 Motor Phase R 1 R 2 R 3 CH2 CH3 ADC CH4 Motor Phase R 1 R 3 R 2 Virtual Starpoint Motor Phase R 3 R 1 R 2 43

Back EMF The zero crossing point of the BEMF doesn t directly indicate the commutation point because it is in the middle of one conduction phase Therefore the half of the commutation time has to be advanced until the phase supply voltages can be changed. + BEMF - + Current - 44

RPM Measurement The RPM can be calculated by determining the period between two rising or falling edges of one Hall sensor through the captured value in the sensor related capture register. With the number of ticks between those events, the PWM base clock, and the PWM prescale value the speed can be calculated easily by using the following formula: RPM = ((PWM CLOCK/(PWM Prescaler+1))*60.0)/(CaptureValue)); For a higher precision the period between n rising edges is used to calculate the speed in this application, whereas n stands for the number of poles 45

46

Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: NXP: OM11025,598