You are here

VESC as Generator - Low Output at High Brake Current?

9 posts / 0 new
Last post
hoeken
Offline
Last seen: 1 year 1 month ago
Joined: 2021-06-12 01:50
Posts: 8
VESC as Generator - Low Output at High Brake Current?

I'm trying to use VESC to build a generator using the braking current functionality.  My first step was to set up a test bench with a driver motor connected to a generator motor (see pic).  I am using the Flipsky FSESC6 for each motor, a generic 170KV 6374 motor as the driver, and a 130KV Flipsky 66112 motor as the generator (need a waterproof motor as my goal is to build a hydro generator).  The generator is wired through a Victron shunt as a second source of power generation data, and it is all connected to a 12v / 24aH LifePo4 battery (4s?)

After a bunch of trial and error, I have gotten it working and am able to generate power.  I've written some scripts to try and help me characterize the motors and understand how it all works.   The most interesting one is where I set the driver at a constant RPM, and then ramp up the brake_current on the generator.  What I'm seeing is that the generated power ramps up with the brake current, hits a peak, and then drops back down, eventually dropping below zero and actually drawing power.

Obviously the goal is to extract as much power as possible, so it is really confusing to me how the output can drop when changing the brake current.  I'm a bit of a newbie when it comes to BLDC stuff so maybe there is something here that I'm not understanding properly.  It seems to me that the output power should ramp up with the brake current and then plateau when it hits the maximum available power.

Any help or links to further reading would be greatly appreciated.

Power output curve:

Screenshot_20210827-112353.jpg

Test setup:

20210828_100223.jpg

rodread
rodread's picture
Offline
Last seen: 6 months 6 days ago
Joined: 2018-01-12 11:08
Posts: 12

Looks like your power and current lines are very much superimposed and directly correlated the whole time as to be expected.

So really wondering what's going on with the code to set the braking current.

Also ... everything is run on the one battery power source and charging sink at the same time... that's a potential source of confusion.

The kite turbine builder

hoeken
Offline
Last seen: 1 year 1 month ago
Joined: 2021-06-12 01:50
Posts: 8

Hey Rod, thanks for the quick reply.  I love your kite turbine project and lots of good information there.  As an avid kitesurfer and sailor its cool to see what you're doing.  Once I'm ready to move to testing my design in the water, I am shamelessly planning on using a strain gauge like you have in your setup.  Great idea!  I appreciate your help and hopefully this is just some noob mistake as I'm pretty new to BLDC stuff.

The code I wrote for testing is located here:  https://github.com/hoeken/TH20T/blob/4b45224c71b6b9799331703f51d18a166a0...

Basically it sets the driver motor at a chosen RPM, then ramps up the brake current on the generator over 60 seconds while recording the voltage, current, wattage on both driver and generator.  As expected, the generator is lower than the driver, and the driver only ever increases as the brake current increases.  The part I'm not understanding is that the generator power output peaks at a certain brake current (around 20A) and then even begins drawing power at high brake currents (>= 40A)

I will try separating the driver and generator on different batteries, but the victron shunt is wired up to only show the current in/out of the generator and that data matches up with what the VESC is showing.

Also, when I try to replicate this using the VESC tool, I get some confusing results.  If I set it to 10k rpm on the driver, and 20a on the generator I get the expected result... power generated:

10krpm 20a ok.png

When I set the driver to the same 10k erpm, but with full brake current on the generator to start, it ramps up, and seems fine, although the shunt is reporting that the generator is not actually sending current to the battery:

full brake current.png

The weird part is sometimes when I hit full brake or a large current when the driver is already running at full speed, then the duty cycle oscillates between positive and negative and current is all over the place:

full brake crazy duty cycle.png

rodread
rodread's picture
Offline
Last seen: 6 months 6 days ago
Joined: 2018-01-12 11:08
Posts: 12

Delighted if I have been of any help thanks Hoeken. 

Are you mixing kitesurfing with regen? -  Sounds like an amazing project.

I think you'll have more luck in the bench test with separated power source and sink batteries...

In the second screenshot the Volts in reading has dropped to 11.2V 

The kite turbine builder

hoeken
Offline
Last seen: 1 year 1 month ago
Joined: 2021-06-12 01:50
Posts: 8

I just got 4 more 12v batteries today so I can test with different configurations of voltages, separate banks, etc.  I will follow up once I have more info.  I also added a bit to the script to abort the test if the battery drops below 12v.

My plan is to build a towable hydro generator for my sailboat.  Partially inspired by efoils that use a BLDC that is fully submerged, it made me think that it could work well.  People have done towable hydro gen before, but the motor has been attached to the boat, while the prop in the water transfers the force with a spinning rope.  Obviously retrieving that at sea will be tricky.   Watt&Sea also make a hydro gen, but its a fixed unit like an outboard.  That's a bit difficult on my boat where I don't have much room on the stern.  I'd like something compact that I can stow easily, as well as deploy and retrieve.  There's a high likelihood this will not work at all, but its been a fun project so far and I'm learning a lot.

rodread
rodread's picture
Offline
Last seen: 6 months 6 days ago
Joined: 2018-01-12 11:08
Posts: 12

Love it!!

Sounds brilliant. Best of luck with this project Hoeken

The kite turbine builder

hoeken
Offline
Last seen: 1 year 1 month ago
Joined: 2021-06-12 01:50
Posts: 8

So, an update for anyone who is interested in this.  VESC is pretty daunting and there are a zillion parameters to work with.  I've gotten things to a point where I'm happy. The output of the generator motor scales up with brake_current and doesn't drop off a cliff, or go negative.  Granted I've only tried it at low wattages so far, but everything seems to work nicely right now.

The biggest change that helped out, was to set FOC > Advanced > Sample in V0 and V7 to True.  I'm not sure why, but when this is off, the detect motor values were all over the place.

Once I had that working, I messed around with the KP and KI numbers.  I don't fully understand why, but lowering the KI number made things more stable. Config at the end of the post.

I also found an old thread for manually calculating flux linkage and observer gain which helped me to double check the numbers: https://vesc-project.com/node/52

Here's a graph from the script that I wrote that compares the wattage used to drive vs the wattage from the generator motor and also calculates the efficiency.  Seems like in the next step there is definitely going to be a sweet spot of drag vs. power generated.  This was at around 700rpmsuccess.png

Config:

vesc config.png

flydr2
Offline
Last seen: 1 year 6 months ago
VESC Free
Joined: 2023-02-18 20:29
Posts: 4

I have a 35ft sailboat which I've converted to electric motors.All works fine except regen.

When powewred up and the ADC at center the prop simply stops turning (I think it's like shorted phases).

I've tried to lower the regen/brake amps all the way to 1A and still no go. This is an 18" prop and when I sail over 3.5knt the prop/motors start turning... At 5kts they turn hard and fast... If I turn on the controller I get a few sec of regen then locked up

I need forward and reverse but would like to be in regen mode while sailing (Recharge my batteries when under sail)

I've tried Duty cycle reverse center and now will try current reverse center.

Basically I would like to regen at center... any amps is better than none

Anyway to do that?

Cheers!

Marc

flydr2
Offline
Last seen: 1 year 6 months ago
VESC Free
Joined: 2023-02-18 20:29
Posts: 4

I have a 35ft sailboat which I've converted to electric motors.All works fine except regen.

I need forward and reverse but would like to be in regen mode while sailing (Recharge my batteries when under sail)

I've tried Duty cycle reverse center and now will try current reverse center.

Basically I would like to regen at center...

Anyway to do that?

Cheers!

Marc