
RL78/G1G Sensorless Speed control of 120-degree conducting controlled permanent magnetic synchronous motor (Implementation)
R01AN3582EJ0100 Rev.1.00
Page 34 of 46
Jan 13, 2017
3.5
Macro definitions of sensorless 120-degree conducting control software
Lists of macro definitions used in this control program are given below.
Table 3-22 List of Macro definitions
“motor_parameter.h”
File name
Macro name
Definition value
Remarks
motor_parameter.h
MP_POLE_PAIRS
2
Number of pole pairs
MP_MAGNETIC_FLUX
0.02159f
Flux [Wb] (not used)
MP_RESISTANCE
6.447f
Resistance [Ω] (not used)
MP_D_INDUCTANCE
0.0045f
d-axis Inductance [H] (not used)
MP_Q_INDUCTANCE
0.0045f
q-axis Inductance [H] (not used)
Table 3-23 List of Macro definitions
“control_parameter.h”
File name
Macro name
Definition value
Remarks
control_parameter.h
CP_OFFSET_CALC_TIME
10000
Counts for measurement of voltage offset
CP_BOOT_REF_V
5.0f * 0x80
Voltage reference at draw-in [V]
CP_V_UP_TIME
250
Time to increase voltage step at draw-in
[ms]
CP_V_CONST_TIME
125
Period of constant voltage 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
0.30f * 0x08
Step to increase speed reference
Electrical angle [rad/s]
CP_OL_START_RPM
185
Speed of open loop at start-up
Mechanical angle [rpm]
CP_OL_MODE1_CHANGE_RPM
400
Speed to change open loop mode1
Mechanical angle [rpm]
CP_OL_MODE2_CHANGE_RPM
600
Speed to change open loop mode2
Mechanical angle [rpm]
CP_OL_START_REFV
5.0f * 0x80
Voltage reference of open loop at start-up
[V]
CP_OL_MODE1_RATE_RPM
8
Increase step of speed at open loop
mode1 [rpm/control period]
CP_OL_MODE2_RATE_REFV
0.01f * 0x80
Increase step of voltage at open loop
mode2 [V]
CP_OL_MODE2_RATE_RPM
6
Increase step of speed at open loop
mode2 [rpm/control period]
CP_OL_MODE3_RATE_REFV
0.01f * 0x80
Increase step of voltage at open loop
mode3 [V]
CP_OL_MODE3_MAX_REFV
5.00f * 0x80
Maximum voltage of open loop [V]
CP_SPEED_PI_KP
0.0200f * 0xFFFF
Proportional gain
CP_SPEED_PI_KI
0.0006f * 0x400000
Integral gain
CP_SPEED_LPF_K
1.0f * 0x40
Speed LPF parameter
MTR_FIRST60
1
Non-Complementary First 60 degree PWM
(default)
MTR_FIRST60_COMP
0
Complementary First 60 degree PWM