Balance bot questions


I am trying to tune my balance bot. I got it to balance quite good now, but the reaction to throttle input is really sluggish. So sluggish, I am afraid to drive it, because I might not be able to stop it in time.
I tried a few parameters to make it more responsive, but achieved nothing so far…
Here is the parameter file, if anybody has the time to look at it:

BalanceBot.param (15.9 KB)

And a short video of the balance bot, but running INAV. This was really dangerous, because I used a servo mixer, no disarming, no crash detection or angle limit. If the bot would have tipped over, the motors would have gone to 100% throttle:

I suppose you are running Manual mode? Throttle input controls how much it pitches:
It’s easier to drive in Acro mode, but you’ll have to tune pitch, speed and steering PIDs. Follow the tuning guide here:
Turn on crash detection: Set FS_CRASH_CHECK to 2 and CRASH_ANGLE to 20 degrees or so.

Sorry for not replying earlier. I waited for the AMS AS5047D encoders to arrive. I installed them and yesterday everything was working fine. Today I powered the rover up and it went beserk. It was suspended on a test stand, wheels of the ground and I tested the balancing reaction by tilting it back and forth. I then tested stick input and suddenly the motors go to full power and would not stop after disarming.
After I managed to yank the battery cable out, I noticed the HUD in Missionplanner was all green, even with the rover still and level and the compass was rotating like crazy. I pulled the USB cable and plugged it in again, the compass was still rotating, but the HUD was level again. I disabled ths compass and rebooted, everything looked normal. I armed the rover without battery power and the HUD rolled about 10 degrees to the right, I disarmed, HUD level again. This was repeatable, the rover did not move (roll) at all, of course. I saved the parameters, flashed arduplane, flashed rover again, wrote the parameters back. Everything looked normal again. But with a few stick inputs the rover freaked out again after balancing/driving normal, this time the crash detection worked and the motors shut down. It was always after going backwards, the slightest input forwards would make the motors go full throttle (I limited the ERPM in the VESC tool after the first mishap). After a few tries, the motors would suddenly go in the wrong direction. I checked the motor direction in the VESC tool and the settings were right. After a reboot, the motors turned in the right direction again.
When the motors turned forward, there was also a periodical millisecond brake in rotation, but not while turning backwards. I enabled realtime data in the vesc tool and both motors would brake at the same time for a split second. This might have been the cause for the full throttle problem described above. The motors would brake, the rover looses balance and tries to catch up with more throttle, till the crash detection makes it end.
I then disabled the encoders in ardurover, still the brake problem. I unplugged the encoders and the brake problem was gone. The rover balances now, but the slightest disturbance causes it to oszilate wildy. All with values that worked fine 24h ago. I experienced this during the initial balance tuning, going back to PID values that worked before, did not always result in the same behaviour. I had to start from scratch several times. The balancing performance is overall much worse than the makeshift solution with a F3 flighcontroller and INAV. Tuning INAV took about 15min to get a very good balancing performance. It has now been several hours with ardurover. Perhaps 50Hz looptime is too slow for a balancing rover. I have no idea what might cause the problems described above. If the encoders were overloading the Pixhawk, any problem should show in both rotating directions. Both VESCs braking at the same time speak for a false input from the Pixhawk, but the telemetry does not show it.
I do not expect any reply, I am just writing this down to sort my thoughts …