Question regarding the drivetrain characterization tool

Our team is trying to do velocity control using the kv ka ks kp constants generated from the drivetrain characterization tool in the robot py GitHub. However we are only given one set of kv ka ks instead one a set for each side of our wcd robot. How do we get a set for each side or a kp for each side

2 Likes

They apply to both sides because a typical drivetrain is symmetric.

1 Like

So for the kp it outputs it’s the same for both sides?

This is correct. However, it is a good practice to check that your robot’s drivetrain really is symmetric. Hardware differences between the left and right sides can arise from many causes.

A good starting diagnostic is running with full command with the wheels up (robot on jackstands). The sound and the current draw should be similar on left and right. If they differ, the robot will likely pull to one side even if your characterization is correct.

That’s only the case with feedforward-only. Your feedback controller should be robust to that. Just treat the difference as a disturbance for the controller to overcome.

This depends on how severe the asymmetry is. At high speeds and/or low battery, it doesn’t take much extra drag to overwhelm feedback controller tuning. It is always better to check the hardware than just rely blindly on feedback control to correct asymmetry.

If you’re running out of control authority due to battery voltage sag, having a differently tuned feedback controller for each side won’t fix that. You need something more sophisticated than proportional gains like disturbance estimation. You can also scale the outputs based on the vbus, and that sorta works until your voltage drops too low (increasing your output as compensation can cause a lower drop due to inductive loads).

So having the same kp on each side is ok assuming both are perfectly identical buy they aren’t cause it never truly is so we have to tune it anyway?

1 Like

I won’t advise you on how or whether to tune controls. My advice is to check the hardware for severe asymmetric drag, and correct that IN HARDWARE if you find it. My criterion for severe drag asymmetry is more than 1.5 Ampere difference in current draw comparing left vs. right, at full demand and voltage.

Feedback control is great for rejecting disturbances; however, severely asymmetric drag is not a disturbance.