Home
RX62T Vector control of permanent magnetic synchronous motor
Contents
1. LED control Input parameters Change motor operation mode based on the value of com 52 mode system Determine rotation speed Rotation speed command value setting Watchdog timer clear LED control Figure 3 5 Main Process Flowchart Target Software 1 RO1AN2155EJ0100 Rev 1 00 9 26 2014 24 NE S AS Page 37 of 44 RX62T Vector control of permanent magnetic synchronous motor Implementation Initialization of peripheral functions Initialization of user interface in the main process Initialization of sequence process Initialization of ICS Wait for capacitor charging time Initialization of variables used Reset process Input parameters Change motor operation mode based on the value of com s2 mode system LED control Watchdog timer clear I Figure 3 6 Main Process Flowchart Target Software 2 RO1AN2155EJ0100 Rev 1 00 Page 38 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 6 2 100 us cycle interrupt handling Sensorless Vector Control C 100 us cycle interrupt 2 U phase current W phase current and inverter bus voltage A D conversion value acquisition Calculate U phase V phase and W phase current values Get inverter bus volt
2. Input INPUT ics input structure for ICS Output None R MTR SetSpeed Input int16 ref speed speed command value Output None R SetbDir Input uint8 dir rotation direction Output None R MTR GetSpeed Input None Output int16 52 speed rpm speed R GetDir Input None Output uint8 g u1 direction rotation direction GetsStatus Input None Output uint8 g u1 mode system motor status RO1AN2155EJ0100 Rev 1 00 9 26 2014 24 NE S AS Initialization of the sequence process Changing the status Calling an appropriate process execution function for the occurred event Variable initialization function call upon motor startup Motor control startup function call Motor control stop function call No processing is performed Global variable initialization Motor control stop function call Initializing only the variables required for motor startup Position and speed calculation processing Current PI control Setting motor variables Setting the buffer Setting the speed command value Setting the rotation direction Obtaining the speed calculation value Obtaining the rotation direction Obtaining the motor status Page 20 of 44 RX62T Vector control of permanent magnetic synchronous motor Implementation mtr spm less foc c Table 3 10 List of Control Functions 5 6 File name Function name Process overview mtr
3. P41 ANOO1 P42 ANOO2L GND IV AIN Phase P62 AN2 Rotation speed command Switch input P91 Motor rotation start stop P92 Error reset LED output PA2 MTUS3 output P71 MTIOC3B Up L Inverter circuit 3 P76 MTIOC4D W Over current detection input P70 POEO Over current detection Encoder pulse input P32 P33 Phase current detection Not used for sensorless control PMSM Figure 2 1 Hardware Configuration Diagram R5F562TAADFP T2001 Target Software 1 RO1AN2155EJ0100 Rev 1 00 Page 4 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation RX62T A D converter input P43 ANOO3 Bus voltage AC 240 V input Power supply circuit P40 ANOOO P41 ANO01 P42 ANOO2 _ P60 ANO _ IV AIN Phase current VTEMP_AIN IPM a temperature ed LED output 2 MTU3 output 71 U P72 MTIOCAA V P73 MTIOC4B W P74 MTIOC3D Un P75 MTIOCAC V P76 MTIOC4D W Inverter circuit 3 o Over current detection input P70 POE0 Over current detection u l Phase current detection P Perature detection Z E o 2 Qo z gt 2 p PMSM Figure 2 2 H
4. In the target sample programs described in this application note user interfaces start stop command rotation speed command etc based on the development support tool In Circuit Scope ICS can be used ICS is a tool which displays real time waveforms of global variables of the program being executed on the target system on PC Refer to In Circuit Scope manual for usage and more details Incircuit Scope Software C XProgram Files Renesas Electronics ICSXIncircuit Scope_eny File View Channels Windows Tools Help Open Project Save Project Load Variables A Clear Variables COM6 Ready CPU Status 2nnitrnl Window 4 m Write Ass Read 100 mos Variable Data Variable List S Variable Mame Data Type Pead WE inii Mode Auto O Single Normal Active Qhanr TIME DIV 2 00m TRG MODE Auto CH1 T 1 00K TRG POS 8 00m Next w Acquisition Length Sample 20 00u Time Div 200 00u LLLI LM NM ESI E B Ver A Ver A Ver B Ver B ver B Har A Hor A Hon Har B Har B 1 502000 003 Min 1 505000 003 1 509000 003 May 1 Max 1 hey 1 SUE ANNE d 3 Figure 4 1 In Circuit Scope Appearance 4 2 How to use the library In order to use ICS for the low voltage version it is necessary to call functio
5. MTR UNDERVOLTAGE LI 1 0 Low voltage limit value V 2 100 M M IT MTR OVERIPMTEMPERAT 1 Undefined IPM temperature limit value URE LIMIT 2 3 V M RO1AN2155EJ0100 Rev 1 00 Page 31 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 22 List of Macro Definitions 6 12 File name Macro name Definition value Remarks 1 MTR_PORT_IC_GATE 1 Undefined Port for inrush current prevention mtr ctrl rx62t100 t2001 h 2 PORTB DR BIT B3 circuit MTR IC GATE ON 1 Undefined 2 2 1 mtr ctrl rx62t100 t1102 h Table 3 23 List of Macro Definitions 7 12 Definition value mtr spm less foc h INT DECIMATION Number of interrupt decimation times PERIOD INT DECIMATION 1 Control cycle s CARRIER FREQ 1000 CARRIER 1000 Control frequency Hz MTR INT DECIMATION 1 Flux Wb Resistance O Inductance H T L s H MTR CTRL PERIOD MTR M T M s Wb MTR POLE PAIRS MP POLE PAIRS Number of pole pairs MTR SPEED LIMIT RP 1 4000 Speed limit value mechanical angle rpm M 2 6000 SPEED LIMIT RAD SPEED LIMIT RPM MTR Speed limit value electrical angle rad s RPM RAD MTR POLE PAIR S MTR TWOPI 2 3 14159265f MTR TWOPI 3 MTR TWOPI 3 2n 3 SQRT 2 1 41421356f E MTR SQRT 3 y 3 MTR SQRT 2 3 0 81649658f V 2 3 MTR RPM
6. Reference d axis current subtracting time fA ref speed const time float32 Time of constant speed command value i4 accel float32 rad s SUMI RA fA fluctuation limit float32 Limit value of speed fluctuation rad s fA ol iq down time float32 Reference q axis current subtracting time in ms open loop mode fA ol ref iq float32 Reference q axis current j gt D f4_ol_iq_up_time float32 Reference q axis current adding time in open ms loop mode f4_offset_calc_time float32 Calculation time for current offset R01AN2155EJ0100 Rev 1 00 Page 27 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 5 Sensorless vector control software macro definitions Lists of macro definitions used in this control program are given below Table 3 17 List of Macro Definitions 1 12 File name Macro name Definition value Remarks main h ICS_UI 1 0 ICS user interface use 2 Undefined BOARD UI 1 1 Board user interface use 2 Undefined MAX SPEED CP MAX SPEED RPM Rotation speed command maximum value mechanical angle rpm OL TO LESS SPEED RPM CP OL TO LESS SPEED RPM Rotation speed command minimum value mechanical angle rpm ID PI KP CP ID PI KP d axis current PI control proportional term gain ID PI KI CP ID PI KI d axis current PI control integral term gain IQ PI KP CP IQ PI KP q axis current PI control proportional term gain IQ PI KI CP IQ PI KI q a
7. algorithm 1 1 Development environment Table 1 1 shows development environment of the sample programs explained in this application note Table 1 1 Development Environment of the Sample Programs Sample Microcontroller Inverter board Motor Version of program CubeSuite Low voltage R5F562TAADFP T2001 ote 1 FH6S20E xa1 2 y2 02 00 version High voltage R5F562TAADFP BXM6200 A Ne 3 V2 02 00 version For purchase and technical support of inverter boards T2001 T1102 contact sales representatives and dealers of Renesas Electronics Corporation Notes 1 The inverter board T2001 T1102 and the development support tool In Circuit Scope are the products of Desk Top Laboratories Inc Desk Top Laboratories Inc http www desktoplab co jp 2 FH6S20E X81 is the product of NIDEC SERVO CORPORATION SERVO CORPORATION http www nidec servo com en index html 3 BXM6200 A is the product of ORIENTAL MOTOR CO LTD ORIENTAL MOTOR CO LTD http www orientalmotor co jp RO1AN2155EJ0100 Rev 1 00 Page 3 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 2 System overview Overview of this system is explained below 2 1 Hardware configuration The hardware configuration is shown below A D converter input P43 AN003 Vac Bus voltage Power supply circuit DC 24 V input P40
8. lt NE S AS APPLICATION NOTE RO1AN2155EJ0100 RX62T Rev 1 00 9 26 2014 Vector control of permanent magnetic synchronous motor Implementation Abstract This application note aims at explaining sample programs for operating vector control of a permanent magnetic synchronous motor by using functions of RX62T and how to use a library of the development support tool In Circuit Scope The sample programs should be used just as reference and Renesas Electronics does not guarantee the operations Please use these sample programs after carrying out a thorough evaluation in a suitable environment In particular handling the high voltage environment is extremely dangerous Before using each development environment read the user s manuals carefully Renesas Electronics assumes no liability whatsoever for any damages arising from the use of development environment described in this application note Operation checking device Operations of the sample programs are checked by using the following device RX62T R5F562TAADFP Target sample programs The target sample programs of this application note are as follows 1 RX62T100 T2001 SPM LESS CSP V100 Sensorless vector control sample program for RX62T R5F562TAADFP T2001 2 RX62T100 T1102 SPM LESS CSP V100 Sensorless vector control sample program for RX62T R5F562TAADFP T1102 Reference documents e RX62T Group User s Manual Hardware RO1UHOO34EJ0200 App
9. A WEM com f4 __ com f4 id down time down time float32 Command d axis current Command d axis current subtracting time ms time msl com 4 4 acce float32 Acceleration Acceleration ras com f4 fluctuation limit float32 Speed fluctuation limit value rad s com f4 ol iq down time float32 Command q axis current subtracting time ms com 14 ol ref iq float32 q axis current command value in open loop A com 14 ol iq up time float32 q axis current command value adding time in open loop mode ms 4 offset calc time float32 Current offset value calculation time ms com s2 enable write Enabled to rewriting variables Reflection destination variable variable in motor control layer Reflected to g 52 sw userif upon rewriting Reflected to g s2 mode system upon rewriting g u1 direction g s2 ref speed 9 14 kp speed g 14 ki speed g f4 kp id g f4 ki id g f4 kp iq g f4 ki iq g f4 emf g f4 k theta g 14 speed k g 14 current Ipf k mtr p mtr p mtr p g 14 offset g s2 max speed g 52 ol to less speed rad g 52 ol iq up speed rad g s2 less to ol speed rad g f4 ol ref id g f4 ol id up step g 14 id down step g f4 ref speed const time g f4 accel g f4 fluctuation limit g f4 ol iq down step g f4 ol ref iq g f4 ol iq up step g f4 offset calc time RO1AN2155EJ0100 Rev 1 00 9 26 2014 RENESAS Page 43 of 44 RX62T Vector control of perm
10. OL ID UP TIME CP OL ID UP TIME Command d axis current adding muet MTR OL ID UP STEP MTR OL REF ID Command d axis current adding Lin CNN MTR ID DOWN TIME CP ID DOWN TIME Command d axis current subtracting kwl ere MTR ID DOWN STEP MTR OL REF ID Command d axis current subtracting M LE MTR REF SPEED CONST CP REF SPEED CONST TIME Time uL which speed command l ACCEL MODEO MODEO ACCEL MODEO ACCEL MODEO Acceleration in start mode Acceleration in start mode rad s ACCEL MODE1 CP ACCEL MODE1 Acceleration in control mode rad s T OL IQ DOWN TIME CP OL IQ DOWN TIME time ms OL IQ DOWN STEP 1 MTR OL IQ DOWN TIME Inverse of command q axis current memo PAARA open loop mode A MTR OL IQ UP TIME CP OL IQ UP TIME q axis current command value adding time in open loop mode ms RO1AN2155EJ0100 Rev 1 00 Page 33 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 25 List of Macro Definitions 9 12 File name Macro name Definition value Remarks mtr spm less foch OL IQ UP STEP MTR OL REF IQ Command q axis current adding value in MTR OL IQ UP TIME open loop mode A MTR OFFSET CALC TIME CP OFFSET CALC TIME ms MTR EVERY TIME Calculation when transferring current offset value to boot mode MTR ONE TIME 1 Calculation when transferring current offset v
11. RAD ID PL KP ID PL MTR IQ PI KP MTR IQ PI KI MTR SPEED PI KP CP SPEED KP Speed PI control proportional term gain MTR SPEED Current LPF parameter MTR LIMIT VD 1 12 d axis current PI control output limit value V 2 120 1 41421356 a RO1AN2155EJ0100 Rev 1 00 Page 32 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 24 List of Macro Definitions 8 12 File name Macro name Definition value Remarks mtr_spm_less_foc h MTR LIMIT VQ 2 12 q axis current PI control output limit I LIMIT VD 12 mer ja 2 120 1 41421356 term limit value rpm MTR MAX SPEED RAD MTR MAX SPEED RPM Maximum speed electrical angle a s a MTR OL TO LESS SPEE CP OL TO LESS SPEED RPM Sensorless control switching speed a ime anual Tua MIR OL TO LESS SPEE MTR OL TO LESS SPEED RPM MT Sensorless control switching speed OL IQ UP SPEED CP OL IQ UP SPEED RPM Speed at start of q axis current RPM command value increase mechanical angle rpm OL IQ UP SPEED OL IQ UP SPEED RPM MTR P Speed at start of q axis current RAD PAIRS MTR TWOPI 60 command value increase electrical angle rad s D RPM mechanical angle rpm MTR LESS TO OL SPEE MTR LESS TO OL SPEED RPM MT i en switching speed D RAD R POLE PAIRS MTR TWOPI 60 MTR OL REF ID CP OL REF ID Command d axis current in open jaa en
12. guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or systems manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruct
13. motor Implementation 3 1 4 State transition Figure 3 3 is a state transition diagram of the sensorless vector control software RESET EVENT STOP MODE ERROR MODE RUN EVENT ERROR EVENT STOP EVENT RUN MODE OPENLOOP MODE LESS FOC MODE Figure 3 3 State Transition Diagram of Sensorless Vector Control Software Target Software 1 2 R01AN2155EJ0100 Rev 1 00 Page 15 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Figure 3 4 shows startup control of sensorless vector control software Each mode 15 controlled by flags managing each command value of the d axis current q axis current and speed jene MTR CTRL MODE MTR LESS FOC MODE especcepecBocssecbeteeseeseeenqgneseeee MTR START MODE MODE MODE ZERO CTRL 3 p d I MIRIDDWN 2 pee MTR ID CONST sl ECTS PI OUTPUT SPEED MTR I MRIQUP 2 MTR_IQ_ZERO 0 1 MTR SPEED ti coner E SPEED CONST 3 MTR SPEED CHANGE 4 I G z I lt U z r z i X Bs 1 On qu Lon 1 A E c E 1 On oS jem O IE c gt i L D uc D _ I Wes essed he eres as ka RUN MODE CTRL MODE Ia reference status flag F
14. CALC TIME CP OFFSET CALC TIME Current offset value calculation time ms 2 Undefined 2 Undefined 2 Undefined Constant for creating rotation speed command 2 Undefined value 2 Undefined mew O0 Rotatndirection ics NT LEVEL de Interrupt priority levelforicS o Table 3 19 List of Macro Definitions 3 12 File name Macro name Definition value Remarks 2 5 2 0 091f MP RESISTANCE 1 0 453f Resistance Q 2 1 69235f MP INDUCTANCE 1 0 0009477f Inductance H 2 0 00889f RO1AN2155EJ0100 Rev 1 00 Page 29 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 20 List of Macro Definitions 4 12 File name Macro name Definition value Remarks 1 MTR PWM TIMER FREQ 96 0f PWM timer count frequency mtr ctrl rx62t100 t2001 h D 23 Hz MTR CARRIER CARRIER Of Carrier Carrier frequency kHz kHz mtr rx62t100 t1102 h 2 3 MTR DEADTIME SET uint16 MTR_DEADTIME Dead time setting value clock MTR_AD_SAMPLING CYC 26 0f A D sampling time Cycle LE MTR AD SAMPLING TIME MTR AD SAMPLING CYCLE A D sampling time us MTR AD FREQ MTR AD TIME SET uintE MTR TIMER FREQ A D sampling time count MTR AD SAMPLING TIME value MTR CARRIER SET uint MTR TIMER FREQ Carrier setting value 1000 CARRIER FREQ 2 MTR DEADTIME SE
15. ENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 28 List of Macro Definitions 12 12 control parameter h CP OL IQ UP SPEED RPM 1 450 0f Speed at start of q axis current command value Sn 2 increase mechanical angle rpm Open loop switching speed mechanical angle 2 300 0f rpm 2 1 25f 2 64 0f mode ms CP ID DOWN TIME 1 512 0f Command d axis current subtracting time ms ae al CP REF SPEED CONST TIME 256 0f Time during which speed command value is tt 2 0 5f 2 0 5f 2 50 0f CP OL IQ DOWN TIME 100 0f Command q axis current subtracting time ms CP OL REF IQ q axis current command value in open loop mode A CP OL IQ UP TIME 512 0f q axis current command value adding time in open loop mode ms CP OFFSET TIME Current offset value calculation time ms RO1AN2155EJ0100 Rev 1 00 Page 36 of 44 9 26 2014 RENESAS RX62T 3 6 3 6 1 Vector control of permanent magnetic synchronous motor Implementation Control flowcharts Main process Main process Initialization of peripheral functions Initialization of user interface Initialization of variables used in the main process Initialization of sequence process Initialization of ICS Reset process I Ul ICS UI Board or ICS UI Board Change motor operation mode according to SW status
16. Structure for q axis current PI control speed _ MTRPLCTRL Structure for speed PI control 1 CCW 1 CCW 9 u1 enable write unita Variable for ICS UI MTR_ICS_INPUT Structure for ICS UI g u2 cnt adjust unit16 Counter to calculate current offset NEN g u1 flag id ref unita d axis current command value management d axis current increase flag Constant d axis current d axis current decrease d axis current 0 unita g u1 flag iq ref q axis current command value management q axis current O flag Speed PI output q axis current increase q axis current decrease g 14 temp speed rad float32 Variable to store speed Electrical angle rad s g 14 temp ref speed rad float32 Variable to store speed command value Electrical angle rad s g u1 flag down to ol unita Open loop mode transition flag 0 Stay 1 Transition RO1AN2155EJ0100 Rev 1 00 Page 24 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 14 List of Variables 3 4 g u1 flag offset calc Current offset value calculation flag 0 Calculation in transition to the boot mode 1 Calculation in transition to the boot mode first time only g 14 iq down step float32 q axis current subtraction value g 14 emf est float32 Estimation value of inductive voltage g 14 emf calc float32 Calculation value of inductive voltage g f4 id ref buf
17. T MTR HALF CARRIER SE uintT amp O MTR CARRIER SET 2 Half of T MTR CARRIER SET RO1AN2155EJ0100 Rev 1 00 Page 30 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 21 List of Macro Definitions 5 12 File name Macro name Definition value Remarks mtr ctrl rx62t100 t2001 h output port MTR PORT UN PORT7 DR BIT B4 U phase negative phase mtr ctrl rx62t100 t1102 h MTR_PORT_VP PORT7 DR BIT B2 V phase positive phase MTR PORT VN PORT7 DR BIT B5 V phase negative phase mem s MTR PORT WP PORT7 DR BIT B3 W phase positive phase RR E MTR PORT WN PORT7 DR BIT B6 W phase negative phase mmm I ee 2 Undefined 2 Undefined MRLEDON o Active incase of Low MTR INPUT V 1 24 Power supply voltage V 2 240 1 41421356 MTR IC GATE ON V 1 Undefined Power supply voltage 80 96 2 int32 MTR INPUT V 0 8f V MTR HALF VDC MTR INPUT V 2 0f Power supply voltage 2 V MTR ADC SCALING Ox7FF Constant for adjusting ADC offset MTR_CURRENT SCALING 1 20 0f 4095 0f Current A D conversion 2 100 0f 4095 0f value resolution MTR_VDC_SCALING 1 111 0f 4095 0f Inverter bus voltage 2 686 8f 4095 0f A D conversion value resolution MTR IPMTEMPERATURE __ 1 Undefined IPM temperature SCALING 2 5 0f 1023 A D conversion value resolution MTR OVERCURRENT LIMI 4 8f Current limit value A 2 400
18. age value Error check Convert axis Model current calculation current estimation error calculation Position inductive voltage and speed estimation Current PI control Decoupling control Modulation and axis conversion Calculate PWM register setting value PWM register setting C End 2 Figure 3 7 100 us Cycle Interrupt Handling Sensorless Vector Control RO1AN2155EJ0100 Rev 1 00 9 26 2014 24 NE S AS Page 39 of 44 RX62T Vector control of permanent magnetic synchronous motor Implementation 3 6 3 1 ms interrupt handling C 1 ms interrupt b Normal operation mode Normal control Startup control Speed PI starts Speed PI Figure 3 8 1 ms Interrupt Handling R01AN2155EJ0100 Rev 1 00 Page 40 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 6 4 Over current detection interrupt handling Over current detection interrupt Motor stop process Clearing high impedance status Figure 3 9 Over Current Detection Interrupt Handling RO1AN2155EJ0100 Rev 1 00 Page 41 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 4 Development support tool In Circuit Scope 4 1 Overview
19. alue to boot mode first time only MRCW 0 X Rotation direction MIRFIGCRR 0 X Flag management MRIDUP 0 darscumentiease MIRIOZRO o o 0 O O O SPEED ZERO 0 Speed 0 MTR LESS 120 MODE BEMF sensorless 120 degree operation mode MTR OVER IPMTEMPERATURE 1 Undefined IPM temperature error ERROR 2 0x08 MTR UNKNOWN ERROR Undefined error RO1AN2155EJ0100 Rev 1 00 Page 34 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 26 List of Macro Definitions 10 12 Definition value mtr_spm_less_foc h MTR_MODE_STOP Stop status MTR_MODE_RUN Rotating MTR_MODE_ERROR Error status MTR_SIZE_STATE 3 Stusconts MTR EVENT STOP Motor stop event EVENT RUN Motor startup event MTR EVENT ERROR Motor error event MTR EVENT RESET Motor reset event MTR SIZE EVENT 4 Eventcounts Table 3 27 List of Macro Definitions 11 12 File name Macro name Definition value Remarks 2 10 8227f a 10 8227f 2 0 08f 2 0 01f A 0 00003f 2 1 935f 2 0 0948f 2 0 0136 0 8f OFFSET LPF K LPF LPF parameter of current offset value U of current offset value o 3000 0f Sensorless control switching speed mechanical angle rpm RO1AN2155EJ0100 Rev 1 00 Page 35 of 44 9 26 2014 R
20. anent magnetic synchronous motor Implementation Website and Support Renesas Electronics Website http www renesas com Inquiries http www renesas com contact All trademarks and registered trademarks are the property of their respective owners RO1AN2155EJ0100 Rev 1 00 Page 44 of 44 9 26 2014 RENESAS Revision Record d Date of issue 2014 09 26 Page Summary First edition issued General Precautions in the Handling of MPU MCU Products The following usage notes are applicable to all MPU MCU products from Renesas For detailed usage notes on the products covered by this document refer to the relevant sections of the document as well as any technical updates that have been issued for the products 1 Handling of Unused Pins Handle unused pins in accord with the directions given under Handling of Unused Pins in the manual The input pins of CMOS products are generally in the high impedance state In operation with an unused pin in the open circuit state extra electromagnetic noise is induced in the vicinity of LSI an associated shoot through current flows internally and malfunctions occur due to the false recognition of the pin state as an input signal become possible Unused pins should be handled as described under Handling of Unused Pins in the manual Processing at Power on The state of the product is undefined at the moment when power is supplied The states of internal circuits
21. ardware Configuration Diagram R5F562TAADFP T1102 Target Software 2 RO1AN2155EJ0100 Rev 1 00 Page 5 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 2 2 Hardware specifications 2 2 1 User interface List of user interfaces of this system is given in Table 2 1 Table 2 1 User Interface Item men component Function Target software Target software 2 Rotation speed Variable resistor Reference value of rotation speed input analog value START STOP Toggle switch S Motor rotation start stop command E w RESET status LED1 Yellow green LED Yellow green LED At the time of motor rotation ON LED2 Yellow green LED Yellow green LED At the time of error detection ON DE O in tme ot nonna operator OF List of port interfaces of this system is given in Table 2 2 Table 2 2 Port Interfaces Function PG2 AN2 For rotation speed command value input analog value Po STARTISTOP toggle switch P92 ERROR RESET toggle switch PA2 PA2 LED1 ONOFF control O P60o AN0 IPM temperature measurement o Complementary PWM output Wn PSS MTCLKAA Encoder A phase input P32 MTCLKBA Encoder B phase input O R01AN2155EJ0100 Rev 1 00 Page 6 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementati
22. at 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955 9510 Renesas Electronics Korea Co Ltd 12F 234 Teheran ro Gangnam Ku Seoul 135 920 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2014 Renesas Electronics Corporation All rights reserved Colophon 4 0
23. ate management 0 Stop mode 1 Run mode 2 Error mode g u2 run mode unit16 Operation mode management 0 Boot mode 1 Start mode 2 Control mode g u2 ctrl mode unit16 Control mode 1 Open loop mode 5 Sensorless vector control mode g u1 error status unita Error status management 1 Over current error 2 Over voltage error 3 Rotation speed error 7 Low voltage error 8 Over IPM temperature error target software 2 OxFF Undefined error A A RO1AN2155EJ0100 Rev 1 00 Page 23 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 13 List of Variables 2 4 foat32 axis current PI control proportional term gain gfAK iq foat32 axis current PI control integral term gain C 4 4 4 4 4 4 O fa kp speed Speed PI control proportionaltermgain g_f4 ki speed float32 Speed PI control integral term gain g f4 ilim vd float32 d axis current control integral term limit V value g f4 ilim vq float32 q axis current PI control integral term limit value Al Al Speed PI control output value Electrical angle rad s Rotor position Speed LPF parameter gf4curent ip k Current LPF parameter gf ofsetip k foat32 LPF parameter of current offset value S vd MTRPLCTRL Structure ford axis current PI control va
24. current is detected when a falling edge of the POEO port is detected and when the output short circuit is detected RO1AN2155EJ0100 Rev 1 00 Page 7 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 2 3 Software configuration 2 3 1 Software file configuration Folder and file configuration of the sample programs are given below Table 2 4 Folder and File Configuration of the Sample Program Target Software 1 RX62T100 T2001 SPM LESS inc FOC_CSP_V100 lib angle speed R5F562TAAxFP obj Angle and speed estimation library Table 2 5 Folder and File Configuration of the Sample Program Target Software 2 RX62T100_T1102 SPM LESS inc Dm asa ce ICS RXE2Th mtr rx62t100 c RX62T dependent processing mtr mirineerupto C Interrupt handler mtr spm less foc c Sensorless vector control mtr ctrl rx62t100 t1102 c Board and RX62T dependent processing RO1AN2155EJ0100 Rev 1 00 Page 8 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 2 3 2 Module configuration Module configuration of the sample programs is described below Motor control layer Sensorless vector control H W control layer Micro controller dependent processing part inverter board dependent processing part Figure 2 3 Module Configuration of the Sample Programs Table 2 6 Mo
25. dule Structure of the Sample layer main c main c Motor control layer mtr_spm_less_foc c mtr spm less foc c mtr rx62t100 t2001 c mtr rx62t100 t1102 c H W control layer mtr ctrl rx62t100 c mtr rx62t100 c mtr t2001 c mtr ctrl t1102 c RO1AN2155EJ0100 Rev 1 00 Page 9 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 2 4 Software specifications Table 2 7 shows basic software specification of this system For details of the vector control refer to the application note Vector control of permanent magnetic synchronous motor algorithm Table 2 7 Basic Specifications of Sensorless Vector Control Software Target Software 1 Control method Vector control Motor rotation start stop Determined depending on the level of SW1 P91 Low rotation start High a stop or input from ICS N 1 Position detection of rotor Sensorless magnetic pole Rotation speed control CW 0 oni to 2000 rpm Processing stop for D Tos the motor control signal output six outputs under any of the protection following four conditions 1 Current of each phase exceeds 4 8 A monitored every 100 us 2 Inverter bus voltage exceeds 28 V monitored every 100 us 3 Inverter bus voltage is less than 0 V monitored every 100 us 4 Rotation speed exceeds 4000 rpm monitored every 100 us When an external over current signal is de
26. ergency stop signal over current detection from the hardware In addition U V and W phase currents are monitored in over current monitoring cycle When an over current when the current exceeds the over current limit value is detected the CPU executes emergency stop software detection Over voltage error The inverter bus voltage is monitored in over voltage monitoring cycle When an over voltage is detected when the voltage exceeds the over voltage limit value the CPU performs emergency stop Here the over voltage limit value is set in consideration for the error of resistance value and error of supply voltage by AC adapter etc Low voltage error The inverter bus voltage is monitored in low voltage monitoring cycle The CPU performs emergency stop when low voltage when voltage falls below the limit value is detected Over speed error The rotation speed is monitored in rotation speed monitoring cycle The CPU performs emergency stop when the speed 15 over the limit value IPM temperature error The IPM temperature is monitored by IPM temperature monitoring cycle The CPU performs emergency stop when high temperature is detected when it exceeds the IPM temperature limit value Table 3 5 Setting Values of the System Protection Function Over current error Over current limit value A Monitoring cycle us Over voltage error Over voltage limit value V IPM temperature error 3 RO1AN2155EJ0100 Rev 1 00 Page 17
27. error check Input None Output None mtr set speed ref Input None Output None mtr set iq ref Input None Output None mtr set id ref Input None Output None mtr calc mod Input float32 f4 vu U phase voltage float32 fA vv V phase voltage float32 14 vw W phase voltage float32 fA vdc bus voltage Output None RO1AN2155EJ0100 Rev 1 00 9 26 2014 Error monitoring and detection Setting the command value for speed control Setting the q axis current command value Setting the d axis current command value Modulation factor calculation Page 21 of 44 24 NE S AS RX62T 1 mtr ctrl rx62t100 t2001 c 2 mtr ctrl rx62t100 t1102 c Vector control of permanent magnetic synchronous motor Implementation Table 3 11 List of Control Functions 6 6 File name Function name Process overview mtr init mtu Input None Output None mtr init io port Input None Output None mtr init ad converter Input None Output None init ui Input None Output None mtr start Input None Output None mtr stop Input None Output None mtr get vr1 target software 1 Input None Output unit16 u2 temp VR1 A D conversion value mtr get iuiwvdc Input float32 f4 iu ad U phase current A D conversion value float32 fA iw ad W phase current A D conversion value float32 14 vdc ad Vdc A D conversion value Output None mtr get ipm temperature target software 2 Inp
28. erter bus voltage AN003 3 U W phase current The U and W phase currents are measured as shown in Table 3 3 and used for vector control Table 3 3 Conversion Ratio of U and W Phase Current Item Sample Conversion ratio Channel Dome U W phase current A D conversion value U W phase 10 A to 10 A 0000H to OFFFH lu current Iw ANOO2 2 50 A to 50 A 0000H to OFFFH RO1AN2155EJ0100 Rev 1 00 Page 11 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 4 IPM temperature The IPM temperature is measured as shown in Table 3 4 and used for IPM temperature error detection For the relation of IPM temperature and the voltage refer to the datasheet of IPM Table 3 4 Conversion Ratio of IPM temperature Item Sample Conversion ratio Channel IPM EE EE A D conversion value IPM 1 Not used used temperature 0 to 5 V 0000H to ANO RO1AN2155EJ0100 Rev 1 00 Page 12 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 1 3 Modulation The target sample software of this application note uses pulse width modulation hereinafter called PWM and the triangular wave comparison method to generate the input voltage to the motor and the PWM waveform respectively 1 Triangular wave comparison method In order to actually output the command value voltage
29. f float32 Variable to store d axis current command A value g f4 iq ref buff float32 Variable to store q axis current command value g u2 cnt speed const Counter of reference speed constant time NENNEN g u1 flag speed ref Speed command value management flag 0 Speed 0 1 At the time of low speed open loop 2 At the time of high speed open loop 3 Constant speed 4 Variable speed foa32 Speed electromotive force estimation gain I 4 4 4 4 4 g f4 k theta float32 Position estimation gain gf4 tdspeed If foa32 Control cycle x difference inspeed oo g f4 ol iq up speed rad float32 Speed at start of q axis current command Electrical angle rad s value increase g f4 ol iq up step float32 Reference q axis current adding value in open A loop mode g 14 id down step float32 Reference d axis current subtracting value 14 ref speed const time float32 Time of constant speed command value g f4 fluctuation limit float32 Limit value of speed fluctuation rad s open loop mode loop mode mode q axis current command value in open loop A mode Electrical angle rad s Electrical angle rad s RO1AN2155EJ0100 Rev 1 00 Page 25 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 15 List of Variables 4 4 g f4 offset calc time float32 Calculation time for current offset g f4 accel float32 rad s g 14 modu float32 U phase modulatio
30. ferences between Products Before changing from one product to another i e to a product with a different type number confirm that the change will not lead to problems The characteristics of an MPU or MCU in the same group but having a different part number may differ in terms of the internal memory capacity layout pattern and other factors which can affect the ranges of electrical characteristics such as characteristic values operating margins immunity to noise and amount of radiated noise When changing to a product with a different part number implement a system evaluation test for the given product Notice Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics does not assume an
31. human life or bodily injury artificial life support devices or systems surgical implantations etc or may cause serious property damages nuclear reactor control systems military equipment etc You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application for which it is not intended Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas Electronics You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to
32. igure 3 4 Startup Control of Sensorless Vector Control Software Target Software 1 2 I reference status flag speed reference status flag NIME IMEEM C PE eee MCI CRIME CMT MMC SS eee ss see cei attests Dat aaa tat ae Reh 2s te ace I mone a Ra el A A CP_OL_REF_ID 3 0 1 reference speed PI output A _IQ CP OL REF I 0 speed reference by input value Sees ce seas nti RanaVY U rr o rO shu In maII tq T O c rer QE to UO o 2 CP OL I OSS SPEED BPM 2 _ H UP SPEED ZoscaonsecinceneeclieccocuncczdccesecpeeletescccoccN cl2cclcecceteeece22cccec2doeccc tocodccucos2cccsE For details of the sensorless vector control refer to the application note Vector control of permanent magnetic synchronous motor algorithm RO1AN2155EJ0100 Rev 1 00 9 26 2014 24 NE SAS Page 16 of44 RX62T Vector control of permanent magnetic synchronous motor Implementation 3 1 5 System protection function This control program has the following five types of error status and executes emergency stop functions in case of occurrence of respective errors Table 3 5 shows each setting value for the system protection function Over current error High impedance output is made to the PWM output port in response to an em
33. in the LSI are indeterminate and the states of register settings and pins are undefined at the moment when power is supplied In a finished product where the reset signal is applied to the external reset pin the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed In a similar way the states of pins in a product that is reset by an on chip power on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited The reserved addresses are provided for the possible future expansion of functions Do not access these addresses the correct operation of LSI is not guaranteed if they are accessed Clock Signals After applying a reset only release the reset line after the operating clock signal has become stable When switching the clock signal during program execution wait until the target clock signal has stabilized When the clock signal is generated with an external resonator or from an external oscillator during a reset ensure that the reset line is only released after full stabilization of the clock signal Moreover when switching to a clock signal produced with an external resonator or by an external oscillator while program execution is in progress wait until the target clock signal is stable Dif
34. ion When exporting the Renesas Electronics products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations Itis the responsibility of the buyer or distributor of Renesas Electronics products who distributes disposes of or otherwise places the product with a third party to notify such third party in advance of the contents and conditions set forth in this document Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products 11 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics 12 Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics 24 NE SAS SALES OFFICES Renesas Electronics Corporation http Www renesas com Refer to http Awww renesas com for the latest and detailed information Renesas Electronics America Inc 2801 Scot
35. le programs of this application note are explained here 3 1 Contents of control 3 1 1 Motor start stop Starting and stopping of the motor are controlled by input from SW1 or ICS A general purpose port P91 is assigned to SW1 The P91 port is read within the main loop When P91 is at a Low level it is determined that the start switch is being pressed Conversely when the level is switched to High the program determines that the motor should be stopped 3 1 2 Motor rotation speed command value inverter bus voltage and motor three phase current 1 Motor rotation speed command value The motor rotation speed command value can be set by A D conversion of the VR1 output value analog value or input from ICS The A D converted value is used as rotation speed command value as shown in Table 3 1 Table 3 1 Conversion Ratio of the Rotation Speed Command Value Item Sample Conversion ratio Channel software Command value A D conversion value Rotation speed 1 0 rpm to 2000 rpm 0200H to O3FFH AN2 command value 0 rpm to 2000 rpm 01FFH to 0000H 2 Not used 2 Inverter bus voltage Inverter bus voltage is measured as given in Table 3 2 It is used for modulation factor calculation and over voltage detection When an abnormality is detected PWM is stopped Table 3 2 Inverter Bus Voltage Conversion Ratio Item Sample Conversion ratio Channel sote eterbursologe ADcomeenvabe Inv
36. lication note Vector control of permanent magnetic synchronous motor algorithm n Circuit Scope Manual Downloadable from http www desktoplab co jp download html Trial series T1102 3kW 4kVA Inverter Unit User s Manual Trial series T2001 50W 60VA Low Voltage Inverter Unit User s Manual Trial series T5201 RX62T 100pin CPU card User s Manual RO1AN2155EJ0100 Rev 1 00 Page 1 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Contents JOE iu 9 2 OV IV ape coeur vedo tape ad editae e depu mb Use ON ep iri pud 4 3 Descriptions of the control program a a nnn nnns 11 4 Development support tool In Circuit Scope a ener 42 RO1AN2155EJ0100 Rev 1 00 Page 2 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 1 Overview This application note explains how to implement the vector control sample programs of permanent magnetic synchronous motor PMSM using the RX62T microcontroller and how to use the library of the development support tool In Circuit Scope hereinafter referred to as ICS Note that these sample programs use the algorithm described in the application note Vector control of permanent magnetic synchronous motor
37. n factor g 14 modv float32 V phase modulation factor g 14 modw float32 W phase modulation factor 9 14 ipm temperature ad float32 IPM temperature voltage conversion value RO1AN2155EJ0100 Rev 1 00 Page 26 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 4 List of sensorless vector control software structures Lists of structures used in this control program are given below Table 3 16 List of structures e o MTRPLCTRL float32 PI control proportional gain faki foat32 PI control integral gain _ dmt float32 PI control output limit value p float32 Integral term output value fA ilimit float32 Integral term output limit value PARAMETER s M mrtm float32 f mrt fa mrm MTR ICS INPUT 52 direction 0 CW 1 4 kp speed f4 ki speed kp id f4 Ki id M kp iq M speedipf k fioat2 Speed LPF parameter L M curent pf k foaG2 Current LPF parameter _ 1 k float32 Current offset LPF parameter o s2 ol iq up speed Speed at start of increasing reference q axis Mechanical angle rpm current s2 less to ol speed Openloop control switching speed Mechanical angle rpm fA ol ref id float32 Reference d axis current fA ol id up time float32 Reference d axis current adding time in openloop mode fA id down time float32
38. ns related to ICS The ICS related functions have been set by conditional compilation ifdef endif To use ICS set as follows As for the high voltage version ICS can be used without changing the source code File name mtr common h Point to change Add the following declaration Zdefine ICS USE RO1AN2155EJ0100 Rev 1 00 Page 42 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 4 3 List of variables for ICS Table 4 1 is a list of variables for ICS When these variables are changed they are not reflected to variables in the motor control layer yet However the variables in the motor control layer are rewritten when the same values as s2 enable write are written to 52 enable write Note that variables with do not depend on s2 enable write Table 4 1 List of Variables for ICS 1 1 com 52 sw userif int16 User interface switch target software p 0 ICS user interface use default 1 Board user interface use com s2 mode system int16 State management 0 Stop mode 1 Run mode 3 Reset Sensorless control switching speed mechanical angle rpm Speed at start of q axis current command value increase mechanical angle rpm com 52 less to ol a Open loop ME speed mechanical angle rpm com f4 com 4 ol ref id ref id float32 Command d axis current in open Command d axis current in open mode A mode
39. of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 2 Function specifications of sensorless vector control software Multiple control functions are used in this control program Lists of control functions are given below For detailed processing please refer to flowcharts or source files 1 mtr ctrl t2001 c 2 mtr ctrl t1102 c Table 3 6 List of Control Functions 1 6 File name Function name Process overview main Input None Output None ics ui Input None Output None ctrl ui target software 1 Input None Output None software init Input None Output None R MTR ChargeCapacitor target software 2 Input None Output None ic gate on target software 2 Input None Output None get vr1 target software 1 Input None Output uint16 ad data A D conversion result get sw1 target software 1 Input None Output uint8 tmp port SW1 level get sw2 target software 1 Input None Output uint8 tmp port SW2 level led1 on Input None Output None led2 on Input None Output None led1 off Input None Output None led2 off Input None Output None RO1AN2155EJ0100 Rev 1 00 9 26 2014 24 N S AS Hardware initialization function call User interface initialization function call nitialization function call of the variable used in the main process Status
40. on 2 2 2 Peripheral functions List of the peripheral functions used in this system is given in Table 2 3 Table 2 3 List of the Peripheral Functions for Each Sample Program i 12 bit A D 10 bit A D MTU3 POE3 Rotation speed command value Initialization of complementary PWM Current of each phase U V output ports and W 1 ms Complementary interval timer PWM output Set PWM output ports to high impedance state to stop the PWM output Inverter bus voltage IPM temperature 1 12 bit A D converter U phase current Iu V phase current Iv W phase current Iw and inverter bus voltage Vdc are measured by using the 12 bit A D converter The operation mode is set the single cycle scan mode with the sample and hold function use hardware trigger 2 10 bit A D converter The rotation speed command value and IPM temperature are measured by using the 10 bit A D converter Set the operation mode to the single mode use software trigger 3 Compare match timer CMT The channel 0 of the compare match timer is used as 1 ms interval timer 4 Multi function timer pulse unit 3 MTU3 The operation mode varies depending on channels On the channels 3 and 4 output with dead time high active 15 performed by using the complementary PWM mode 5 Port output enable 3 POE3 The PWM output ports are set to high impedance state to stop the PWM output and initialize the complementary PWM output port when the over
41. sing selection function call Output None Changing the motor status High impedance state clearing function call mtr mtu4 interrupt Calling every 100 us Input None Vector control Output None Current PI control mtr cmtO interrupt Calling every 1 ms Input None Start control Output None Speed PI control RO1AN2155EJ0100 Rev 1 00 Page 19 of 44 9 26 2014 RENESAS RX62T mtr spm less foc c Vector control of permanent magnetic synchronous motor Implementation Table 3 9 List of Control Functions 4 6 File name Function name Process overview lInitSequence Input None Output None R MTR ExecEvent Input uint8 u1_ event occurred event Output None mtr act run Input uint8 u1 state motor status Output uint8 u1 state motor status mtr act stop Input uint8 u1 state motor status Output uint8 u1 state motor status mtr act none Input uint8 u1 state motor status Output uint8 u1 state motor status mtr act reset Input uint8 u1 state motor status Output uint8 u1 state motor status mtr act error Input uint8 u1 state motor status Output uint8 u1 state motor status mtr start init Input None Output None mtr angle speed Input None Output None mtr pi ctrl Input PI CTRL ctrl control structure Output float32 fA ref control output value mtr set variables Input None Output None
42. t Boulevard Santa Clara CA 95050 2549 U S A Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Electronics Canada Limited 1101 Nicholson Road Newmarket Ontario L3Y 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Electronics Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 585 100 Fax 44 1628 585 900 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel 49 211 6503 0 Fax 49 211 6503 1327 Renesas Electronics China Co Ltd Room 1709 Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100191 P R China Tel 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Unit 301 Tower A Central Towers 555 Langao Road Putuo District Shanghai P R China 200333 Tel 86 21 2226 0888 Fax 86 21 2226 0999 Renesas Electronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 852 2265 6688 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 13F No 363 Fu Shing North Road Taipei 10543 Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Electronics Singapore Pte Ltd 80 Bendemeer Road Unit 06 02 Hyflux Innovation Centre Singapore 339949 Tel 65 6213 0200 Fax 65 6213 0300 Renesas Electronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jln Persiaran Bar
43. tected when a falling edge of the POEO port is detected and when the output short circuit is detected the PWM output ports are set to high impedance state Table 2 8 Basic Specifications of Sensorless Vector Control Software Target Software 2 Control method Vector control Motor rotation start stop Input from ICS Position detection of rotor Sensorless a a S Rotation speed control CW 0 Tami to 3000 rpm range CCW 0 rpm to 3000 rpm Processing stop for Disables the motor control signal output six outputs under any of the protection following four conditions 1 Current of each phase exceeds 4 8 A monitored every 100 us 2 Inverter bus voltage exceeds 400 V monitored every 100 us Inverter bus voltage is less than 100 V monitored every 100 us 4 Rotation speed exceeds 6000 rpm monitored every 100 us 5 IPM temperature output value exceeds 3 V 60 10 C monitored every 100 us When an external over current signal is detected when a falling edge of the POEO port is detected and when the output short circuit is detected the PWM output ports are set to high impedance state Note 1 For more details refer to 4 Development support tool In Circuit Scope RO1AN2155EJ0100 Rev 1 00 Page 10 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 Descriptions of the control program The target samp
44. the triangular wave comparison method is used By this method the pulse width of the output voltage can be determined by comparing the carrier waveform triangular wave and voltage command value waveform Output of the voltage command value of the pseudo sinusoidal wave can be performed by turning the switch on or off when the command value voltage is larger or smaller than the carrier wave voltage respectively L i U phase switching waveform wt V phase switching waveform wt Voltage between U V lines U phase waveform V phase waveform Figure 3 1 Conceptual Diagram of the Triangular Wave Comparison Method K ili Modulation wave command voltage Carrier wave triangular wave PWM timer count RO1AN2155EJ0100 Rev 1 00 Page 13 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Here as shown in the Figure 3 2 ratio of the output voltage pulse to the carrier wave is called duty Duty x 100 d Torr L Average voltage Figure 3 2 Definition of Duty Modulation factor m is defined as follows m Modulation factor V Command value voltage E Inverter bus voltage A requested control can be performed by setting this modulation factor to the register which determines PWM duty RO1AN2155EJ0100 Rev 1 00 Page 14 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous
45. transition and event execution function call Main process Main process execution function call Watchdog timer clear function call ICS user interface use Motor status change Determination of rotation speed command value Initialization of variables used in the main process Wait for capacity charging time Switching gate signal for inrush current prevention ON VR1 status acquisition SW1 status acquisition SW2 status acquisition Turning LED1 ON Turning LED2 ON Turning LED1 OFF Turning LED2 OFF Page 18 of44 RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 7 List of Control Functions 2 6 File name Function name Process overview mtr ctrl rx62t100 c R_MTR_InitHardware Initialization of the clock and peripheral functions Input None Output None mtr_init_cmt Initialization of CMT Input None Output None mtr_init_poe3 Initialization of POE3 Input None Output None init_wat Initialization of the watchdog timer Input None Output None clear_wat Clearing the watchdog timer Input None Output None mtr_clear_oc_flag Clearing the high impedance state Input None Output None mtr clear cmtO flag Clearing the interrupt flag Input None Output None Table 3 8 List of Control Functions 3 6 File name Function name Process overview mtr interrupt c mtr over current interrupt Overcurrent detection process Input None Event proces
46. ut None Output int16 52 temp IPM temperature A D conversion value mtr clear mtu4 flag Input None Output None mtr inv set uvw Initial setting of MTU3 Initial setting of IO ports Initial setting of the A D converter Initialization of UI Motor startup processing Motor stop processing VR1 A D conversion A D conversion of U phase current W phase current and inverter bus voltage IPM temperature A D conversion Clearing the interrupt flag PWM output setting Input float32 f4_modu U phase modulation factor float32 f4_modv V phase modulation factor float32 f4_modw W phase modulation factor Output None mtr init register Initialization of buffer register Input None Output None RO1AN2155EJ0100 Rev 1 00 9 26 2014 Page 22 of 44 24 NE S AS RX62T Vector control of permanent magnetic synchronous motor Implementation 3 3 List of sensorless vector control software variables Lists of variables used in this control program are given below Note that the local variables are not mentioned Table 3 12 List of Variables 1 4 target software 1 target software 1 gui motor status Motor status EW 0 Turning SW2 ON in error status 1 Turning SW2 OFF in error status target software 1 target software 1 target software 1 g S2 sw userif 0 ICS user interface use default target software 1 1 Board user interface use g u1 mode system unita St
47. xis current PI control integral term gain e noveme l 5 MP INDUCTANCE Inductance H OFFSETIPFK LPF K OFFSET LPF LPF LPF parameter of current offset value of current offset value OL IQ UP SPEED CP OL IQ UP SPEED RPM Speed at start of q axis current command value increase mechanical angle rpm LESS TO OL SPEED CP LESS TO OL SPEED RPM Open loop switching speed mechanical angle rpm OLREFID REF ID CP OL REF ID Command d axis current in open loop mode A OL ID UP TIME CP OL ID UP TIME Command d axis current adding time in open loop mode ms ID DOWN TIME TIME CP ID DOWN TIME Command d axis current subtracting time ms REF SPEED CONST TIME CP REF SPEED CONST TIME Time during which speed command value is constant ms ACCEL MODEO MODEO CP ACCEL MODEO Acceleration in start mode rad s 2 ACCEL MODE1 CP ACCEL 1 Acceleration in control mode rad s RO1AN2155EJ0100 Rev 1 00 Page 28 of 44 9 26 2014 RENESAS RX62T Vector control of permanent magnetic synchronous motor Implementation Table 3 18 List of Macro Definitions 2 12 Definition value main h FLUCTUATION_LIMIT CP FLUCTUATION LIMIT Speed fluctuation limit value rad s OL IQ DOWN TIME CP OL IQ DOWN TIME Command q axis current subtracting time ms mode A OL IQ UP TIME CP OL IQ UP TIME q axis current command value adding time in open loop mode ms OFFSET
48. y liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration modification copy or otherwise misappropriation of Renesas Electronics product Renesas Electronics products are classified according to the following two quality grades Standard and High Quality The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots etc High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems and safety equipment etc Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to
Download Pdf Manuals
Related Search
Related Contents
DINAMYK 9-36 Value Network Tool: A tool for Modeling, Simulating and - E E-520 取扱説明書 Renesas HD74LV2GT04A User's Manual Mode d`emploi Français Optimus Crux Lite-Crux Lite Piezo revue HISTOIRE DE L`EDUCATION led lcd tv owner` s manual - Haier.com Worldwide Nous attendons vos idées Copyright © All rights reserved.
Failed to retrieve file