WPILIB SysId drivetrain dynamic tests are jittery

Hello, when my team runs our System identification for our drivetrain the dynamic tests don’t really follow what the example video on the docs shows. Our drivetrain setup is 4 spark maxes connected through CAN to 4 NEO motors with a NavX gyro. The back two spark maxes have REV through bore encoders connected to their data ports and the encoders connected to our gearbox’s output shaft.

During the quasistatic tests, it follows the example video, however when we try the dynamic tests the robot goes a bit jittery where the motors sound like they’re going back and forth. A different time we did the dynamic tests the robot would start turning to the left. Sadly I don’t have a video and don’t have the outputs of our tests to show and won’t be able to for a bit, but I can show what our config looks like.

If the turning to the left is only gradual that is supposed to happen, otherwise I am un aware of a solution to this issue, only thing I would know is make sure your wpilib stuff is up to date. Also though, if you are using Spark Maxes and neo’s, you can select built in for the encoder.

It wasn’t a gradual turn, it would maybe go a couple feet forward then make almost a sharp 90 degree turn into the wall.

Our wpilib is up to date, our sysid software is even newer than what wpilib has.

Wouldn’t using the built in encoders for the NEOs changing my config to include the gear ratio?

1 Like

I have no idea what your issue is, it is the weirdest SysID issue I have ever heard of. The built in encoder really would only change your results that you get back. The only other things I could think of would be physical issues like wiring or maybe you have some motor inverted incorrectly. If you want to calculate these constants there are other ways to do it.

What is the other way to calculate the constants?

You can slowly increase the voltage until the robot moves for kS, and you can set a voltage for kV and measure the speed. The. You take the (voltage applied - kS)/speed. Not sure about kA though. kA is the voltage required to accelerate at a rate of 1 meter per second squared. I would guess that if you moved at a constant voltage and then upped it one volt you could do (newSpeed - oldSpeed)/timeToFinishAccerating to get the acceleration, then kA would be equal to 1/acceleration.

Next time when you run sys id, can you verify ur not browning out?

2 Likes

If you had perfect measurements and no noise, yes. In practice, acceleration is extremely hard to measure due to vibrations, discretization, and timing constraints; and you either need to collect enough data for a regression (what SysId does) or else estimate kA theoretically.

1 Like

I know we were using fully charged batteries and I don’t remember seeing any brownouts as we ran it multiple times, with the same results.

You’d be surprised I would make sure to look at the driver station, and ensure that your drive gearing can handle the dynamic test

We’re using the andymark kit of parts chassis with the standard gearing

Good idea from @vargoose84 try lowering the voltage for the dynamic test to see if that works. If it does that means your motors are drawing to much current and you need to change the gearing.

2 Likes

I thought the sysid program was built with the andymark kit of parts chassis in mind?

It’s not designed with any particular drivetrain in mind.

I got the system identification to work by not using the REV through-bore encoders and just using the built-in encoders in the NEOs.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.