Braking in speed PID mode

General topics and discussions about the VESC and its development.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
vadim
Posts: 6
Joined: 02 Sep 2018, 20:01
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Braking in speed PID mode

Postby vadim » 13 Sep 2018, 13:01

Hi all,

I'm trying to configure braking for use in speed controlled mode. The goal is have the motor brake when the speed is above a pre-set value, which seems to be working if motor is applying torque when speed is below the set value.

Now I need to limit the torque, and ideally have the motor coast when the speed is lower then preset. I tried to achieve that by setting "Motor Current Max" to zero or other low value, while keeping "Motor Current Max Brake" at nominal value. However I see that lowering "Motor Current Max" also removes the braking capability.

Looking at the current charts, I see that the in speed control mode braking, the current is positive (unlike in braking mode when it is negative, see attached).

So, to summarize :
1. Is braking in speed control mode regenerative (seems like it isn't from the current direction) ?
2. Is there a way to configure coast/brake speed control mode ?


Thanks!
Attachments
VESC speed ctrl mode braking.png
VESC speed ctrl mode braking.png (157.19 KiB) Viewed 255 times
VESC braking mode.png
VESC braking mode.png (151.5 KiB) Viewed 255 times

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Braking in speed PID mode

Postby pf26 » 16 Sep 2018, 07:30

Running FOC or BLDC ?
Possibly, in the second example, the motor turns very slowly (smaller duty cycle), and braking is achieved by shorting the motor (no current IN) ?

vadim
Posts: 6
Joined: 02 Sep 2018, 20:01
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Braking in speed PID mode

Postby vadim » 16 Sep 2018, 09:12

Running FOC mode (HW4.10, FW 3.40)

Now I see that the motor current polarity depends on the direction of rotation, and yes, battery current is zero. This holds for 1500 eRPM, and all the way to 4000 as far as I tried.

Is there a condition to brake by shorting for some RPM values ? Can't find it in the code so far ...
Attachments
VESC braking both directions.png
VESC braking both directions.png (94.74 KiB) Viewed 194 times

vadim
Posts: 6
Joined: 02 Sep 2018, 20:01
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: Braking in speed PID mode

Postby vadim » 18 Sep 2018, 13:09

Some progress :)

I've traced lack of braking to this condition in mcpwm_foc.c :
VESC braking code.PNG
VESC braking code.PNG (21.94 KiB) Viewed 151 times


apparently, the threshold is very high and is continuously triggered in my setup. After disabling this check, constant current braking works, and I see negative battery current (charging).

However, it only works for low brake current (IB<3Amp). For higher brake current settings it reverts to the previous behavior of duty =0


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest