# Calculating/Finding Ka for an elevator

I’m trying to find an acceleration feedforward for my elevator. I tried doing the physics of stall torque (as proportional to applied voltage?) to pull a “frictonless cart” (as I think I’ve handled the constant and Kv terms,) but this gave me voltages that dominated over the constant and velocity terms.

Is there a smarter way to calculate this (maybe by better modeling of the motor?) Instead if I decided that pure theory was too much work and had the physical elevator, how could I experimentally determine Ka?

I’m not sure which equations you are referring to, but for elevators we always use a helpful PowerPoint from one of our mentors: https://skunkworks.wildapricot.org/resources/Documents/tool_kit_for_teams/Drive_System_Engineering_20161105_Workshop.pptx

I’d take a read through this paper about FRC 449. They give a nice explanation of feed forward and how to theoretcially derive kv and ka for drivetrains.

Similar principles apply for the elevator - calculate net torque when the motors are at stall to get the maximum acceleration.

I currently have zero experience in tuning a system with multiple feed forwards like this, so keep that in mind. But I find this stuff interesting so I thought I might give my thoughts.

To me the way you calculated the ka seems legitimate. And unless the elevator was light weight and high friction, I would expect the ka to dominate the kv.

Are you only using those two terms? It seems like you may also want a constant term to compensate for gravity. I guess you could just add 9.81 to all the acceleration numbers.

If I had a real elevator in front of me that I wanted to tune, I would start by tuning the constant to counter the weight because it seems easiest. Just make it so the elevator holds itself up. Then I would tune the kv term by outputting a constant voltage and measuring the equilibrium velocity. To tune ka, I would calculate it from the gravity constant as a starting point. Then i would right some motion profiles that accelerate and decelerate to a specific distance. I would run these profiles with all the feed forwards and no feed back, and measure/graph the error over time.

The equations of motion for a DC motor controlled mechanism reduce to:

Voltage applied = Kv * velocity + Ka * acceleration + Ks

Ks includes both static friction and acceleration due to gravity. Keep in mind that gravity is always present, but static friction only ever resists movement.

If you run your mechanism up and down and record velocity, voltage applied, and time, you should be able to find the coefficients that make the equation above fit your observed data.

Ks is easiest to estimate by applying very small voltages until your mechanism just begins to move (or if it moves on its own due to gravity, apply voltage until the elevator stops falling).

Kv is easiest to estimate by doing movements at constant velocity, so we expect the acceleration term above to be zero.

Once you know Ks and Kv, you can accelerate and decelerate the mechanism and solve for the Ka value that best fits your data.

1 Like

We calculate kA by just applying 6 volts and then (after some trimming to remove data where inductance comes in to play) combine those data with data from our voltage ramp test for determining the constant and kV terms and do a multilinear regression over velocity and acceleration to figure out all 3 constants (the intercept is the constant voltage). You can see our (unfortunately uncommented) R script for doing this for a drivetrain with left and right sides here.