You are here

Real RPM=0 but ERPM>0 issue

3 posts / 0 new
Last post
cir7
Offline
Last seen: 5 days 6 hours ago
VESC Free
Joined: 2020-06-06 12:16
Posts: 5
Real RPM=0 but ERPM>0 issue

I have a strange issue with a motor configuration on an ebike. During the test the motor is locked up with a break. Typical behavior of vesc would be to ramp up the duty cycle with increasing current linearly and maintain 0 erpm. Here that is true to some randomly changing point(usually 20-70A), but then the duty jumps to >0.2 and ERPM is at ~4K. It seems that the observer is unstable at higher current, the motor "overtakes" its target position. I think it may be amplified by the high pole count(50) of a motor used(Bafang RM G060.750.DC). Please take a look: https://youtube.com/shorts/wfPDB2AL6fo

 

I tried to lower time constant, change observer gain, increase frequency, different observers from fw 6.0 beta but that seems to have no effect on the problematic behavior.

 

How can I maintain the synchronization? What parameters do I need to adjust?

 

 

 

 

 

Just in case:

<?xml version="1.0" encoding="UTF-8"?>
<MCConfiguration>
    <ConfigVersion>2</ConfigVersion>
    <pwm_mode>1</pwm_mode>
    <comm_mode>0</comm_mode>
    <motor_type>2</motor_type>
    <sensor_mode>0</sensor_mode>
    <l_current_max>95</l_current_max>
    <l_current_min>-9.92</l_current_min>
    <l_in_current_max>60</l_in_current_max>
    <l_in_current_min>-200</l_in_current_min>
    <l_abs_current_max>140</l_abs_current_max>
    <l_min_erpm>-100000</l_min_erpm>
    <l_max_erpm>100000</l_max_erpm>
    <l_erpm_start>0.8</l_erpm_start>
    <l_max_erpm_fbrake>300</l_max_erpm_fbrake>
    <l_max_erpm_fbrake_cc>1500</l_max_erpm_fbrake_cc>
    <l_min_vin>30</l_min_vin>
    <l_max_vin>72</l_max_vin>
    <l_battery_cut_start>47.6</l_battery_cut_start>
    <l_battery_cut_end>42</l_battery_cut_end>
    <l_slow_abs_current>0</l_slow_abs_current>
    <l_temp_fet_start>80</l_temp_fet_start>
    <l_temp_fet_end>95</l_temp_fet_end>
    <l_temp_motor_start>85</l_temp_motor_start>
    <l_temp_motor_end>100</l_temp_motor_end>
    <l_temp_accel_dec>0.15</l_temp_accel_dec>
    <l_min_duty>0.005</l_min_duty>
    <l_max_duty>0.99</l_max_duty>
    <l_watt_max>1.5e+06</l_watt_max>
    <l_watt_min>-1.5e+06</l_watt_min>
    <l_current_max_scale>1</l_current_max_scale>
    <l_current_min_scale>1</l_current_min_scale>
    <l_duty_start>1</l_duty_start>
    <sl_min_erpm>150</sl_min_erpm>
    <sl_min_erpm_cycle_int_limit>1100</sl_min_erpm_cycle_int_limit>
    <sl_max_fullbreak_current_dir_change>10</sl_max_fullbreak_current_dir_change>
    <sl_cycle_int_limit>62</sl_cycle_int_limit>
    <sl_phase_advance_at_br>0.8</sl_phase_advance_at_br>
    <sl_cycle_int_rpm_br>80000</sl_cycle_int_rpm_br>
    <sl_bemf_coupling_k>600</sl_bemf_coupling_k>
    <hall_table__0>-1</hall_table__0>
    <hall_table__1>1</hall_table__1>
    <hall_table__2>3</hall_table__2>
    <hall_table__3>2</hall_table__3>
    <hall_table__4>5</hall_table__4>
    <hall_table__5>6</hall_table__5>
    <hall_table__6>4</hall_table__6>
    <hall_table__7>-1</hall_table__7>
    <hall_sl_erpm>2000</hall_sl_erpm>
    <foc_current_kp>0.0577</foc_current_kp>
    <foc_current_ki>32.98</foc_current_ki>
    <foc_f_zv>30000</foc_f_zv>
    <foc_dt_us>0.12</foc_dt_us>
    <foc_encoder_inverted>0</foc_encoder_inverted>
    <foc_encoder_offset>180</foc_encoder_offset>
    <foc_encoder_ratio>7</foc_encoder_ratio>
    <foc_encoder_sin_gain>1</foc_encoder_sin_gain>
    <foc_encoder_cos_gain>1</foc_encoder_cos_gain>
    <foc_encoder_sin_offset>1.65</foc_encoder_sin_offset>
    <foc_encoder_cos_offset>1.65</foc_encoder_cos_offset>
    <foc_encoder_sincos_filter_constant>0.5</foc_encoder_sincos_filter_constant>
    <foc_sensor_mode>2</foc_sensor_mode>
    <foc_pll_kp>2000</foc_pll_kp>
    <foc_pll_ki>30000</foc_pll_ki>
    <foc_motor_l>5.5e-05</foc_motor_l>
    <foc_motor_ld_lq_diff>1e-05</foc_motor_ld_lq_diff>
    <foc_motor_r>0.039</foc_motor_r>
    <foc_motor_flux_linkage>0.013015</foc_motor_flux_linkage>
    <foc_observer_gain>5.9e+06</foc_observer_gain>
    <foc_observer_gain_slow>0.05</foc_observer_gain_slow>
    <foc_observer_offset>-1</foc_observer_offset>
    <foc_duty_dowmramp_kp>10</foc_duty_dowmramp_kp>
    <foc_duty_dowmramp_ki>200</foc_duty_dowmramp_ki>
    <foc_openloop_rpm>700</foc_openloop_rpm>
    <foc_openloop_rpm_low>0</foc_openloop_rpm_low>
    <foc_d_gain_scale_start>0.9</foc_d_gain_scale_start>
    <foc_d_gain_scale_max_mod>0.2</foc_d_gain_scale_max_mod>
    <foc_sl_openloop_hyst>0.1</foc_sl_openloop_hyst>
    <foc_sl_openloop_time_lock>0</foc_sl_openloop_time_lock>
    <foc_sl_openloop_time_ramp>0.1</foc_sl_openloop_time_ramp>
    <foc_sl_openloop_time>0.05</foc_sl_openloop_time>
    <foc_hall_table__0>255</foc_hall_table__0>
    <foc_hall_table__1>172</foc_hall_table__1>
    <foc_hall_table__2>104</foc_hall_table__2>
    <foc_hall_table__3>138</foc_hall_table__3>
    <foc_hall_table__4>38</foc_hall_table__4>
    <foc_hall_table__5>5</foc_hall_table__5>
    <foc_hall_table__6>71</foc_hall_table__6>
    <foc_hall_table__7>255</foc_hall_table__7>
    <foc_hall_interp_erpm>500</foc_hall_interp_erpm>
    <foc_sl_erpm>4000</foc_sl_erpm>
    <foc_sample_v0_v7>0</foc_sample_v0_v7>
    <foc_sample_high_current>0</foc_sample_high_current>
    <foc_sat_comp>0</foc_sat_comp>
    <foc_temp_comp>0</foc_temp_comp>
    <foc_temp_comp_base_temp>25</foc_temp_comp_base_temp>
    <foc_current_filter_const>0.1</foc_current_filter_const>
    <foc_cc_decoupling>0</foc_cc_decoupling>
    <foc_observer_type>0</foc_observer_type>
    <foc_hfi_voltage_start>20</foc_hfi_voltage_start>
    <foc_hfi_voltage_run>4</foc_hfi_voltage_run>
    <foc_hfi_voltage_max>10</foc_hfi_voltage_max>
    <foc_sl_erpm_hfi>2000</foc_sl_erpm_hfi>
    <foc_hfi_start_samples>15</foc_hfi_start_samples>
    <foc_hfi_obs_ovr_sec>0.001</foc_hfi_obs_ovr_sec>
    <foc_hfi_samples>1</foc_hfi_samples>
    <foc_offsets_cal_on_boot>1</foc_offsets_cal_on_boot>
    <foc_offsets_current__0>2047.68</foc_offsets_current__0>
    <foc_offsets_current__1>2046.49</foc_offsets_current__1>
    <foc_offsets_current__2>2046.48</foc_offsets_current__2>
    <foc_offsets_voltage__0>0.0004</foc_offsets_voltage__0>
    <foc_offsets_voltage__1>-0.002</foc_offsets_voltage__1>
    <foc_offsets_voltage__2>0.0015</foc_offsets_voltage__2>
    <foc_offsets_voltage_undriven__0>0</foc_offsets_voltage_undriven__0>
    <foc_offsets_voltage_undriven__1>0</foc_offsets_voltage_undriven__1>
    <foc_offsets_voltage_undriven__2>0</foc_offsets_voltage_undriven__2>
    <foc_phase_filter_enable>0</foc_phase_filter_enable>
    <foc_phase_filter_max_erpm>4000</foc_phase_filter_max_erpm>
    <foc_mtpa_mode>0</foc_mtpa_mode>
    <foc_fw_current_max>0</foc_fw_current_max>
    <foc_fw_duty_start>0.9</foc_fw_duty_start>
    <foc_fw_q_current_factor>0.02</foc_fw_q_current_factor>
    <foc_fw_ramp_time>0.2</foc_fw_ramp_time>
    <gpd_buffer_notify_left>200</gpd_buffer_notify_left>
    <gpd_buffer_interpol>0</gpd_buffer_interpol>
    <gpd_current_filter_const>0.1</gpd_current_filter_const>
    <gpd_current_kp>0.03</gpd_current_kp>
    <gpd_current_ki>50</gpd_current_ki>
    <sp_pid_loop_rate>5</sp_pid_loop_rate>
    <s_pid_kp>0.004</s_pid_kp>
    <s_pid_ki>0.004</s_pid_ki>
    <s_pid_kd>0.0001</s_pid_kd>
    <s_pid_kd_filter>0.2</s_pid_kd_filter>
    <s_pid_min_erpm>900</s_pid_min_erpm>
    <s_pid_allow_braking>1</s_pid_allow_braking>
    <s_pid_ramp_erpms_s>25000</s_pid_ramp_erpms_s>
    <p_pid_kp>0.025</p_pid_kp>
    <p_pid_ki>0</p_pid_ki>
    <p_pid_kd>0</p_pid_kd>
    <p_pid_offset>0</p_pid_offset>
    <p_pid_kd_proc>0.00035</p_pid_kd_proc>
    <p_pid_kd_filter>0.2</p_pid_kd_filter>
    <p_pid_ang_div>1</p_pid_ang_div>
    <p_pid_gain_dec_angle>0</p_pid_gain_dec_angle>
    <cc_startup_boost_duty>0.01</cc_startup_boost_duty>
    <cc_min_current>1</cc_min_current>
    <cc_gain>0.0046</cc_gain>
    <cc_ramp_step_max>0.04</cc_ramp_step_max>
    <m_fault_stop_time_ms>500</m_fault_stop_time_ms>
    <m_duty_ramp_step>0.02</m_duty_ramp_step>
    <m_current_backoff_gain>0.5</m_current_backoff_gain>
    <m_encoder_counts>8192</m_encoder_counts>
    <m_sensor_port_mode>0</m_sensor_port_mode>
    <m_invert_direction>0</m_invert_direction>
    <m_drv8301_oc_mode>0</m_drv8301_oc_mode>
    <m_drv8301_oc_adj>16</m_drv8301_oc_adj>
    <m_bldc_f_sw_min>3000</m_bldc_f_sw_min>
    <m_bldc_f_sw_max>35000</m_bldc_f_sw_max>
    <m_dc_f_sw>25000</m_dc_f_sw>
    <m_ntc_motor_beta>3380</m_ntc_motor_beta>
    <m_out_aux_mode>0</m_out_aux_mode>
    <m_motor_temp_sens_type>0</m_motor_temp_sens_type>
    <m_ptc_motor_coeff>0.61</m_ptc_motor_coeff>
    <m_hall_extra_samples>1</m_hall_extra_samples>
    <si_motor_poles>28</si_motor_poles>
    <si_gear_ratio>4</si_gear_ratio>
    <si_wheel_diameter>0.57</si_wheel_diameter>
    <si_battery_type>0</si_battery_type>
    <si_battery_cells>14</si_battery_cells>
    <si_battery_ah>20</si_battery_ah>
    <si_motor_nl_current>0.5</si_motor_nl_current>
    <motor_brand>Unnamed</motor_brand>
    <motor_model>Not Specified</motor_model>
    <motor_weight>0</motor_weight>
    <motor_sensor_type>0</motor_sensor_type>
    <motor_description>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Roboto'; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;A motor description can be edited here.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</motor_description>
    <motor_quality_bearings>0</motor_quality_bearings>
    <motor_quality_magnets>0</motor_quality_magnets>
    <motor_quality_construction>0</motor_quality_construction>
    <motor_quality_description>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Roboto'; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Some comments about the motor quality. Images can be added as well.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</motor_quality_description>
    <bms.type>1</bms.type>
    <bms.t_limit_start>45</bms.t_limit_start>
    <bms.t_limit_end>65</bms.t_limit_end>
    <bms.soc_limit_start>0.05</bms.soc_limit_start>
    <bms.soc_limit_end>0</bms.soc_limit_end>
    <bms.fwd_can_mode>0</bms.fwd_can_mode>
</MCConfiguration>

 

dpeinado
Offline
Last seen: 1 hour 7 min ago
VESC Free
Joined: 2022-01-14 11:59
Posts: 19

Hello Cir7. Sometimes I've had issues with the application selected. For making tests with experiments tool, the app should be selected to No App, because if you have selected one App, then the commnads are given by this app.

cir7
Offline
Last seen: 5 days 6 hours ago
VESC Free
Joined: 2020-06-06 12:16
Posts: 5

Yes, I know that if app is selected the commends are given by the app. I use ADC throttle input instead of experiments tool for testing just because of convenience. My problem is persistent even with no app tho. Thanks for taking a look at my problem! ;)