You are here

Rough acceleration - BLDC & FOC

10 posts / 0 new
Last post
Loose Nickers
Offline
Last seen: 4 years 6 months ago
Joined: 2020-02-05 00:29
Posts: 4
Rough acceleration - BLDC & FOC

Hey Guys

I recently embarked on my first DIY board and with that, my first experience with the VESC tool. Please excuse my ignorance or lack of understanding of any aspects.

Bought a Flipsky6.6 Dual (i know, i probably should have spent the extra and just got a proper VESC) and set up using the VESC tool, paid for and downloaded from here. 

Initially went through all the standard initial setup wizards as shown in the documentation here, as well as YouTube videos. 

The motors simply don't seem to operate properly.

In FOC mode, I seem to regularly have the motor from the slave triggering absolute over current error. In addition, acceleration is jerky, one side seems to pulsate and one side sometimes just cuts in and out.

In BLDC mode, low speed operation is poor. With wheels in the air, slowly pulling the trigger results in motors roughly responding, and if to slow, one often runs slightly backward. If I jerk the throttle a little sharper, they seem to spin up okay, but slow speed is extremely rough in both sound and operation.

Occasionally with really slight throttle input, it may even run both backward. If they run forward, it's like one is 

Trying full acceleration take off from standing resulting in a lot of motor jerking and basically no operation.

The slow speed operation has been like this with the original parameters, as well as after adjusting and tweaking a few settings such as current control gain, PIDs etc.

I have since reverted PID settings back to original.

Once the board is up to about 10km/h or so, it pulls away fine. Feels strong and relatively smooth. No issues with the operation there. I really just want

The build is in an Evolve GTR, using their standard motors with hall sensors. I have tested with a 10s and 12s battery, with results being the same on both. 



Not sure what specific info people would need but any assistance would be appreciated.

I have gone through the FOC motor wizard numerous times as well as the R & L detection. Everything seems to detect fine without issue.

I have performed the sensor detection in BLDC numerous times also without issue.

Running only 35a, although tested 45a as well.

I have tried running it set to sensored, non-sensored and hybrid with no real change. Sensorless ERPM Hybrid set to 2000.



Would love to get this accelerating as smoothly as is did standard and with the same output power.

Thanks in advance for any help.

TechAUmNu
Offline
Last seen: 2 months 2 weeks ago
Joined: 2017-09-22 01:27
Posts: 575

Hey, can you maybe upload your motor configuration XML so we can have a look? 

Also a quick video of the behavior is sometimes helpful.

Flipsky's stuff isn't the best quality but should work fine.

 

Do you have the same problem on both sides of the vesc? 

Loose Nickers
Offline
Last seen: 4 years 6 months ago
Joined: 2020-02-05 00:29
Posts: 4

Couldn't find a file upload option so i've copied and pasted the xml configuration below.

Link for the video is here - https://youtu.be/Y9JMlKcvBCs

You'll see in the video both sides seem to operate abnormally (to me at least). 

Bit hard to film the acceleration when on the board but will try.

I'm sure i've done something somewhere, but being my first dealings with the VESC tool, i thought i'd see if anyone could give some insight.



Thanks again.

<MCConfiguration>

<pwm_mode>1</pwm_mode>

<comm_mode>0</comm_mode>

<motor_type>0</motor_type>

<sensor_mode>2</sensor_mode>

<l_current_max>35</l_current_max>

<l_current_min>-25</l_current_min>

<l_in_current_max>99</l_in_current_max>

<l_in_current_min>-40</l_in_current_min>

<l_abs_current_max>150</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>8</l_min_vin>

<l_max_vin>57</l_max_vin>

<l_battery_cut_start>40.8</l_battery_cut_start>

<l_battery_cut_end>36</l_battery_cut_end>

<l_slow_abs_current>1</l_slow_abs_current>

<l_temp_fet_start>85</l_temp_fet_start>

<l_temp_fet_end>100</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.02</l_min_duty>

<l_max_duty>0.96</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>

<sl_min_erpm>150</sl_min_erpm>

<sl_min_erpm_cycle_int_limit>2000</sl_min_erpm_cycle_int_limit>

<sl_max_fullbreak_current_dir_change>10</sl_max_fullbreak_current_dir_change>

<sl_cycle_int_limit>180.5</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>1321.18</sl_bemf_coupling_k>

<hall_table__0>6</hall_table__0>

<hall_table__1>1</hall_table__1>

<hall_table__2>5</hall_table__2>

<hall_table__3>6</hall_table__3>

<hall_table__4>3</hall_table__4>

<hall_table__5>2</hall_table__5>

<hall_table__6>4</hall_table__6>

<hall_table__7>6</hall_table__7>

<hall_sl_erpm>2000</hall_sl_erpm>

<foc_current_kp>0.0189</foc_current_kp>

<foc_current_ki>11.47</foc_current_ki>

<foc_f_sw>30000</foc_f_sw>

<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>7.542e-05</foc_motor_l>

<foc_motor_r>0.0459</foc_motor_r>

<foc_motor_flux_linkage>0.006489</foc_motor_flux_linkage>

<foc_observer_gain>5.17e+06</foc_observer_gain>

<foc_observer_gain_slow>0.3</foc_observer_gain_slow>

<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_sl_openloop_hyst>0.1</foc_sl_openloop_hyst>

<foc_sl_openloop_time>0.1</foc_sl_openloop_time>

<foc_sl_d_current_duty>0</foc_sl_d_current_duty>

<foc_sl_d_current_factor>0</foc_sl_d_current_factor>

<foc_hall_table__0>255</foc_hall_table__0>

<foc_hall_table__1>103</foc_hall_table__1>

<foc_hall_table__2>169</foc_hall_table__2>

<foc_hall_table__3>135</foc_hall_table__3>

<foc_hall_table__4>36</foc_hall_table__4>

<foc_hall_table__5>70</foc_hall_table__5>

<foc_hall_table__6>2</foc_hall_table__6>

<foc_hall_table__7>255</foc_hall_table__7>

<foc_sl_erpm>2000</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.1</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>2</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>65</foc_hfi_start_samples>

<foc_hfi_obs_ovr_sec>0.001</foc_hfi_obs_ovr_sec>

<foc_hfi_samples>1</foc_hfi_samples>

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

<s_pid_kp>0.004</s_pid_kp>

<s_pid_ki>0.004</s_pid_ki>

<s_pid_kd>0.001</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>

<p_pid_kp>0.03</p_pid_kp>

<p_pid_ki>0</p_pid_ki>

<p_pid_kd>0.0004</p_pid_kd>

<p_pid_kd_filter>0.2</p_pid_kd_filter>

<p_pid_ang_div>1</p_pid_ang_div>

<cc_startup_boost_duty>0.1</cc_startup_boost_duty>

<cc_min_current>0.05</cc_min_current>

<cc_gain>0.2</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.04</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>

<si_motor_poles>14</si_motor_poles>

<si_gear_ratio>4.4</si_gear_ratio>

<si_wheel_diameter>0.175</si_wheel_diameter>

<si_battery_type>0</si_battery_type>

<si_battery_cells>12</si_battery_cells>

<si_battery_ah>14</si_battery_ah>

<motor_brand>Unnamed</motor_brand>

<motor_model>Not Specified</motor_model>

<motor_weight>0</motor_weight>

<motor_poles>14</motor_poles>

<motor_sensor_type>0</motor_sensor_type>

<motor_description>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A motor description can be edited here.</p></body></html>

</motor_description>

<motor_loss_torque>0.03</motor_loss_torque>

<motor_quality_bearings>0</motor_quality_bearings>

<motor_quality_magnets>0</motor_quality_magnets>

<motor_quality_construction>0</motor_quality_construction>

<motor_quality_description>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some comments about the motor quality. Images can be added as well.</p></body></html>

</motor_quality_description>

</MCConfiguration>

TechAUmNu
Offline
Last seen: 2 months 2 weeks ago
Joined: 2017-09-22 01:27
Posts: 575

Settings look normal, are you using duty cycle or current mode for the app? You might find current mode better for your application.

For low speed you should find that foc is much smoother.

 

Loose Nickers
Offline
Last seen: 4 years 6 months ago
Joined: 2020-02-05 00:29
Posts: 4

Pretty sure was 'current' mode. 

I ended up returning the app configuration back to original and starting again.

I tried FOC again, but it still doesn't operate correctly. Start-up is far better than when in BLDC, however when it reaches the sensored ERPM limit, the motors start cogging really badly. 

If you set the sensored ERPM to 70,000 (10,000rpm real world), they will spin all the way up, but with excessive noise and heat building, even when operating them in the air. Almost like the "timing" is out and applying current at the wrong intervals, causing increased resistance and subsequently heat.

I need to go back to it today. Going to try different motors on the chance these have something odd going on with them.

Loose Nickers
Offline
Last seen: 4 years 6 months ago
Joined: 2020-02-05 00:29
Posts: 4

Update-

I've gone back to setting it up in FOC. With the initial set up parameters it still wouldn't function correctly above the sensorless ERPM limit. 

I went through and changed the coupling to cross and BEMF and set High Current Sampling and Sample in V0 & V7 both to True.

This resulted in both motors seemingly working properly, however, with the motor from the slave unit triggering ABS Over Current initially on full acceleration free-spinning, then coming good.

Found that manually carrying out the FOC parameter detection was returning varying results every time and i think the increasing inductance and resistance readings were attributing to this fault.

From the first detection coming back with around 42 & 55 inductance, to the final runs coming back with anything up 250 and 300?

I've ended up setting the resistance, inductance and flux linkage to be in-line with what they were detected as in the first place.

These are:

R: 52.60 & 66.3

L: 42.73 & 54.55

Flux: 6.45 & 6.25

Now the motors are seemingly operating as they should. 

Problem currently is getting the VESC to maintain CAN communication to set motor direction (keeps dropping out).

my next question-

while the board seems to be operating relatively smoothly and has pick up once rolling, it's lacking the sudden acceleration i was hoping for with the 12s battery. Currently, it feels less than the GTR did stock.

Positive and negative ramping in PPM settings is at 0.1.



Running 35a/motor. Short of bumping up current, is there a way to increase acceleration response on FOC similar to how the BLDC operation utilises current control gain?

G_FPV
Offline
Last seen: 3 years 3 months ago
Joined: 2020-03-03 12:40
Posts: 2

Hi!

so I got the exact same issues which is driving me nuts 🥜 

also evolve stock motors.  The cogging/timing makes it sound like there is stones in the motor.  Scary part is if I try brake it can start cogging, or when rolling downhill and ease on the throttle it does the same thing, I really don't feel like landing in hospital again!  Also flipsky dual 6.6 plus

G_FPV
Offline
Last seen: 3 years 3 months ago
Joined: 2020-03-03 12:40
Posts: 2

This issue continues........ its better but damn dangerous when it starts acting up 

Yesterdays video with traction control on https://www.youtube.com/watch?v=Iu15u9IbIiw

Todays video with traction off https://www.youtube.com/watch?v=lyoyxLFVUDA

  1. Flipsky dual 6.6 plus
  2. VX2 remote 
  3. Evolve GTX gen2 motors 
  4. Set to FOC
  5. Current brake, no reverse 
  6. V0 & V7 = true
  7. High Current = true ( without these it doesnt work) 
  8.  motor Current 45A, regen 30A 
  9. ERPM 40000
  10. Latest firmware, reflashed multiple times
  11. Both VESC identical settings
  12. 10S 10000Mah 
  13.  Max Duty 95%
  14. Min Duty 0.5%
  15. Min Volts 8V
  16. Max 42V
  17. CAN rate 50hz

As I`m putting these deets in, looking at the VESC app, the ABS Tacho is counting away slowly.   I`ve run all the measurements and tried everything suggested via various forums 

Any ideas?

 

 

tomgold2
Offline
Last seen: 4 years 3 weeks ago
Joined: 2019-01-16 07:10
Posts: 1

Not sure if this helpful, but I have had very strange behaviors similar to this in the past, and they were caused by a faulty version of the VESC tool. Make sure you're using the latest version of Linux for windows (never use a Mac version).  

 

You also may want to try setting up each VESC as a single and seeing if the same problem persists with both VESCs before you try to connect them over CAN.

 

Finally, you can try controlling the motors using your keyboard while a computer is hooked up to the VESC.  You do this by pressing the arrow key symbol on the right of the VESC tool, and then using the arrow keys.  This will rule out problems created by the control app.

 

btw I own two Fliskpy 6.6s and they work well.

MC_DIY_Beginner
Offline
Last seen: 2 years 6 months ago
Joined: 2022-05-15 11:53
Posts: 1

Hey guys, Just in case this helps anyone. I was experiencing the same issues as described at the beginning of this post by Loose Nickers. When applying the throttle at slow speeds (<10KM/h), there was lots of cogging and stuttering by both motors. In some cases, the wheels would spin in the opposite direction, then eventually start going forwards. At higher speeds though, they seemed to run fine.
For me, the problem turned out to be the connectivity of the hall sensors. In shuffling around parts, so that I could fit everything in the enclosure, I managed to switch over the motor cables but accidentally forgot to switch the hall sensors. Once I realised this (and it took me far too long to discover) and then re-ran the motor wizard, everything has been smooth as. So, if you're experiencing this and your problem isn't a user error like mine, it could be that the hall sensor cables aren't connected, or have a faulty connection.