FOC on eBike - cuts in acceleration

Discussions regarding the Field Oriented Control (FOC) implementation on the VESC.
imval
Posts: 12
Joined: 02 Sep 2016, 13:07
Location: Rouen, France

FOC on eBike - cuts in acceleration

Postby imval » 01 Jun 2018, 14:52

Hi guys,
I'm using a VESC 4.12 on my electric bike with a 13S battery (I know it's bad and too close to the limits of the vesc, but it's running fine since now two years, if we forget some blown up drv).

I have a bretty big motor (5kW) and running 100A phase max (forced cooling). It has an amazing acceleration, really incredible. I'm driving the VESC through serial and a "custom" dashboard that reads the throttle input and sends serial commands to the vesc. Now if I hit the throttle directly to ask 100A to the VESC in current control mode, it usually just start a little then cuts off to a "ABS_OVER_CURR" error. So I implemented a smoothing in the dashboard control. Which is a little better now.

But I still have some issues, around 50Kph, if I don't release the throttle like halfway, it goes to the same "ABS_OVER_CURR". If I lower it enough, it goes over 50-53 kph and then I can hit the throttle again and it goes to 60kph with an amazing acceleration.

Do you have any idea what could cause these issues ? And is there a way to smooth the requested current from the VESC to avoid the error codes ?
Best regards, and thank you again for this amazing product !

pf26
Posts: 309
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: FOC on eBike - cuts in acceleration

Postby pf26 » 02 Jun 2018, 06:03

In BLDCTOOLS, motor configuration/Motor/Current limits, you could set a higher "Absolute Max" parameter. This will reduce your "ABS_OVER_CURR" faults, at the expense of a greater risk to blow your VESC. Reason is the current control is not perfect, and setting too little margin between your Motor Max current and Absolute Max results in such faults.
Maybe you could slightly reduce your Max motor current instead increasing the Absolute max. Would be safer obviously.

With 13s (LiPo ?), you probably also want to severely restrict Regen to avoid overvoltage. And try and keep the VESC cool (the higher the temperature, the higher the MOSFET avalanche voltage threshold that somewhat protects the DRV from overvoltage).

Could you tell what motor you use (MXUS 5K ?) and if so, the R, L, Lambda parameters you found ? (I found L=2.72e-05H, R=0.0164, lambda 0.0263 for my 5K in FOC mode). Didn't have the time to set it on a bike, but indeed, it must have great accelerations !

imval
Posts: 12
Joined: 02 Sep 2016, 13:07
Location: Rouen, France

Re: FOC on eBike - cuts in acceleration

Postby imval » 02 Jun 2018, 12:52

I already set the absolute current to 150A which is the maximum value possible without having to change the firmware (which I would prefer, don't want to do too far and blow it up again).
I have set the regen and max batt voltage to a safe value and not using the regen when the battery is full.
I have a forced cooling on the VESC with a high power fan and temperature monitoring.

I'm using a "chinese" motor without any real marking on it. Here are the values I got :
R: 25,47 mOhms
L: 13,29 µH
Lambda: 20,523 mWb

Image

I was thinking of doing this modification, maybe it could help ?
viewtopic.php?f=5&t=68

have a nice wekend !

pf26
Posts: 309
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: FOC on eBike - cuts in acceleration

Postby pf26 » 04 Jun 2018, 09:04

You could try to reduce the FOC current controller parameters (Ki and Kp), say by 20%, and see if it helps.
It is also possible to adjust manually the R and L of the motor, but I do not know in which direction to go.

imval
Posts: 12
Joined: 02 Sep 2016, 13:07
Location: Rouen, France

Re: FOC on eBike - cuts in acceleration

Postby imval » 05 Jun 2018, 07:24

Thanks for the advice ! I'll try it as soon as possible and give you the results ;)

district9prawn
Posts: 4
Joined: 08 Apr 2018, 10:40
Location: Sydney

Re: FOC on eBike - cuts in acceleration

Postby district9prawn » 05 Jun 2018, 13:07

Isn't observer gain of 2.37 very low?

I have a vesc 4 on my ebike and have phase at 130A and abs max at 220A. The configuration has proven reliable so I'm comfortable with such a high current threshold for faults.


Return to “FOC”

Who is online

Users browsing this forum: No registered users and 1 guest