fitRampData

open fun fitRampData(timeSamples: List<Double>, positionSamples: List<Double>, powerSamples: List<Double>, fitStatic: Boolean, @Nullable file: File): RegressionUtil.RampResult

Run regression to compute velocity and static feedforward from ramp test data.

Here's the general procedure for gathering the requisite data: 1. Slowly ramp the motor power/voltage and record encoder values along the way. 2. Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).

Return

feedforward parameter estimates and additional summary statistics

Parameters

timeSamples

time samples

positionSamples

position samples

powerSamples

power samples

fitStatic

fit kStatic

file

log file