Configuration of kv and ka Values for Feedforward in Elevator

Hello, my team is using feedforward to make the elevator position more precise, but we are unsure about the configuration of kv and ka. According to the WPILib documentation, it is possible to configure these values using a graph, but we are looking for a faster way to make these changes. Is there a formula to determine these values? If so, how can we do that? We are using 2 NEO motors and a continuous belt elevator.

First you should understand what the values mean. Do you?

1 Like

Yes, I even did some tests, but I would like to improve the accuracy. To find the KV last time, we divided the applied voltage by the motor’s RPM in rad/s and the value of the reduction gearbox. I’m not sure if this is the best method, but that’s how we did it.

Yes actually. kV and kA feedforwards are just the back-emf constant (+ a very small amount of viscous friction) and effective mass respectively.

The back-emf constant has to be backed out from the values the motor manufacturers give you (because they can’t make proper spec sheets like the rest of the world) using the formula
k_b = \frac{rated voltage - freecurrent * r_a}{freespeed} , (where r_a is the effective resistance) and then convert this value to the frame of reference of that the controller is looking for. If there is a lot of viscous friction, you may have to bump this value a bit higher, but never lower.

kA is simply \frac {m_{effective}}{k_t * gearratio} (where k_t is the torque cosnstant found here) at the frame of reference of the mechanism in units of A-s^2/rad. This will have to be converted to the units and frame of reference your controller is looking for. The effective mass includes motor inertia which can in the frame of reference, get scaled by the gear ratio squared which is often significant for mechanism with extremely large gear ratios, or is simply just the mass/MOI that any sysID routine would output.

I understand, the calculation I mentioned earlier would apply to this KV configuration case?