You are here

mcpwm_set_current VS mcpwm_set_brake_current

2 posts / 0 new
Last post
sanielsen
Offline
Last seen: 6 days 6 hours ago
VESC Free
Joined: 2017-12-27 23:38
Posts: 4
mcpwm_set_current VS mcpwm_set_brake_current

Hello,
Could someone explain to me what is different between the functions mcpwm_set_current(float current); and mcpwm_set_brake_current(float current);
 

We are trying to generate as much electrical power as possible using a VESC 4.12 (like a few others in here are too). Our setup is two motors mechanically coupled directly. One is driving the other which is acting as generator.
So far we have tried to run the generator in RPM control, and drive the other motor in current mode to 'overpower' the generator (regenerative braking). With this method we have achieved about 120W from a 200g motor. However the efficiency seems very low, as we input about 40% more from the driver than we get out of the generator.

The question is therefore would it be a significant difference to run the RPM control loop with a regenerative brake ( mcpwm_set_brake_current(float current); ) instead of the default ki( mcpwm_set_current(float current); ) as it seems like it is doing now?

IMG_4845.JPG

 

sanielsen
Offline
Last seen: 6 days 6 hours ago
VESC Free
Joined: 2017-12-27 23:38
Posts: 4

We now tested the custom made Generator app by ArvidB in post 618 on the setup seen above (also mentioned here in post 615). At first we used the app as it was written - using mcpwm_set_current(float current)  here we got some rather strange unstable behavior which didn't produce energy, which we didn't document further. Then we changed the code from using mcpwm_set_current(float current) to using mcpwm_set_brake_current(float current);. This gave a more stable behavior up to a certain RPM, then a very strange cogging at max A.. we tried to document this in this video.

What are we doing wrong? And why is the efficiency so low? our input motor consumed 100W and as you see on the video we produce only 50W! Additionally, the motors went quite hot..