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

Integral Control and When Not to Use It

Understand accumulated error without abusing it.

Module 9: PID and Feedforward ControlControl

In this lesson, you will:

  1. 01Explain integral accumulation.
  2. 02Recognize windup.
  3. 03Use I only for persistent error.

Concept narrative

Integral adds past error over time. It can remove steady-state error, but it can also create windup that makes mechanisms overshoot badly.

Robot mental model

I is like remembering frustration. If the mechanism sits below target for a long time, the controller pushes harder. That can help gravity-loaded systems, but it can also punish the robot after the condition changes.

Implementation walkthrough

Add integral only after P/PD are understood. Limit the integral sum, reset it near target or on target changes, and print the integral contribution separately.

IntegralGuard.javaJava

integral += error * dt;
integral = Math.max(-maxIntegral, Math.min(maxIntegral, integral));
double output = kP * error + kI * integral;

Common mistakes and debugging

If output grows while the mechanism is blocked, integral windup is happening. If the mechanism overshoots long after error changes sign, reset or cap the accumulator.

Practice

Demonstrate integral windup safely with a simulated value or low-power mechanism, then add a cap.

Checkpoint

  • Integral has a cap.
  • Integral resets on target changes.
  • I is not used to hide mechanical problems.
  • 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 “Integral Control and When Not to Use It”?

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.

Finished reading?

Mark this lesson complete — “PIDF and Feedforward” is up next.

PD Control and DampingPIDF and Feedforward