11084 FOC Sensorless FOC for PMSM with dspic DSC

Similar documents
Sensorless Field Oriented Control (FOC) for Permanent Magnet Synchronous Motors (PMSM)

TCP/IP Networking: Web-Based Status Monitoring

How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc.

Touch Through Metal. mtouch Metal Over Capacitive Technology Part 1

PICmicro DC Motor Control Tips n Tricks

TB3016. Using the PIC MCU CTMU for Temperature Measurement IMPLEMENTATION BASIC PRINCIPLE MEASUREMENT CIRCUIT

Analog-to-Digital Converters

PICkit 3 Programmer/Debugger User s Guide

WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD

AN1160. Sensorless BLDC Control with Back-EMF Filtering Using a Majority Function SENSORED CONTROL VERSUS SENSORLESS CONTROL INTRODUCTION

AN1083. Sensorless BLDC Control With Back-EMF Filtering INTRODUCTION DEVELOPMENT BOARD DEVELOPMENT BOARD WITH ATTACHED POWER MODULE

Timers: Timer0 Tutorial (Part 1)

AN905. Brushed DC Motor Fundamentals INTRODUCTION PRINCIPLES OF OPERATION. Stator. Rotor SIMPLE TWO-POLE BRUSHED DC MOTOR. Microchip Technology Inc.

Motor Control Application Tuning (MCAT) Tool for 3-Phase PMSM

How To Use Microchip.Com

Introduction to SMPS Control Techniques

Principles of Adjustable Frequency Drives

Current Loop Tuning Procedure. Servo Drive Current Loop Tuning Procedure (intended for Analog input PWM output servo drives) General Procedure AN-015

PICkit 2 Microcontroller Programmer USER S GUIDE

AN1142. USB Mass Storage Class on an Embedded Host INTRODUCTION. USB Mass Storage Class. Overview

THIS paper reports some results of a research, which aims to investigate the

Motor Fundamentals. DC Motor

dspic30f3012/3013 dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata Silicon Errata Summary

AN687. Precision Temperature-Sensing With RTD Circuits RTD OVERVIEW INTRODUCTION EQUATION 1:

Introduction to the dspic DSC SMPS (Part 1)

Digital Control of Acim Using dspic

An Introduction to MPLAB Integrated Development Environment

Application Information

AN1307 FULL STEP MODE PHASE VOLTAGE AND PHASE CURRENT MICROSTEPPING WITH 1/4 STEP SIZE

ZENA Wireless Network Analyzer User s Guide

Real-Time Data Monitor User s Guide

Motors and Generators

Application Information Fully Integrated Hall Effect Motor Driver for Brushless DC Vibration Motor Applications

Active Vibration Isolation of an Unbalanced Machine Spindle

AN1156. Battery Fuel Measurement Using Delta-Sigma ADC Devices INTRODUCTION REVIEW OF BATTERY CHARGING AND DISCHARGING CHARACTERISTICS

AN905. Brushed DC Motor Fundamentals INTRODUCTION PRINCIPLES OF OPERATION. Stator. Rotor SIMPLE TWO-POLE BRUSHED DC MOTOR. Microchip Technology Inc.

AN Wire Communication with PIC Microcontroller INTRODUCTION. OVERVIEW OF THE 1-Wire BUS. 1-Wire Protocol. Prerequisites

PICkit TM 2 Microcontroller Programmer USER S GUIDE

Power Electronics. Prof. K. Gopakumar. Centre for Electronics Design and Technology. Indian Institute of Science, Bangalore.

Mathematical Modeling and Dynamic Simulation of a Class of Drive Systems with Permanent Magnet Synchronous Motors

AN956. Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software OVERVIEW INTRODUCTION. Microchip Technology Inc.

The following document contains information on Cypress products.

Chen. Vibration Motor. Application note

AN1106. Power Factor Correction in Power Conversion Applications Using the dspic DSC INTRODUCTION

AN1286. Water-Resistant Capacitive Sensing INTRODUCTION THEORY OF OPERATION. Sensing Steps. Sensing Steps Description DESIGN

Application Note AN-1187

MCP1701A. 2 µa Low-Dropout Positive Voltage Regulator. Features. General Description. Applications. Package Types

Sensorless Field Oriented Control (FOC) for a Permanent Magnet Synchronous Motor (PMSM) Using a PLL Estimator and Field Weakening (FW)

AN1162. Sensorless Field Oriented Control (FOC) of an AC Induction Motor (ACIM) INTRODUCTION OVERVIEW. Control Strategy. AC Induction Motor

Universal Programming Module 2

PIC10F200/202/204/206

Setup for PWM Tests of BLDC Motor

Getting Started with dspic30f Digital Signal Controllers User s Guide

Speed Control Methods of Various Types of Speed Control Motors. Kazuya SHIRAHATA

MPLAB ICD 3 In-Circuit Debugger User s Guide For MPLAB X IDE

MPLAB IDE QUICK START GUIDE

Technical Guide No High Performance Drives -- speed and torque regulation

AN1303. Software Real-Time Clock and Calendar Using PIC16F1827 DATA INTERFACE INTRODUCTION IMPLEMENTATION INTERNAL REGISTER MAP

LIN Serial Analyzer User s Guide Rev2.0

DIRECT CURRENT GENERATORS

DRV8312-C2-KIT How to Run Guide

ZENA Wireless Network Analyzer User s Guide

MPLAB IDE USER S GUIDE

Lab 8: DC generators: shunt, series, and compounded.

AC generator theory. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

SPEED CONTROL OF INDUCTION MACHINE WITH REDUCTION IN TORQUE RIPPLE USING ROBUST SPACE-VECTOR MODULATION DTC SCHEME

CNC Machine Control Unit

Bootloader for dspic30f/33f and PIC24F/24H Devices

Dually Fed Permanent Magnet Synchronous Generator Condition Monitoring Using Stator Current

Digital Signal Controller (DSC) Development Tools

MATHEMATICAL MODELING OF BLDC MOTOR WITH CLOSED LOOP SPEED CONTROL USING PID CONTROLLER UNDER VARIOUS LOADING CONDITIONS

AN1305. Sensorless 3-Phase Brushless Motor Control with the PIC16FXXX TYPICAL MOTOR CONNECTION OVERVIEW DRIVE AND CONTROL CIRCUITRY

How To Measure Power Of A Permanent Magnet Synchronous Motor

AC/DC Power Supply Reference Design. Advanced SMPS Applications using the dspic DSC SMPS Family

dspic30f4012 Microcontroller

MODELLING AND SIMULATION OF SVPWM INVERTER FED PERMANENT MAGNET BRUSHLESS DC MOTOR DRIVE

Stepper motor I/O. Application Note DK Motion Control. A General information on stepper motors

3-Phase BLDC Motor Control with Hall Sensors Using 56800/E Digital Signal Controllers

DC GENERATOR THEORY. LIST the three conditions necessary to induce a voltage into a conductor.

TABLE 1: BUCK REGULATOR

AN1212. Using USB Keyboard with an Embedded Host INTRODUCTION. USB Keyboard Overview. USB Keyboard with an Embedded Host USB KEYBOARD OUTPUT REPORT

Uninstalling Incorrect USB Device Drivers

How To Develop A Microchip Device With Dspic Language Tools

MPLAB Starter Kit for dspic Digital Signal Controllers User s Guide

AN885. Brushless DC (BLDC) Motor Fundamentals INTRODUCTION CONSTRUCTION AND OPERATING PRINCIPLE. Stator. Padmaraja Yedamale Microchip Technology Inc.

Understanding the Alternator

In-Circuit Serial Programming (ICSP ) Guide

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

AN1265. KEELOQ with AES Microcontroller-Based Code Hopping Encoder INTRODUCTION DUAL ENCODER OPERATION BACKGROUND FUNCTIONAL INPUTS AND

2. A conductor of length 2m moves at 4m/s at 30 to a uniform magnetic field of 0.1T. Which one of the following gives the e.m.f. generated?

How To Improve Electromagnetic Compatibility

Specifying a Variable Frequency Drive s

Simulation of Electric Drives using the Machines Library and the SmartElectricDrives Library

Synchronous motor. Type. Non-excited motors

AN990. Analog Sensor Conditioning Circuits An Overview INTRODUCTION SENSOR APPLICATIONS. Target Audience. Goals. Description.

CONVENTIONALLY reduced order models are being

AN1275. KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder KEY FEATURES OVERVIEW. Microchip Technology Inc.

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

Renesas Inverter Agenda

Equipment: Power Supply, DAI, Synchronous motor (8241), Electrodynamometer (8960), Tachometer, Timing belt.

Transcription:

11084 FOC Sensorless FOC for PMSM with dspic DSC 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 1

Class Objectives When you finish this class, you will: Understand some of the latest motor control design solutions available Be aware of a new algorithm for sensorless Field Oriented Control (FOC) of Permanent Magnet Synchronous Motors (PMSMs) Know where to find more information on this algorithm 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 2

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 3

Hands-On Exercises LAB Sessions: Lab 1 Running Sensorless Demo Lab 2 Enabling Graphs Using DMCI Lab 3 Tuning PI Parameters Lab 4 Tuning Sensorless Parameters 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 4

Agenda PMSM Overview PMSM Applications PMSM v BLDC PMSM Construction PMSM Characteristics PMSM Operation 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 5

PMSM Applications High Efficiency & Reliability Designed for high-performance Servo Applications Runs with/without Position Encoders More compact, efficient and lighter than ACIM Coupled with FOC control produces optimal torque Smooth low and high speed performance Low Audible Noise & EMI 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 6

PMSM Applications Air Conditioner & Refrigerator (AC) compressors Direct-drive washing machines Precision Machining Tools Automotive Electrical power steering Traction control Data Storage 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 7

PMSM v BLDC History. the motors originated from different areas The fundamentals of Torque production are identical BLDC is a variant of the PM BDC PMSM describes a AC synchronous motor whose field excitation is provided by PMs Control Methods are different (Six Step v FOC) 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 8

Motor Classification 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 9

PMSM Construction Stator Stator Rotor Rotor Radial Axial 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 10

PMSM Construction 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 11

PMSM Construction Rotor Assembly possibilities 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 12

PMSM Construction PM Characteristics 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 13

PMSM Construction The PMSM is similar to the BLDC but the Back EMF signals are sinusoidal and trapezoidal respectively Mathematical treatment is different Designed to be driven with a sine wave Like a 3-phase ACIM but air gap flux is produced by rotor mounted magnets 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 14

PMSM Characteristics BLDC PMSM Stator Flux Linkage Back EMF 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 15

PMSM Characteristics eb ωt Wave shape is largely influenced by Stator design Number of slots per pole per phase is key Fractional slot, coil and pole motors enable wave shaping Waveform quality determined by manufacturing tolerances 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 16

PMSM Characteristics v ea eb ec ωt Back EMF shape of PMSM Brushless motor with sinusoidal Back EMF Synchronous AC motor BLAC PMSM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 17

PMSM Characteristics The Back EMF ideally contains no harmonics Leads to a reduction in audible noise And better efficiency reduction of parasitic energy that excites mechanical components in an uncontrolled way 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 18

PMSM Characteristics Torque Demagnetization limit VSI current limit Short time operation VSI voltage line T0 Continuous operation 0 ωr Speed 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 19

PMSM Operation PMSM Electric Model v i R L Motor e i s e s T = T ω i s Instantaneous power Torque x Speed = Back EMF x phase current 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 20

PMSM Operation Torque production Taking direction of F into account T=Fr sin θ 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 21

PMSM Operation S N S θ N S S Stator Field N S N Rotor Field N 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 22

PMSM Operation Stator field can be decomposed into components which are parallel and orthogonal to the rotor field Only the orthogonal (quadrature) field produces torque The parallel (direct) field produces force which compresses the bearings Phase current produces stator field and can be measured 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 23

PMSM Operation N S S N θ S Without FOC N S N N S Torque BEMF (V) θ Current (I) T = Fs*Rs*sinθ 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 24

PMSM Operation S N N S 90 S With FOC N S N N S Torque BEMF (V) θ Current (I) T = Fs*Rs*sinθ 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 25

PMSM Operation 90 π/2 0 -π/2 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 26

PMSM with FOC Keep load 90 ahead of rotor position N S S Knowledge of rotor position required at all times N N 90 S S S Better torque production N N No torque ripple 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 27

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 28

Lab 1. Running Sensorless Demo 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 29

Objectives of Lab 1 Getting to know the hardware in front of you Where are the Labs located? C:\Masters\11084\Lab1\PMSM.mcw How to load the lab projects Programming the dspic DSC devices Running the program on dspic DSC 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 30

You should have. 1. MPLAB IDE v7.60 or higher installed 2. C30 Compiler 3. Complete MPLAB ICD 2 setup 4. dspicdem MC1 Board 5. Low Voltage Power Module 6. dspic30f6010a PIM 7. 24V power supply for the board 8. Hurst (NTDynamo) BLDC motor 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 31

What we will do: LAB 1 Configure board hardware connections Open a workspace in MPLAB IDE Compile or Build a simple first project in MPLAB IDE Follow a procedure to Program the dspic DSC using MPLAB ICD 2 Follow a procedure to Run the program using MPLAB ICD 2 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 32

Instructions for Lab1: Lab1 On MC1 board, move DIP switch to ICD position Connect power to MC1 board Open MPLAB IDE by double clicking on the icon In MPLAB IDE, select File -> Open Workspace Browse to \Lab1\PMSM.mcw Select PMSM.mcw and open workspace Contd... 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 33

Lab1 (contd.) Instructions for Lab1 (contd): In MPLAB IDE, Select Project -> Build All IF NO errors then... In MPLAB IDE, Select Debugger -> Program to program dspic DSC On MC1 board, move DIP switch to Analog position Install wire jumper from AN2 to VR1 on J6 In MPLAB IDE, Select Debugger -> Run Pot VR1. Arrow should be at position Pot VR2 should be all the way to CW Press S4 on MC1 board and Motor will start spinning 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 34

Lab1 Results Follow Lab1 for programming and running software: Before programming dspic DSC, move DIP to ICD position Before running, move DIP to Analog position Each Lab has a already created workspace in the appropriate folder Use the created workspace for each lab 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 35

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 36

Agenda FOC for PMSM FOC Overview Signal processing FOC for PMSM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 37

FOC Overview Sinusoidal excitation with applied current space vector referenced to rotor position Stator current & rotor (magnet) flux interact to produce mutual torque and speed Electronic control required to keep phase at 90 degrees (quadrature) with respect to the rotor in order to optimize torque production T Current Space Vector 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 38

FOC Overview Improved Dynamic Response Reduced Torque Ripple Extended Speed Range Operation is possible Low Audible Noise & EMI 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 39

Signal Processing Vector-Coordinate Systems b β q d a α c 3-Axis Stator Reference 2-Axis Stator Reference 2 -Axis Rotating Reference 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 40

Signal Processing 3-phase voltages to control the current space vector Transformations simplify equations and allows control of 3-Phase Motors with conventional techniques as in a DC motor 3-phase time variant into a 2-axis time invariant 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 41

Signal Processing b 3-Phase Coordinate System (Stator current space representation) is ib ic ia a c 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 42

Signal Processing Projected Onto 2-Phase System (Clarke Transformation) Real α and imaginary β components is = isα + jisβ. Transformation to an orthogonal, stationary system. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 43

Signal Processing Projected Onto Rotating System (Park Transformation) q β d θ α Transformation from stationary to a rotating reference frame. Direct-axis and Quadrature-axis stator current representation 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 44

Signal Processing Projected Onto Rotating System (Park Transformation) Transformation from stationary to a rotating reference frame (turned at the rotor speed) 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 45

Signal Processing Vectors in the Rotating Reference Frame Properly phased winding currents will result in a current space vector which rotates with and is orthogonal to the rotor. Iq should be maximized and Id minimized for optimal control 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 46

Signal Processing Vectors in the Rotating Reference Frame q iq is id d Torque iq Flux id They are time-invariant and can be treated as DC parameters, which allows them to be controlled independently. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 47

FOC for PMSM N ref Σ PI iq ref - - id ref Σ Σ PI PI Vq Vd d,q α,β Vα Vβ SVM 3-Phase Bridge - θ iq d,q iα α,β ia id α,β iβ a,b,c ib Speed and Position QEI A B Encoder Motor This allows optimal torque production. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 48

FOC for PMSM PI Controllers operate in the d-q reference frame of the rotor, they are isolated from the sinusoidal variation of motor voltages and currents and so perform equally well at low and high motor speeds Iq is servoed to equal the Torque demand and Id is servoed to zero. This gives optimal torque production The PI Controller Outputs are transformed to produce three phase voltage signals to the bridge (inverse Park, inverse Clarke folded into SVM) 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 49

Without FOC N N S θ S S FOC for PMSM Torque N N With FOC S 90 S S θ N N S T = Fs*Rs*sinθ N N S S N S N BEMF (V) BEMF (V) Current (I) Current (I) 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 50

FOC for PMSM Phase Current Responses PI Speed Control PI Speed + FOC Control 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 51

FOC for PMSM Speed Responses PI Speed Control PI Speed + FOC Control 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 52

FOC for PMSM Field Weakening What happens when the Back EMF approaches the supply voltage? To enable more speed the rotor field must be weakened The stator d axis current is set to a negative value Torque reduces and speed increases with field weakening 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 53

FOC for PMSM FOC provides smooth control at low speeds as well as efficient control at high speeds Trapezoidal (BLDC) commutation can be efficient at high speed but introduces torque ripple at low speed and produces audible noise Sinusoidal drive produces smooth control at low speed but is inefficient at high speeds FOC provides the best of both worlds 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 54

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 55

Agenda Hands-On exercises Lab 2 Enabling Graphs Using DMCI Lab 3 Tuning PI Parameters 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 56

DMCI Data Monitor and Control Interface Smart Watch Window 9 Slider 35 Input Control 4 Graphs 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 57

Sliders Assigns control variables Suitable for PID control loop tuning Dynamic data control 9 Booleans available for flags 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 58

Input Controls Text box type Configurable increments Dynamic Data Input Hex, Decimal, Fractional and Enum List data types 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 59

Graphs Up to 4 plots Features include Zoom in/out Mark data points Print Export as data Dynamic Data View 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 60

Lab 2. Enabling Graphs Using DMCI 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 61

Objectives of Lab 2 Getting to use DMCI How to enable a graph using DMCI Plotting variables 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 62

Lab2 Instructions for Lab2: On MPLAB IDE, open DMCI, select Tools - > Data Monitor And Control Interface 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 63

Lab2 (contd.) Instructions for Lab2 (contd.): Select Dynamic Data View tab Check Graph 1 box 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 64

Lab2 (contd.) Instructions for Lab2 (contd.): Right click over Graph 1 area Select Configure Data Source 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 65

Lab2 (contd.) Instructions for Lab2 (contd.): Select SnapBuf1 for data source array Select Fractional for Display Format Click OK 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 66

Lab2 (contd.) Instructions for Lab2 (contd.): Assign SnapBuf2 and SnapBuf3 to Plots 2 and 3. Halt, Reset and Run application using MPLAB IDE Run motor by pressing S4 After letting the motor run for about 5 seconds, halt execution Data should be on Graph 1 plot. This data corresponds to estimated rotor angle. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 67

Lab2 Results Estimated Theta Plot Usage of plots in DMCI Tool 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 68

Lab 3. Tuning PI Parameters 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 69

Objectives of Lab 3 Tuning PI Parameters for Currents and Speed Using Sliders on DMCI tool 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 70

Lab3 Instructions for Lab3: On MPLAB IDE, open DMCI, select Tools - > Data Monitor And Control Interface 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 71

Lab3 Instructions for Lab3: On DMCI, Click Open Icon, and select: Lab3\Lab3.dmci File Lab3.dmci 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 72

Lab3 (contd.) Instructions for Lab3 (contd.): Open Lab3 Project Program dspic DSC Run motor by pressing S4 By Pressing S6, Speed reference will be doubled Analyze transient response on Plots Tune Speed PI Parameters to reduce overshoot Tune Iq PI Parameters to achieve minimum oscillations on Speed 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 73

Lab3 Results PI Tuning Usage of Sliders in DMCI Tool 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 74

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 75

Agenda Sensorless Techniques Six step for BLDC FOC for PMSM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 76

Six step for BLDC Commutation is implemented in six discrete steps per electrical revolution Hall sensors can be used to indicate when commutation is required Back EMF can be used to provide the same information 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 77

Six step for BLDC BLDC Motor Back EMF DC+ A Back EMF DC- C B Phase A and C are energized Inactive Phase B has induced Back EMF Normally the phase which is not energized, is monitored for Back EMF 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 78

Six step for BLDC BLDC Back EMF Crossing Diagram 0 0 T30 T60 0 SECTOR 5 0 1 2 3 4 5 0 1 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 79

Six step for BLDC The Back EMF zero crossing method in detail In every electrical cycle, there are periods when each phase is not being driven. During these regions one end of the inactive phase is referenced to the star point and the other is monitored. The monitored voltage will cross the 1/2 VDD point at 30 electrical degrees. Knowing the last zero crossing time we know the 60 electrical degree time (T60) T60 divided by 2 = T30 is loaded in TMR2. The ISR of TMR2 then commutes the next pair of windings at T30 seconds later 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 80

Six step for BLDC - Summary Six step control creates comparatively more torque ripple Phase currents are rectangular Less processing power required Rotor position is not accounted for between commutation points Starting ramp parameters must uncover Back EMF signal BLDC produces more Torque than PMSM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 81

Sensorless FOC for PMSM N ref Σ PI iq ref - - id ref Σ Σ PI PI Vq Vd d,q α,β Vα Vβ SVM 3-Phase Bridge - θ iq d,q iα α,β ia id α,β iβ a,b,c ib Position Speed Position and Speed Estimator Vα Vβ Motor 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 82

Sensorless FOC for PMSM es π/2 ωt -π/2 Position Estimation Rotor position is calculated with BEMF information 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 83

Sensorless FOC for PMSM i PMSM Electric Model R L e d v s = Ris + L is + dt e s v Motor d dt i s = R L i s + 1 L ( v e ) s s Position Estimation PMSM motor shares the same basic electric model as the Brushed DC (BDC), BLDC and AC Induction Motors 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 84

2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 85 Sensorless FOC for PMSM ( ) ) ( ) ( 1 ) ( ) ( 1) ( n e n v L n i L R T n i n i s s s s s s + = + ( ) ) ( ) ( ) ( 1 1) ( n e n v L T n i L R T n i s s s s s s + = + Position Estimation

Sensorless FOC for PMSM Current Observer Hardware Slide-Mode Vs PMSM Is Controller - +K d dt i R = i L * * 1 s s + L * ( v e z) s s I*s + Sign (I*s Is) z -K * Estimated variable 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 86

Sensorless FOC for PMSM Current Plots 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 87

Sensorless FOC for PMSM Back EMF Estimation d dt i R L * * 1 s = is + L ( * v e z) s s e * s z LPF LPF e filtered * s e arctan e α β θ * * Estimated variable 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 88

Sensorless FOC for PMSM Back EMF Plots 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 89

Sensorless FOC for PMSM Position and Speed estimation e arctan e α β θ* ω* + + θ*comp 7 ω = i= 0 ( θ ( n) -θ ( n -1)) Kspeed LPF ω* filtered * Estimated variable 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 90

Sensorless FOC for PMSM Phase Compensation The inherent position filtering is compensated Speed range is divided into parts with compensation applied to each Spread sheet calculator supplied 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 91

Sensorless FOC for PMSM Hardware Vs PMSM Is Slide Mode Controller - -1 d dt i R = i L * * 1 s s + z LPF L * ( v e z) * Estimated variable s e * s s LPF e filtered * s e arctan e 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 92 α β I*s 7 ω = i= 0 θ* + ( θ ( n) -θ ( n -1)) K speed Sign (I*s Is) z ω* LPF +1 θ*comp + + ω* filtered

Encoder Rotor Position Sensorless FOC for PMSM Practical Results Estimated Rotor Position 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 93

Sensorless FOC for PMSM Initial Torque Demand iq ref id ref Σ - Σ PI PI Vq Vd d,q α,β Vα Vβ SVM 3-Phase Bridge - θ iq d,q iα α,β ia id α,β iβ a,b,c ib Motor Startup θ Motor t 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 94

Sensorless FOC for PMSM S4 Pressed Measure Winding Currents Convert Currents to Iq and Id Reset Initialize Variables and Peripherals Motor Stopped Initialize Variables for Running Motor Initialize PI Controller Parameters Enable Interrupts Read Reference Torque from VR1 Motor Running Start Up A/D Interrupt Open Loop FOC Set New Duty Cycles using SVM Execute PI Controllers for Iq and Id Increment Theta Based on Ramp Motor Stopped Stop Motor S4 Pressed or FAULT S4 Pressed or FAULT End of Start Up Ramp Motor Running Sensorless FOC A/D Interrupt Read Reference Speed from VR2 Main Software State Machine Set New Duty Cycles using SVM Sensorless FOC Measure Winding Currents Execute PI Controllers for Speed, Iq and Id Compensate Theta Based on Speed Calculate Speed Estimate Theta using SMC Convert Currents to Iq and Id 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 95

No Extra Cost Added 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 96

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 97

Agenda Hands on exercises Lab 4 Tuning Sensorless Parameters 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 98

Lab 4. Tuning Sensorless Parameters 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 99

Objectives of Lab 4 Tuning Sensorless Parameters for Open Loop. Lock Times and End Speed. Tuning Sensorless Parameter for Closed Loop. Slide Mode Controller Gain. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 100

Lab4 Instructions for Lab4: On MPLAB IDE, open DMCI, select Tools - > Data Monitor And Control Interface 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 101

Lab4 Instructions for Lab4: On DMCI, Click Open Icon, and select: Lab4\Lab4.dmci File Lab4.dmci 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 102

Lab4 (contd.) Instructions for Lab4 (contd.): Open Lab4 Project Program dspic DSC Run motor by pressing S4 Motor will not transition to closed loop Halt and analyze Plots Set K slide to.9. Run and analyze Set K slide to.1. Run and analyze Change End Speed from Slide Bars. What happens to Estimated Current? What happens to Theta? 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 103

Lab4 K Slide = 0.9 / 500 RPM K Slide = 0.1 / 500 RPM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 104

Lab4 K Slide = 0.9 / 2000 RPM K Slide = 0.1 / 2000 RPM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 105

Lab4 Results K Slide tuning. Slide Mode Controller Gain should be high enough to track measured current. Gain should be low enough to keep Theta as clean as possible. Estimated current and measured current should be on the same scale. End Speed should be enough to get a clean Theta. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 106

Agenda PMSM Overview Hands-On Exercise FOC for PMSM control Hands-On Exercises Sensorless techniques Hands-On Exercise Wrap up, Q&A 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 107

Agenda Wrap up, Q&A Summary Dev Tools used in this class Resources 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 108

Summary PMSM High efficiency and smooth torque are advantageous FOC Provides optimal torque control Can be run with or without Position Sensors Applicable for ACIM 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 109

Dev Tools used in this class dspicdem MC1 Motor Control Development Board (DM300020) dspicdem MC1L 3-Phase Low Voltage Power Module (DM300022) 3-Phase BLDC Low Voltage Motor 24V (AC300020) MPLAB ICD 2 In-Circuit Debugger/Programmer (DV164005) 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 110

Resources For resources and information regarding designing motor-control applications, visit Microchip s motor-control design center at: www.microchip.com/motor Microchip Application Notes for Motor-Control Applications: PIC18CXXX/PIC16CXXX Servomotor Brushless DC Motor Control Made Easy Brushless DC (BLDC) Motor Fundamentals Brushless DC Motor Control Using PIC18FXX31 Using the dspic30f for Sensorless BLDC Control Using the dspic30f for Vector Control of an ACIM Sensored BLDC Motor Control Using dspic30f2010 Using the PIC18F2431 for Sensorless BLDC Motor Control An Introduction to ACIM Control Using the dspic30f Sensorless BLDC Motor Control Using dspic30f2010 Sinusoidal Control of PMSM Motors with dspic30f Sensorless Control of PMSM Motors Sensorless BLDC Control with Back EMF Filtering Getting started with the BLDC Motors and dspic30f Measuring speed and position with the QEI Module Driving ACIM with the dspic DSC MCPWM Module Using the dspic30f Sensorless Motor Tuning Interface AN696 AN857 AN885 AN899 AN901 AN908 AN957 AN970 AN984 AN992 AN1017 AN1078 AN1083 GS001 GS002 GS004 GS005 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 111

Thank You Note: The Microchip name and logo are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. All other trademarks mentioned herein are property of their respective companies. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 112

Trademarks The Microchip name and logo, the Microchip logo, Accuron, dspic, KeeLoq, KeeLoq logo, microid, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, rfpic and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Linear Active Thermistor, Migratable Memory, MXDEV, MXLAB, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dspicdem, dspicdem.net, dspicworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzylab, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rflab, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 2007 Microchip Technology Incorporated. All Rights Reserved. 11084 FOC Slide 113