You are here

mcpwm_set_current VS mcpwm_set_brake_current

3 posts / 0 new
Last post
stiganielsen
Offline
Last seen: 1 year 6 months ago
VESC Free
Joined: 2017-12-27 23:38
Posts: 5
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

 

stiganielsen
Offline
Last seen: 1 year 6 months ago
VESC Free
Joined: 2017-12-27 23:38
Posts: 5

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

mechhead
Offline
Last seen: 4 months 3 weeks ago
VESC Free
Joined: 2017-09-23 14:13
Posts: 2

Hi I love seeing alternative uses of the vesc,  i may have something to offer on your oscillation problem. and the efficiency as well.

the heat problem is related  as the motor apears to be loaded at too high amps low volts  this makes big resistance losses and these motora are made for aircranf and as such need a gale force cooling wind (propwash) to get anywhere xclose to their rated power level.

From the readings in the video it is apparent that the motor brake is ramping more and more current  but this does not show as a large increase in battery current, this is likely because you are loading the motor brake well below the maximum power point.      It is like with solar panels  there is an optimal point of voltage vs current drawn that produces the most watts and the motor is being loaded via the switching at too high current  low voltage , this may have something to do with the switching frequency as well as how high the rpm is allowed to go.

Just my two cents worth.

I love the idea and would love to see it successful .

I have another application im working on and would like help and ideas about programming a custom app for it  and where to find resources on how to do this .

The application is as a solar pump controller  that uses the low battery roll back as a means of keeping the solar panel voltage near the maximum power point with changing light levels and operates autonomously with no battery  ill start a new thread on this later.

Any further news on the progress of the generator coding ?