background image

RX62T                                                                                   YROTATE-IT-RX62T Motor Control Kit 

 

UM-YROTATE-IT-RX62T  Rev.1.00 

                                                                               Page 14 of 51 

Jan 15, 2014 

 

 

8. Connection with a 1.5KW external power stage 

 

The  interface  for  an  external  power  supply  was  designed  to  be  compatible  with  the  power  stages  of  previous 
Renesas motor control platforms MCRP05/06.  

So it becomes possible to use the same power stage and connect any Motor Control board using RX62T, RL78/G14 or 
RX220 microcontroller families. 

The schematics of a 1.5KW power stage are included into the documentation on the CD-ROM delivered with the Kit. 

Please find below the details to connect the power stage to the RX62T motor control kit. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The power supply of 24V

DC

 is delivered by the 1.5KW power board (on the left hand side).  It’s directly connected to 

the RX62T control board thanks to the Jumper 

JP5

 (on the right hand side).  

The pin 1 and 2 of the jumper 

JP5

 are short-circuited, while the pin 3 and 4 are left open.  

In the microcontroller board, the supply configuration jumper 

JP2

 is configured in order to select the external supply 

(not the USB one).  

In the power stage board, a DC bus connector allows the user to provide a higher external DC voltage; in such way 
high voltage motors can be managed. 

 

POWER SUPPLY CONNECTOR

 

DC BUS CONNECTOR

 

MOTOR CONNECTOR

 

J12

 

J13

 

J11

 

JP5 

JP2 

Summary of Contents for YROTATE-IT-RX62T

Page 1: ...measurement is done via three shunts which offers a low cost solution avoiding the need for an expensive current sensor A single shunt current reading method is also available The powerful user friendly PC Graphical User Interface GUI gives real time access to key motor performance parameters and provides a unique motor auto tuning facility The hardware is designed for easy access to key system te...

Page 2: ... stage 14 9 Control microcontroller overview 15 10 Permanent magnets AC Brushless motor model 17 11 Sensorless Field Oriented Control Algorithm 22 12 Flux Feedback Gain 23 13 Software description 24 14 Application customization using customize h file 28 15 Start up procedure 30 16 Reference system transformations in details 32 17 PWM modulation technique 33 18 PC Graphical User Interface 34 19 Mot...

Page 3: ...RX62T YROTATE IT RX62T Motor Control Kit UM YROTATE IT RX62T Rev 1 00 Page 3 of 51 Jan 15 2014 1 Key features ...

Page 4: ...cludes A complete 3 phase inverter on board with a low voltage motor so it becomes easy to test the powerful sensorless algorithm on the RX62T USB communication with the PC via a H8S2212 microcontroller Connectors for hall sensors and encoder connections Compatibility with the existing Motor Control Reference Platforms MCRP05 06 power stage available at Renesas To achieve these aims an independent...

Page 5: ...ded realizing a step up converter to obtain the inverter VBUS necessary for the motor obviously if this feature is used the system is no more insulated from the PC If external power supply is used for the inverter the logic power supply is obtained through a step down converter in order to reduce heating and power consumption Please refer to the electrical drawings or schematics to get the hardwar...

Page 6: ...re between 12VDC and 24VDC In this case the communication stage is insulated from the inverter The selection between the two possibilities is made through three jumpers in the J2 connector as described in the following figure The first jumper configuration connects the USB ground to the inverter ground the USB 5Vdc to the logic 5Vdc and the output of the step up converter around 13Vdc to the inver...

Page 7: ...gging Several specific test points are available on the board to visualize with the oscilloscope the behavior of some internal analog signals it is very useful during the tuning process for adapting the software to a new motor to use the test points There are specific 3 PWM debug test points TP5 TP6 TP7 as shown below ...

Page 8: ... that the USB port is supplied and by consequence all the communication section DL7 is connected to the step down converter output and it is on only if an external power supply is connected DL9 is connected to the logic supply so it indicates that the control section is supplied The other LEDs in the board are driven via software in particular DL6 is blinking if there is a communication between th...

Page 9: ... are the Renesas RJK0654DPB n channel power MOSFETs please refer to the data sheet for the characteristics On the upper side of the board is mounted the MOSFETs driving circuit composed with discrete elements refer to the electric drawings The current reading shunts are also in the bottom side of the board while the signal conditioning circuit is in the upper side The inverter has the classical sc...

Page 10: ...o 3 phase Brushless AC motors at the same time Please find below the schematics of the connectors present in the board used for connecting an external power stage 5V 1 3 2 4 VBUS EXT CONN J12 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 JUMPER JP5 CONN J11 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 MTIOC3D UP53 PHASE U LOWER PWM DRIVE SIGNAL MTIOC4C UP52 PHASE V LOWER PWM DRIVE SIGNAL MTIOC4D UP51 PHASE W L...

Page 11: ...nnected to the board ground to minimize the cross talking of the lines if a flat cable is used b A 26 pins connector J13 is used to collect some signals from the power stage in particular the current readings and the DC link voltage reading those signals are clamped and weakly filtered then directly connected to the A D converter input pins of the microcontroller so the external power stage has to...

Page 12: ...und connection is always on and it represents the reference for all the interface signals In the next figure a simple example regarding how the power board has to be arranged is presented the power supply comes from the supply connector and the supply for power module is derived from it The external supply is also used to supply the microcontroller board through the connector J12A and the jumper J...

Page 13: ...RX62T YROTATE IT RX62T Motor Control Kit UM YROTATE IT RX62T Rev 1 00 Page 13 of 51 Jan 15 2014 ...

Page 14: ... with the Kit Please find below the details to connect the power stage to the RX62T motor control kit The power supply of 24VDC is delivered by the 1 5KW power board on the left hand side It s directly connected to the RX62T control board thanks to the Jumper JP5 on the right hand side The pin 1 and 2 of the jumper JP5 are short circuited while the pin 3 and 4 are left open In the microcontroller ...

Page 15: ...l peripheral interface LIN module 12 bit A D converters with three channel simultaneous sampling function and 10 bit A D converter are incorporated as peripheral functions which are essential to motor control devices In addition the 12 bit A D converters include a window comparator and programmable gain amplifier for additional functionality Please find below the summary of the RX62T features RX60...

Page 16: ...C x 12ch RCAN x 1ch POR LVD OCO Low speed CRC RX CPU 100MHz 2 7 3 6V 4 0 5 5V FPU Flash Data Flash 8KB RAM Multiplier divider and multiplier accumulator Protection External input POE Clock stop detection Clock monitoring 3ph PWM with dead time Use two 16 bit timer ch3 4 1 or 2 Encoder Input Use 1or2 16 bit timer ch1 2 Hall sensor BEMF Input Use one 16 bit timer ch0 Dead time compensation Use one 1...

Page 17: ...tor The working principle is quite simple if we supply the motor with a three phase system of sinusoidal voltages at constant frequency in the stator windings flow sinusoidal currents which create a rotating magnetic field The permanent magnets in the rotor tend to stay aligned with the rotating field so the rotor rotates at synchronous speed The main challenge in driving this type of motor is to ...

Page 18: ... the rotor This magnetic field can be represented by vector Λm whose position in respect to the stator is determined by the angle ϑ between the vector direction and the stator reference frame The contribution of the permanent magnets in the flux linkages depends on the relative position of the rotor and the stator represented by the mechanical electric angle ϑ It is in every axis the projection of...

Page 19: ...thematical representation in a new reference coordinates system In the two phases α β fixed system the above equations become dt d i R v dt d i R v S S β β β α α α λ λ For the magnetic field equations we got sin cos ϑ λ λ ϑ λ λ β β β β α α α α m m m m Li Li Li Li Λ Λ After performing the derivation m m m m dt di L dt di L dt d dt di L dt di L dt d α β β β β α α α ωλ ϑ ω λ ωλ ϑ ω λ Λ Λ cos sin Fina...

Page 20: ...rents in the d q system must impose voltages given from the formulas above This is ensured by closed loop PI control on both axis d q Proportional Integral Since there is a mutual influence between the two axes decoupling terms can be used In the block scheme the mechanic part is included where p is the number of pole pairs while B represents friction J the inertia τload the load torque and τ the ...

Page 21: ...cos If the synchronous inductance L is small the current terms can be neglected if not they have to be considered In general β β β β β β α α α α α α λ λ ϑ λ λ ϑ Li dt i R v Li y Li dt i R v Li x S t m S t m Λ Λ sin cos 0 0 0 0 So in the α β system phase we obtain from the flux components arctan y x ϑ The system speed ω can be obtained as the derivative of the angle ϑ t dt d ϑ ω Based on this a sen...

Page 22: ...fference between the three shunts configuration and the single shunt one is in the Current Reading block the rest of the algorithm remains the same z 1 z 1 z 1 z 1 0 Idref Id PI Iq PI Speed PI ωref Speed estimation Flux Phase estimation PWM Modulation u v w α β α β d q d q α β α β u v w Motor Current Reading z 1 z 1 Vd Vq Iα α α αmea Iβ β β βmea Iumea Ivmea Idmea Iqmea ϑ ϑ ϑ ϑest ω ω ω ωest Iqref ...

Page 23: ...ith a signal obtained modulating accordingly with the estimated phase the error between the estimated flux amplitude and the amplitude of the permanent magnets flux The gain of this correction is indicated with G and it is this feedback which avoids the integral divergence due to the errors offsets and so on The higher G is the higher is the correspondence between the estimated amplitude and the t...

Page 24: ...lass of algorithm This allows the user to realize virtually what he wants in addition The total software uses the following resources 1 FLASH 18Kbytes 2 RAM 3Kbytes Please note that these data include also the communication interface and the reference board management The following flowcharts show the software implementation of the motor control part of the software 100µ µ µ µs Interrupt Interrupt...

Page 25: ...ameters upload A D channels offset reading Peripherals initialization Variables initialization cnt_int 0 NO YES cnt_int NUM_INT Main loop synchronization Main loop body Speed ramp management Communication management General board management Parameters modification management Main Program Interrupt enabling ...

Page 26: ...t PWM output commands generation using vuout vvout vbus is used to calculate maximum phase voltage used in current PI controls Phase estimation based on old_vaout old_vbout iamea ibmea produces new estimated phase angle ϑest Voltage memories update old_vaout vaout old_vbout vbout Speed estimation produces ωest Estimation errors detection if errors an alarm is produced Start up in progress NO YES i...

Page 27: ... file customize h where all the motor parameters are located 2 File name MCRP07_RX62T_extPS_v7 zip has to be used with an external power stage e g 1 5KW as the embedded software is using other channels of the Motor control timer In the software driving the power stage the customize h file contains the parameters of the motor called MB057GA240 Please find below a snapshot of the header file customi...

Page 28: ...se find below snapshot of the file customize h which contents many interesting options and details about the RX62T embedded software Feel free to modify it and recompile the source code in order to use the new values The customize h is a file containing some macros used to specify important program parameters The most important of them are listed below ...

Page 29: ...RX62T YROTATE IT RX62T Motor Control Kit UM YROTATE IT RX62T Rev 1 00 Page 29 of 51 Jan 15 2014 ...

Page 30: ...nd the speedref are maintained to zero idref is increased with a ramp till the value istart is reached at the moment t1 The references are referred to an arbitrary da qa system based on the arbitrary phase ϑa From this moment the phase estimation algorithm begins to be performed and the estimated phase ϑest is used to calculate the components of the measured current referred to the d q system base...

Page 31: ...eference system change is performed from the arbitrary da qa reference to the d q reference based on the estimated phase ϑest The current references are changed to the values id0 and iq0 and all the PI controllers are initialized with these new values The speed PI integral memory is initialized with the value iq0 while the current PI integral memories are initialized with the analogous voltage val...

Page 32: ...s 2 3 1 3 1 2 3 2 3 3 2 2 1 2 1 3 2 v u w v w v a w v u g g g g g g g g g g g g β α u v w α β 2 3 2 3 2 1 2 3 2 3 2 1 β α β α β α β α α g g g g g g g g g g g g w v u α β u v w cos sin sin cos ϑ ϑ ϑ ϑ β α β α g g g g g g q d α β d q cos sin sin cos ϑ ϑ ϑ ϑ β α q d q d g g g g g g d q α β 3 4 cos 3 2 cos cos 0 0 0 π ϕ ω π ϕ ω ϕ ω t V v t V v t V v w v u sin cos 0 0 ϕ ω ϕ ω β α t V v t V v sin cos 0 ...

Page 33: ...the upper arm always off The method is based on the fact that having no neutral connection we are interested only in phase to phase voltages or in the voltage differences between the phases not in the voltage level of the single phases This allows us to add or subtract an arbitrary quantity to the phase voltages on condition that this quantity is the same for all the three phases So obtained from ...

Page 34: ...value The LED DL4 is quickly blinking on the main board to indicate that an alarm is set The maximum and minimum values are specified in the two constants tables called par_max par_min in the ges_eqp h header file Another root cause for the alarm 1 is the EEPROM hardware failure when the error is accessed in read or write mode When this alarm is active the access to the EEPROM is restricted To res...

Page 35: ...the software by TRIP_ALL This alarm is produced when the sensorless position detection algorithm is producing inconsistent results It means that the rotor position is unknown due to a lack of accuracy so the motor is stopped The LED DL4 is quickly blinking on the main board to indicate that an alarm is set This alarm can be reset by setting the speed reference to zero on the PC GUI Please find bel...

Page 36: ... In terms of AC Brushless motor driven in sinusoidal mode and FOC algorithm the most important parameters to tune are 1 Current PI parameters Propotional Kp and Integral Ki 2 Motor parameters Stator resistance Rs the synchronous inductance Ls and the Permanent Magnet flux Λm Let s tune step by step a real low voltage PMSM motor using the internal power stage with Mosfets a The BLAC Motor selected ...

Page 37: ...b Let s setup the Motor control kit for 24V external power supply the jumper JP2 needs to be set to 2 3 position c Let s connect the 24VDC Power supply to the RX62T motor control reference kit d Now connect the USB cable to the PC and the Kit and connect the 24V to the kit and the motor to the kit ...

Page 38: ...2T kit On the left hand side the new buttons appears Cu PI tuning Cu PI tuning AUTO Motor Identification and Oscilloscope f Set the maximum current parameter n 07 as it will influence all the next steps Click on Parameters settings Enter the value 3500 the unit is in mA and click on Write to save the parameter into the EEPROM And close the window g Click now on Cu PI tuning AUTO button and press s...

Page 39: ...lick on the button Cu PI tuning to open the manual current PI tuning window and check the step answer by clicking on Apply current step button Depending on the motor the parameters found by the automatic procedure can be too fast or too slow Please use the Zoom function to check the beginning of the step ...

Page 40: ...e closed as the proportional and integral coefficients of the PI current are tuned i Perform an auto identification of the motor parameters by clicking on Motor Identification and click start And accept the results to store them into the EEPROM The stator resistance the synchronous inductance and the Permanent Magnet flux have been measured and tuned j Now please click on parameters settings and e...

Page 41: ...equal to 25 of the maximum current In our case 25 of 3 5A is 0 875A Please enter the value 875 into the parameter n 6 and click on the write button on the left Let s close the window l Please click on the button Speed Control To start the motor let s enter a speed which is 1 5 times the minimum speed in this case 1500 RPM ...

Page 42: ...n the Oscilloscope button to see the motor waveforms with the current in Y axis and the time in x axis You can also display the phase by clicking on Phase selector For the oscilloscope window use an opportune time scale 1 sample every 1 should be used for extremely fast phenomena when running at very high speed ...

Page 43: ...n order to see some periods of the current or the phase When the motor is running you can adjust the speed PI parameters Please follow the procedure while running at a medium speed range 2 times the minimum speed In our example the speed is set to 2000 RPM Start by increasing the Parameter n 13 Kp until the instability that can be display in the current or phase waveform window Add a step of 50 an...

Page 44: ...75 in our case click on write and set the speed to 2000 RPM Do the same for the parameter n 14 which is the speed loop Ki parameter Increase it until it becomes unstable In our case the critical value is reached at 2800 for Ki so the value to be used is 1400 n Test now all the speed ranges and different rotation o Finally the parameters list can be saved in a file in CSV format for further used an...

Page 45: ...sed frequency the number of pole pairs n is n freq 60 speed if you change the number of pole pairs remember to adjust also the minimum and maximum speed values Sometimes the no load start up is easier if the inductance parameter is set to 0 All the procedure is tuned to manage motors which maximum current is close to the inverter capability which is around 6Arms for the external power stage shunt ...

Page 46: ...peed in RPM 3000 3500 12000 12000 5000 13000 Polar Couples 2 2 2 2 2 2 Startup Current in Apk 1000 1000 1000 1000 1000 875 200 Maximum Current Apk 1000 6000 3000 3000 3000 3500 400 Stator Resistance in Ohm 100 38 125 45 30 63 220 Synchronous inductance in Henry 10000 6 12 5 3 17 25 Permanent Magnets Flux in Weber 10000 178 333 42 52 264 30 Current PI Prop Coefficient Kp 18 73 4 10 80 30 Current PI...

Page 47: ...ere Volt is obtained ex iu kadi iuad ium_off r_sta float Stator resistance ohm l_sync float Synchronous inductance henry c_poli float Number of polar couples krpmocp ukrpmocp float Conversion constant between mechanical speed and electrical speed and its reciprocal ukrpmocp 1 krpmocp rad s rpm rpm rad s vstart float Startup voltage in single shunt operation during startup first a voltage ramp at z...

Page 48: ...lue used for voltage clamping volt vfmax float Maximum allowed phase voltage star volt vdmax vdmax float Maximum d and q axis allowed voltages i_max iq_max float Max allowed total current maximum allowed q axis current ampere vdc vqc vdcf vqcf float D and q axis imposed voltages instant and filtered values volt vac vbc float Alpha and beta axis voltages volt vuc vvc vwc float Phase voltages star v...

Page 49: ...eed_trip float Minimum and maximum electrical speed values used for estimation error detection rad s Speed_est float Estimated electrical speed rad s omrif f_omrif float Reference electrical speed instant and filtered values rad s omegae omegae_f omf float Imposed electrical speed instant and filtered values rad s maxerr float Maximum electrical speed error rad s vbus_ulpkt_slow vbus_ulpkt_fast fl...

Page 50: ...od MTU pulses semiperdead unsigned short PWM half period plus dead time MTU pulses cr_ss unsigned short Status variable for single shunt current reading trip_cnt unsigned short Counter for estimation error detection startup_cnt unsigned short Counter for startup startup_val unsigned short Startup time N of sampling periods stp_tim unsigned short Startup time ms XXXXXX_ep unsigned short Many variab...

Page 51: ... RX62T Rev 1 00 Page 51 of 51 Jan 15 2014 Label s Type Description Unit tele_ang float Corrected electrical position rad om_mec float Mechanical angular speed rad s om_eme float Electro mechanical angular speed rad s enc_buf float Encoder filter buffer rad ...

Page 52: ...Revision History Rev Date Description Page Summary 1 00 Jan 15 2014 First Edition ...

Page 53: ...nction are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified 3 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 ac...

Page 54: ...he 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 9 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...

Reviews: