Sabvoton Controller Erfahrungen

Für alles was mit Steuergeräten zu tun hat. Bitte eventuell auch im speziellen Forum Ihres Rollertyps suchen.
Antworten
slothorpe
Beiträge: 561
Registriert: Do 4. Jul 2019, 14:14
Roller: Classico LI in schwarz, selbst gebautes Lasten-Pedelec
PLZ: 10717
Wohnort: Berlin
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von slothorpe »

Hallo MEroller,

Du weißt nicht zufällig, was die Standard-Werte von Current Loop Ki und Kd beim Sabvoton sind ?

Es muss ja mal eine Version der SW gegeben haben, bei der man zumindest Ki einstellen konnte, siehe 3. Screenshot bei https://endless-sphere.com/forums/viewt ... 78#p842395

Was habe ich beim MODBUS-Protokoll analysieren herausgefunden:

Die Parameter sind irgendwie in "Seiten" organisiert, so ähnlich wie die Oberfläche des Sabvoton Programms. In der Regel sind die Parameter in den Registern in der gleichen Reihenfolge wie in der Oberfläche der Sabvoton Software.
Diese "Seiten" fangen immer auf Adressen mit einer 8 hinten an.... Die meisten Register lassen sich leicht erraten, da man die Werte ja parallel auch in der Oberfläche sieht. Ausserdem kann man ja Parameter setzen und dann schauen, was über MODBUS geschickt wird, sprich welches Regsister geschrieben wird.

Die "SET - DEBUG" Seite beginnt bei Register 2648

Current Loop Kp ist in Register 2648
im Register 2649 steht eine 9
im Register 2650 ist der Hall-angle Test "Kippschalter" (0=disable, 1=enable)
im Register 2651 ist Control-Mode "Normal Run" (0) oder "Hall angle test" (1)
im Register 2552 steht der Test-strom für den Hall-Test (*54,6)
im Register 2553 steht der Hall-Winkel

Danach kommen 0, 0, 0, 3, 0, 0, 0, 0.... Werte, die man in der Oberfläche nicht sieht.

Also kommt vermutlich für Ki die 2649 in Frage.
Einen Kandidaten für Kd habe ich nicht...

Der Ki Wert hat ja wohl den "Sinn", das System eher zu dämpfen und dafür zu sorgen, dass der Regler eher langfristig in Richtung Zielwert strebt. Wenn man Kp zu hoch macht dann beginnt es zu schwingen, so sagt die Theorie und so kann man es auch merken, bei einem Kp von über 6000 (ich vermute mal, der Wert wird intern auch durch 54,6 geteilt) bekommt man ein Fiepen beim Gasgeben. Mit einem höheren Ki müsste man das wieder dämpfen können. Bei einem höheren Kp reagiert der Regler stärker auf Abweichungen und tatsächlich ist da das komische Geräusch viel schwächer bis ganz weg. Ich würde also gerne mal versuchen den Kp noch etwas höher zu setzen und dafür den Ki auch etwas zu erhöhen um die Schwingungsneigung zu unterdrücken.

Btw: das "unlock-Flag" ist die 2595, wenn man das auf 1 setzt kann man die Strombegrenzung überschreiben, wozu auch immer das gut ist (ich war neugierig und habe die MQCON-current_unlock.exe ausprobiert, geht).

Gruß
Holger
Zuletzt geändert von slothorpe am Mi 14. Aug 2019, 18:26, insgesamt 2-mal geändert.

Benutzeravatar
MEroller
Moderator
Beiträge: 17079
Registriert: Mo 1. Nov 2010, 22:37
Roller: Zero S 11kW ZF10.5/erider Thunder (R.I.P)
PLZ: 7
Tätigkeit: Entwickler (Traktionsbatterie)
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von MEroller »

slothorpe hat geschrieben:
Mo 12. Aug 2019, 21:16
Hallo MEroller,

Du weißt nicht zufällig, was die Standard-Werte von Current Loop Ki und Kd beim Sabvoton sind ?
Du meinst auf der Debug Seite? Current loop kp und current loop ki? Im vR one mit MQCON Controller hatte ich auch nur noch kp, mit 299. Was mit dem 5kW 72V Goldenmotor super funktioniert hat, ohne instabile Regelung irgendwo im Kennfeld. Leider kein ki noch kd...

Wünsche viel Erfolg beim weiteren Experimentieren, du bist auf jeden Fall auf dem richtigen Dampfer und hast das notwendige Verständnis :D
Zero S 11kWZF10.5
e-rider Thunder 5000: Ruht in Frieden

slothorpe
Beiträge: 561
Registriert: Do 4. Jul 2019, 14:14
Roller: Classico LI in schwarz, selbst gebautes Lasten-Pedelec
PLZ: 10717
Wohnort: Berlin
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von slothorpe »

Bei einem Kp von 300 „rumpelt” der Motor fast, Sabvoton empfiehlt ja einen Kp von 1000 für 10-Zoll Motoren und sagt, dass Kp 3000 nicht überschreiten soll, bei 1000 ist das schon deutlich besser, bei 3000 noch besser, bei 4000 noch etwas besser und irgendwann fängt dann das Fiepen an (sprich der Regelkreis beginnt zu schwingen). Daher würde ich gerne mal mit Ki und Kd spielen, da müsste es möglich sein, das wieder zu dämpfen.


Naja, werd mir mal nen Arduino-Sketch basteln morgen, mit dem ich beliebige Register setzen kann ... mal sehen, was man erreichen kann. Notfalls halt Factory Reset und von vorne Anfangen...

Gruss
Holger

slothorpe
Beiträge: 561
Registriert: Do 4. Jul 2019, 14:14
Roller: Classico LI in schwarz, selbst gebautes Lasten-Pedelec
PLZ: 10717
Wohnort: Berlin
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von slothorpe »

...so, habe jetzt einen Arduino Sketch mit der Modbus-Master Library geschrieben, mit dem ich beliebige Register lesen, setzten und ganze Register-Listen ausgeben kann. Echt easy, wenn man solche Bibliotheken nutzt.

ich werde mal nachher vorsichtig probieren ;-)

Ich werde auch mal schauen, dass ich die Register-Liste dokumentiere, soweit das möglich ist...

BTW: das bietet ganz neue Möglichkeiten, nen schicken Tacho zu entwickeln :roll:

Peter51
Beiträge: 6122
Registriert: Sa 6. Aug 2011, 10:04
Roller: E-Max 90s, E-Max 110s, E-Max 120s
PLZ: 2
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von Peter51 »

Ich denke, du bist auf gutem Wege:
Auf ES hat Jemand geschrieben:
* Lack Volt = Think of this as the low voltage cut off, set this to the minimum voltage you want the controller to cut off power.
Example: Your using a 48v battery, you want to set this around 42V
* Over Volt = Over voltage protection, I would set this to 95v or slightly above your battery’s maximum voltage. The maximum setting is 95v.
Example: Your using a 48V and you to set this around ~55v
* Rated DC Current = This is the continuous rating for Battery amps, which dictates power. Set this Rated DC current = Max DC current or lower than Max DC Current. Increasing this number will increase wattage power and top speed.
Example: Rated DC Current 50A x 48V = 2400W!
* Max DC Current = Maximum amount of Battery amps. Increasing this number will increase wattage power and top speed. But keep this equal to or higher than Rated DC Current.
Example: Rated DC Current 50A and Max DC Current 70A
* Limit DC Current = Set this to match the Rated DC Current
* Rated Phase Current = Phase amps, this controls the continuous amount of phase amps going into the motor. More phase amps will increase torque and acceleration. Generally you want this higher than * Battery Amps, about 2-2.5x higher, but tune to your setup accordingly.
* Max Phase Current = The maximum amount of phase current, keep this equal to or higher than the Rated Phase Current.
* Electric Brake = Enable for Regen, only applies to Direct Drive Hub Motors.
* Flux Weakening = Enable to increase top speed at the expensive of efficiency. Also known as field weakening. Do not recommend higher than 50A otherwise you can damage or destablize the motor’s magnets.
* Flux weakening current = 0-150A, the higher this setting the higher you can boost the top speed of your motor. Technically this counters EMF of the motor and forces the motor to run at a higher RPM.
* Electric Brake Ph current = 0-200A This controls how strong the regen will be I generally set this at 100A on a 17? moto wheel for street riding and 150A for track riding. 26? Wheel you would want 80A or higher. Be warned, setting this too high will skid the rear tire upon deceleration and can fish tail the rear. Again, tune according to your motor and wheel setup.
* Pn = Very important to set the correct number of pole pairs for the motor otherwise you will have poor performance. This is the number of magnets in your motor divided by two.
* Hall Angle Test = Very import to run the Hall Angle Test map the hall sensors with the controller. Gone are the days of trying various hall and phase combinations.
* Try a phase combo then click enable hall angle test, and change control mode to hall angle test. Click OK, then also change the test given current setting from 10A-28A, your motor should spin forward. * Very Important to suspend the bike, because the motor will spin on its own for a few minutes.
* If Hall Status = Passed then congrats you found the right combination! The Hall Angle setting should have changed to the proper “degree”. Click OK then yes on parameter store. Restart the controller and take it for a spin!
* If the motor spins backwards change the Motor direction setting under “Motor”
* If the Hall Test fails then change a different phase combination and run the hall test again.
* To save the settings, you have to click SET! > DEBUG > Parameter Store > Yes and click OK. That will save the settings.

1. Vielleicht doch lieber die Magnete zählen?
2. Der max. Sollwert ~ 4,2V (hall throttle grip) ist gleich dem vollen Motorphasenstrom. Was passiert denn, wenn du nur ein klein wenig Strom gibst und der Motor auf Enddrehzahl beschleunigst?
E-Max 90s von 2010 - Vmax>50km/h - km-Stand >11.400 - 4x Greensaver SP50-12 50Ah C20
E-Max 110s von 2010 - Vmax>50km/h - km-Stand >1.800 - 16x LiFePo4 CHL 40Ah
E-Max 120s von 2015 - Vmax 80km/h - TÜV 03.2024 - 72V100Ah LFP-Akku - JK-B2A24S15P Balancer BT - MQ Controller BT

Peter51
Beiträge: 6122
Registriert: Sa 6. Aug 2011, 10:04
Roller: E-Max 90s, E-Max 110s, E-Max 120s
PLZ: 2
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von Peter51 »

Daran hat auch schon Jemand anderes gearbeitet:
I had a couple people message me for source code to the dashboard. Unfortunately, I lost it in an HDD crash.

I ended up getting rid of the "street legal" set up I had, and converting it to a bicycle. I wanted to make sure I would be able to comply with my local legal compliance of an "electric assist bicycle". So I needed to have a way to limit power to 750W, and limit top speed to 25 mph. I looked into the 3-speed switch on the controller, but I was unable to get it to work. Instead, I remembered being able to read data from the controller, and wanted to see if I could also write configuration data and program max current, and motor speed limit on the fly with an arduino. I believe I was successful, so I thought I would document it here in case anyone else is looking for something similar.

I started from the Arduino sketch in the OP. I just got it to a functional state. It could be MUCH cleaner, possibly using a Modbus library like this (https://playground.arduino.cc/Code/ModbusMaster/) instead of sending the raw bytes. However, for my application, it was fine.

I started by capturing the serial data by using an application called "Device Monitoring Studio" (https://www.hhdsoftware.com/device-monitoring-studio) in a 14 day trial period. From there, I was able to determine the following registers:
Motor Speed Limit: 0x0A4C
Rated DC Current: 0x09F7

The format for writing registers is similar to the format to the read data sketch in the OP.
Byte 1: 0x01 (address of controller)
Byte 2: 0x06 (write single register)
Bytes 3-4: Register Address
Bytes 5-6: Data
Bytes 7-8: CRC

For example, to set the motor speed limit to 100%, I wrote
01 06 0A 4C 00 64 4A 2E

The last two bytes are a kind of check to ensure data integrity. They can be obtained either by capturing the data, using an online CRC calculator, or generating them on the fly on the Arduino. I was super lazy, so I just used this online calculator: https://www.lammertbies.nl/comm/info/cr ... ation.html (Use CRC-17 (Modbus)) This calculator gives the bytes in reverse order. For example, it is says 0x4B37, byte 7 is 0x37, byte 8 is 0x4B.

With that, I was able to modify the original sketch to write the correct registers. Note: you need to run the enable_data function before the Sabvoton controller will allow you to write other registers.

I'll attach my sketch, but again, don't judge me too much! I used the switch from my rear brake lever to signal the Arduino when I want to switch modes. It requires 5 ON/OFF cycles within a few seconds, and then it will send the appropriate commands to the Sabvoton controller to switch modes. Works pretty well so far. I am powering the Arduino off of the 5V present on the Sabvoton controller USB connector, so I am using a low-power library to minimize current draw.

Attachments

Sabvoton_Legal_Switch_3.zip
(1.68 KiB) Downloaded 19 times

Top
E-Max 90s von 2010 - Vmax>50km/h - km-Stand >11.400 - 4x Greensaver SP50-12 50Ah C20
E-Max 110s von 2010 - Vmax>50km/h - km-Stand >1.800 - 16x LiFePo4 CHL 40Ah
E-Max 120s von 2015 - Vmax 80km/h - TÜV 03.2024 - 72V100Ah LFP-Akku - JK-B2A24S15P Balancer BT - MQ Controller BT

slothorpe
Beiträge: 561
Registriert: Do 4. Jul 2019, 14:14
Roller: Classico LI in schwarz, selbst gebautes Lasten-Pedelec
PLZ: 10717
Wohnort: Berlin
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von slothorpe »

Peter51 hat geschrieben:
Di 13. Aug 2019, 17:01
1. Vielleicht doch lieber die Magnete zählen?
2. Der max. Sollwert ~ 4,2V (hall throttle grip) ist gleich dem vollen Motorphasenstrom. Was passiert denn, wenn du nur ein klein wenig Strom gibst und der Motor auf Enddrehzahl beschleunigst?
zu 1. - frage ist wie, dazu müsste ich wohl den Motor aufmachen, aber die 27 scheint schon OK zu sein. Wie gesagt, nach meiner Wahrnehmung hat die Polzahl keine Auswirkung außer die Berechnung der Umdrehungen pro Minute des Motors. Die Aussage hier scheint mir falsch, ich kann keinerlei Performance-Unterschiede feststellen, egal ob ich da 2, 4, 16, 27 oder 64 eintrage:
Peter51 hat geschrieben:
Di 13. Aug 2019, 17:01
* Pn = Very important to set the correct number of pole pairs for the motor otherwise you will have poor performance. This is the number of magnets in your motor divided by two.
Zu 2. der Sabvoton läuft im Torque-Modus, d.h. mit dem Gasgriff regelt man deas Drehmoment, nicht die Drehzahl. Wenn er auf dem Hauptständer steht, dreht er auch bei fast kein Gas bis zu Maximaldrehzahl, ist beim Fahren aber kein Problem. Das Geräusch ist davon unabhängig, es tritt, wenn es auftritt, sowohl bei Vollgas wie bei wenig Gas auf.
Peter51 hat geschrieben:
Di 13. Aug 2019, 17:26
Daran hat auch schon Jemand anderes gearbeitet:
..................
Den Artikel hatte ich auch schon gefunden, daher wußte ich, dass es MODBUS-Protokol ist, was der Sabvoton spricht.
Der Arduino-Sketch von dem Menschen ist aber totaler Müll, hat er aber selbst erkannt:
Peter51 hat geschrieben:
Di 13. Aug 2019, 17:26
It could be MUCH cleaner, possibly using a Modbus library like this (https://playground.arduino.cc/Code/ModbusMaster/) instead of sending the raw bytes. However, for my application, it was fine.
Mit Hilfer der MODBUS Library kann man sehr viel einfacher und vor allem fehlerfrei mit dem Controller kommunizieren, ich werd das nochmal ein wenig rund machen und dann hier einstellen. Man braucht nur eine einfache serielle Console (Terminal-Emulation oder den Serial-Monitor der Arduino-Entwicklungsumgebung) dafür.

Das beste ist, dass mit einem Arduino-Nano zu machen und den direkt ins USB-Kabel einzubauen, dann kann man mit einem Schalter umschalten zwischen dem Consolen-Modus und dem Betrieb wie mit dem MQCON-Kabel und der Sabvoton-SW. Braucht man das original-Kabel nicht mehr...

Das Kernproblem ist natürlich, dass längst nicht alle Register des Sabvoton eindeutig erkennbar oder einem Sinn zuordenbar sind, mit der Consolen-Version kann man ggf.auch großen Mist bauen, wenn man die falschen Parameter verändert....

Gruß
Holger

Peter51
Beiträge: 6122
Registriert: Sa 6. Aug 2011, 10:04
Roller: E-Max 90s, E-Max 110s, E-Max 120s
PLZ: 2
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von Peter51 »

Ich probierte einmal 23 Polpaare.
Vielleicht bekommst du ja von MQCON das richtige Register für Ki ? Ich glaube aber nicht, das Ki dir viel brächte.
Mit restore kommst du doch immer auf die Werkseinstellung zurück?
E-Max 90s von 2010 - Vmax>50km/h - km-Stand >11.400 - 4x Greensaver SP50-12 50Ah C20
E-Max 110s von 2010 - Vmax>50km/h - km-Stand >1.800 - 16x LiFePo4 CHL 40Ah
E-Max 120s von 2015 - Vmax 80km/h - TÜV 03.2024 - 72V100Ah LFP-Akku - JK-B2A24S15P Balancer BT - MQ Controller BT

slothorpe
Beiträge: 561
Registriert: Do 4. Jul 2019, 14:14
Roller: Classico LI in schwarz, selbst gebautes Lasten-Pedelec
PLZ: 10717
Wohnort: Berlin
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von slothorpe »

Mal sehen was Sabvoton sagt... ich hatte noch keine Zeit mit den Parametern zu experimentieren....

Andi_UR
Beiträge: 99
Registriert: Mi 2. Mai 2018, 13:23
Roller: Uranus R
PLZ: 0
Kontaktdaten:

Re: Sabvoton Controller Erfahrungen

Beitrag von Andi_UR »

slothorpe hat geschrieben:
Di 13. Aug 2019, 19:05
zu 1. - frage ist wie, dazu müsste ich wohl den Motor aufmachen, aber die 27 scheint schon OK zu sein. Wie gesagt, nach meiner Wahrnehmung hat die Polzahl keine Auswirkung außer die Berechnung der Umdrehungen pro Minute des Motors. Die Aussage hier scheint mir falsch, ich kann keinerlei Performance-Unterschiede feststellen, egal ob ich da 2, 4, 16, 27 oder 64 eintrage:
Die Polzahl ist immer gerade, die Polpaarzahl kann auch ungerade sein. In manchen Controllern werden Pole eingestellt in anderen Polpaare.

Antworten

Zurück zu „Steuergeräte / Controller“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 4 Gäste