How does VESC adjust output voltage?

Does anyone know for sure if the VESC controls motor speed by applying pwm to the output to reduce the effective voltage, or by using a transformer-like mechanism to trade voltage for current?

Maybe try googling â€śDutycycleâ€ť Thats how every Esc works, modulation of the dutycycleâ€¦

Thatâ€™s how hobby escâ€™s work The Vesc has duty cycle option, current control option and watt control option with akmaniac firmware

1 Like

current control no reverse with brake has been my go-to for the past few years.

still need to try this watt control thing.

2 Likes

What you are describing is bldc (brushless dc). It outputs pwm dc voltage. The motor is an inductive load so it smooths the pwm signal to make current look somewhat like a sin wave.

Foc is slightly different. From what I understand it is actually varying voltage to the base of the transistor so that the VESC outputs a sin wave

Voltage in all forms of control is duty cycle. Timing/phase control is either sequential BLDC, or All phase FOC for our applications. Motor speed is kV * voltage. Current is a factor of load required to spin the motor at speed.

Duty cycle 25% Voltage at point in time 38.9V Motor voltage at point in time (38.9 * .25) = 9.725V RPM motor wants to be at with applied voltage (190kV * 9.725) = 1846 RPM

Current is dependent on load, resistance of a motor and the applied voltage will give you No-Load Current. Ie for a set of 190kV motors I have the no load current at 9.7v is 1.6A. so at 9.725 motor volts, the load can be no less than 1.6A. add a factor of load to it and the current will increase continuously until the motor can achieve the speed of itâ€™s applied voltage * kV ie 1846RPM.

2 Likes

Gotcha, it pwmâ€™s it. Interesting that pwm decreases voltage but increases amperage. I guess the power needs to be conserved, so it has to be true. Thanks!

Kind of. BLDC is closer to PWM because the gates open and close on the fets and only two phases are powered are once making a square wave form. FOC is continuous modulation of the amplitude across all phases making a trapezoidal/sine.

Speed doesnâ€™t equal torque. Speed is a result of kv and voltage. Torque is a result of efficiency and current at a given voltage.

Kv = RPM per volt Rm = motor resistance in Ohms Io = No load current

Kq Torque constant.(units = N m): Kq = 30/(pi Kv)

RPM and TORQUE at current I: RPM = Kv(I â€“ Io) Q = Kq(I â€“ Io)

MOTOR EFFICIENCY: Î· = Mechanical power out/electrical work in Î· = (V- I Rm)(I - Io)/(V I): V and I= working voltage and current.

CURRENT AT MAX EFFICIENCY: Imax = sqrt(V Io/Rm)

Torque at max efficiency: Qmax = Kq (Imax â€“ Io)

RPM at max eff: RPMmax = Kv( V â€“ Imax Rm)

2 Likes

Iâ€™m not a scientist or electrical engineer. All I know is that with Vesc in current control and no load like when the board is upside down, the wheels spin full speed regardless of throttle position. Only when load is applied does the throttle increase/decrease speed. To a common man like myself, it seems that the Vesc in current control outputs constant voltage with variable current.

With my old car escâ€™s which ran in duty cycle, it was a completely different story. With no load, motor speed was variable by throttle position.

Not true.

You can see me modulating speed at the beginning of this video and slowly ramping to full

I donâ€™t recognize thatâ€¦ Easy on the throttle makes wheels turn slowly even with no load.

I think the VESC controls voltage, and measures current. Thus to â€ścontrolâ€ť current, itâ€™s applying PID control, varying the voltage until it achieves the desired current draw?

Are you running in watt control mode? I run in current control BLDC no sensors and mine doesnâ€™t work that way I get full speed at 1/4 throttle with no load My car escâ€™s had variable speed from zero to full throttle with no load.

No watt control in 3.xx only watt limits.

Iâ€™m using 2.18 on Vesc 4.12 there is no watt limiting on this version. So I guess things have changed with the newer firmwares.

Guess Iâ€™m just an old dog that wonâ€™t learn new tricks.

1 Like

Ah, so Ackmaniacâ€™s firmware still has the added watt control feature just integrated as the standard max wattage part of current control in the new 3.xx+ firmwares, where max wattage set = 100% throttle, decreasing to say 50% wattage at 50% throttle and so on (based on linear throttle curve) as opposed to just a limit in the standard firmware?

I havenâ€™t had a chance to test and feel the difference between standard 3.xx+ compared to Ackmaniacâ€™s, but when I heard the standard firmware had watt limits now, I assumed it basically meant it worked the same as Ackmaniacâ€™s controlling wattage linearly based on duty cycle and not just as a limit.

No, thats how every ESC works.

Thats how you tell the controller what to do, but has nothing to do with the output of the ESC. Since the Mosfets (at least in our use-case) has simplified only 2 states, Open or Closed, you can just modulate the dutycycle. Current control is measuring the current (by shunts) and adjust the dutycycle/pwm-output to it.

Practically FOC works after the same principal: the mosfet still has only 2 states (again simplified, no ramp up, no ramp down, no leakage, no resistanceâ€¦), Open or Closed, so to get the desired sine wave you need for FOC, you simply vary the dutycycle and get something like this: