Anyone ever modified Kp/Ki settings on a sabvoton?

Bobby.T

10 mW
Joined
Mar 28, 2021
Messages
21
I am running a 96120 on a 5000w q260v4 on a 23s 150amp 70ah battery. The top speed is there 65-68 mph but the accel is soft. I have unlocked it, set it to max, reduced thr response time and its still soft, so I am thinking my only option may be adjusting the Kp and Ki but I need to know
A. how adjusting 1 affects things
B. how much I can change 1
C. if I change 1 how much do I change the other?
 
Either someone tried to tune the exact motor/controller combination else there’s no answer on this really since the response will be unique to each combination.

You can do a basic PI loop trim but be careful, the kp and ki constants are affecting the motor regulation and a too big overshoot could harm the controller if the hardware isn’t properly regulated by safety features.

I’d do it like this - (in theory since i don’t have a Sabvoton):
-Make sure your bike can’t flip from the inertia of the sped up motor - once the response is like a huge slam on the motor the counterforces will really start acting on your bike

-Store the initial settings file for backup (if that’s possible, otherwise write the settings down)
-Set the motor current to half of the max or less. This is to allow any overshoot to stay within the capabilities of the controller.
-Make sure battery is in the low voltage range but still high enough to avoid bms cutoffs and undervoltage protection (estimated 3.6-3.8v per cell but it depends on what battery you have) This is to lower risk for voltage spikes in the system reaching too high levels for the hardware.
-Lift the wheel for hub motor, remove chain for mid drive
-Apply some clearly visible tape on the rotating motor or motor axle so you can use that and the film timing for rpm and acceleration estimations.
-Film some max throttle applications with your phone on slow mo mode, on a stand (so you can later compare the same film when you do changes)

Verify the controller response to parameter changes:
- Add 20% to kp, does response get faster? Then this is the right direction to tune for kp (if you cannot see a clear change, increase one more step)
- Remove 20% from ki, does response get faster?
Then this is the right direction to tune for ki

(Set back the original values for kp and ki after the parameter response tests, then start the tuning loop)

-Start changing kp in steps of a 1/5 of whatever unit was there from the start. When you get to a point where you feel you are close, start filming each run. When the drive begins to oscillate or get out of control, dial the kp back one step.

-Follow the same process with ki until oscillation or out of control occurs, then dial the ki back one step

At this point, you should be somewhere in the neighborhood and can try to fine-tune the process with smaller steps.

Take it easy before going on the road with your freshly tuned controller, it won’t be nice if the response is super agressive or oscillating, turn down the motor current to something really low and increase this in steps until you’re happy.

Happy tuning!
 
Last edited:
If you test with unloaded motor, then turn off the weakening field function before.
I killed two sabvotons with the wheel i the air.
The sabvoton is current regulated , if there is no load on the motor it will spin imidiatly to max RPM, in the case weakenkng field is activated the generated voltage from the motor can be higher than the controller can handle.
 
Good point! But that's screwed up. If controller has field weakening it needs to keep the field weakening control active until rpm and BEMF is below the base voltage (kv*voltage).

Sometimes i wonder why most of the available controllers are so poorly implemented!
 
Last edited:
I killed first a SVMC72260 and later a SVMC72150, both with weakening field activated and the scooter on the main stand with rear wheel in the air. After that I installed another new SVMC72150 without any other changes , but weakening field turned off and made 8000km with it, the last 3000km with activated weakening field.

The now installed SVMC72150 runs with peak power up to 14kw, the current calibration is slightly off , it draws up to 180A peak and around 175A continuous without any issues.

I will not do unloaded tests anymore 😉 .
 
I killed first a SVMC72260 and later a SVMC72150, both with weakening field activated and the scooter on the main stand with rear wheel in the air. After that I installed another new SVMC72150 without any other changes , but weakening field turned off and made 8000km with it, the last 3000km with activated weakening field.

The now installed SVMC72150 runs with peak power up to 14kw, the current calibration is slightly off , it draws up to 180A peak and around 175A continuous without any issues.

I will not do unloaded tests anymore 😉 .
Mind sharing how many amps you're using for flux weakening? I currently have a locked 72150 running at 50A flux weaking (max it will allow) but it's not enough for me. I'm planning to upgrade to 72200 which has a flux weakening limit of 100A but I heard you can blow the controller running at those currents of flux weakening which I'm not sure if it's true because if you can, why would they allow you go that high.
 
On both controllers I had set 50A weakening current. They only die when the motor can spin free and the generated voltage gets higher than the controllers max voltage.
 
which I'm not sure if it's true because if you can, why would they allow you go that high.
We don't really know, but that kind of thing in general is a pretty common thing with various types of hardware (not just ebike-specific stuff), for setup software/etc to allow outside-safe-range-for-the-hardware settings, usually with no warnings or confirmation dialogs letting you know this could cause a problem.


For this case, the controller should be reading the voltage from the motor phases and seeing a trend upward that could result in a voltage higher than it's hardware can handle, and either shutdown or refuse commands leading to higher RPM than that. But apparently it doesn't.


For another instance I can recall, Kelly allows changing settings on a controller while the motor is spinning, which bricks the controller. We don't know why they haven't corrected this problem, but some of their controllers do this, and have for years. If it was just a software bug I'd expect it to be fixed, since that's pretty serious...but they haven't, so one might assume it's a "feature". ;) They do have a warning in the manual about it, but AFAIK there is nothing in the software itself that tells the user not to do whatever it is they are about to do will break the controller. (at least one person has fixed the controller by reflashing the MCU "from scratch" with the right firmware, but that shouldnt' be necessary--this kind of problem shouldn't even be allowed by the software).



Truthfully, a well-designed controller (etc) would have setup software (and internal firmware) that cannot be set to more than say, 80% of whatever hardware specification the setting affects. Then there is always margin to allow for parts variation, manufacturing, environment, etc., so even under the worst-case usage and hardest-usage settings, the controller is always well within it's physical capabilities. (it should also have safety features like thermal sensing in the appropriate places to rollback output even more when necessary). This will increase the cost, probably significantly, because a controller otherwise rated for say, 72v 100A is now only good for at most 48v 80A (possibly less depending on other margins). If a 48v80A controller used to be say, $200, and the 72v100A was $400, now the 48v80A is $400, and the 72v100A might be $800. (not really extrapolated numbers, just statements to show the idea). Most of the stuff out there tends to be rated near the capabilities of the parts themselves in the usage they're put to. (you can't necessarily go by the single-component ratings, or just linearly add them together, etc, so a part that has 18 FETs each capable of 100A doesn't mean the controller is a 300A controller (18 / 2 halves of each phase bridge / 3 phases); if there are current spikes in a usage that is already at the spec limit, they could be damaged or fail).
 
The SVMC72260 died in a no load condition with the 5kw hub-motor in the air. It was only a voltage issue. No way these armada of transistors could be damaged due to overcurrent, phase current was set to 350A and line current was set to 200A.
After changing all the Fets the controller ran for a few weeks and then the hall sensors where not recognized anymore. The same hall problem with the 72150 a few months later. Both died after releasing the throttle. The big one died with a big bang, the smaller one died quiet with no dead fets Inside.



20201106_215450.jpg20201106_215437.jpg
 
Last edited:
for setup software/etc to allow outside-safe-range-for-the-hardware settings
This is why MQCON sells locked and unlocked controllers. They don't even provide warranty for unlocked controllers.
That's why if this is true and flux weaking above 50A can damage the controller then this is bizarre because this is excatly why locked controllers exist for.
 
Those things just mean that either the controllers are not well-designed, or the software is not well-written, such as to account for design issues or potential usage scenarios that can induce out-of-range conditions and prevent those from happening.

Motor controller design (hardware and software) seems like a very complex thing, based on the design threads here on ES, as well as threads like this one that show problems such as the one(s) above.
 
Can't we just agree that most controller manufacturers for ebikes and hobby don't care if their controller has basic system flaws, like the Kelly bricking error, Sabvoton faulty handling of field weakening control, flipsky vescs dead due to the use of faulty pins, Votols having a GUI that's unrelated to what the parameters do, chinese vescs that don't state that if you use the phase filtering feature in vesc program then your controller might die, APT controllers that brick when using the program etc etc.

It's a frustrating world and there's still room for a new manufacturer with some pride in their product.
 
Can't we just agree that most controller manufacturers for ebikes and hobby don't care if their controller has basic system flaws, like the Kelly bricking error, Sabvoton faulty handling of field weakening control, flipsky vescs dead due to the use of faulty pins, Votols having a GUI that's unrelated to what the parameters do, chinese vescs that don't state that if you use the phase filtering feature in vesc program then your controller might die, APT controllers that brick when using the program etc etc.

It's a frustrating world and there's still room for a new manufacturer with some pride in their product.
I think we can agree just based on the fact that most controllers, even premium ones have no basic protection like reverse polarity or current spike protection that costs few extra cents to implement and can potetionally save the consumers couple hundred bucks and the company receiving returns from customers claiming "The controller arrived bricked" when in reality the consumer shorted it and killed it.
 
Back
Top