Feedforward Characterization
Measure what your mechanism needs: the voltage wasted on friction, the volts per unit of speed, and the cost of accelerating.
Inputs
Steady-speed test
Command a voltage, wait until the speed stops changing, record it. Repeat across the range. This gives kS and kV.
Acceleration test optional
While the mechanism is speeding up, record the voltage, the speed at that instant, and how fast the speed was changing. This gives kA. Leave it empty if you have not measured it.
Results
kS, voltage that goes nowhere
—V
kV, volts per unit of speed
—
kA, volts per unit of acceleration
—
How well the line fits
—R²
Points used
—
Predicted top speed at 12 V
—
Furthest point from the line
—V
Your feedforward
—
how much of the variation the straight line explains
Show the numbers behind this chart
Each measured point, what the fitted line predicts for it, and the difference.
Ask for a speed
Your steady-speed points, volts against speed, with the straight line through them. Where the line meets zero speed is kS: the volts spent before anything moves. Its slope is kV. Pick a speed and follow the dashed lines to the voltage your feedforward sends for it; at the top of the slider it runs out of volts, and that is the fastest this mechanism goes.
How this is calculated
Feedforward is the part of the control output that comes from knowing what you are asking for, rather than from watching what went wrong. To use it you need to know what your mechanism costs, and the only reliable way to find that out is to measure it.
volts = kS + kV × speed + kA × accelerationHold a steady voltage and acceleration is zero, so the last term drops out and what remains is a straight line: voltage against speed. Measure several points on it and the line's intercept and slope are the first two constants.
With your numbers
What each constant is
- kS is the voltage that produces no motion at all. It is spent breaking static friction, and it is why a mechanism given a tiny command sits there humming instead of creeping. On the graph it is where the line crosses zero speed.
- kV is the volts needed per unit of speed once moving. It is the slope, and it is mostly a property of the motor and gearing rather than of the load.
- kA is what changing speed costs on top of holding it. It is the term that lets a mechanism follow a motion profile instead of lagging behind one, and it is the hardest of the three to measure well.
Measure the low end
kS is the intercept, so it is determined almost entirely by the points nearest zero speed. A test that starts at 6 V and works upward produces a confident-looking line whose intercept is an extrapolation into territory nobody visited.
If your lowest point is well above the point where the mechanism actually starts moving, treat kS as a guess however good the fit looks.
A good fit is not the same as a good measurement
R² says how close the points sit to the line, not whether the line means anything. Six points clustered at the top of the range will fit beautifully and tell you very little about kS.
The residual table below is more useful than the R² for spotting trouble. One point far off the line is usually a mistyped number or a reading taken before the speed settled. A curve in the residuals (all positive in the middle, negative at the ends) means the relationship is not actually straight, and a straight-line model is the wrong tool.
What this does not know
- Whether the speed had settled. Reading too early produces points below the line and a kV that is too low. If the residuals slope one way through the test, suspect this.
- Direction. Friction is not symmetric on most mechanisms. Constants measured going one way may not suit the other, and a lift is the obvious case.
- Battery sag. Twelve volts commanded is not twelve volts delivered on a tired battery, and the error grows with current, which means it grows exactly where you are measuring the top of the line.
Code for these numbers
Only the numbers come from this page. How your program uses them is up to you, so read each line before you paste it.
Make a notebook page
Turns this calculation into a dated engineering notebook page: the setup, data, results, figures, working and sources, numbered and cited. You add the goal, the decision and the reflection in your own words, plus photos and sketches. Print it, paste it into Google Docs, or download a Word file or slides.
Save this run, and compare
Keeps what is on screen so you can change something and see both sides of the change. Saved in this browser only, never uploaded.
Sources & assumptions
No VEX data. Everything here comes from measurements you took on your own mechanism, which is the entire point of characterisation.
The straight-line model of a brushed DC motor (a constant to break friction, plus voltage proportional to speed, plus voltage proportional to acceleration) is the standard basis for feedforward control. The fit is ordinary least squares, computed in closed form rather than iteratively, so it is exact for the data given.
Where this goes next
Explore further on the full mapWhere the answers on this page can be used, and which tools could have given you the numbers it asks for.
Comes after
PID Error Analyzergives you your trial resultsYour Motor, Measuredgives you your trial resultsPID SimulatorYou are here
Feedforward Characterization
Where your answer goes
PID Error Analyzerrecord a run with feedforward on and see what error PID still has to fixuses your trial results againAutonomous Time Estimatoruse your measured top speed for a more honest autonomous time estimateuses your top speed againGravity Feedforwardadd the extra term an arm needs to hold itself up against gravityPID Simulatortry PID gains on a model of your drive before tuning on the robota number carries across the next question it raises