You are here

Oscillation in FOC current control mode

1 post / 0 new
chris1seto
Offline
Last seen: 1 year 3 weeks ago
Joined: 2019-01-04 01:41
Posts: 11
Oscillation in FOC current control mode

I setup my VESC with a sensored hoverboard motor.

Attached are my settings.

Openloop mode works fine, but trying to run in current control mode with no load on the motor, the motor spins up smoothly until duty cycle maxes out and the current plummets. Here is a screenshot of that:

Capture.PNG

 

 

Any ideas what might be happening here?

<?xml version="1.0" encoding="UTF-8"?>
<MCConfiguration>
    <gpd_current_filter_const>0.1</gpd_current_filter_const>
    <l_temp_motor_end>100</l_temp_motor_end>
    <l_current_min_scale>1</l_current_min_scale>
    <motor_loss_torque>0.03</motor_loss_torque>
    <motor_type>2</motor_type>
    <si_gear_ratio>3</si_gear_ratio>
    <l_min_erpm>-100000</l_min_erpm>
    <foc_motor_r>0.118</foc_motor_r>
    <foc_temp_comp_base_temp>25</foc_temp_comp_base_temp>
    <foc_motor_l>0.00020868</foc_motor_l>
    <l_temp_motor_start>85</l_temp_motor_start>
    <s_pid_ki>0.004</s_pid_ki>
    <foc_hall_table__5>164</foc_hall_table__5>
    <foc_f_sw>26000</foc_f_sw>
    <sl_phase_advance_at_br>0.8</sl_phase_advance_at_br>
    <l_max_duty>0.95</l_max_duty>
    <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:'DejaVu Sans'; font-size:11pt; 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>
    <l_min_vin>8</l_min_vin>
    <foc_current_kp>0.2087</foc_current_kp>
    <hall_table__4>5</hall_table__4>
    <foc_observer_gain>100000</foc_observer_gain>
    <si_battery_ah>6</si_battery_ah>
    <foc_temp_comp>0</foc_temp_comp>
    <foc_sl_d_current_factor>0</foc_sl_d_current_factor>
    <si_motor_poles>14</si_motor_poles>
    <m_duty_ramp_step>0.02</m_duty_ramp_step>
    <foc_encoder_inverted>0</foc_encoder_inverted>
    <sl_min_erpm>150</sl_min_erpm>
    <m_sensor_port_mode>0</m_sensor_port_mode>
    <sl_max_fullbreak_current_dir_change>10</sl_max_fullbreak_current_dir_change>
    <foc_hall_table__6>103</foc_hall_table__6>
    <m_drv8301_oc_mode>0</m_drv8301_oc_mode>
    <foc_hall_table__1>196</foc_hall_table__1>
    <hall_table__2>3</hall_table__2>
    <motor_model>Not Specified</motor_model>
    <motor_brand>Unnamed</motor_brand>
    <m_fault_stop_time_ms>500</m_fault_stop_time_ms>
    <foc_sl_erpm>2500</foc_sl_erpm>
    <l_temp_fet_end>100</l_temp_fet_end>
    <gpd_current_kp>0.03</gpd_current_kp>
    <hall_table__5>6</hall_table__5>
    <l_erpm_start>0.8</l_erpm_start>
    <foc_sensor_mode>2</foc_sensor_mode>
    <l_battery_cut_end>8</l_battery_cut_end>
    <l_max_vin>57</l_max_vin>
    <hall_table__7>-1</hall_table__7>
    <l_battery_cut_start>10</l_battery_cut_start>
    <p_pid_kp>0.03</p_pid_kp>
    <s_pid_allow_braking>1</s_pid_allow_braking>
    <l_temp_accel_dec>0.15</l_temp_accel_dec>
    <foc_hall_table__4>133</foc_hall_table__4>
    <si_battery_type>0</si_battery_type>
    <foc_sl_openloop_hyst>0.1</foc_sl_openloop_hyst>
    <hall_table__3>2</hall_table__3>
    <l_min_duty>0.005</l_min_duty>
    <m_bldc_f_sw_max>35000</m_bldc_f_sw_max>
    <l_temp_fet_start>85</l_temp_fet_start>
    <p_pid_ang_div>1</p_pid_ang_div>
    <cc_gain>0.0046</cc_gain>
    <l_abs_current_max>130</l_abs_current_max>
    <foc_duty_dowmramp_ki>200</foc_duty_dowmramp_ki>
    <m_ntc_motor_beta>3380</m_ntc_motor_beta>
    <hall_sl_erpm>2000</hall_sl_erpm>
    <l_current_min>-60</l_current_min>
    <l_in_current_min>-60</l_in_current_min>
    <motor_quality_construction>0</motor_quality_construction>
    <foc_encoder_ratio>7</foc_encoder_ratio>
    <l_watt_max>1.5e+06</l_watt_max>
    <m_invert_direction>0</m_invert_direction>
    <m_dc_f_sw>25000</m_dc_f_sw>
    <motor_sensor_type>0</motor_sensor_type>
    <s_pid_kp>0.004</s_pid_kp>
    <foc_sl_openloop_time>0.1</foc_sl_openloop_time>
    <foc_current_ki>117.97</foc_current_ki>
    <foc_dt_us>0.08</foc_dt_us>
    <s_pid_kd_filter>0.2</s_pid_kd_filter>
    <sl_cycle_int_limit>62</sl_cycle_int_limit>
    <sensor_mode>0</sensor_mode>
    <foc_hall_table__2>70</foc_hall_table__2>
    <foc_current_filter_const>0.1</foc_current_filter_const>
    <hall_table__0>-1</hall_table__0>
    <foc_duty_dowmramp_kp>10</foc_duty_dowmramp_kp>
    <foc_encoder_offset>180</foc_encoder_offset>
    <foc_hall_table__7>255</foc_hall_table__7>
    <cc_min_current>0.1</cc_min_current>
    <hall_table__6>4</hall_table__6>
    <foc_hall_table__3>33</foc_hall_table__3>
    <foc_pll_kp>2000</foc_pll_kp>
    <foc_sl_d_current_duty>0</foc_sl_d_current_duty>
    <foc_sample_high_current>0</foc_sample_high_current>
    <motor_quality_magnets>0</motor_quality_magnets>
    <m_current_backoff_gain>0.5</m_current_backoff_gain>
    <l_max_erpm_fbrake_cc>1500</l_max_erpm_fbrake_cc>
    <l_current_max>60</l_current_max>
    <s_pid_kd>0.0001</s_pid_kd>
    <foc_pll_ki>30000</foc_pll_ki>
    <si_wheel_diameter>0.083</si_wheel_diameter>
    <m_drv8301_oc_adj>16</m_drv8301_oc_adj>
    <sl_bemf_coupling_k>600</sl_bemf_coupling_k>
    <p_pid_kd_filter>0.2</p_pid_kd_filter>
    <sl_cycle_int_rpm_br>80000</sl_cycle_int_rpm_br>
    <pwm_mode>1</pwm_mode>
    <motor_weight>0</motor_weight>
    <l_slow_abs_current>1</l_slow_abs_current>
    <l_max_erpm>100000</l_max_erpm>
    <sl_min_erpm_cycle_int_limit>1100</sl_min_erpm_cycle_int_limit>
    <gpd_current_ki>50</gpd_current_ki>
    <p_pid_kd>0.0004</p_pid_kd>
    <motor_quality_bearings>0</motor_quality_bearings>
    <l_current_max_scale>1</l_current_max_scale>
    <foc_sat_comp>0</foc_sat_comp>
    <motor_poles>14</motor_poles>
    <l_in_current_max>99</l_in_current_max>
    <l_watt_min>-1.5e+06</l_watt_min>
    <l_max_erpm_fbrake>300</l_max_erpm_fbrake>
    <foc_sample_v0_v7>0</foc_sample_v0_v7>
    <foc_hall_table__0>255</foc_hall_table__0>
    <foc_openloop_rpm>400</foc_openloop_rpm>
    <foc_motor_flux_linkage>0.1</foc_motor_flux_linkage>
    <m_bldc_f_sw_min>3000</m_bldc_f_sw_min>
    <p_pid_ki>0</p_pid_ki>
    <gpd_buffer_notify_left>200</gpd_buffer_notify_left>
    <gpd_buffer_interpol>0</gpd_buffer_interpol>
    <foc_observer_gain_slow>0.3</foc_observer_gain_slow>
    <cc_startup_boost_duty>0.075</cc_startup_boost_duty>
    <s_pid_min_erpm>900</s_pid_min_erpm>
    <m_encoder_counts>8192</m_encoder_counts>
    <si_battery_cells>3</si_battery_cells>
    <cc_ramp_step_max>0.04</cc_ramp_step_max>
    <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:'DejaVu Sans'; font-size:11pt; 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>
    <m_out_aux_mode>0</m_out_aux_mode>
    <comm_mode>1</comm_mode>
    <hall_table__1>1</hall_table__1>
</MCConfiguration>