background image

 

 

 

Notice

1.

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.

2.

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.

3.

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.

4.

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.

5.

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 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.

6.

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.

7.

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.

8.

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.

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 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.

10. It is 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.

http://www.renesas.com

Refer to "http://www.renesas.com/" for the latest and detailed information.

Renesas Electronics America Inc.

2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.
Tel:  +1-408-588-6000, Fax: +1-408-588-6130

Renesas Electronics Canada Limited

9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3
Tel: +1-905-237-2004

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-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2265-6688, Fax: +852 2886-9022

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 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510

Renesas Electronics India Pvt. Ltd.

No.777C, 100 Feet Road, HAL

II

 Stage, Indiranagar, Bangalore, India

Tel: +91-80-67208700, Fax: +91-80-67208777

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

SALES OFFICES

© 2017 Renesas Electronics Corporation. All rights reserved.

Colophon 5.0

Содержание rl78/g1g

Страница 1: ...ice Operations of the control programs have been checked by using the following device RL78 G1G R5F11EBAAFP Target control programs The target control programs of this application note are as follows...

Страница 2: ...ontrol of 120 degree conducting controlled permanent magnetic synchronous motor Implementation R01AN3582EJ0100 Rev 1 00 Page 2 of 46 Jan 13 2017 Contents 1 Overview 3 2 System overview 7 3 Description...

Страница 3: ...explained in this application note Table 1 1 Development Environment H W Microcontroller Evaluation board Motor RL78 G1G R5F11EBAAFP 24V inverter board Note 1 and RL78 G1G CPU Card Note 2 TSUKASA Note...

Страница 4: ...and RL78 G1G CPU Card should be modified per below explanations 1 2 1 Modification of the VR1 input port 1 Remove R8 R15 C9 2 Connect CPU side of R7 and CPU side of R8 Figure 1 1 Modification of the C...

Страница 5: ...e overcurrent detection method is changed to PGA CMP0 CMP1 from default INTP0 the 24V Inverter Board and RL78 G1G CPU Card should be modified per below explanations 1 Modification of the 24V Inverter...

Страница 6: ...r circuit of comparator input 1 Mount 0 Ohms on R16 2 Change resister R10 from 100 Ohms to 1k Ohms 3 Change capacitor C11 from 100pF to 470pF Figure 1 5 Modification of the CPU Card Figure 1 6 Modific...

Страница 7: ...ter circuit DC 24V input Up Vp Wp Un Vn Wn TRD output P15 TRDIOB0 Up P13 TRDIOA1 Vp P12 TRDIOB1 Wp P14 TRDIOD0 Un P11 TRDIOC1 Vn P10 TRDIOD1 Wn Vu Vv Vw Over current detection input P01 PGAI HV port H...

Страница 8: ...troller of this system Table 2 2 Port Interface R5F11EBAAFP Port name Function P23 ANI3 Inverter bus voltage measurement P01 PGAI Shunt current input for over current detection use PGA CMP0 CMP1 Note1...

Страница 9: ...d command value input U phase voltage Vu V phase voltage Vv W phase voltage Vw and inverter bus voltage Vdc are measured by using the 10 bit A D converter The operation mode is set as below The channe...

Страница 10: ...nt magnetic synchronous motor Implementation R01AN3582EJ0100 Rev 1 00 Page 10 of 46 Jan 13 2017 6 Programmable Gain Amp PGA PGA is used to detect overcurrent with CMP0 CMP1 when selected 7 External in...

Страница 11: ..._rl78g1g_mrssk h RL78 G1G and board dependent processing part header mtr_feedback h Feedback control processing part header mtr_gmc h General motor control function part header mtr_driver_access h Dri...

Страница 12: ...name Application layer main c Motor control layer mtr_spm_less_120 c mtr_feedback c mtr_gmc c mtr_filter c mtr_driver_access c mtr_interrupt c Note H W control layer mtr_ctrl_rl78g1g_mrssk c mtr_ctrl...

Страница 13: ...induced voltage with A D converters by 60 degrees Input voltage DC24 V Main clock frequency CPU clock fCLK 24 MHz TRD clock fHOCO 48 MHz Carrier frequency PWM 20 kHz Dead time 2 s Control cycle Speed...

Страница 14: ...eed command value as shown below The maximum of the command value is set as the value from which maximum rotational speed is generated by the resolution of the A D converter Table 3 1 Conversion Ratio...

Страница 15: ...ning Pattern created from U phase induced voltage 2p Timer counter Check Check Check Check Check Check Check Counter value difference Motor rotational speed rad s 2 frequency of timer difference of ti...

Страница 16: ...0 Figure 3 2 PWM Control Modulation factor m is defined as follows E V m This modulation factor is reflected in the setting value of the register that determines the PWM duty In the target control pro...

Страница 17: ...ss Speed control of 120 degree conducting controlled permanent magnetic synchronous motor Implementation R01AN3582EJ0100 Rev 1 00 Page 17 of 46 Jan 13 2017 U V W U V W Figure 3 4 Complimentary first 6...

Страница 18: ...180 WIDE 120 INACTIVE ACTIVE ERROR RESET SYSTEM MODE INACTIVE ACTIVE ERROR INACTIVE INACTIVE INACTIVE ACTIVE ERROR ERROR ERROR ERROR ERROR INACTIVE ACTIVE ERROR MTR_V_PI_OUTPUT g_u2_state_voltage_ref...

Страница 19: ...caught without enough speed Therefore as a start up method there is a method to lead the synchronous speed by generating a rotating magnetic field by forcibly switching conduction patterns regardless...

Страница 20: ...e setting Channel PGA Gain CMP1 2 A CMP1 120 PGA out 4 is selected CMP0 2 A CMP0 83 Overvoltage error The inverter bus voltage is monitored at the overvoltage monitoring cycle When an over voltage is...

Страница 21: ...stem Protection Function Error name Threshold Overcurrent error Note Overcurrent limit A 2 0 Overvoltage error Overvoltage limit V 28 Monitoring cycle ms 1 Low voltage error Under voltage limit V 15 M...

Страница 22: ...n and event execution function call Main process User interface call Watchdog timer clear function call board_ui Input None Output None Motor status change Determination of rotational speed command va...

Страница 23: ...0 1 and PGA clear_wdt Input None Output None Clear the watchdog timer WDT mtr_clear_oc_flag Input None Output None Clear the high impedance state mtr_clear_trd0_imfa Input None Output None Clear the C...

Страница 24: ...Input uint8 u1_dir rotation direction Output None Set the rotation direction R_MTR_GetSpeed Input None Output uint16 u2_speed_rpm rotational speed Obtain the calculated rotational speed R_MTR_GetDir...

Страница 25: ...or happens Check low voltage error mtr_check_over_speed_error Input uint16 u2_speed_rad rotational speed uint16 u2_speed_limit speed limit Output uint16 u2_temp0 over speed error flag when error happe...

Страница 26: ...rror event Changing the motor status Set the flag of error about overcurrent mtr_oc_cmp1_interrupt Input None Output None Overcurrent detection process CMP1 interrupt Disable CMP0 CMP1 interrupt servi...

Страница 27: ...state motor status Output uint8 u1_state motor status Global variables initialization mtr_act_error Input uint8 u1_state motor status Output uint8 u1_state motor status Call motor control stop functio...

Страница 28: ...None Set the conduction pattern at draw in the rotor mtr_set_angle_shift Input None Output None Calculate the counts for phase shift based on the detection of zero cross mtr_check_pattern Input None O...

Страница 29: ...minimum value for motor stop Mechanical angle rpm g_u2_ref_speed_rpm uint16 User setting rotational speed Mechanical angle rpm g_u1_rot_dir uint8 User setting rotation direction 0 CW 1 CCW g_u1_motor...

Страница 30: ...tive mode 0x01 Active mode 0x02 Error mode g_u1_state_v_offset uint8 State management of voltage offset process 0x00 None 0x01 Measure with PWM off 0x02 Measure with PWM on 0x03 Finish measurement Ref...

Страница 31: ...open loop Mechanical angle rpm g_s2_ol_mode1_change_rpm int16 Change speed of open loop mode1 Mechanical angle rpm g_s2_ol_mode2_change_rpm int16 Change speed of open loop mode2 Mechanical angle rpm g...

Страница 32: ...interruption counter value g_u1_v_pattern_num uint8 Control number for forced conduction pattern at open loop g_u1_v_pattern_open 2 7 uint8 Array of forced conduction patterns at open loop g_u2_offse...

Страница 33: ...less 120 degree conducting control software structure Lists of structure used in this control program are given below Table 3 21 List of structure Structure Member Type Scale Content Remarks MTR_PI_CT...

Страница 34: ...oltage at draw in ms CP_MAX_SPEED_RPM 2650 Maximum of rotational speed command Mechanical angle rpm CP_MIN_SPEED_RPM 1200 Minimum of rotational speed command Mechanical angle rpm CP_LIMIT_SPEED_CHANGE...

Страница 35: ...PM Speed to change open loop mode1 Mechanical angle rpm OL_MODE2_CHANGE_RPM CP_OL_MODE2_CHANGE_RPM Speed to change open loop mode2 Mechanical angle rpm OL_START_REFV int16 CP_OL_START_REFV Voltage ref...

Страница 36: ...setting value MTR_HALF_CARRIER_SET MTR_CARRIER_SET 2 Half of MTR_CARRIER_SET MTR_NDT_CARRIER_SET MTR_CARRIER_SET MTR_DEADTIME_SET MTR_PORT_UP CA P1 5 CC RL P1_bit no5 U phase positive phase output por...

Страница 37: ..._ADCCH_VR1 0 A D Converter channel of VR1 MTR_ADCCH_VDC 3 A D Converter channel of inverter bus voltage MTR_ADCCH_VU 17 A D Converter channel of U phase voltage MTR_ADCCH_VV 18 A D Converter channel o...

Страница 38: ...s scale Q3 MTR_CNT_START_CALC 30 Wait speed measurement still zero cross is detected become this counts MTR_SPEED_LPF_K int16 CP_SPEED_LPF_K Speed LPF parameter MTR_LIMIT_SPEED_CHANGE CP_LIMIT_SPEED_...

Страница 39: ..._OL_MODE1_CHANGE_RPM Frequency to change open loop mode1 Hz MTR_OL_MODE2_CHANGE_FREQ int16 MTR_OL_FREQ_CALC MTR_POLE_PAI RS MTR_OL_MODE2_CHANGE_RPM Frequency to change open loop mode2 Hz MTR_PATTERN_C...

Страница 40: ...LG_CLR 0 Constant for flag management MTR_FLG_SET 1 MTR_MODE_INACTIVE 0x00 Inactive mode MTR_MODE_ACTIVE 0x01 Active mode MTR_MODE_ERROR 0x02 Error mode MTR_SIZE_STATE 3 State size MTR_EVENT_INACTIVE...

Страница 41: ...r MTR_ERROR_UNKNOWN 0xff Unknown error MTR_DRAW_IN_NONE 0 initial state not work MTR_DRAW_IN_1ST 1 draw in the 1st initial position MTR_DRAW_IN_2ND 2 draw in the 2nd initial position MTR_DRAW_IN_FINIS...

Страница 42: ...Figure 3 7 Main Process Flowchart Main process Initialization of peripheral functions Initialization of user interface Initialization of variables used in the main process Initialization of sequence p...

Страница 43: ...t Get inverter bus voltage value Measure the voltage of three phase Cancel voltage offset SYSTEM MODE speed reference PI control Commutation with pseudo Hall pattern Detect zero cross End INACTIVE ACT...

Страница 44: ...ing DRIVE MODE BOOT MODE Calculate speed reference Calculate voltage reference Set PWM duty Set conduction pattern to draw in the rotor Finish draw in Go to DRIVE MODE Go to BOOT MODE Finish offset pr...

Страница 45: ...ure 3 10 Overcurrent detection process Hardware detection Figure 3 11 Overcurrent detection process PGA CMP0 1 interrupt Overcurrent detection interrupt Hardware End Generate error event Disable INTP0...

Страница 46: ...netic synchronous motor Implementation R01AN3582EJ0100 Rev 1 00 Page 46 of 46 Jan 13 2017 Website and Support Renesas Electronics Website http www renesas com Inquiries http www renesas com contact Al...

Страница 47: ...Revision History Rev Date Description Page Summary 1 00 Jan 13 2017 First edition issued...

Страница 48: ...p 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 3 Prohibition of Access to Reserved Addresse...

Страница 49: ...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 8 Please contac...

Отзывы: