VESC Tuning and Tips

Hello guys,

As you may know it is very hard to tune a vesc controller and there aren’t any good guides online. This has created a lot of misconceptions and has caused some serious problems like cut outs or even fires :fire:
I have found a very nice tuning guide(although it is a little advanced) from the creator of the mxlemming vesc observer!
I hope you will find it useful :innocent:

10 Likes

This looks like a great guide! Thanks for sharing.

Early in the post it says not to use slow abs max under any circumstances, is that still applicable to esk8? I was under the impression that for the majority of us it’s better to use slow abs max in the hopes of saving the riders skin at the expense of the hardware.
Is anybody able to clarify?

4 Likes

Yes as i understand it, it is for esk8 also. When you get an abs over current error it means that your motor got saturated really fast and the observer lost traction of the motor. So you need to tune or change the observer, or better use an encoder.

He answered this as well at the end

Summary

the typical unstable observer behaviour. That looks like a pulsating sin wave, with fault triggering when the pulsation goes above the abs max
The reason this happens is that the observer struggles to accurately track the angle, and so the pwm output voltage phase angle changes faster than the PI current control loops can keep up. The motor is oscillating between leading and lagging power factors. Observer gain and inductance (L and Lqd) are the tools to tune against this. Sometimes with very salient motors (or very saturated ones), it is hard to eliminate this. This is where ortega observer can help; when applying the correction factor, the ortega observer applies it at an angle that results in a power factor reduction which is stable, but less efficient.

3 Likes

I think I understand the general idea and may just be acting pedantic about phrasing, please bear with me:

What I’m reading is:
“do not use slow ABS over current ever.”

What I’m hearing is:
“slow ABS over current can restore functionality to an improperly tuned vesc but cannot and should not ever be used as a solution to OC faults, proper tuning is the solution to OC faults”

My question is:
If you’ve done all you can to properly tune the system and cannot trigger a fault on the bench, is it still recommended to ensure slow ABS OC is off. In the (admittedly still unpredictable) case of an error wouldn’t the rider be safer with slow ABS OC on?

Tldr: slow ABS max isn’t a solution to OC faults, those need to be handled with tuning and testing. What’s the benefit of having it turned off if you’re not experiencing faults?

2 Likes

That is a good question , maybe Mxlemming can answer this. But i haven’t seen anyone in the vesc forum recommending slow abs. Also @ShutterShock had an overcurrent cutout this week and i think he has slow abs true

3 Likes

i think his issue was firmware related more than slow abs related. i ran it on my solos with the newest firmware without issue and consistently maxed out motor amps on launches. i was having random overcurrent faults prior to the update similar to what Ryan was dealing with.y also had it set to true on sidewinder running dual d100s’

2 Likes

@Egtscs asked Mxlemming specifically about slow abs on the es forum, check his answer.
The problem is that 99% of esk8 users have slow abs on and they don’t tune their escs.
Benjamin Vedder said that if you have slow abs on without tuning, you are basically destroying your controller https://youtu.be/ui_6O5GrbnQ?feature=shared&t=1941
This is why we have so many dead escs in the esk8 world :sweat_smile:
Now bear in mind that this applies only if you are pushing your esc to the max, if you are a regular user you probably don’t do any harm

3 Likes

I’m just going to paste this from MXlemming here since I think he told me the same thing in 2-3 ways but this is the only time I actually understood it :sweat_smile:

(In reference to the amount of additional time slow ABS max may add to your opportunity to catch yourself)

Actually I believe this isn’t exactly the case. I think that you have to have:
1: an acceptable margin of error between target current limits and absolute max current limits. Like you said.
2: tuning that allows the system to measure current within an acceptable margin of error.

As far as I understand, to trigger an OC fault your tuning only needs to be worse than your safety margins. With incredibly good tuning you can likely push 199a on a 200a Max controller.

With incredibly bad tuning you might push 150a out of a controller set to 25a, for this you’d need to be 125a in error which is already massively problematic but won’t necessarily cause faults if your margins are large enough like a 200a abs max.

Again probably

But worth knowing that both circumstances need to be within an acceptable range to avoid faults

4 Likes

The tuning seems to be the difficult part here though. I hope he makes the video.

4 Likes

What i mean by this is that this thread is towards people who race and push their escs and should not discourage people who ride for fun. Oscillations happen at high amps and high duty cycles

Honestly, the difficult part is to find a dyno :sweat_smile:. Mxlemming said that you can tune an e-bike using the inertia of the wheel so maybe it is not so hard after all
Also keep in mind that if you buy some encoders you don’t have to do any tuning

4 Likes

Any recommendations? Im not sure where to even start. Would be interested in trying something though, my biggest problem is rebuilding confidence in eskate and eliminating a major variable for abs faults would be amazing

5 Likes

The Mxlemming guide is a good first step!
I tried some tunning yesterday and got hooked(who doesn’t like free power? :stuck_out_tongue:) so i didn’t search for encoders.
But there are some threads about encoders on the forum
[help] VESC Tool + AS5047
Need help connecting the tle5012b encoder to the vesc

2 Likes

So what I’m hearing is I need to adapt 29 inch MTB tires to my eskate for tuning purposes.

6 Likes

Exactly :stuck_out_tongue:
Anything that has inertia basically
You can add or remove inertia with gears too
But i think for our case a simple brake dyno or something that adds a little friction will be better and cheaper

2 Likes

Gears have backlash and might not be the same as simply adding rotational inertia.

3 Likes

have issue with vest stopping then continuing after 10 20 seconds
i have log files

1 Like