RL78/G1G Sensorless Speed control of 120-degree conducting controlled permanent magnetic synchronous motor (Implementation)
R01AN3582EJ0100 Rev.1.00
Page 31 of 46
Jan 13, 2017
Table 3-19 List of variables [3/4]
Variable name
Type
Scale
Content
Remarks
g_u2_ctrl_conf
uint16
-
Control configuration
0x01: Current control
0x02: Speed control
0x04: Position control
0x08: Torque control
0x10: Voltage control
g_u1_cnt_speed_pi
uint8
-
Decimation counter for speed PI control
function call
g_u1_flg_wait_stop
uint8
-
Flag to wait motor rotation stop
0x00: motor stopped
0x01: waiting motor stop
g_u1_flag_charge_cap
uint8
-
Flag of finish capacitor charge
g_u2_ref_speed_rad_ctrl
uint16
Q3
Speed command value
Electrical angle [rad/s]
g_s2_kp_speed
int16
Q16
Speed PI control proportional gain
g_s2_ki_speed
int16
Q22
Speed PI control integral gain
g_s2_lim_v
int16
Q7
Limit
of speed PI control
[V]
g_s4_ilim_v
int32
Q26
Limit for integral part of speed PI control
[V]
g_s2_limit_speed_change
int16
Q3
Increase step of speed command
Electrical angle [rad/s]
g_s2_ol_freq
int16
-
Frequency of open loop
[Hz]
g_u2_cnt_zerocross
uint16
-
Counter to start speed calculation
g_s2_ol_speed_rpm
int16
-
Speed of open loop
Mechanical angle [rpm]
g_u2_cnt_ol_pattern_set
uint16
-
Counter for open loop
g_s2_ol_start_rpm
int16
-
Start speed of 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_s2_ol_start_refv
int16
Q7
Reference voltage of start open loop
[V]
g_s2_ol_mode1_rate_rpm
int16
-
Increase step of speed at open loop mode1
Mechanical angle [rpm]
g_s2_ol_mode2_rate_refv
int16
Q7
Increase step of voltage at open loop mode2
[V]
g_s2_ol_mode2_rate_rpm
int16
-
Increase step of speed at open loop mode2
Mechanical angle [rpm]
g_s2_ol_mode3_rate_refv
int16
Q7
Increase step of voltage at open loop mode3
[V]
g_s2_ol_mode3_max_refv
int16
Q7
Maximum voltage of open loop3
[V]
g_s2_ol_start_freq
int16
-
Start frequency of open loop
[Hz]
g_s2_ol_mode1_change_freq
int16
-
Change frequency of open loop mode1
[Hz]
g_s2_ol_mode2_change_freq
int16
-
Change frequency of open loop mode2
[Hz]
g_u2_cnt_draw_in
uint16
-
Counter for draw-in
g_s2_boot_ref_v
int16
Q7
Voltage reference at draw-in
[V]
g_u2_v_up_time
uint16
-
Time to increase voltage step at draw-in
g_s2_v_up_step
int16
-
Voltage step at draw-in
g_u2_v_const_period
uint16
-
Period of constant voltage at draw-in
[ms]
g_u1_bemf_signal
uint8
-
Pseudo Hall pattern generated
g_u1_pre_bemf_signal
uint8
-
Previous Hall pattern generated
g_u1_v_pattern
uint8
-
Conduction pattern
g_u1_flag_pattern_change
uint8
-
Zero-cross detection flag
g_u2_cnt_timeout
uint16
-
Counter for timeout
g_u1_direction
uint8
-
Rotation direction
CW: 0
CCW: 1
g_u2_motor_pp
uint16
-
Motor pole pairs