WestlakeLEARN
FTC · Java

FIRST Tech Challenge

FTC · Java

  • P Control Basics
  • PD Control and Damping
  • Integral Control and When Not to Use It
  • PIDF and Feedforward
  • Dashboard Tuning Workflow

PIDF and Feedforward

Combine feedback correction with predicted effort.

Module 9: PID and Feedforward ControlControl

In this lesson, you will:

  1. 01Separate feedback and feedforward.
  2. 02Explain kS, kV, and kA.
  3. 03Log each contribution.

Concept narrative

Feedforward predicts the effort needed for motion before error appears. PID corrects what remains. Together they make controllers smoother and less dependent on high feedback gains.

Robot mental model

kS overcomes static friction, kV maps desired velocity to output, and kA helps during acceleration. These constants describe the robot, not just the code.

Implementation walkthrough

Compute feedback from error and feedforward from desired motion. Print both before summing. Tune or reason about each term by matching it to a physical symptom.

PIDF.javaJava

double feedback = kP * error + kD * derivative;
double feedforward = kS * Math.signum(targetVelocity) + kV * targetVelocity + kA * targetAcceleration;
double output = feedback + feedforward;

Common mistakes and debugging

If the robot will not start, inspect kS. If steady speed is wrong, inspect kV. If it lags during acceleration, inspect kA or reduce profile constraints.

Practice

Add telemetry for feedback, feedforward, and total output to one controller.

Checkpoint

  • Feedback and feedforward are separate in telemetry.
  • Output is clamped.
  • Symptoms map to constants.
  • The test record includes the setup, prediction, and observed result.
  • A teammate can repeat the check from the saved evidence without guessing.

Reflection check

Check your understanding before moving on.

Which result best demonstrates completion of “PIDF and Feedforward”?

Why record the test setup, prediction, and observed result?

0 of 2 answered

References

Game Manual 0FTC community reference for programming, controls, and robot design.FTC DashboardLive telemetry, graphs, config variables, and camera streaming.Road Runner 1.0 TuningDrive class setup, tuning op modes, feedforward, feedback, and validation.

Finished reading?

Mark this lesson complete — “Dashboard Tuning Workflow” is up next.

Integral Control and When Not to Use ItDashboard Tuning Workflow