Home

RX62T Three-Shunt Sensorless Vector Control of Permanent

image

Contents

1. Flux integration is implemented by 1 first low pass filter 2 Derivative 3 second low pass filter Calculate mutual flux Ama Aa ls ia AmB AB ls i8 Observe rotor position 8 Ama AmB y Calculate motor speed based on the observed position w d0 dt Add 3 order low pass filter for estimated motor speed w d dt Close speed loop Figure 12 Flowchart of the Three Shunt Sensorless Vector Control Algorithm RO1ANO903EU0201 Rev 2 01 Page 15 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 8 Motor and Control Parameter Tuning Example 8 1 Tuning through header file Shown in Figure 13 is the BLDC motor BLY 171D 24V 4000 1000SI 05 and Table 4 shows the motor s corresponding specifications The motor is a 24V 4 pole 3 phase BLDC equipped with Hall sensors and a 1000 line per revolution quadratic encoder with index The rated power is 30 watts and the rated speed is 4 000 rpm According to the datasheet the motor and control parameters have to be properly modified to run the three shunt sensorless vector control Figure 13 A BLDC Motor Included in the Evaluation Kit Table 4 Motor Specifications Motor Poles 8 O 24V First define motor parameters define R_STA_CUSTOM 8 stator phase resistance 0 8 Q 10 define LLSYN_CUSTOM 1 inductance in Henry 2 3mh 10000 de
2. GDB Settings sub tab under the Debugger tab and set the Debugger hardware to E1 and Target Device to RSF562TA le Debug Configurations T Create manage and run configurations Name Evakit_Rx62T_SVC_3Shunt x C Main 3s Debugger amp Startup Source C Common Debug only GDB Hardware Debugging Debug hardware fe Target Device RSFS627A fol GDB Simulator Debugging SH RL78 RH850 b RX gt GHS Local C C Launch GDB Settings Connection Settings Debug Tool Settings pF Renesas GDB Hardware Attach E E Renesas GDB Hardware Debugging E7 Evakit_Rx62T_SVC_3Shunt x Autostart local GDB server sales ok wt ace TS E7 Renesas Simulator Debugging RX only C Connect to remote GDB server Gpg port number 51234 ADM port number 61236 GDB Connection Settings GOB Command ecipse_home DebugComp rx elf qdb T Enable verbose mode IV Non stop mode Required for Real Time Access CPE ST Faas SS Se TVS SE Filter matched 8 of 13 items Figure 26 Debug Configuration Debugger Dialog Box Select the Connection Settings sub tab and change the External Frequency value to 12 00 MHz and JTag Clock Frequency to 12 38 MHz Set Power to No Select the Debug Tool Settings sub tab under the Debugger tab and select Big Endian in the Endian setting under Memory T
3. 100 mA Parameter Settings a System Monitor a x speed Control sooof INDEX Descerpry unr MN max vatue vauio CC 00 Default 32767 oo true e 01 Minimum rpm 5000 true 02 Maximur rpm 20000 true E STOP uppati 03 Accelerz rpm s 10000 sooo O true 04 Decelerz rpm s 10000 5000 true 05 Polar co 4 06 Startup Apk AmpDiv Position Control 07 Maximur Apk AmpDiv Ke o N Len wo s WwW N 08 Stator R Ohm OhmDiv Save data to file Figure 34 Changing the Parameter Settings in the GUI Application If standalone mode is used the target board will Disconnect and no longer be communicating with the GUI The LED DL6 will be on but it will no longer be blinking In order to reconnect from standalone mode press P6 reset and Connect to the GUI using the User Interface To terminate the GUI application return the control needle to zero position press the Disconnect button and then press the Exit button to close the application RO1ANO903EU0201 Rev 2 01 Page 29 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Appendix A References L RX62T Group User s Manual Hardware R01UH0034EJ0110 April 20 2011 2 DevCon 2010 Courses ID 620C Complete Motor Control Integration with RX62T D 623C Understanding Sensorless Vector Control with Floating Point Unit FPU Implementation 3 Application Not
4. 1 Channel 6 amp 7 ncoder 3 amp 4 gt LVD Overcurrent WDT IWDT iu iv iw vbus 12bit ADC 10bit ADC CAN SPI LIN I2C Figure 2 System Control Block Diagram RO1ANO903EU0201 Rev 2 01 Page 5 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 5 Three Shunt Motor Phase Current Measurement 5 1 Three Shunt Current Measurement Method The three phase motor currents are usually sampled by Shunt Resistors TEM Hall Effect Sensors Shunt resistors are popular current sensors because they provide an accurate measurement at a low cost LEM Hall Effect current sensors are widely used because they provide a non intrusive measurement and are available in a small IC package such as the Allegro Current Sensor IC that combines the sensor and signal conditioning circuit Table 1 summarizes the advantages and disadvantages between the two current sensors Table 1 Current Sensing Comparison Between Hall Effect Sensor and Shunt Resistor Current Sensing Method LEM Hall Effect Sensor Shunt Resistors Isolation is oe o e f o e ee e f e Shunt resistors are a popular current sensing sensor because of the low cost and good accuracy The voltage drop across a known low value resistor is measured in order to determine the current flowing through the load If the resistor is small
5. Putuo District Shanghai China 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 2886 9318 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 13F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Electronics partes ta sar 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 Jin Persiaran Barat 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 Gu Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2014 Renesas Electronics Corporation All rights reserved Colophon 3 0
6. in magnitude the voltage drop is small and the measurement doesn t have a major effect on the motor circuit The selection criteria of a shunt current resistor requires the evaluation of several trade offs including Increasing the resistance to increase the sensing voltage which makes the voltage offset and input bias current offset amplifier errors less significant A large resistance value causes a voltage loss and a reduction in the power efficiency and also causes a voltage offset to the load in a low side measurement that may impact the EMI characteristics and noise sensitivity of the system Special purpose low inductance resistors are required if the current has a high frequency content The power rating of resistor must be evaluated because the I R power dissipation can produce self heating and a change in the nominal resistance of the shunt gt hS gt S Low side current measurements offer the advantages that the circuitry can be implemented with a low voltage op amp because the measurement is referenced to ground The low side measurement circuit can use a non inverting amplifier and the input impedance of the circuit is equal to the large input impedance of the amplifier On the other hand there are some disadvantages to the low side resistor The low side resistor disrupts the ground path and the added resistance to the grounding system produces an offset voltage which can cause EMI noise problems Also
7. it can t detect a fault where the load is accidently connected to ground via an alternative ground path RO1ANO903EU0201 Rev 2 01 Page 6 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 5 2 Three Shunt Current Measurement Circuit Figure 3 shows the evaluation kit hardware circuit for the three shunt current measurement Jumpers J6 and J9 are shorted while jumpers J7 and J8 are open The composite current of all three MOSFET inverter low side legs can be measured with a single shunt resistor of 0 1 or the current in each individual leg can be determined with three shunt resistors Table 2 lists the jumper settings for the three shunt current measurement RJK0656DPB Q2 RJKO656DPB RJK0SS5S6 DPB Q5 RJKOGSS DPB RIKO6S60PB or JP8 STRIP M V P 2 54 2P 0 JP3 b STRIP M V P 2 54 2P l Figure 3 Three Shunt Current Measurement in the Low Side Inverter Legs Table 2 Jumper Settings for the Three Shunt Current Measurement 5 3 Motor Current Reading from Three Shunts Figure 4 depicts one leg of the inverter and voltage waveforms If the low switch is ON and the gate command u is high then The gate command u is low No current can flow through the high switch because it is OFF No current flows through the high diode because it is inversely polarized so the high diode is also OFF If the low side switch is ON the p
8. 8 5 Build Project and Debug Operation with e2studio To generate the firmware program for demonstration the provided zip file must be imported to the project workspace using e studio IDE revision 3 0 or higher The following steps will explain the procedure for importing the project and setting up the debugger in the e studio IDE 8 5 1 Build Project Procedure in e studio Before importing the project the user needs to install e studio version 3 0 or higher and Renesas complier CCRX revision v1 02 01 Note This demo will only use Renesas complier CCRX revision v1 02 01 The user will need to create a new file folder in Windows Explorer Open the estudio IDE as shown in Figure 17 and proceed with the following Steps Step 1 Browse or type the newly created file folder path in the Workspace Launcher window and click the lt OK gt button tENESAS e2studio v3 0 FJ Workspace Launcher i x Select a workspace Parts Copyright 2014 Ren e2 studio stores your projects in a folder caled a workspace Choose a workspace folder to use for this session Workspace Works ace Rx62T_kit Browse Use this as the default and do not ask again Figure 17 e studio IDE Start up Windows and Workspace Launcher Step 2 Select Import from the File pull down menu After selecting Import Figure 18 shows a Select dialog box that prompts the user to Create new projects from an archive file or direct
9. DL1 begins to blink If pressing P6 does not fix the fault disconnect and reconnect the E1 debugger and the Mini USB and reprogram the board using the steps discussed in section 8 5 2 RO1ANO903EU0201 Rev 2 01 Page 27 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Renesas RX62T Demo Kit User Interface Communication Settings Algorithm information Parameter Settings System Monitor Speed Control 3 Shunt Sensorless Vector Control with External Amplifier Position Control 1 Shunt Sensorless Vector Control with External Amplifier 3 Shunt Sensorless Vector Control with Internal Amplifier 1 Shunt Sensorless Vector Control with Internal Amplifier Encoder Based Position Control _ Algorithm JP6_ JP7 38 JP9 JP10 JP1i 4P12_ ipis JP14 iPr External 3 Shunt_ 1 2 22 1 2 1 2 1 2 1 2 Amplifier 1 Shunt_ 1 2 1 2 eo SS PS ee ee nplifier 1 Shunt 1 2 E z Pea sod Oe ys Me i aari Gi Figure 32 Algorithm Information in the GUI Application Step 5 Click the lt Speed Control gt button Step 6 Set the speed arbitrarily by dragging the indicator needle to the right or left as shown in Figure 33 The speed can also be manually typed into the dialog box below the needle shown in Figure 33 Note The user needs to set the directional speed value from 2000 to 4000 rpm to run this demo The motor shaft should
10. New ote i y ro a moos X i 1i A b Standalone Operation Buttons Figure 1 Evaluation Board RO1ANO903EU0201 Rev 2 01 Page 4 of 31 Jul 30 2014 7rCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 4 System Control Block Diagram The RX62T is a 32 bit high performance microcontroller with a maximum operating frequency of 100MHz and 165 DMIPS and single precision floating point unit FPU which is equipped with multifunction timers MTU GPT high speed 12 bit ADC and a 10 bit ADC for facilitating motor control Figure 2 depicts the block diagram of a sensorless vector control of a PMSM based on the Renesas RX62T Microcontroller The evaluation kit is capable of controlling two motors The RX62T timer MTU3 channels 3 and 4 can be used to drive the second motor which is not covered in this application note The MTU3 channels 6 and 7 are used to generate 6 PWM signals to drive the on board motor in the complementary mode The PWM modulation uses the space vector PWM or the sinusoidal PWM with the third harmonic The three phase inverter uses the Renesas low voltage MOSFETs which generates three phase voltages with variable frequency and amplitude to drive the motor to the desired voltage The motor currents of l l are measured by three shunt resistors The currents of l L are measured by a 12 bit u L w u L 2 ADC unitO of channel AN002 AN001 and ANOOO respectively and the bus voltage is measured
11. by a 12 bit ADC unitO of channel AN003 The second motor currents of ll sl L are measured by a 12 bit ADC unit1l of channel AN102 AN101 and AN100 The bus voltage is sampled by a 12 bit ADC unit of channel AN103 The speed is given by an external potentiometer which is input to the 10 bit ADC channel AN1 The MOSFET temperature is measured by the 10 bit ADC channel AN2 The encoder pulses A and B are input to the TCLKA and TCLKB and the Z pulse is input to IRQO For the second motor the encoder pulses A and B are input to the TCLKC and TCLKD and the Z pulse is input to IRQ3 The MTU3 timer has phase counting mode to capture two phase encoder pulse inputs When the motor and the power board have overcurrent the current ADC sample circuits generate a port output enable POE signal to immediately shut down the PWM outputs from the MCU hardware In addition the RX62T control system has various system level safety features to comply with the IEC60730 safety standard such as low voltage detection LVD independent watchdog timer IWDT clock stop detection ADC converter self diagnosis and an output port monitor etc The GUI communicates with the RX62T MCU using the USB and it can display the motor operation status in the real time and tune the motor and control parameters The board can also run in the standalone mode and the LCD displays the motor status RX62T 2 motor control MTU3 MTU3 Channel 0
12. by the Iq current Due to its nature the 3 phase motor has three windings and three currents which are 120 degrees apart Vector formulation uses Clarke and Park transforms to convert the measured phase currents from the u v and w frame to first transform them into the static orthogonal a frame which is 90 degrees apart and then the rotor frame The rotor frame is also an orthogonal frame aligned along the magnetic field axes known as the d and q frame These transformations use the transcendental functions sine and cosine of the rotor angle therefore it is a requirement that the rotor angle is known at the time the calculation is made Once the currents are transformed into the d and q frame the control algorithm simply runs the PID or PI loop to calculate the required voltages for the torque and flux These required voltages Vdc Vqc are then transformed back into the u v and w frame using the inverse Clarke and inverse Park transforms to further calculate the PWM duty cycle All these blocks form the inner current loop shown in Figure 9 with two computing blocks known as flux observer and speed estimation which are special parts of the sensorless vector control formulation When a sensor is used to measure the rotor angle and speed measurements these two blocks change significantly In sensorless implementation because there is NO sensor to measure the angle and speed a motor model is used to calculate the flux and estimate the speed b
13. l dbsct c ges_eqp c a ges_eqp h a globdef h a globvar h L hwsetup c intprg c a iodefine_m h main c ih mask h a misratypes h motorcontrol c a motorcontrol h resetprg c l sbrk c la sbrk h th stacksct h A switches c a switches h s typedefine h a user_define h userif c n userif h a vect h l vecttbl c mG F GG a e s a ea E E Ee 4 E E E E H E Figure 10 Three Shunt SVC Software Workspace R01AN0903EU0201 Rev 2 01 Page 13 of 31 Jul 30 2014 2tENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 7 2 Flowchart of Three Shunt Sensorless Vector Control The MTU3 timer interrupt is implemented for three shunt sensorless vector control Figure 11 is a flowchart of the PWM interrupt It starts with the open loop and then switches to the closed speed loop The procedures in the PWM interrupt of MC_ConInt are Motor phase currents and DC bus voltages are first sampled When the motor powers on the startup procedure handles the open loop After the motor powers on the system switches into the closed speed loop e The rotor position and the speed are estimated in sync with the carrier frequency in order to rapidly update the position and the speed L2 SCS S 2 oe The current PI controller outputs of v and v are transformed back to the three ph
14. output voltage of the amplifier is added to the 2 5V offset The ADC input value of 2 5V is taken as the current of zero The ADC input values from 2 5V to 5V correspond to positive current values and the inputs from 0 to 2 5V correspond to negative current values The 12 bit ADC reads the voltage into the digital value from 0 to 4096 i KADI AN002 i spa i KADI AN001 i pa i KADI AN000 i ofrer KADI 5 4096 Rshunt Kamp Where l L and 1 are three phase motor currents la ofset v_offset and lw offser E U V and w phase current offsets AN 002 ANOOI and ANOOO are the 12 bit ADC reading values of u v and w phase shunt currents KADI is the motor phase current scaling Rshunt is the value of the shunt resistor Kamp is the gain of the current amplifier RO1ANO903EU0201 Rev 2 01 Page 10 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 5 5 Three Shunt Current Reading Software Implementation The software implementation includes the shunt current offset calculation MC_SetOff and the shunt current reading MC_Readc_TS MC_SetOff reads the offset of the ADC channels when the currents are 0 and it is executed once at the beginning MC_Readc_TS is called every interrupt at the trough and it reads the ADC conversion results Given the duty cycle values it calculates which two channels are to be read corresponding to the longe
15. rotate with the setting speed Returning the control needle to zero position stops the motor By default the demo sets parameter values for speed Minimum speed 2000 rpm Maximum speed 4000 rpm Acceleration 5000 rpm s Deceleration 5000 rpm s Startup time 1000 ms R01AN0903EU0201 Rev 2 01 Page 28 of 31 Jul 30 2014 zCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Renesas RX62T Demo Kit User Interface Communication Settings SPEED zoon VOLTAGE 6000 rpm F j i i 40V Algorithm information 4000 rpm 20V 2000 rpm Parameter Settings ov 0 rpm 2000 rpm we a aie System Monitor 4000 rpm 40V 4 sec 2 sec 0 sec 4 Speed Control 6000 rpm T sec 2 sec 0 sec Position Control Scien Measured Direct r Bus Total i u Total E STOP UPDATE Motor speed a Motor speed Imposed F Direct Curr Torque Cur Direct Volt Quadratur L D Bus Vol Alarm Code Time stamp 2400 II 5 Save data to file Figure 33 Setting the Speed to Turn the Motor in the GUI Application Step 7 Click the Parameter Settings button The Parameter Settings feature can be used to manually adjust the preset variables using the GUI Figure 34 shows the Parameter Settings dialog box ox Renesas RX62T Demo Kit User Interface 2tEN ESAS Communication Settings VOLTAGE CURRENT 30 V 400 mA Algorithm information 300 mA 200 mA
16. will recognize the new hardware and will launch the driver installation screen Follow the instruction from the Message Box to install respective USB device driver Note Separate instructions for the USB device driver installation are provided in the Quick Start Guide or the driver will install automatically depending on the CD ROM installer Figure 29 shows the necessary connections and LED designations ENCODER HALL MOTOR FUSE 24VDC 24VDC Aux LCD Hro Be rad e TA Ta m JP14 m DEBUG DEBUG STAR RX62T H8S SPEED STOP FORWARD REVERSE MODE E1 E10 Figure 29 Running the Demo with estudio and the GUI Step 2 Start the GUI program by double clicking on the Motor Control Demo icon ni or select the Motor Control Demo program from the Windows taskbar Start in All Programs under the Motor Control Demonstrator folder The GUI program screen will launch and display as shown in Figure 30 For a serial port update wait for a few seconds to get the Connect button highlighted and then proceed to Step 3 Note If the Connect button is not highlighted the GUI couldn t find the correct USB device driver for COM port setting Step 3 Click the Communication Settings tab on the top left of the GUI seen in Figure 30 and select Auto detect under the serial port drop down tab Step 4 Click lt Connect gt RO1ANO903EU0201 Rev 2 01 Page 26 of 31 Jul 30 2014 2tCENESA
17. 3EU0201 Rev 2 01 Page 21 of 31 Jul 30 2014 2tENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Figure 21 shows the Clean Windows dialog box Step 8 Check the Start a build immediately option and select the Radio buttons Clean all projects and Build the entire workspace Then click the lt OK gt button to clean and rebuild all projects in the workspace For debugging the target firmware x file is generated in the Binaries workspace folder shown in Figure 22 For release set the active project to release mode for building projects The target firmware mot file is generated in the workspace Release folder lo x ci i eee ae oe ee ee es mge lox o Problems 4 Tasks amp Console Properties Memory Stack An Peripher i Device Lis Sy Device To 3 Code Pre O Bl SR Ble erne CDT Buid Console EvaKit_Rx62T SVC 3Shunt Figure 21 Clean Message Box ebug EvaKit_Rx62T_SVC_3Shunt main c e studio E aoc E Debug DISCLAIMER i GH EvaKt_Rx62T_SVC_3Shunt Copyright C 2011 Renesas Electronics Corporation All rights reserved y Binanes FSESESKESASSSESESHESSSSSESKSKSSSHSASAKSHSSAHSAESESHSSSREHESESHSSSSOASERSSESSOSS Indudes File Name S Debug version Device s Tool Chain AYR PE aS 2 H W Platform YMCRPRX62T Rx62T Motor Control Evaluation Kit Description 3 Shunt SVC with external amplifier
18. 62T MCU ADC channels AN000 ANOOI1 and ANOO2 and are listed in Table 3 RO1ANO903EU0201 Rev 2 01 Page 8 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Figure 6 Motor Current Measurement Circuit Table 3 ADC Conversions Item ADC Channel Conversion Ratio actual value ADC input value Phase u Current iu ANOO2 5A 5A 0 5V Phase w Current iw ANOOO 5A 5A 0 5 V DC Bus Voltage vbus ANOO3 0 50 V 0 5V The signals can be categorized into two main types bipolar and unipolar The motor phase currents are examples of bipolar signals while the DC bus voltage is an example of a unipolar signal The shunt resistor used in this application is 0 1Q and the measured current range is from 5A to 5A The gain of the amplifier is set to 5 Figure 7 depicts the current sensing scale translation OV 2 5V 2 5V offset RX62T 12 bit ADC Figure 7 Motor Current Sensing Scale Translation RO1ANO903EU0201 Rev 2 01 Page 9 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM The shunt resistor senses the maximum 5 Amps current to translate the current to the 0 5 volts voltage and the amplifier enlarges this voltage 5 times The ADC inputs accept the analog input signals 1 1 and in the range of 0 5 volts for the RX62T with the ground referenced to 0 volts The
19. Main function Operation Limitations PP RSSESZESASELSESESESSESE LES SESE SESE SES SS ESSE SESE SES SESE SES ESE SESE SEES ES ESSE SS SS SE History MM DD YYYY Version Description ba 12 18 2011 1 00 First Release 06 15 2014 2 01 Second Release Release Note change IDE from HEW to e2Studio Ver 3 using build in ad e2Studio import feature SESSELSSSLSSSSSSESSSSSSSSSSPISSESSSSSSSLASSLSSSSSSLSSCSSSLSSSSESSSSSGSSSSSVS i define C_MAIN to be inserted BEFORE including globdef h Sj FEFSKSTSSSSSESSKSSSSSSSSSSEKSSESSSSESSESESSESSSSESHSESLSKSESSESKSESSSSSSESSESESSESESEES xl Console Tasks Renesas C B Memory Us Performan Profile tY Real time s Trace Visual Expr Problems Exeautables 7 7 0 tems Figure 22 Target Firmware in Workspace R01AN0903EU0201 Rev 2 01 Page 22 of 31 Jul 30 2014 7stENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 8 5 2 Debug Procedure in e studio IDE After generating the target firmware the user is now ready to setup the debug interface through the E1 debugger The E1 debugger is necessary as an interface from the software to the hardware Even if there is no need for any debugging this procedure is still necessary to reprogram the board using the provided algorithms Connect the 24V DC power to J3 the E1 Debugger to J5 and the motor to the J8 connector The connections are shown in Figure 23 Check the recommended jumper set
20. S RX62T Three Shunt Sensorless Vector Control of PMSM x Renesas RX62T Demo Kit User Interface Figure 30 Connecting to the Motor Control Demo GUI 1 of 2 After successfully connecting with the target board the Communication Settings area will change to a green color and the Connect button will change to Disconnect The LED DL6 will blink while communicating between the target board and GUI Figure 31 shows the GUI after a successful connection Renesas RX62T Demo Kit User Interface Communication Settings Desconnect Desconnect __speeaconnot Control Position Control Figure 31 Connecting to the Motor Control Demo GUI 2 of 2 The GUI will detect the programmed algorithm In this case the Three Shunt Sensorless Vector Control with External Amplifier will be used After connection the Speed Control button is active while the Position Control button is grayed out The user can check with the Algorithm Information message box which shows a valid algorithm Clicking the Verify Jumper Settings button shows Table 5 in the GUI Figure 32 shows the Algorithm Information dialog box Follow the below procedure for using the GUI The LED DL1 will be blinking continuously while running demo with no fault occurrence If a fault occurs the LED DL2 will flash and DL1 will remain illuminated without flashing If a fault occurs press P6 reset and check if
21. ally 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 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 regu
22. ameter tuning The software described in this application note is applicable to the following devices and platforms MCU RX62T and RX62N Motor Three Phase BLDC Motor and PMSM Platform Renesas Evaluation Kit Control algorithm Three Shunt Sensorless Vector Control SCS S SCS KS 2 SCS S RO1ANO903EU0201 Rev 2 01 Page 2 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 2 Specifications and Performance Data The implementation of the three shunt sensorless vector control is based on the Renesas evaluation kit and the RX62T MCU The main specifications are described as following Input Voltage 24VDC Rated Bus Voltage 24V Output Voltage 24VAC Rated Output Power 120W PWM Switch Frequency 20KHz Control Loop Frequency 1OKHz Current Measurement 3 Shunt Resistors Implementation FPU CPU Bandwidth 19 7 Used Flash Memory 33 816Kbytes Used RAM 4 387Kbytes Used Stack 336bytes 9 gt S SCS gt S SCS S SCS S SCS S SCS S SS S SCS S SCS S gt KS R01AN0903EU0201 Rev 2 01 Page 3 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 3 Hardware Platform The RX62T evaluation board is a single board with an integrated power inverter with the controller The hardware includes a low voltage MOSFET power stage a communication stage and a RX62T microcon
23. ase voltages of V V and V which are used to calculate PWM duty ratios to drive motor to the desired voltages C PWM Interrupt D Motor phase currents and bus voltage ADC measurements otor power on Currents transformation from abc to dq No Speed control Startup Procedure New position angle setting Id current control Y Iq current control Y Voltage transformation from dq to abc PWM generation t Flux observer Y Speed estimation Figure 11 Flowchart of PWM Interrupt RO1ANO903EU0201 Rev 2 01 Page 14 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Figure 12 shows a flowchart of the three shunt sensorless vector control algorithm Phase current iu iv iw reading Y Vector transformation to transfer the currents from iu iv iw to ia i and to id and iq DC bus voltage Vbus reading dq current loop controller to produce vd and vq Vector transformation to transfer the dq voltages to va vB Y Flux and position estimation based on ia iB va vB inthe af stationary reference frame Y Calculate back EMF ea va rs ia e v rs i r Calculate stator flux Aa Aa0 f va rs ia dt AB A 0 v rs i dt
24. ased on the measured phase currents and motor parameters Therefore making computations is more involved with sensorless implementation and these computations further involve the use of transcendental functions and filters Phase currents measured with the ADC are first converted into proper current values Third order filters are employed to reduce the noise and other undesired effects and integrate the flux continuously as required Finally the inverse tangent ARCTAN function is used to derive the rotor angle The speed is estimated based on two consecutive rotor angle computations again with some filtering employed All of these calculations take a significant amount of time and consume the CPU bandwidth This is where the FPU helps to reduce the CPU bandwidth and it also reduces the code size Inverse Inverse commanded speed park transform Clarke transform rr Observed actual speed Current loop Motor Model Based Flux and Position Observer Park transform Speed Estimation p Speed loop Figure 9 Block Diagram of Sensorless Vector Control As shown sensorless vector control SVC uses the complex coordinate transformations and motor mathematical model which requires a large amount of calculations Thus SVC necessitates a fast MCU with high computing capability Currently most of the SVC implementations are based on the fixed point MCUs or DSPs While a few of them adopt the floating point processors the cores of those p
25. b wheel potentiometer a graphic LCD and a few simple steps to quickly operate the motor out of the box For debugging or programming the user needs to connect J5 with E1 Use the Mini USB connector J1 in the evaluation board for communication to the GUI ENCODER HALL MOTOR FUSE 24VDC 24VDC Aux DEBUG DEBUG START RX62T H8S STOP _ FORWARD REVERSE _ MODE E1 E10 a Board Layout b Functional Layout Figure 16 Board Layout Before starting the demo reconfigure the jumpers JP6 JP15 as highlighted with red in Table 5 The jumper s location is shown in Figure 16 b The board can be operated in standalone mode or in GUI mode Table 5 Bn Ti Jumper Settings Operation P6 3P7 JP8 JP JP10 3P11 JP12 JP13 JP14 JP15 ee ee le a shunt aap ae Internal PGA 3 Shunt 2 3 2 3 2 3 3 4 3 4 3 4 vi awe ale RO1ANO903EU0201 Rev 2 01 Page 18 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM For standalone mode press and hold P4 mode button during power cycle or P6 reset Then release the P4 button Now the board is in standalone mode Press P1 start stop to start or stop motor Set RV1 for motor speed and change motor rotation direction by pressing P2 forward or P3 reverse button P4 toggles different modes on the LCD Note The user needs to set speed to 2000 rpm or more to run the motor in this demo GUI mode will be explained in section 8 6
26. 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 CENESAS SALES OFFICES Renesas Electronics Corporation http www renesas com Refer to http www renesas com for the latest and detailed information Renesas Electronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 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 651 700 Fax 44 1628 651 804 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 Dusseldorf Germany Tel 49 211 65030 Fax 49 211 6503 1327 Renesas Electronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 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 Rd
27. e of Sensorless Vector Control of Three Phase PMSM Motors REU05B0103 0100 Rev 1 00 March 2009 4 Application Note of Mcrp05 Brushless AC Motor Reference Platform REUO5B0051 0100 Feb 2009 5 Huangsheng Xu Rohan Hubin and Dave Cocca Sensorless Vector Control of PMSM Motor Using One Shunt Current Detection IEEE IAS 2008 Oct 5 9 Edmonton Alberta Canada 6 Huangsheng Xu and Yashvant Jani Understanding Sensorless Vector Control for Brushless DC Motors ESC 2008 Embedded System Silicon Valley Conference April 15 17 San Jose California USA RO1ANO0903EU0201 Rev 2 01 Page 30 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Website and Support Renesas Electronics Website http www renesas com Inquiries http www renesas com inquiry All trademarks and registered trademarks are the property of their respective owners RO1ANO903EU0201 Rev 2 01 Page 31 of 31 Jul 30 2014 2CENESAS Revision Record Rev 1 00 2 00 2 01 Date Nov 18 2011 Jan 31 2014 Jul 30 2014 Description Page 18 Summary First edition issued Second edition issued Demonstration Guide added A 1 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 manual refer to the relevant sections of the manual If the descriptions under Ge
28. e required to get applications started and shorten time to production by allowing developers to apply what they learn in the evaluation phase to the real applications The kit comes ready to run a Brushless DC BLDC motor included Simply power up the board to explore the 5 different types of motor control solutions 1 three shunt sensorless vector control 2 single shunt sensorless vector control 3 three shunt sensorless vector control with the internal Programmable Gain Amplifier PGA 4 single shunt sensorless vector control with the internal PGA 5 encoder based position control Developers can modify the demonstration applications to develop specific motor control applications and using the Graphical User Interface GUI the motor and control parameters can be modified to drive your own motor This document presents the RX62T three shunt sensorless vector control solution which has been implemented on the RX62T evaluation kit with a three shunt current measurement This document describes the evaluation kit hardware platform three shunt current measurement motor phase current reconstruction method three shunt sensorless vector control strategy and software implementation The sensorless vector control algorithm is based on the method introduced in Renesas Application Note REU05B0103 0100 Rev 1 00 Specifically this document explains how to modify the solution for different motors and applications and this document gives an example of par
29. ed 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 Differences between Products Before changing from one product to another i e to one with a different type number confirm that the change will not lead to problems The characteristics of MPU MCU in the same group but having different tyoe numbers may differ because of the differences in internal memory capacity and layout pattern When changing to products of different tyoe numbers implement a system evaluation test for each of the products Notice Descriptions of circuits software and other related information in this document are provided only to illustrate the operati
30. fine POLES_CUSTOM 4 4 pair of poles define ISTART_CUSTOM 1 5 startup current of 1 5A define IQ MAX CUSTOM 5 0 maximum ig current of 5 0A define RPM _MIN_ CUSTOM 500 minimum motor speed of 500 rpm define RPM MAX CUSTOM 4000 maximum motor speed of 4 000 rpm Second tune control parameters define R_ACC_CUSTOM 1000 acceleration ramp in 1000 rpm sec define _KP_CUR_CUSTOM 60 proportional gain of current controller define KI_CUR_CUSTOM 80 integral gain of current controller define KP_SPD_CUSTOM 40 proportional gain of speed controller define KI_SPD CUSTOM 150 integral gain of speed controller 8 2 Tuning Using the GUI The motor and control parameters can be tuned through the Renesas GUI as shown in Figure 14 Without modifying the code the parameters can be set for different motors and applications There is a parameter window to set up 20 separate parameters By scrolling up and down through these parameters the user can decide to make changes to the settings and Write to EEPROM but this doesn t change the customize h file The original values will be restored upon clicking RO1ANO903EU0201 Rev 2 01 Page 16 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM E Reload From Figure 15 it can be seen that these parameters mirror the defines in the customize h file and the motor and control parameters can be easily changed usin
31. g the GUI O xX RENESAS Renesas RX62T Demo Kit User Interface Comunication Settings v Efe ll s eA Connect SPEED Algorithm selection 4000 rpm 3000 rpm 2000 rpm 1000 rpm Speed Setting and Display j 0 rpm Parameter Settings System Monitor Position Control 1000 rpm 4000 rpm Reference E 01i Minimum Speed Maximun Speed 03 Acceleration Deceleration 05 Polar couples Startup Current D7 Maximum q Stator Resistance Current Measured etting Synchronous Inductance Startup Time Current Loop Kp Current Loop Ki 3 Speed Loop Kp Speed Loop K Startup offset Y 6 Startup delta Y PI Tuning trigger NIT MIN 0 rpm rpm rpms VOLTAGE 30 v ia Direct fl Quadrature 00 Default Parameter 200 a ll 1000 il roms Apk 10 Apk 10 Ohm 10 ms CURRENT 400 mA 300 mA 200 mA 100 mA 0 mA 100 mA Motor speed Direct Volt Figure 14 Evaluation GUI Interface 32767 5000 20000 10000 10000 5 5000 5000 5000 sooo 10000 2047 Figure 15 Parameter Window 4 sec 2 sec il Direct fe Torque ii Total Imposed F Quadratur MAX YALUE E ETOP UPDATE Motor speed e Direct Curr DC Bus Vol true true true true true true true o true oO true true true true true true true true true true
32. h Renesas GDB Hardware Debuggir EvaKit_Rx62T_SVC_3Shunt x Name EvaKit_Rx62T_SVC_3Shunt x IO Use Default IO Filename IO Filename Break Force Hardware Breakpoints E Renesas Simulator Debugging RX External Memory Areas Work RAM Start Address Work RAM Size Bytes E System Program re writes internal Program ROM Program re writes internal Data Flash ea Filter matched 8 of 12 items I Figure 28 Debug Configuration Dialog Box 2 of 2 Step 8 Check the target board power is ON and verify the connections through the PC E1 debugger and the target board Clicking the lt Debug gt button in the Debug Configurations dialog box will download the firmware to the target board Step 9 Click the Resume icon or press the F8 Key to run the program This may require the user to press the Resume icon or F8 multiple times depending on the delay in the code The icon should turn gray when the program is running The LED DIL I will blink at about a one second rate continuously while running the target board RO1ANO903EU0201 Rev 2 01 Page 25 of 31 Jul 30 2014 sCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 8 6 GUI Operation This operation requires the demo board to be connected to the PC using the supplied Mini USB cable Step 1 Connect the Mini USB cable to J1 from the PC LED DL8 is on when the USB bus power is applied to evaluation board The PC
33. hase current flows through the shunt Therefore in order to read the motor phase current the corresponding shunt current should be read when the related low side switch is ON By observing the voltage waveforms obtained with three phase modulation in Figure 4 it can be seen that two of the three phases are lower than the 90 of the maximum voltage value so two of the three phases have a low switch ON period greater than 10 of the total period Therefore it is always possible to read two currents with a three shunt measurement system RO1ANO903EU0201 Rev 2 01 Page 7 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Figure 4 One Leg of the Inverter Left and Motor Voltage Waveforms Right Figure 5 shows the PWM waveforms The three shunt current reading depends on the PWM duty cycle The lesser is the duty the higher voltage is the output so the lesser time the lower switch is on Those trees are chosen for which the lower arm on time is higher Therefore the conversion in amperes should be made Transfer moment lnbenrupt momar TCNTS 1 l TCHT JIN Figure 5 Three Phase PWM Duties and PWM Waveform 5 4 Three Shunt Current ADC Sampling and Scaling Figure 6 shows the three shunt current sample and amplifier circuit Due to the current polarity the offset should be added to shift the maximum negative current to 0 volts After the offset and amplifier the three shunt currents input to the RX
34. he 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 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 especi
35. hen click the lt Apply gt button The typical debug settings for this demo are shown with RED boxes in Figure 27 and in Figure 28 RO1ANO903EU0201 Rev 2 01 Page 24 of 31 Jul 30 2014 2tCENESAS RX62T FJ Debug Configurations Three Shunt Sensorless Vector Control of PMSM Create manage and run configurations bee aro Name EvaKit_Rx62T_SVC_3Shunt x type fiter text Debug only E GDB Hardware Debugging E GDB Simulator Debugging SH RL t n GHS Local C C Launch Renesas GDB Hardware Attach E EvaKit_Rx62T_SVC_3Shunt x E Renesas Simulator Debugging RX Fiter matched 8 of 12 items E Renesas GDB Hardware Debuggir Figure 27 Debug Configuration Dialog Box 1 of 2 FJ Debug Configurations Debug hardware E1 Y Target Device R5F562TA GDB Settings Connection Settings Debug Tool Settings Clock Main Clock So Extal Frequency MHz Permit Clock Source Change On Writing Internal Flash M Yes Connection with Target Board Emulator EXTAL Auto ne J JTag Clock Frequency MHz Fine Baud Rate Mbps Hot Plug Powe Power Target From The Emulator MAX 200mA olta oc og 12 38 2 00 No No 2 WAL Create manage and run configurations Gls amp oy type filter text sE Debug only E GDB Hardware Debugging E GDB Simulator Debugging SH RL tli GHS Local C C Launch Renesas GDB Hardware Attac
36. lations 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 destruction 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
37. neral Precautions in the Handling of MPU MCU Products and the body of the manual differ from each other the description in the body of the manual takes precedence 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 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 Reserv
38. on 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 any 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 t
39. ory Step 3 Select Existing Projects into Workspace from the Select pop up dialog box and click the lt Next gt button RO1ANO0903EU0201 Rev 2 01 Page 19 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM Girly Cirl Shiht wy Crits Ciri tshirts de Welcome Select F 15 Import i Create new projects from an archive file or directory t E type fiter text W H S Code Generator CVS Figure 18 Importing Projects into the Workspace 1 of 2 After clicking the lt Next gt Button the Import Projects dialog box in Figure 19 prompts the user to Select a directory to search for existing Eclipse projects Step 4 Select the Radio Button Select archive file and click lt Browse gt to locate the Single Shunt Sensorless Vector Control with Internal PGA zip file to import into the workspace The selected project will then appear with a checked box in the Projects message box as seen in Figure 19 Step 5 Check the Add project to working sets check box and then click the lt Finish gt button to complete the project import RO1ANO903EU0201 Rev 2 01 Page 20 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM CW C C e studio m Import File Edit Source Refactor Wel Import Projects elcome Select a directory to search for existing Eclipse
40. projects Select root directory Se Browse Select archive fie C WorkSpace Rx62T_kt_updated_e2stud Browse Projects M EvaKit_Rx62T_SVC_3Shunt EvaKit_Rx62T_SVC_3Shunt EJ Options M Search for nested projects IY Copy projects into workspace Working sets Figure 19 Importing Projects into the Workspace 2 of 2 If the file does not appear with a check box in the Projects message box the selected zip file is the wrong zip file type or it was not properly exported If the file already exists in the workspace then the user will see a message that states Some projects cannot be imported because they already exist in the workspace After clicking lt Finish gt the imported project is now in the estudio workspace shown in Figure 20 and the project should be in Debug mode by default FI Debug e2 studio eo BE Outline Project amp a amp pees Evakit_Rx621 Tookhan Name Renesas RXC Tookhan Current Verson v1 02 01 Available Versions fv1 02 01 X LETE Fa Figure 20 Setting the Toolchain Version in the e studio Workspace Step 6 Select Properties from the Project pull down menu and expand C C Build section Select the Change Toolchain Version option and set the Available Versions to v1 02 01 Step 7 Select the Clean command from the Project pull down menu for cleaning and rebuilding the project RO1ANO090
41. r ON period of the lower switches It has to subtract the channel offsets and converts them into the motor actual currents The 3rd current is calculated as minus the sum of the other two Figure 8 shows the flowchart of the three shunt current measurements Calculate Shunt current iu iv iw offset at zero current iu_ offset iv_offset iw_offset Y Start ADC channels of AN000 AN001 AN002 conversions every PWM interrupt at the trough Check three phase PWM duties du dv dw to determine the shunt current reading sequence Case 1 If du gt dv then If dv gt dw phase u and v are chosen and phase w is calculated else phase u and w are chosen and phase v is calculated Case 2 If du lt dv then If du gt dw phase u and v are chosen and phase w is calculated else phase v and w are chosen and phase v is calculated y Calculate three phase motor currents iu iv and iw Figure 8 Flowchart of Three Shunt Current Measurements R01AN0903EU0201 Rev 2 01 Page 11 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 6 Three Shunt Sensorless Vector Control Strategy The vector control formulation depicted in Figure 9 provides a straightforward way to control the flux and the torque in a similar way to controlling DC motors the flux is controlled by the Id current while the torque is controlled
42. rocessors are actually fixed point and they are not true FPU implementation RO1ANO903EU0201 Rev 2 01 Page 12 of 31 Jul 30 2014 2tCENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 7 Software Descriptions The three shunt sensorless vector control software has the following features SO S All codes are written in C language The software is modularized according to the SVC block diagram as shown in Figure 9 Core SVC modules can be generally used without any changes I O definitions and basic MCU drivers are automatically ported by e Studio Motor and control parameters are easily tuned through a header file of customize h and GUI SO S SCS S 2 hS SCS S 7 1 Three Shunt Sensorless Vector Control Software Implementation Three shunt sensorless vector control software architecture is similar to the one in the Renesas Application Note REU05B0103 0100 Rev 1 00 Figure 10 shows the workspace for three shunt sensorless vector control using Renesas e Studio IDE Integrated Development Environment The code includes dbsct c hwsetup c intprg c main c motorcontrol c resetprg c userif c and vectbl c Core sensorless vector control modules for vector control transformation and speed and position observer are put in the library of 3Shnt_SVC_Lib lib gt EvaKit_Rx62T_SVC_3Shunt in Includes 6 LCD amp MCRPO7_Library Lh const_def h h Customize h
43. s RENESAS APPLICATION NOTE RX62T RO1AN0903EU0201 Rev 2 01 Three Shunt Sensorless Vector Control of Permanent Magnet Jul 30 2014 Synchronous Motors PMSM Introduction This document presents the RX62T three shunt sensorless vector control solution which has been implemented on a RX62T evaluation kit with a three shunt current measurement It describes the evaluation kit hardware platform three shunt current measurement motor phase current reconstruction method three shunt sensorless vector control strategy and software implementation The sensorless vector control algorithm is based on the method introduced in Renesas Application Note REU05B0103 0100 Rev 1 00 Target Device RX62T Contents Te TUG cin escrito cna te iri pot eee dnl wet ce ile oleh ot sega eign aaltee da EE 2 2 Specifications and Performance Data ccccccccssecccccseseeeceeeeeeeseeeeeeseeeeeeeseueeeeeeeeeesseeeeeesseseeesseeeenens 3 MPA OU aar tiation A EEE EE E E A EEEE RAEE R AE E E 4 4 System Control Block Diagram cccccccseeesecccceeceeeesseeceeeeeeseaeesecceeeeesaueaseeeeeeeesssueaeeeeeeeeesssaaeeeeeees 5 5 Three Shunt Motor Phase Current Measurement ccceeeeeeeeeeeeeeeeeeeeaaaeeeeeeeeeeeeeeeeeeeeeeeeeaaaaaas 6 6 Three Shunt Sensorless Vector Control StrateGy cccccssssccccccessseceeeeeeseceeeeseseeeeesseeeeeeeesegeeeees 12 7 SOMMANe IOS SCh OOM S searre E E EEE cana vermneade nea enedasaeeate scence 13 8 Motor and Con
44. tings for this demo refer to section 8 4 ENCODER HALL MOTOR FUSE 24VDC 24VDC Aux yy a E i Be Be Br Be em I JP10 To LYLYLY JP15 JP14 JP13 RESET j fb g RESET OF res hs f DEBUG DEBUG START RX62T H8S SPEED STOP FORWARD REVERSE MODE E1 E10 Figure 23 Debug Setup for Demo Board Step 1 Select Debug Configurations from the Run pull down menu or click the debug icon 7 and select Debug Configurations Now the user will view the Debug Configurations Windows dialog box as shown in Figure 24 Project Explorer 3 e Debug Configurations FS Evakit_Rx62T_SVC_3Shunt Debug Create manage and run configurations CERI l Configure launch settings from this dialog press the New button to create a configuration of the selected type gt Press the Duplicate button to copy the selected configuration aHg5o 26 Press the Delete button to remove the selected configuration te Press the Filter button to configure filtering options Edit or view an existing configuration by selecting it Configure launch perspective settings from the Perspectives preference page ACME ALG SLE al aa Galea 7 y gt Fiter matched 8 of 13 items Figure 24 Setup Debug Configuration in Workspace Step 2 Select Renesas GDB Hardware Debugging Using the mouse right click on Renesas GDB Hardware Debugging and select New as sho
45. trol Parameter Tuning Example ccccccccccsseeeeeeceeeeeceeeeeeaeeeeeeseeaeeeeeesaeeeeeeeeas 16 9 Demonstration Guide asi eushetnsanims nies teaatnaetcntasuisheadeancessiaauedsoutitestensssietaddssaiieeduiepdacthinmeaiaensuadanovmenssne 18 Appendix A References acaiessscereiacicevedisdcpussasnouatierntavesacdua vebdedapassnea sunitean saneens Gan retesdspaceaeacunddernceneseedae aden 30 RO1ANO903EU0201 Rev 2 01 Page 1 of 31 Jul 30 2014 2CENESAS RX62T Three Shunt Sensorless Vector Control of PMSM 1 Overview Recent years have seen rapid development and wide applications of microcontrollers in embedded control system such as motor control and 32 bit floating point units FPU have also been adopted in the high end motor control applications The floating point architecture improves performance simplifies programming and enables more sophisticated motor control algorithms for advanced capabilities The Renesas RX MCU is a high performance and low cost 32 bit 1OOMHz 165DMIPS microcontroller It supports the IEEE 754 standard format for single precision 32 bit floating point data The hardware FPU integrated in the RX core offloads the RX CPU and simplifies decimal point calculations boosting overall processing performance and simplifying firmware development For the developers of the RX62T based motor control applications the RX62T evaluation kit provides a complete development platform with all of the hardware and softwar
46. troller based controller as shown in Figure 1 The board has the following features SCS hS A complete 3 phase inverter on board with a low voltage motor 24V external power supply to provide DC bus voltage 15V and 5V power supply Power devices use Renesas low voltage MOSFETs Power rate up to 120 watts Supports three shunt and single shunt current measurements Easily change jumpers from the external amplifiers to the internal PGA USB communication with the PC via a H8S2212 MCU GUI to both modify the motor and control parameters and tune the speed and position control Connectors for Hall sensors and encoder connections LCD to monitor the operation status Supports the standalone mode set by potentiometer and push buttons Supports the second motor drive signals and connector for another motor control power stage SCS 2S SCS hS SCS 2S SCS 2S SCS 2S SCS hS SCS 2S SCS hS SCS hS SCS hS SCS hS Encoder Hall Sensor _Motor _ A ne af E pal ae Pi k TEPA nggi l md Renesas MOSFETs y HEREN STATE be SS eee japi 2AP of Pewi _ Je PUP ama Second Motor Co A gs 4 nd lotor Cogras l TRAE LE a yo Connector se re LOJ R i fto f f DAAD 5 S h lt 2 ent d p H i Sag Ae f ee ER Pot haoo py e d j gt fu re 5 ERA ZS a P rd Emulator i FO re s TET ae F 7 zak ser t ore ee ae Oe ee agi gt a Wer sad
47. true true Torque Cur Alarm Code YALID Jul 30 2014 R01AN0903EU0201 Rev 2 01 Page 17 of 31 RX62T Three Shunt Sensorless Vector Control of PMSM Demonstration Guide 8 3 Introduction to the Demonstration Guide The purpose of this Demonstration Guide is to help users get up and running quickly with the RX62T motor control kit YMCRPRX62T The RX62T Microcontroller is pre programmed to run Three shunt Sensorless Vector Control with External Amplifier If the demo board has been programmed with a different demo algorithm reprogram the board via the El programmer debugger to demonstrate the Three Shunt Sensorless Vector Control of PMSM Later sections will explain how to 1 setup the demo board 2 build and debug the demo project with e studio and 3 run the GUI application The user needs to connect the motor and the power supply to experience the efficient motor control capabilities of the Renesas RX62T microcontroller Caution Do not connect power to the board until all instructions are followed The Demo contains the following items RX62T Motor Control Evaluation Board YMCRPRX62T One BLDC motor with a 3 way Molex connector and encoder cable 24V DC power supply E1 debugger Mini USB cable CD ROM for motor firmware and application GUI 8 4 Demo Board Setup Figure 16 a shows the board with the motor connected to J8 and the power supply to J3 There are four push buttons a thum
48. wn in Figure 24 Step 3 In Figure 25 under the Main tab in Debug Configurations Select the Single Shunt Sensorless Vector Control EvaKit_ Rx62T SVC_1Shunt as the Project and verify the Build Configuration tab is selected as Debug and the Use workspace settings is selected RO1ANO903EU0201 Rev 2 01 Page 23 of 31 Jul 30 2014 2CENESAS RX62T Step 4 Step 5 Step 6 Step 7 Three Shunt Sensorless Vector Control of PMSM Create manage and run configurations Name EvaKit_Rx62T_SVC_3Shunt x B Main gt Debugger Startup Ey Source Common E Debug only E GDB Hardware Debugging E7 GDB Simulator Debugging SH RL78 RH850 Debug Evakit_Rx62T_SVC_3Shunt x p a GHS Local C C Launch Variables Search Project Browse i gt Renesas GDB Hardware Attach r E7 Renesas GDB Hardware Debugging Project E7 EvaKit_Rx62T_SVC_3Shunt x Evakit_Rx62T_SVC_3Shunt Browse Renesas Simulator Debugging RX only Build if required before launching C C Application Build configuration Debug bi J Select configuration using C C Application Enable auto build Disable auto build Use workspace settings Configure Wo ce Settings Filter matched 8 of 13 items GA Figure 25 Debug Configuration Main Dialog Box Select the Debugger tab as shown in Figure 26 Select the

Download Pdf Manuals

image

Related Search

Related Contents

la note du 5 mars 2013  Forum, mode d`emploi 316 - Mairie de Vitry-sur  Manuale istruzioni (italiano - english)  Leadinginn。vati。n))> 東芝白熱灯器具取扱説明書 イ呆管用`  QBiC X1 / D1      User's Guide Series A.6  Samsung OL46B Manual de Usuario  ODYS Pulse  

Copyright © All rights reserved.
Failed to retrieve file