public class RampRegression
Container for ramp feedforward regression data.
Here's the general procedure for gathering the requisite data:
Slowly ramp the motor power/voltage and record encoder values along the way.
Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).
Modifier and Type | Class and Description |
---|---|
static class |
RampRegression.RampResult
Feedforward parameter estimates from the ramp regression and additional summary statistics
|
Constructor and Description |
---|
RampRegression(java.util.List<java.lang.Double> timeSamples,
java.util.List<java.lang.Double> positionSamples,
java.util.List<java.lang.Double> powerSamples)
Container for ramp feedforward regression data.
|
RampRegression(java.util.List<java.lang.Double> timeSamples,
java.util.List<java.lang.Double> positionSamples)
Container for ramp feedforward regression data.
|
RampRegression(java.util.List<java.lang.Double> timeSamples)
Container for ramp feedforward regression data.
|
RampRegression()
Container for ramp feedforward regression data.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double time,
double position,
double power)
Add a sample to the regression.
|
RampRegression.RampResult |
fit(boolean fitStatic)
Fit data from a "ramp" test.
|
RampRegression.RampResult |
fit()
Fit data from a "ramp" test.
|
void |
save(java.io.File file)
Save the data to a CSV file for debugging or additional analysis.
|
@JvmOverloads public RampRegression(@NotNull java.util.List<java.lang.Double> timeSamples, @NotNull java.util.List<java.lang.Double> positionSamples, @NotNull java.util.List<java.lang.Double> powerSamples)
Container for ramp feedforward regression data.
Here's the general procedure for gathering the requisite data:
Slowly ramp the motor power/voltage and record encoder values along the way.
Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).
timeSamples
- time samplespositionSamples
- position samplespowerSamples
- power (scaled voltage) samples@JvmOverloads public RampRegression(@NotNull java.util.List<java.lang.Double> timeSamples, @NotNull java.util.List<java.lang.Double> positionSamples)
Container for ramp feedforward regression data.
Here's the general procedure for gathering the requisite data:
Slowly ramp the motor power/voltage and record encoder values along the way.
Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).
timeSamples
- time samplespositionSamples
- position samples@JvmOverloads public RampRegression(@NotNull java.util.List<java.lang.Double> timeSamples)
Container for ramp feedforward regression data.
Here's the general procedure for gathering the requisite data:
Slowly ramp the motor power/voltage and record encoder values along the way.
Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).
timeSamples
- time samples@JvmOverloads public RampRegression()
Container for ramp feedforward regression data.
Here's the general procedure for gathering the requisite data:
Slowly ramp the motor power/voltage and record encoder values along the way.
Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).
public void add(double time, double position, double power)
Add a sample to the regression.
@JvmOverloads @NotNull public RampRegression.RampResult fit(boolean fitStatic)
Fit data from a "ramp" test.
fitStatic
- true if kStatic should be fit (note: this affects the kV computation)@JvmOverloads @NotNull public RampRegression.RampResult fit()
Fit data from a "ramp" test.
public void save(@NotNull java.io.File file)
Save the data to a CSV file for debugging or additional analysis.