Home
XMC 750 Watt Motor Control Application Kit
Contents
1. 0 In04 2N Integer Tmp_CRS 7 CCU4_PWM_PERIOD 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 29 Chapter 2 Configure CCU4 as Debugging Cinfineon feature 3 7 B n04 is either positive or negative integer CRS CCU4 PWM PERIOD Slope T CCU4 PWM PERIOD ac Tmp CRS a Ind 28 iN 2M Integer In04 QN 1 Tmp_CRS 27 CCU4_PWM_PERIOD 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 30 Chapter 2 Configure CCU4 as Debugging Cinfineon feature 4 7 e CCU4 Debug with Three Outputs HHHH band P 4 Pl 8 and P1 2 for XHCLS02 TSS0P38 void CCU4 Debug3output int32 t t In amp 4 uintl6 t In 4 Flag uintl6 t In amp 4 N int32 t In10 uintl6 t Ini Flag uintl6 t In16 N int32 t In12 uintl6 t Inl2 Flag uintl6 t L int32 t Tmp CRS Tmp for CCU4 debug Update P 4 CCU4 duty cycle for debug Tmp CRS Ina CCU4 PWM PERIOD gt gt In84 N SS Tmp_CRS zinoga N X CCU4 PWM PERIOD 2 T Tmp CRS In 4 1 lt lt In 4 N CCU4 PWM PERIOD gt gt In84 N 1 if Tmp CRS gt 8 CCUAB CC41 gt CR5 Tmp CRS else tmp CRS CCUAB CC41 gt CR5 Tmp CRS In04 2 m04 N y 2N41 x CCU4 PWM PERIOD ff lledatn DT B CPA dikur eue la Fee dahan Set 1 if sample ve and ve signals FOC Calculation PMSMFOCSLO1 FOCCalculation amp PMSMFOCSL81 Handle
2. 1 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 34 infineon Agenda 1 2 Ka B Kit Overview B Tooling Overview B Getting Started O Chapter 1 O Chapter 2 L Chapter 3 Ll Chapter 4 Ll Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014 All rights reserved Page 35 Chapter 3 Motor Electrical Parameters Cinfineon Measurement 1 4 m The proposed measurement techniques determine D Number of pole pairs D Phase to phase stator resistances inductances m The electrical parameters are needed to be configured in DAVE apps to calculate torque flux PI controller and etc 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 36 Chapter 3 Motor Electrical Parameters Cinfineon Measurement 2 4 B Equipments required to measure motor pole pairs O Driving motor D Oscilloscope voltage probe m Following steps describe the method to determine number of motor pole pairs 1 Connect the Phase U to signal probe phase V Phase W to ground 2 Rotate the motor manually in 1 mechanical revolution 360 and capture the waveform in oscilloscope H 7 B Phase U Back EMF 2014 09 26 Copyright Infineon Technologies AG 2014 All rig
3. 1 2 1 2 I 1 0 8 0 8 Wa f 0 6 Input X 0 4 Output Y 0 2 SARMAHARMANHOONAT 4 O OQ 00 r iD in sf m e c CO OQ 00 TAD AD AAI NN OMT s In in P 0 0000 A n mom OI in sa ba m XO 10 C uo ni 00 ost cd c4 NN mM WW OA DP DD 00 C WB Z1 6367 Z2 636 B Z1 636 22 63 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 73 Chapter 5 Driving Ceiling Fan Application Cinfineon 16 20 User would require to modify the PMSMFOCSLO2_Config c to change the response time to drive different motors gt To fine tune the PT12 filter gain additional user code needs to be added as shown below 168 define 71 MULTIPLY 6 189 define 71 DIVIDE 16 116 define 72 MULTIPLY 1 111 define 72 DIVIDE 115 L 2 t i P 116 Ymax int32 t 0x76000000 117 Ymin int32 t 8x7808008000 118 PTlbuf int32 t e 119 128 MOTORLIBS PIlHandleType PMSMFOCSLO2 PIl12betaHandlee 121 Z int32 t 6367 Z1 MULTIPLY Z1 DIVIDE 122 int32 t 636 72 MULTIPLY Z2 DIVIDE 123 B 124 Ymin int32 t x7 00008 125 PTlbuf int32 t e 126 127 gt User can fine tune Z1 MULTIPLY variable for other PMSM motors 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 74 Chapter 5 Driving Ceiling Fan Application infineon 17 20 Besides user needs to change 2 to 4 for both PMSMFOCSLO2 HandleO H
4. E Omit all symbol information 5 c YY d TITI ge Miscellaneous Hs Prepr OCESSOT 33 Directories 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Optimization level OmimzemosCO3 0000 Pack structures Tpack struc r Short enumerations fshort enums Function sections ffunction sections C Function sections fdata sections Other optimization flags Hi ARM GCC Assembler Page 25 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 12 12 m Build project da SAW App Connectivity View gw H W Connectivity View E Properties Problems E Console 22 4 Search CDT Build Console PMSMFOCSLO2_Example01 Invoking ARM GCC Print Size C MDAVE 3 1 18VARM GCC als Sl dec 15458 text data bss Build Finished pne eabi size format berkeley PMSMFOCSL 2 Example81 elf hex filename 3c78 PMSMFOCSL82 Example6l elf ample 1 siz m Code Size 15 5K 1 Click su 2 Wait for Build to finish 12926 ass 2116 Finished building PM Debug Configuration ler sl Create m ge i ru 2g AS gt L L ie 2 i He Name ACCINAVFOL Exampleol ST mDownload code a J 1 Click 2 First time download double Tasking C C Debugger in Debug Configuration Select Infineon Boot Kit for XMC1300 and click Debug 4 Click i UJ Re 4 Q5 UP GI e e i 2014 09 26 Copyrigh
5. o e ct y P e XMC1100 Series a XMC1200 Series DAVE Project 4 XMC1300 Series Create a new C C project for Infineon tool chains XMC 1 30 2 0040X01 2 8 XMC1302 Q040X0064 Project Marne PRI SMTFOCSLO2 Exarnpleot XMC1302 Q040X0032 Use default location Location C DAVE3_wo rkspace ws3 1 10 Browse J XMC1302 Q040X0016 d C V XMC1302 T038X0200 C Project Type Tool Chain t l aiaa DD Cant Y a E gt Infineon XIMIC Z Applicati 7 d T F c U ARM GCC Application for XMC Project Device Features Easy Start Project Empty Main Project Qu Package PG TSSOP 38 Gan ROM 200 KB Flash RAM 16 KB RAM InOut 34 digital I O T ARM GCC Library for XMC Project Ernpty Project Further Options Show project types and tool chains only if they are supported on the platform 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 15 Chapter 1 Generate PMSMFOCSLO2 template 2 12 m Click on App Selection View on your right File Edit Navigate Project DAVE Debug Search Window Help i PS lt Em 5 mur aa n3 EO t us Ei ES oum m Moi COM Port COM7 Baud Rate 1000000 i Mh E e E PMSM FOC SLO1 ExampleO1 A da S W App Dependency T 3 7 EJ Search filter se S W App Connectivity View 23 sw H W Connectivity Search filter Category Based Tree 4 Basic Applications 4 Acquisition of Analog sigr a ADCODI 1 0 12 e
6. Cinfineon How to load Example Project in DAVE M 5 5 m Download Example Projects from the web http www infineon com cms en product promopages aim mc dave downloads html Download the project zip file D Download the project zip file D Open DAVE and go to File gt Import gt Infineon gt DAVE Project D Check Select Archive File O Browse to the downloaded DAVE project zip file O Press Open 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 91 References Cinfineon How to improve compiler performance B Please refer to Infineon official XMC forum to explore how to speed up DAVE compilation time It provides a couple of options that give perceivable improved speed m How to improve compiling feature discussion thread http www infineonforums com threads 1647 Improve compiler performance 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 92 Cinfineon Innovative semiconductor solutions for energy efficiency mobility and security
7. ADCOO 2 1 0 16 e ADCOO3 1 0 12 e ADCCHOO1 1 0 16 aw ADCCMPODI 1 0 10 a ADCGLOBOO1 1 0 16 a ADCGROUPOOI 1 0 18 aw ADCSYNCOOI 1 0 12 a Communication 4 iz IIc ER I2C001 1 0 22 4 i SPIOO1 sw SPIOO1 1 0 18 4 UART aw UARTOOI 1 0 16 R E 9g JL Rh iba a n Th FN n Show Latest Versions Only 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Cinfineon Page 16 Chapter 1 Generate PMSMFOCSLO2 template iifineon 3 12 B Look for PMSMFOCSLO2 under App Selection View 4 Middleware Apps m Click OK to create New Instance for a amp Motor Control EA PMSMFOCSLO2 1 0 6 ADC m Double click on PMSMFOCSLO2 in ma GENES I the S W App Connectivity View EN MM 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 17 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 4 12 m Configure PMSMFOCSLO2 settings D Open PMSMFOCSLO2 UIEditor by double clicking or right click gt UIEditor on the app in S W Connectivity View O Control Algorithm tab Homo Keep default settings da PMSMFOCSLO2 0 3 Control Algorithm Control Strategy Speed Control PWM frequency 20000 Hz hd Control Technique Field Oriented Cantral Speed Control Rate g der ka Feedback Mechanism Sensorless Current Control Rate 3 dec M Phase Current Measurement V F Startup SVM Trap 2 Phase Enable Enable 5 3 Phase SVM Scheme S
8. Main c int main void status t status Declaratio n of return variable for DAVES APIs toggle comment if required 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 24 Chapter 1 Generate PMSMFOCSLO2 template 11 12 m Optimize DAVE generated code 1 Goto Project gt Active Project Properties Under ARM GCC C Compiler gt Optimization Optimize most O3 Under ARM GCC Linker gt General gt enable Remove unused section Cinfineon 02 EsampleOt Mainc DAVE 3 NNN as tor Navigate Search Run DAVE Debug Window Help Build Active Project Rebuild Active Project Open Project Close Project Main c Build All Ctrl B Build Project Build Working Set Created on Author Clean Build Automatically l SW DD A CW un Pe Lu R3 ll 12 include lt DAVE3 h 13 14 15 int main void Debugging S3 ARM GCC C Compiler B Preprocessor Directories 3 Optimization 33 Warnings 3 Miscellaneous E ARM GCC Assembler 3 Preprocessor Directories 3 Warnings B Miscellaneous S3 ARM GCC C Linker Script file T _ S BuildArtifactFileBaseName ld Do not use standard start files nostartfiles Do not use default libraries nodefaultlibs 3 Debugging nocte E ARM GCC C Compiler 3 Preprocessor i FHEHLTICITIOVEL SECTIONS L7 TEED 7 7 LH dc Sectiai
9. T ontro I a e sd Selector and GATE Driver Se 1 d s B c Mr Ya r ircui Motor lonn L L ERA Connector a Fw L gri EERE ELLE Fr BEMF Voltage S m biji Sense Circuirty 6 Is iEn oS Sana E Bus 2 ssl X t i Input Voltage 3 Phase Shunt our ie ia ea Line Filter Current Sense 3 K t FigBack converter 4 Geu gt 15u Sv Aunar 1 Board E 4 Y ssir I Drive Card Phas Power Inverte E J1 Connector Flyback Converter Auxiliary Power DC Link Filter Power Mains 400V gt 15V 15V Board Connector Capacitors and 230VAC 3 15A Shunt 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 7 infineon Agenda 1 2 AN B Kit Overview B Tooling Overview B Getting Started O Chapter 1 O Chapter 2 L Chapter 3 Ll Chapter 4 L Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014 All rights reserved Page 8 Cinfineon Tooling Overview Boot Modes 1 2 B Boot Modes available D UART Bootstrap Loader Mode D User Mode Halt After Reset D User Mode Debug Default Mode of device on Drive Card D User Mode Productive B Boot Modes can be configured via O DAVE Download DAVE http www infineon co
10. gt Ia S4 fint32_t PMSMFOCSL 2 Handlee H Ptr 1Ia PMSMFOCSLO2 Handlee H Ptr gt AmpOffset Reading Phase W current PMSMFOCSL 2 Handlee H Ptr gt IB CADCCH 1 HandleType PMSMFOCSL 2 Hand le ADCRegSrcPtrB gt kChBHandlerPtr gt ADCGrPtr gt RES CADCCH G 1 _ HandleType PMSMFOLSL6G2 Handlee eDcRnegsrcPtrB gt EkChBHandlerPtr gt KStartResultRegMNo amp VADC_G_RE PMSMFOCSL 2 Handle6 H Ptr gt Ib 4 int32 t PMSMFOCSLO2 Handle H Ptr gt Ib PMSMFOCSL62 Handlee H Ptr gt AmpOffset 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 75 Chapter 5 Driving Ceiling Fan Application Cinfineon 18 20 10 In this stage the motor will be driven in FOC Closed Loop gt Build project 1 Click sw Wait for Build to finish A SAW App Connectivity View amp H W Connectivity View Properties nu Problems El Console xn Y 4 Search CDT Build Console PMSMFOCSLO2 Example Invoking ARM GCC Print Size C XDAVE 3 1 18XMARM GCC bin arm none eabi size format berkeley PMSMFOCSL82 Examplee1 elf text data bss dec hex filename 12926 ass 2116 15468 3c78 PMSMFOCSLO2 Example l elf Finished building PMSMFOCSL6W2 Example 1 siz Build Finished gt Download code 1 Click amp click gt to run the motor c Ef U Oe hg User should monitor the transition current waveform to fine tune Zi MULTIPLY to reduce vibration current spike and etc 2014 09 26 Co
11. 22 Chapter 1 Generate PMSMFOCSLO2 template 9 12 m Manual Pin Assignment for XMC1300 Drive Card O Assign Pin Click Assign Pins accordingly Solve and Save Close App Pin Number IO002 0 U H PO 0 IO002 1 U_L PO 1 IO002 2 V HJ PO 7 IO002 3 V_L PO 6 IO002 4 W_H PO 8 IO002 5 W_L PO 9 IO004 0 Enable Pin PO 11 IO002 6 Trap Pin PO 12 IO001 0 I U P2 9 IO001 1 I_V P2 10 2014 09 26 K P K P c c c Resource aa App IO002 1 U L pin Not Selected IO002 0 U H pin Mot Selected IO002 5 W L pin Not Selected IOQ01 0 T U pin Not Selected IOQ01 1 I V pin Not Selected IO002 3 V LI pin Not Selected IO002 6 Trap Pin pin Mot Selected IO004 0 Enable Pin pin Not Selected IO0O2 4 W H pin Not Selected IO002 2 V H pin Not Selected Copyright Infineon Technologies AG 2014 All rights reserved Cinfineon e E a Port Pin Pin Number PO 18 Not Selected PO O 17 Mot Selected PO 9 228 Not Selected P29 6 Not Selected P2 10 7 Not Selected PO 6 23 Not Selected P012 31 Not Selected P011 30 Not Selected POB EN Mot Selected PO 24 Mot Selected Page 23 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 10 12 B To Generate Code Click k m Start the motor by calling the API function PMSMFOCSLO2 MotorStart amp PMSMFOCSLO2 HandleO in
12. 78 infineon Agenda 2 2 AN E Summary B General Information B References D Where to find Apps documentation D Where to download example projects O How to load Example project in DAVE D How to improve compiler performance 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 79 Infineon Summary This document provides effective techniques for tuning the PMSMFOCSLO2 App in DAVE for running high voltage PMSM motor This procedure are more robust and should cover the requirements of most ventilation fan and ceiling fan applications 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 80 Agenda 2 2 E Summary m General Information B References D Where to find Apps documentation D Where to download example projects O How to load Example project in DAVE 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Cinfineon Page 81 Cinfineon General Information B Where to buy kit Kit detail 469 html O Order Number KIT XMC750WATT MC AK V1 B Kit documentation D KIT XMC750WATT MC AK Vi B Infineon parts utilized on kit Infineon Parts Order Number XMC1300 Microcontroller XMC1302 T038X 0200 LDO 500mA IFX1763 Standalone PFC Controller ICE3PCSO2 Offline SMPS Current Mode ICE3B0365JG Discontinued Controller ICE3BR4765JG Replacement Gate Drive IC 6EDOO3L06 F High Speed DuoPack IGBT IKB20N60H3 IGBT wi
13. Application Cinfineon 13 17 gt Screenshot of typical V F parameters value in DAVE App Start Speed Reference 1 RPM Motor Direction Forward Direction Start Speed Threshold 100 CT Reverse Direction End Speed Reference 1000 RPM Configuration Options Speed Slew Rate D o Default mg User Defined Max Voltage Limit 100 75 Speed Ep 2133 dec Ki G dec ka PI Output 100 pC Integral Buffer 1 00 25 Id Kp 7967 dec Ki 5 dec ba PI Output 100 ne Integral Buffer 100 p ka Iq Kp 7967 dec ka Ki 5 dec PI Output 100 o6 Integral Buffer 100 r ka V F Constant 1 6 Voltage Offset 5500 The Start up parameters shown are mainly for references purpose Due to differences between various motor the V F control parameters needs to be tuned to drive every new motor model Copyright Infineon Technologies AG 2014 All rights reserved Page 53 Chapter 4 Driving Ventilation Fan Application Cinfineon 14 17 8 The FOC Closed Loop operation can be ENABLED by uncommenting the 5 lines highlighted as below gt Under C C projects gt Dave gt Generated gt src gt PMSMFOCSLO2 c search for PMSMFOCSLO2 SpeedRampup API function SET BIT MandlePtr gt M Ptr MotocStatus PMSMFOCSLO2 RAMP Pos else Skip the following page 50 to page 52 if user is using PMSMFOCSLO2 1 0 8 and above Id and Iq KpKI values in App GUI are calculated based on motor resistance and inductance values Speed PI
14. Chapter 4 Driving Ventilation Fan Application Cinfineon 6 17 gt Click on Power Board tab ea PMSMFOCSLO2 0 33 ADC Configuration DC Link Voltage 320 VADC Reference 5000 mV Current Measurement Parameters 750 Rshunt 800 Amplifier Gain Passive Level Configuration Maximum Current 4 166666667 A ka High Side Switch Low Side Switch Amplifier Bias Voltage 2500 mV Amplifier Bias Voltage Calibration Enable Inverter Enable Pin Configuration Level Selection Voltage Measurement Parameters Enable Active Low Voltage Divider Ratio 1 Refer to page 16 or 750W Board User Manual for hardware details 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 46 Chapter 4 Driving Ventilation Fan Application Cinfineon 7 17 gt Click on Control Panel tab user should configure start up parameters for V F control s PMSMFOCSLO2 0 3 Start Speed Reference p RPM Motor Direction amp Forward Direction Start Speed Threshold C35 Reverse Direction End Speed Reference 1000 RPM ma Configuration Options Speed Slew Rate C7 Default User Defined Max Voltage Limit 100 p Speed Kp 2133 dec r Ki e dec PI Output 100 o Integral Buffer 100 oe Id Kp 7967 dec ka Ki 5 dec ka PIOutput 100 o Integral Buffer 100 oa Iq Kp 7967 dec bag Ki 5 dec PI Output 100 oe Integral Buffer 100 ae W F Constant 6 4 Voltage Offse
15. Ptr Ia and PMSMFOCSLO2 HandleO H Ptr Ib in PMSMFOCSLO2 c Eu This is user define interrupt handler for period match interrupt void PMSMFOCSL 2 PWMPeriodMatchISR void H Reading Phase U current PMSMFOCSL 2 Handle6 H Ptr gt Ia ADCCH 1 HandleType PMSMFOCSLO2 Handlee ADCReg5rcPtrA gt kChAHandlerPtr gt ADCUGrPtr gt RES ADCCH 1 HandleType PMSMFOCSLO2 Handlee ADCReg gt 5rcPtrA gt kChAHandlerPtr gt KStartResultRegNo amp VADC G RE PMSMFOCSLO2 Handle6 H Ptr gt Ia 2 int32 t PMSMFOCSL82 Handle6 H Ptr gt Ia PM5MFOCSL62 Handle8 H Ptr gt AmpOffset Reading Phase V current PMSMFOCSLO2 Handle6 H Ptr gt Ib CC ADCCH8801 HandleType PMSMFOCSLO2 Handle ADCRegSrcPtrB gt kChBHandlerPtr gt ADCGrPtr gt RES ADCCH 1 HandleTypec t9PMSMFOCSLe2 Handlee ADCReqSrcPtrB kChBHandlerPtr k5StartResultRegMo amp VADC G RE PMSMFOCSLO2 Handle8 H Ptr gt Ib 2 int32 t PMSMFOCSL82 Handle6 H Ptr Ib PMSMFOCSL82 Handle8 H Ptr gt AmpOffset JF This is user define interrupt handler for period match interrupt void PMSMFOCSL 2 PWMPeriodMatchISR woid L EI Reading Phase U current PMSMFOCSL 2 Handlee H Ptr gt Ia C K ADC CH 1 HandleType PMSMFOCSLO2 Handle ADC RegSrcPtrA gt kChAHandlerPtr gt ADCGrPtr gt RE gt S CADCCH 1 HandleType yPMSMFODSLO2 Handlee eaADCReg gt rcPtrA gt EChAHandlerPtr gt KS gt tartResultRegMo amp VADC_G RE PMSMFOCSL 2 Handlee H Ptr
16. Sensorless FOC PMSMFOCSLO2 O Hardware XMC 750 Watt Motor Control Application Kit KIT XMC750WATT MC AK V1 D DC Link Voltage 320 VDC y X3 D Fan Motor Specification Phase to Phase Resistance 71 2 Q Da gt Phase to Phase Inductance 483 mH gt Pole Pairs 6 in gt Tested Speed range 30 rpm to 220 rpm gt Blade Size 22 5 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 59 Chapter 5 Driving Ceiling Fan Application Cinfineon 2 20 m This chapter provides a guideline on how to run Ceiling Fan application using PMSMFOCSLO2 B TP1 TP2 and TP3 are test points to probe with oscilloscope m Connect the motor phases to XMC 750 Watt Motor Control Application Kit as shown TP Test Point Ce arr gt 230Vac 50Hz ae TTT gt PC USB b EI B nil LT TUAM N gt PO 5 MCU t d ee EN ERE CTRL eo E B B BE TP2 o i ea gt P1 2 TP3 EL uii gt FAN Motor Page 60 Copyright Infineon Technologies AG 2014 All rights reserved 2014 09 26 Chapter 5 Driving Ceiling Fan Application Cinfineon 3 20 1 Create DAVE CE Project Next Stage FOC Closed Loop A YES 2 Configure Pin Assignment fa Fine tune V F Constant safe VOltage Offset Speed Slew Rate start Speed Reference 3 Configure Motor Power Board control profile 6 Fine tuning Start up in V F 4 Generate Application 5 Configure C
17. o Id Va Reference IPI Controller Cartesian E to Polar Source pae Speed iq Transform Inverter Pl Controller VSI Pl Controller Ip deles c 1 2 or 3x Park li Transform Transform Rshunt In general FOC is a method to generate a 3 phase sinusoidal signal which can easily be controlled in freguency and amplitude in order to minimize the current which means to maximize the efficiency 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 13 infineon Agenda 1 2 B Kit Overview B Tooling Overview B Getting Started O Chapter 1 D Chapter 2 L Chapter 3 Ll Chapter 4 L Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014 All rights reserved Page 14 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 1 12 1 Open DAVE J 3 Select the device accordingly OI select XMC1300 TO38X0200 TM 2 In DAVE 7 workspace create a as controller depending on your new Empty Main project Y File gt New gt DAVE Project Give the project a name e g Target Selection Page P M S M FOCSLO 2 Exa m p eO 1 rn Select the controller for which the project has to be creat O Select DAVE CE Project as i XMC4000 1 V XMC1000 Pr T
18. t pmsmfocsl l irwccr gt 1 E gt CLR BIT PMSMFOCSL81 Handle lt amp appInst 5VMAppPtr PhasePtr 8 INTE CCUB CCB INTE PME Pos x pe Xif app getlIntegerValue AppBaseuri appInst t pmsmfocsl l erwout enablepot 1 gt Measure the pot value and update the end speed reference value PMSMFOCSL 1 PotMeasurement amp PMSMFOCSLel Handles appInst 2 K per update speed reference value PMSMFOCSL 1 SpeedRampup amp PMSMFOCSL 1 Handle lt appInst gt FOC Calculation PMSMFOCSL 1 FOCCalculation amp PMSMFOCSLOl Handle lt appInst 2 2 Copy the content of attached main c and paste to user DAVE generated main c 3 Save and close the PMSMFOCSLO2c jet E main c 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 33 Chapter 2 Configure CCU4 as Debugging infineon feature 7 7 m Click to regenerate code after modifying jet file with Solve and re generate code then click OK B Now CCUADebug3Output has been included in PMSMFOCSLO2 c under PMSMFOCSLO2 PWMPeriodMatchISRO ne a Cancel code generation a Solve and re generate code f This is user define interrupt handler for period match interrupt 5 Re generate code without invoking solver void PMSMFOCSL 2 PWMPeriodMatchISR8 void 1 Reading Phase U current PMSMFOCSLO2 Handle8 H Ptr gt Ia LADCCHB01 HandleType PMSMFOCSLO2 Handle6 ADC
19. 8 CCU4 Debug3Output PMSMFOCSL61 Handle8 H Ptr gt Ialpha 1 9 PMSMFOCSL 1 Handle8 H Ptr gt Ia 1 9 uintl6 t PMSMFOCSL 1 Handle8 H Ptr gt Angle 16 DON Scale it to 2 Variable Name 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 31 Chapter 2 Configure CCU4 as Debugging Cinfineon feature 5 7 1 Initialize the CCU4 PWM period to 100Khz 50 duty cycle 2 Configure 3 I O on board as CCU4 outputs D PO 5 CCUAO OUTO D PO 4 CCUAO OUT1 D P1 2 CCU40 OUT2 3 Create software handle function in Main c Call CCU4_Init to initialize CCU4 configuration before start the motor operation 5 Call the CCU4_Debug30Output to sample desire signals in PMSMFOCSLO2 PWMPeriodMatchISRO D PMSMFOCSLO2 HandleO H Ptr Ialpha ri PMSMFOCSLO2 HandleO H Ptr Ibeta O PMSMFOCSLO2 HandleO H Ptr Angle 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 32 Chapter 2 Configure CCU4 as Debugging Cinfineon feature 6 7 1 To avoid DAVE3 erase user function when user click Regenerate code please go to D Model gt PMSMFOCSLO2 gt 1 0 6 gt Templates gt PMSMFOCSLO2c jet O Paste the user function into PMSMFOCSLO2 PWMPeriodMatchISRO in PMSMFOCSLO2c Jet click SAVE and CLOSE it PMSMFOCSL 1 ReadCurrent amp PMSMFOCSLe1 Handle lt amp appInst gt if CCR is greater than 1 disable Period Match interrupt Xif app getIntegerValue AppBaseuri appInst
20. APIs ACIMVFO1 SetMotDirection and ACIMVFO1_SetEndSpeedRef Ramp up V F control current measurement DC link voltage measurement and POT measurement are executed in the PWM period match interrupt Trap interrupt handler handles the trap condition by stopping the motor Motor status can we read by using API ACIMVFO1_GetMotStatus This ts bit field level information Please refer to the 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 84 References i Where to download Example Projects 1 2 oe m Two sets of Example Projects available D Additional Application Examples Can be downloaded directly from the web o DAVE Project Library Examples Can be downloaded from library in DAVE Can also be downloaded directly from the web 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 85 References i Where to download Example Projects 2 2 oe m Additional Application Examples available D Running LEDs Example Simple XMC1100 RunningLEDs zip D UART Example Simple XMC1100 UART zip 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 86 References How to load Example Project in DAVE M 1 5 B Download Example Projects via DAVE library store D Help Install DAVE Example Library 2014 09 26 e Debug Window uu a E e Welcome Help Contents ap Search Dynamic Help Key Assist Ctrl Sh
21. All rights reserved Page 40 Chapter 4 Driving Ventilation Fan Application Cinfineon 1 17 m Ventilation Fan Application Overview O Microcontroller Infineon XMC1302 T038X0200 O Algorithm Dual Shunt Sensorless FOC PMSMFOCSLO2 O Hardware XMC 750 Watt Motor Control Application Kit KIT XMC750WATT MC AK V1 O DC Link Voltage 320 VDC O Fan Motor Specification gt Phase to Phase Resistance 19 6 Q gt Phase to Phase Inductance 154 mH 174 mH gt Pole Pairs 3 Tested Speed range 500 rpm to 1000 rpm 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 41 Chapter 4 Driving Ventilation Fan Application Cinfineon 2 17 m This chapter provides a guideline on how to run ventilation Fan application using PMSMFOCSLO2 B TP1 TP2 and TP3 are test points to probe with oscilloscope m Connect the motor phases to XMC 750 Watt Motor Control Application Kit as shown TP Test Point t0 gt 230Vac 50Hz ae TTT gt PC USB b EI nil TUAM gt P0 5 MCU fif EI a T CTRL T E_ sn L mw i un ii i TP2 E h a Ma N E gt P1 2 TP3 udi gt FAN Motor o Page 42 Copyright O Infineon Technologies AG 2014 All rights reserved 2014 09 26 Chapter 4 Driving Ceiling Fan Application 3 17 1 Create DAVE CE Project 2 Configure Pin Assignment 3 Configure Motor Power Board control profile parameters in DAVE
22. CU4 as Code Template Debugging Feature 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 61 Chapter 5 Driving Ceiling Fan Application Cinfineon 4 20 FOC Closed Loop 8 Enable FOC Closed Loop Mode in Code 9 Change PT12 Filter Constant 10a Fine tune PT12 Filter Constant NO 11a Fine tune Id lq Speed NO PI Parameters YES The End i 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 62 Chapter 5 Driving Ceiling Fan Application 5 20 1 Create DAVE CE project page 15 2 Configure Pin Assignment page 23 Cinfineon 3 Configure Motor power board control profile parameters in DAVE GUI gt Keep default setting value in Control Algorithm tab gt Click on Motor Parameters tab de PMSMFOCSLO2 0 2 Nominal Voltage Nominal Current 670 mA bd Nominal 5peed P Pole Pair 6 dec Nominal Torque 256 mm T Configure Motor Nominal Voltage as 320V Nominal Speed set to 300 rpm Phase to phase resistance set to 71 20 Phase to phase inductance set to 483mH Pole Pairs of motor 6 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 63 Chapter 5 Driving Ceiling Fan Application Cinfineon 6 20 gt Click on Power Board tab ae PMSMFOCSLO2 0 33 ADC Configuration Link Voltage 220 VADC Reference 5000 mV Curre
23. Example Projecte vath DAVE Apps E x E x Ani I2 Cu Hi J Fi Ig Deselect Al Dezenpesan Fiberi Hide rlwma tat aro already dominan der Ghee only latest version Cancel 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 89 References How to load Example Project in DAVE M 4 5 Infineon D Accept terms of the license agreements and click Finish IMPORTANT DOWNLOAD NOTICE The software you have requested for download is protected by national and international copyright laws and may be protected by other intellectual property rights You shall use the software only in accordance with the applicable licensing terms and conditions which may be different from the terms and conditions of the DAVE 3 Software License Agreement For copyright information licensing terms and additional information e g on how to obtain the source code of such Open Source Software please check the Help Function Section Copyright and Licensing Information of the software By downloading the software you acknowledge that you have read and understood this download notice I accept the terms of the license agreements Ido not accept the terms of the license agreements D DAVE Example Projects are installed 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 90 References
24. F Constant Voltage Offset Start Speed mid d Von age V Frequency Hz Slope WF Constant l Slope Speed Slew Rate Voltage Time g Frequency Hz 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 67 Chapter 5 Driving Ceiling Fan Application Cinfineon 10 20 7 Evaluate the motor start up response repeat fine tuning steps if necessary User may reconfigure the 4 parameters in App GUI regenerate code is needed for every changes in GUI A PMSMFOCSLO2 c Wet PIMSIMFOCSLO2 0 ZZ gt Le Mainec Le PMSMFOCSLO2_Conf c e axo Mioter Direction Start Speed Reference 1 a Forward Direction Start Speed Threshold 30 C Reverse Direction End Speed Reference 220 EPMA _ Configuration Options C Default am User Defined Speed Slew Rate Max Voltage Limit 100 po Speed Kp 1066 dec _ Ki o dec S PI Output 100 me Integral Buffer 100 c Id Ep 2346 4 dec _ Ki 21 dec 7 PI Output 100 r Integral Buffer 100 r Iq Ep 234604 dec Ki 21 dec bul PI Output 100 a Integral Buffer 100 a WF Constant 1 5 Voltage Offset B500 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 68 Chapter 5 Driving Ceiling Fan Application Cinfineon 11 20 User may change the RED highl
25. GUI 4 Generate Application Code Template 2014 09 26 Next stage FOC Closed Loop A YES Ta Fine tune VIF Constant Cinfineon lem Voltage Offset Speed Slew Rate 6 Fine tuning Start up in V F Control 5 Configure CCU4 as Debugging Feature Copyright Infineon Technologies AG 2014 All rights reserved Start Speed Reference Page 43 Chapter 4 Driving Ceiling Fan Application Cinfineon 4 17 FOC Closed Loop 8 Enable FOC Closed Loop Mode in Code 9 Change PT12 Filter Constant 10a Fine tune PT12 Filter Constant NO 11a Fine tune Id lq Speed NO PI Parameters YES The End i 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 44 Chapter 4 Driving Ventilation Fan Application irineon 5 17 1 Create DAVE CE project page 15 2 Configure Pin Assignment page 23 3 Configure Motor power board control profile parameters in DAVE GUIs gt Keep default setting value in Control Algorithm tab gt Click on Motor Parameters tab ae PMSMFOCSLO2 0 23 MominalSpeed 1000 RPM Pole Pair 3 dec Nominal Torque 256 mN rn Z Configure Motor Nominal Voltage as 320V Nominal Speed set to 1000 rpm Phase to phase resistance set to 19 6 Q Phase to phase inductance set to 164 mH Pole Pairs of motor 3 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 45
26. Kp and KI are not calculated it is hardcoded values 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 54 Chapter 4 Driving Ventilation Fan Application Cinfineon 15 17 gt 2014 09 26 Build project At this stage the motor will be driven in FOC Closed Loop mode 1 Click sr Wait for Build to finish 2 SW App Connectivity View H W Connectivity View Properties IST Problems El Console x A Search CDT Build Console PMSMFOCSLO2_ExampleQ1 Invoking ARM GCC Print Size C DAVE 3 1 1 ARM GCC bin arm none eabi size format berkeley PMSMFOCSL82 Examplee1 elf text data bss dec hex filename 12926 Il 2116 15458 3c78 PMSMFOCSLO2 Example l elf Finished building PMSMFOCSL 2 Example 1 siz Build Finished Download code 1 Click amp click to run the motor pf n 5 UP m oe i Copyright Infineon Technologies AG 2014 All rights reserved Page 55 Chapter 4 Driving Ventilation Fan Application Cinfineon 16 17 9 Below shows CCU4 output waveforms of Ventilation Fan while from V F Open Loop to FOC Closed loop 1 a g a 8 V F Control Start up E 2 MAN SW Y U rT gt Transition Open Loop to Closed Loop at 100 rpm gt Transition at 11W Channel 1 yellow PMSMFOCSLO2 HandleO H Ptr Iy Channel 2 green PMSMFOCSLO2 HandleO H Ptr gt Iu Channel 3 blue PMSMFOCSLO2 HandleO H Ptr gt Angle Channel 4
27. Reg5rcPtrA gt kChAHandlerPtr gt ADCGrPtr gt RES ADCCH881 HandleType PMSMFOCSL82 Handle6 ADCReg5rcPtrA gt kChAHandlerPtr gt kStartResultRegNo amp VADC G RES RESULT Msk PMSMFOCSL82 Handle8 H Ptr gt Ia 2 int32_t PMSMFOCSL 2_Handle H Ptr Ia PMSMFOCSL82 Handle8 H Ptr gt AmpOffset Reading Phase V current PMSMFOCSL82 Handle8 H Ptr gt Ib CADCCH 1 HandleType PMSMFOCSLO2 Handle6 ADCReg5SrcPtrB gt kChBHandlerPtr gt ADCGrPtr gt RES ADCCHG81 HandleType PMSMFOCSL82 Handle6 ADCReg5rcPtrB gt kChBHandlerPtr gt kStartResultRegNo amp VADC G RES RESULT Msk PMSMFOCSLe2 Handle8 H Ptr gt Ib 2 int32 t PMSMFOCSL82 Handle8 H Ptr gt Ib PMSMFOCSL 2 Handle8 H Ptr gt AmpOffset if CCR is greater than 1 disable Period Match interrupt CLR BIT PMSMFOCSLe2 Handle8 sVMAppPtr PhasePtr 6 INTE CCUS CCS INTE PME Pos update speed reference value PMSMFOCSLO2 SpeedRampup amp PMSMFOCSL82 Handle Calculation of stationary orthogonal reference frame Current Components Ialpha and Ibeta PMSMFOCSLO2 Handle8 H Ptr gt Ibeta MOTORLIBS ClarkTransform PMSMFOCSLO02 Handle8 H Ptr gt Ia PMSMFOCSL602 Handle8 H Ptr Ib amp PMSMFOCSL82 Handle8 H Ptr gt Ialpha FOC Calculation PMSMFOCSL62 FOCCalculation amp PMSMFOCSLOe2 Handlee call SvM PWMSVM81 SVM PMSMFOCSL82 HandleB SVMAppPtr uintl amp t PMSMFOCSL 2 Handle6 H Ptr gt Amplitude uintl amp t PMSMFOCSL82 Handle H Ptr Angle
28. Threshold V F Constant Voltage Offset Start Speed aas d Frequency Hz Slope VIE Constant lope Speed Slew Rate Time n Frequency Hz 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 49 Chapter 4 Driving Ventilation Fan Application Cinfineon 10 17 7 Evaluate the motor start up response repeat fine tuning steps if necessary User may reconfigure the 4 parameters in App GUI regenerate code is needed for every changes in GUI em PMSMFOCSLO2 0 Xi Start Speed Reference 1 RPM Motor Direction amp Forward Direction Start Speed Threshold dh Revere Dirr ibn End Speed Reference 1000 RPM Configuration Options Speed Slew Rate 5 Default Gm User Defined Max Woltage Limit 100 ce Speed Kp 2133 dec _ Ki o dec PI Output 100 c Integral Buffer 100 c Id Kp aes dec _ Foi 5 dec PI Output 100 oF Integral Euffer 100 oF Iq Kp 7967 dec Ki 5 dec PI Output 100 a Integral Buffer 100 ce WEF Constant 6 4 Voltage Offset 6666 666666667 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 50 Chapter 4 Driving Ventilation Fan Application Cinfineon 11 17 User may change the RED highlighted variables to improve the start up response in PMSMFOCSLO2_ Config c i kMormSlewRate uint32 t 180172 PHSMFOCSL82 StartupHand
29. XMC 750 Watt Motor Control Application Kit Getting Started PMSM Motor Sensorless dual shunt Field Oriented Control FOC PMSMFOCSLO2 Cinfineon infineon Agenda 1 2 oe m Kit Overview m Tooling Overview m Getting Started D Chapter 1 Generate PMSMFOCSLO2 template D Chapter 2 Configure CCU4 as Debugging feature L Chapter 3 Motor Electrical Parameters Measurement Ll Chapter 4 Driving Ventilation Fan Application L Chapter 5 Driving Ceiling Fan Application 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 2 infineon Agenda 2 2 E Summary m General Information m References D Where to find Apps documentation D Where to download example projects o How to load Example project in DAVE D How to improve compiler performance 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 3 infineon Agenda 1 2 AN B Kit Overview B Tooling Overview B Getting Started O Chapter 1 O Chapter 2 L Chapter 3 Ll Chapter 4 L Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014 All rights reserved Page 4 Infineon Kit Overview 1 3 id m XMC1300 Drive Card with galvanic isolation H ee Power GND Debug Domain Debug Po
30. YM Voltage Compensation Speed Ref Via POT 7 Segment Enable Enable O 5 Segment 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 18 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 5 12 D Control Panel tab Start Speed Reference j Start Speed Threshold 300 End Speed Reference 1500 Speed Slew Rate 50x Max Voltage Limit 100 In PMSMFOCSLO2 motor run in open loop V F control and switch to closed loop In open loop motor start with Start Speed Reference and ramp up the motor until speed reaches as Start Speed Threshold The control switch to closed loop at Start Speed Threshold The motor will ramp up until it reaches End Speed Reference m Configuration Options In Default Mode PI and V F parameters will be calculated based on motor parameters Select User Defined to fine tune Configuration Options Speed Kp 5000 PlOutput 100 ld Kp 1379 PlOutput 100 E Kp 1379 PlOutput 100 WF Constant 015 2014 09 26 Ki D Integral Buffer 100 Ki Integral Buffer 100 Voltage Offset Soo Default amp User Defined dec E dec dec m BH Use For V F Start up only Copyright Infineon Technologies AG 2014 All rights reserved Page 19 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 6 12 D Motor Parameters tab Parameters can be found in motor datasheet User can measure motor Phase to Phase Resistance Inductance manually by o
31. ant rH Voltage Offset 1000 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 65 Chapter 5 Driving Ceiling Fan Application Cinfineon 8 20 4 Generate Application Code Template Click pa 5 Configure CCU4 as Debugging Feature page 27 page 29 gt Following the steps to enable CCU4 debugging pin Copy the attached main c and paste into user s main c 6 Fine tuning Start up in V F control gt V F control principle consist in feeding the motor winding with a 3 phase sinusoidal voltage whose amplitude is proportional to the freguency and time gt Under C C projects gt Dave gt Generated gt src gt CR search for PMSMFOCSLO2 SpeedRampup API unction Grey out the 5 code lines as shown else WandlePtr gt M Ptr gt SpeedRef SET BIiT MandlePtr HM Ptr gt MctcrStatus PMSMFOCSLO2 RAMP Pos Ia CE 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 66 Chapter 5 Driving Ceiling Fan Application Cinfineon 9 20 gt Place 3 signal probes on PO 4 PO 5 P1 2 on hardware gt Take note that the start up current would be HIGH if user configure motor start up parameters wrongly User can always limit the current in power supply Its recommended to start with LOW V F constant amp Voltage Offset V F constant 1 0 V Hz Voltage Offset 1000 mV The start up response will be affected by Speed Slew Rate Start Speed Threshold V
32. der The package iz wrapped in an exe that users can accept the licenses conditions DOWNLOAD the zipped file package B Note For users who have downloaded DAVE as a zipped file package DAVE can be started via DAVE exe in the eclipse folder 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 10 infineon Agenda 1 2 emm B Kit Overview B Tooling Overview B Getting Started O Chapter 1 O Chapter 2 L Chapter 3 Ll Chapter 4 L Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014 All rights reserved Page 11 Cinfineon Getting Started m Following these steps to get started with XMC 750 Watt Motor Control Application Kit 1 2014 09 26 Read through Board Users Manual 3phase Power Inverter 750W Connect the power board to a AC Input power supply Connect XMC1300 drive card to power board Using the USB cable included in the kit with 75OW Motor Control Application Kit The user can program the Drive Card to drive the motor after connecting USB cable between a PC amp kit Copyright Infineon Technologies AG 2014 All rights reserved Page 12 Block Diagram of Infineon Sensorless Field Cinfineon Oriented Control Voc 3 Phase 2 Level Voltage 0
33. echnologies AG 2014 All rights reserved Page 21 Chapter 1 Generate PMSMFOCSLO2 template 8 12 m Label the apps instance D Under App Dependency TreeView Right click on IO002 0 app gt Add User Label Type U_H in the field provided D Repeat the steps to label other apps App Feature I0002 0 U_H IO002 1 U_L 10002 2 V_H I0002 3 V_L High side Phase U Low side Phase U High side Phase V Low side Phase V IO002 4 W H High side Phase W IO002 5 W L Low side Phase W IO004 0 Enable Pin Enable Pin Gate Driver IC IO002 6 Trap Pin Trap Pin IO001 0 I UT 10001 1 I V Current Phase U Current Phase V 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved m 4 um User Label Cinfineon PWMSVMOL U se CCUSGLOBAL O aw CLK002 0 am CLEDO2 U r 10002 1 UlEditor sw 10002 2 D Remove ee 10002 3 ae 10002 4 Signal Connection m 2 ae 1O002 5 Manual Pin Assignment aw 10002 6 E A 10004 0 Manual Resource Assignment Add User Label Please Specify User Label U H 4 ga PMSMFOCSLO2 0 4 ge ADCOD2 O 4 ge ADCCHOOL O ee 10001 0 LU 4 ga ADCCHOOL 1 sw 10001 1 I V 4 ge ADCGROUPOO1 0 4 ge ADCGLOBOO1 0 se CLK002 0 4 ga PWMSVMOL O 4 ge CCUSGLOBAL O sm CLKOO2 0 sm CLKOO2 0 sw 10002 0 U H sw 10002 1 U L sw 10002 2 V HI sw 10002 3 V L ee 10002 4 W H sm 10002 5 W L ee 1O002 6 Trap Pin ee 10004 0 Enable Pin Page
34. fineon Technologies AG 2014 All rights reserved Page 69 Chapter 5 Driving Ceiling Fan Application Cinfineon 12 20 gt Below shows CCU4 output waveform of Ventilation Fan while running in V F control Start up a g B 100 a gt Motor Speed 30 rpm Fregi Y 7 req 3 0H RMS 4 123 9mA Freg 3 3 1Hz A I xal l Channel 1 yellow PMSMFOCSLO2 HandleO H Ptr Iy Channel 2 green PMSMFOCSLO2 HandleO H Ptr gt Iu Channel 3 blue PMSMFOCSLO2 HandleO H Ptr gt Angle Channel 4 pink Current of fan motor Phase U measured by current probe 0 1V A 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 70 Chapter 5 Driving Ceiling Fan Application Cinfineon 13 20 gt Screenshot of typical V F parameters value in DAVE App s PMSMFOCSLO2 0 53 Start Speed Reference 1 Motor Direction a Forward Direction Start Speed Threshold 30 dh Reverse Dreic End Speed Reference 2 Configuration Options Default a User Defined Speed Slew Rate Max Voltage Limit 100 oc Speed Kp 1066 dec ka Ki a dec ka PIOutput 100 i Integral Buffer 100 o6 Icl Kp 23464 dec Ki 21 dec _ PIOutput 100 o6 Integral Buffer 100 on Iq Kp 23464 dec Kr 21 dec PIOutput 100 o5 Integral Buffer 100 oe V F Constant 1 5 Voltage Offset amp 500 The Start up parameters shown are mainl
35. hts reserved Page 37 Chapter 3 Motor Electrical Parameters Cinfineon Measurement 3 4 m The number of pole pairs 3 m The number of pole pairs can be obtained from the motor specification sheet m Using measured frequency value the speed can be calculated using below equation 60 x Frequency measured in Hertz Speed RPM no Pole Pairs 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 38 Chapter 3 Motor Electrical Parameters Cinfineon Measurement 4 4 B Equipment required to measure phase to phase stator resistances and inductances O Digital Multimeter LCR meter m Following steps describe the method to measure phase to phase resistances and inductances O Phase to Phase Resistance Use multimeter and measure the DC resistance across the two phase wires of PMSM D Phase to Phase Inductance Use LCR to measure the inductance at 1Khz across the two phase wires of PMSM Rs x 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 39 infineon Agenda 1 2 AN B Kit Overview B Tooling Overview B Getting Started O Chapter 1 D Chapter 2 L Chapter 3 Ll Chapter 4 Ll Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014
36. ift L Tips and Tricks DAVE Forum DAVE Online Support Cheat Sheets Install DAVE Apps Example Library Check for DAVE App Updates Uninstall DAVE App Example Library Check for Updates Install New Software About DAVE 3 Copyright Infineon Technologies AG 2014 All rights reserved Cinfineon Page 87 References Cinfineon How to load Example Project in DAVE M 2 5 O Select DAVE Project Library Manager in the drop down menu ie Ubay Manager Wang EET Download Libraries Page Thu wib page heled in direnieadie the bhiares of Eet eample praeci ai apes lra Dose Sie Work witht CAVE Proe Libere Uecyn Find mg lIEre bry ark na wrth Bae LR nd abe ines preferences Livari Enter the kKerreezrds ta fitter IMCA see AH Desehect Dez cnpE an Filbacu d Picks heme that are airaach den bara Show anhy riau veru 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 88 References Cinfineon O Select Examples in the Libraries window and click Next How to load Example Project in DAVE M 3 5 d amp Library Manager Wizard Cownload Libraries Page The witard page Palpi in downloading the libeanes of type comple projects er appi bban Da Sim Week wrth D Penpert Library Manager Lira sci Enter the keywosh to filter 3 J L 8 K L B d i Z E E Er Ti i 3 Piara F DAVE 3
37. ighted variables to improve the start up response de PMSMFOCSLO2 0 A Main c PMSMFOCSLO2 c j PMSMFOCSLO2_Conf c xia 0x00 198 HO EMEN C MH BMSMED C c di DM 4 189 kNormkp uint32 t 512 PMSMFOCSL 2 5tartupHandleType PMSMFOCSL82 StartupHandle amp md ii 201 kNormki uint32 t 32767 vFOffset uint32 t 7es E S ES sud 283 kMormSpeed uint32 t 11118 vFConst uint32 t 1084 204 Ang e intl6 t 16 sag KNormCurrent uint32 t 33 LS 287 kMormCurrentAlphaBeta uint32 t 66 208 209 kNormCurrentdg uint32 t S50 i 210 i PMSMFOCSL 2 DynamicHandleType PMSMFOCSL82 DynamicHandle8 um A uint32 t 10171 F 1 213 kAmplitudeMax uint32 t 133293 rs 2fuint32 LN EO 214 Iqgstartup uint32_t Saal 215 kAmplitudeMin uint32 t e State PMSMFOCSLO2 UNINITIALIZED 216 Ls 217 kUserStartSpeedRef int32 t 2 z 218 kUserStart5peedThreshold int32 t 88 219 228 KUserEnd5peedRef int32 t 648 221 222 kSpeedMaxTarget uint32 t 884 2 24 kRampCounter uint32 t 782 225 226 kSlewRate uint32 t 13 227 228 kSpecifiedVolt uint32 t 2621 229 238 kPolePair uint32 t 6 231 The main advantage Save up compilation time during fine tuning High inertia motor requires higher start up power Refer to page 21 to set code optimization level in DAVE before user download hex code into XMC1300 2014 09 26 Copyright In
38. leType PMSMFOCSL 2 StartupHandle8 i KAmplitudeMax uint32 t 13329 KAmplitudeMin uint32 t 8 kUserStartSpeedThreshold int32 t 147 kKUserEnd5peedRef int32 t 1474 kSpeedMaxTarget uint32 t 5898 kRampCounter uint32 t 138 kSlewRate uint32 t 68 kSpecifiedVolt uint32 t 2621 The main advantage Save up compilation time during fine tuning Refer to page 25 to set code optimization level in DAVE before user download hex code into XMC1300 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 51 Chapter 4 Driving Ventilation Fan Application Cinfineon 12 17 gt Below shows CCU4 output waveform of Ventilation Fan while running in V F control Start up a g B 200 8 gt Motor Speed 100 rpm hM ae eK e la wae HM d e Ereg 5 15Hz 3 Freq T 5 15Hz RMS 4 208 7mA Freg 3 5 10Hz v l Channel 1 yellow PMSMFOCSLO2 HandleO H Ptr I Channel 2 green PMSMFOCSLO2 HandleO H Ptr gt Iu Channel 3 blue PMSMFOCSLO2 HandleO H Ptr gt Angle Channel 4 pink Current of fan motor Phase U measured by current probe 0 1V A 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 52 Chapter 4 Driving Ventilation Fan
39. m DAVE ri MemrTool Download MemrTool http www infineon com cms en product channel html channel ff80808112ab681d0112ab6b50fe07c9 B For more information on how to configure the BMI value please refer to the XMC1000 Tooling Guide 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 9 infineon Tooling Overview DAVE 2 2 B Download DAVE installer package from http www infineon com cms en product promopaaes aim mc DAVE 3 Download html DAVE version 5 1 6 Download Options There are two download options available B m DAVE version 3 1 6 as regular installer package This is a regular installer setup exe that install DAVE and the SEGGER J Link drivers in a user defined target folder In case an earlier version of DAVE is already installed the installer will uninstall the old version and install the new version in the same target folder This ensures that workspaces from earlier versions of DAVE can be used with the new version The installer package includes also an installation of a complete set of DAVE Apps and device descriptions if there are no DAVE Apps installed yet powNLOAD he installer package m DAVE version 3 1 6 as zipped file package This package contains a zip file with all required files to run DAVE on a PC plus the installation setup for the SEGGER J Link drivers The zip file can be unzipped anywhere and DAVE can be started form the eclipse fol
40. nt Measurement Parameters 750 Rshunt 800 Amplifier Gain Passive Level Configuration Maximum Current 4 166666667 A ka High Side Switch Low Side Switch Amplifier Bias Voltage 2500 mV Amplifier Bias Voltage Calibration Enable Inverter Enable Pin Configuration Level Selection Voltage Measurement Parameters Enable Active Low Voltage Divider Ratio 1 Refer to page 16 or 750W Board User Manual for hardware details 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 64 Chapter 5 Driving Ceiling Fan Application Cinfineon 7 20 gt Click on Control Panel tab user should configure start up parameters for V F control de PMSMFOCSLO2 0 33 2 Main c EI PMSMFOCSLO2cjet PMSMFOCSLO2_Conf c A PMSMFOCSLO2 c Start Speed Reference 50 RPM Motor Direction Forward Direction Start Speed Threshold 0 Reverse Direction End Speed Reference 220 RPM m Configuration Options Speed Slew Rate Default Max Voltage Limit 100 To m Speed Kp 1066 dec ka Ki 9 dec E Pl Output 100 oe Integral Buffer 100 ur Id Kp 23464 dec Ki 21 dec gt Starting with lower PI Output 100 pC Integral Buffer sta rt u p powe r lq Kp 23464 dec ka Ki PI Output 100 ntegral Buffer V F Const
41. pink Current of fan motor Phase U measured by current probe 0 1V A 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 56 Chapter 4 Driving Ventilation Fan Application Cinfineon 17 17 10 Below shows CCU4 output waveforms of Ventilation Fan running in FOC during steady state u 2 g a End Speed Reference 1000 rpm gt Speed Slew Rate 30 rpm s 2 pee gt Speed Z 1020 rpm 31 Freq T 51 0Hz RMS 4 489 9mA Freq 3 51 0Hz KA Channel 1 yellow PMSMFOCSLO2 HandleO H Ptr Iy Channel 2 green PMSMFOCSLO2 HandleO H Ptr gt Iu Channel 3 blue PMSMFOCSLO2 HandleO H Ptr gt Angle Channel 4 pink Current of fan motor Phase U measured by current probe 0 1V A 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 57 infineon Agenda 1 2 AN B Kit Overview B Tooling Overview B Getting Started O Chapter 1 D Chapter 2 L Chapter 3 Ll Chapter 4 L Chapter 5 2014 09 26 Generate PMSMFOCSLO2 template Configure CCU4 as Debugging feature Motor Electrical Parameters Measurement Driving Ventilation Fan Application Driving Ceiling Fan Application Copyright Infineon Technologies AG 2014 All rights reserved Page 58 Chapter 5 Driving Ceiling Fan Application Cinfineon 1 20 m Ceiling Fan Application Overview O Microcontroller Infineon XMC1302 T038X0200 O Algorithm Dual Shunt
42. pyright Infineon Technologies AG 2014 All rights reserved Page 76 Chapter 5 Driving Ceiling Fan Application Cinfineon 19 20 gt Below shows CCU4 output waveforms of Ceiling Fan while from V F Open Loop to FOC Closed loop 2 g u P V F Control Start up a a 1 re gt Transition Open Loop to BN cut s Freq FNo edge Closed Loop at 30 rpm RMS 4 UU Freg 3 2 9 ih eA e Channel 1 yellow PMSMFOCSLO2 HandleO H Ptr Iy Channel 2 green PMSMFOCSLO2 HandleO H Ptr gt Iu Channel 3 blue PMSMFOCSLO2 HandleO H Ptr gt Angle Channel 4 pink Current of fan motor Phase U measured by current probe 0 1V A 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 77 Chapter 5 Driving Ceiling Fan Application Cinfineon 20 20 gt Below shows CCU4 output waveforms of Ceiling Fan running in FOC during steady state End Speed Reference 220 rpm gt Speed Slew Rate 13 rpm s 60 x 22 7 HZ gt Speed EE 227 rpm MHz eg Freq T 22 7Hz RMS 4 441 0mA Freg 3 22 5Hz Channel 1 yellow PMSMFOCSLO2 HandleO H Ptr gt I Channel 2 green PMSMFOCSLO2 HandleO H Ptr gt Iu Channel 3 blue PMSMFOCSLO2 HandleO H Ptr gt Angle Channel 4 pink Current of fan motor Phase U measured by current probe 0 1V A 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page
43. t 6666 6666656667 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 47 Chapter 4 Driving Ventilation Fan Application Cinfineon 8 17 4 Generate Application Code Template click 5 Configure CCU4 as Debugging Feature page 27 page 29 gt Copy the attached main c and paste into user s main c 6 Fine tuning Start up in V F control gt V F control principle consist in feeding the motor winding with a 3 phase sinusoidal voltage whose amplitude is proportional to the frequency and time gt Under C C projects gt Dave gt Generated gt src gt PMSMFOCSLO2 c search for PMSMFOCSLO2 SpeedRampup API function gt Grey out the 5 code lines as shown a HandlePtr M Ptr gt SpeedRef SET B T MandlePtr gt H Ptr Motor tatus PMSMFOCSLO2 RAMP Pos else HandlePt 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 48 Chapter 4 Driving Ventilation Fan Application Cinfineon 9 17 gt gt Wokage V Voltage Place 3 signal probes on PO 4 PO 5 P1 2 on hardware Take note that the start up current would be HIGH if user configure motor start up parameters wrongly User can always limit the current in power supply It s recommended to start with LOW V F constant amp Voltage Offset V F constant 1 0 V Hz Voltage Offset 1000 mV The start up response will be affected by Speed Slew Rate Start Speed
44. t Infineon Technologies AG 2014 All rights reserved Page 26 infineon Agenda 1 2 m Kit Overview B Tooling Overview B Getting Started O Chapter 1 Generate PMSMFOCSLO2 template D Chapter 2 Configure CCU4 as Debugging feature L Chapter 3 Motor Electrical Parameters Measurement Ll Chapter 4 Driving Ventilation Fan Application L Chapter 5 Driving Ceiling Fan Application 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 27 Chapter 2 Configure CCU4 as Debugging Cinfineon feature 1 7 m The feature enable the user to visualize and analyze real time variables facilitating control loop adjustment O Function of CCU4 Debug3Output gt User can use P0 4 PO 5 and P1 2 on HW board to output variables through PWM duty cycle change 5 00V B 500v 500v 500m p 00s 20 00 Stop F 2 50V 1 Set Oscilloscope Acquisition Mode Press Acquire key on the front panel to High Resolution mode PES o aa e ___ ee oscilloscope effectively acts like a low pass filter V 2 Or use RC filters to attenuate HF Freq 1 24 3Hz Freq 2 24 0Hz Freq 3 24 2Hz 42 Acq Mode Realtime High Res ml Chapter 2 Configure CCU4 as Debugging Cinfineon feature 2 7 m User may SKIP the steps if debugging feature is not required B n04 is positive integer CRS 4 CCUA PWM PERIOD Slope a CCU4 PWM PERIOD Imp CRS
45. tentiometer XMC1300 Domain Connector User LED CPU P UN EA WT AN ower U rive Cars indicating u AL yd XMC1300 X Uu 6 10 Vs AV f m C E Debug USB 9 eh OO AE T y SR Connector J A a Y NR SZ 21 Me Infineon i T A Debug gn GICH SZ Connector AA44444adddii x N TTT On board Debug Encoder Encoder HALL Power Power Board Debugger Connector Interface Enable Interface m Connector LED 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 5 Kit Overview 2 3 B XMC4400 Drive Card with galvanic isolation Isolated Multi Debug Domain mu ag HALL te Encoder Feedback XMC4400 Interface na9 e Interface interface CPU Reset LED Power indicating LED PA eud nud Debug USB S er lt i AE o dT gnt lt Connector Da L z ydd ll i o UC 5 er amp 8 P pm W r T TWW 7 em HE CH a TO SS AES a a segs Cie a he mn E E Infineon MEN Debug Be t pe iia Connector e 2 4N dM oven J lA m y C p TO EG 1 S eg t e On board CAN HALL Encoder Encoder Multi _ Power Debugger Interface Interface Interface Enable Feedback Indicating LED interface LED 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Cinfineon Power GND Domain Power Board Connector Page 6 infineon Kit Overview 3 3 id E 3 Phase Power Inverter 750W Heatsink RC IGBTs amp PFC Low Side Shunts Circuirty Temperature T Sensor
46. th integrated diode IKD10N60R 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 82 infineon Agenda 2 2 E Summary B General Information m References D Where to find Apps documentation D Where to download example projects o How to load Example project in DAVE D How to improve compiler performance 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 83 References Where to find App Documentation B Go to Help gt Help Contents B Go to DAVE Apps Expand topics gt Clck on IO004 latest version B Click on IO004 App gt Overview Usage information found under xx App Deployment and usage view Usage Cal ACIMVFO1_MotorStart function to start the motor c on fe LM ACIMVFO01 DynamicHandleType for details Cinfineon v Welcome 9 Help Contents Es Search Dynamic Help Key Assist Ctrl Shift L Tips and Tricks ip Help DAVE 3 search Po scope All topics Contents YEZ Workbench User Guide C C Development User Guide Copyright and Licensing Information ESS DAVE Apps DAVE User Manual xSPY User Manual ACIMVFU1 is initialized by the ACIMVFO1_Init function which is called by the DAVE_Init Direction and Speed can be changed at runtime using
47. wn measurement devices Refer to Chapter 3 for Motor Electrical Parameter Measurement Zs PMSMFOCSLO2 0 23 d Main c Nominal Voltage 24 V Phase Resistance 1 5 Ohms Nominal Current 1 79 A PhaseInductance 21 mH Nominal 5peed 4000 RPM Pole Pair 4 dec Nominal Torque 0 0625 Nm 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 20 Chapter 1 Generate PMSMFOCSLO2 template Cinfineon 7 12 O Power Board tab Dead Time and Switch Delay is set to 750ns and 800ns The gate driver 6EDLO4IO6NT is negative logic user need to set Passive Level Configuration to HIGH _ The gate driver enable signal is inverted in order to provide active low User may refer to Board Users Manual 750W to check the power board behavior for more info di PMSMFOCSLO2 0 22v 2 Mainc DC Link Voltage 24 VADC Reference 5000 BH XMC1300 VADC 5V Delay Current Measurement Parameters Dead Time 750 Rshunt 50 mOhms Switch Delay 800 Amplifier Gain Passive Level Configuration High Side Switch Law Side Switch 5 Low 0 Low 9 High 1 High 1 Enable Inverter Enable Pin Configuration Level Selection Voltage Measurement Parameters B DC link voltage divider Voltage Divider Ratio 1 7 ratio Enable Active Low Active High 2014 09 26 Copyright Infineon T
48. y for references purpose Due to differences between various motor the V F control parameters needs to be tuned to drive every new motor model 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 71 Chapter 5 Driving Ceiling Fan Application Cinfineon 14 20 8 The FOC Closed Loop operation can be ENABLED by uncommenting the 5 lines highlighted as below gt Under C C projects gt Dave gt Generated gt src gt PMSMFOCSLO2 c search for PMSMFOCSLO2 SpeedRampup API function else WandlePtr gt M Ptr gt SpoeedRef SET BIT MandlePtr gt M Ptr MotocStatus PMSMFOCSLO2 RAMP Pos Skip the following page 50 to page 52 if user is using PMSMFOCSLO2 1 0 8 and above Id and Iq KpKI values in App GUI are calculated based on motor resistance and inductance values Speed PI Kp and KI are not calculated it is hardcoded values 2014 09 26 Copyright Infineon Technologies AG 2014 All rights reserved Page 72 Chapter 5 Driving Ceiling Fan Application Cinfineon 15 20 9 Fine tune PT12 Filter Constant for better performance The integration of the induced voltage during the calculation of the flux W is calculated by a low pass filter of first order which is realized by a PT12 controller gt Given PT12 controller formula as Y n Y n 1 Z1 X n Z2 Y n 1 For example assume X 1 1 user can fine tune the Z1 value and Z2 value The response time can be modified
Download Pdf Manuals
Related Search
Related Contents
Electrolux FWM 1010 User's Manual ST KT2USB - Common Criteria 安全のために FixCascais 工事説明書 - 長府工産株式会社 B&K ST1200 Series User's Manual Copyright © All rights reserved.
Failed to retrieve file