Field Weakening

General topics and discussions about the VESC and its development.
Jasonv8z
Posts: 3
Joined: 29 Mar 2017, 04:51
Location: San Francisco, CA

Field Weakening

Postby Jasonv8z » 30 Mar 2017, 20:46

I just got my controller driving my ebike motor yesterday and so far I am very impressed with the VESC. However, I have not figured out how to implement field weakening. What's the best way to achieve field weakening or timing advance with the version 4 VESC? Is there a parameter I can set via UART? I'd like to use a low KV motor matched to my cruising speed for good efficiency, while field weakening is used to provide a speed burst when needed.
thanks,

Jason

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

Re: Field Weakening

Postby pf26 » 31 Mar 2017, 07:52

As far as I know, filed weakening is not implemented in VESC4. It may be quite easy to decrease gradually Id current reference (from 0 to a negative value) at high RPM, so as to lower the bemf. But you also need to think about the fault management: If the controller halts (due to fault) at high RPM, and field weakening is removed, then your motor bemf will possibly be higher than the battery voltage. The body diodes of the Fets will clamp the motor bemf to the battery voltage, and this might cause a large current and motor breaking suddenly.

rew
Posts: 940
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Field Weakening

Postby rew » 01 Apr 2017, 12:05

And the FETs are cooled to be able to dissipate 40A * 50mV = 2000mW, and not for 40A * 0.6V = 24W.

Jasonv8z
Posts: 3
Joined: 29 Mar 2017, 04:51
Location: San Francisco, CA

Re: Field Weakening

Postby Jasonv8z » 03 Apr 2017, 21:19

Thanks for the warning. I'm using a motor with a freewheeling clutch. If the motor decides to stop suddenly, it only has to stop itself.

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

Re: Field Weakening

Postby pf26 » 04 Apr 2017, 11:49

If you want to implement field weakening, you could take example from the AN1078 of Microchip http://ww1.microchip.com/downloads/en/AppNotes/01078B.pdf. Basically, you store a table with couples of points (eRPM, Id ref current), and you need a function to interpolate the eRPM and determine the Id reference accordingly - or you may use the current duty value instead of eRPM.
In "mcpwm_foc.c", there is a function "void mcpwm_foc_adc_inj_int_handler(void)". You could implement field weakening in "case FOC_SENSOR_MODE_SENSORLESS" after the comment // Inject D axis current at low speed to make the observer track better
the new id_set_tmp has to be calculated there.

But I think you only increase your system efficiency in case your battery voltage reaches your VESC max voltage capacity. Otherwise, you better increase battery voltage than use field weakening. When running at low RPM/high torque, I doubt having a slightly reduced PWM (due to higher input voltage) would significantly affect the systems losses.

joe90
Posts: 49
Joined: 15 Dec 2015, 16:52

Re: Field Weakening

Postby joe90 » 04 Apr 2017, 14:40

Ask Benjamin before coding,

He told me that everything is there for field weakening, it's just that the Id parameters are not there in the older VESC tools.
Maybe this changed.
Michel Cote
Twin v4.7 + SK3 6374 149KV
Bicycle
2500W peak/unit on 12S

Hummie
Posts: 109
Joined: 10 May 2016, 04:05

Re: Field Weakening

Postby Hummie » 04 Apr 2017, 20:23

Pf26 can u give an example of how inefficient it is to run a higher kv and is it an increase of heat in the motor or just the controller? I have a 90kv motor and would like the motor to stay as cool as possible and also have the option to hit higher speed.

Jasonv8z
Posts: 3
Joined: 29 Mar 2017, 04:51
Location: San Francisco, CA

Re: Field Weakening

Postby Jasonv8z » 05 Apr 2017, 03:59

Thanks for the help. In my case, I'm using a 48V ebike battery, so I'm already close to max voltage. The efficiency gains would come from the lower current in the phase wires feeding the motor. My bike motor (and many others) use a standard connector rated for only 15A and about 70cm of 1.5mm^2 phase wires which already get quite warm. I think lower kv would be better for the input capacitors in certain situations. With ebike motors, the selection of motor kv is also limited unless you are willing to wind it yourself or custom order from the factory. Rather than going through such trouble, it would be nice to make some tweaks in software to get more speed out of a motor I already have.

I tried the phase advance setting in BLDC mode, but did not notice any differences at no load. Is this feature operational?

rew
Posts: 940
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Field Weakening

Postby rew » 05 Apr 2017, 07:07

The thing with electric motors is that they provide maximum torque already at standstill. And for your bike, you need maximum torque when you're going fast. So I don't see why reducing torque at high speed would benefit you much.

Of course, you may have a powerful motor to accelerate quickly, and accept a slower acceleration near your top speed.

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: Field Weakening

Postby benjamin » 05 Apr 2017, 10:04

Field weakening is on my todo list, but I haven't implemented it yet. The best way to implement it is probably to look at the modulation and requested q-axis current vs actual q-axis current. When the modulation is at maximum and the iq is behind the requested value, a negative id can gradually be injected until iq reaches the requested value or until id is at the maximum allowed value or the total magnitude goes above the current limit.

The problem I see with field weakening is that most control modes are implemented such that requesting 0 current switches off the power stage as this is more efficient, and that is not a good idea during field weakening if the motor speed is too high. However, in many cases this might not be a problem since at full modulation the rectified motor voltage will be a bit lower than the bus voltage since SVM does not reach the full rms bus voltage unless overmodulation is used which distorts the waveform. Also, at full modulation iq is 0 since extra voltage above the back emf voltage is required to overcome the resistance and produce current, meaning that field weakening is required to produce torque even before the motor reaches the no-load speed. Therefore I think that probably 20 to 30 % extra speed can be achieved in some situations without running into trouble when stopping modulation if this is considered, and this is probably the amount of field weakening that will be allowed in the first implementation.

However, in general however, field weakening should be avoided if possible. A motor will run significantly more efficient by increasing the bus voltage to produce torque at high speed compared to doing field weakening. If the bus voltage cannot be increased a motor with higher kv should be considered if possible. Field weakening should be the last thing to use. I might implement it in my ebike though since I already have the motor and don't feel like rewinding it (but my ebike is actually fast enough).


Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests