GLOBAL KNOWLEDGE ARK

Robotics & Mechatronics · Closed-loop robot implementation

Test saturation and controller-state recovery

When an actuator request is clamped, a controller’s internal state can continue growing. Compare a supplied integral update with a declared anti-windup rule before interpreting the recovery trace.

All numerical tables, scenarios and records are original constructed teaching data unless a specific external dataset is named. No physical experiment is claimed. A worked simulation model is distinguished from an executed simulator.

Lesson preparation and course links

Use the local explanations and supplied units, diagrams, tables and examples; advanced chapters build on the named local chapters. External links are point-of-need depth, not a requirement to finish an entire map.

Back to the Robotics chapter

After reading, you can

Compare a supplied integral controller with and without a declared anti-windup treatment under a bounded robot demand.

01

State the exact discrete model

The fictional controller stores integral contribution I in amperes. Each 0.10 s update proposes I_candidate=I+Ki e Δt, with Ki=0.20 A/(mm·s). Output is clip(I, −1 A, +1 A) after the update. Start I=0. A supplied unreachable-demand record holds measured x=0 and r=10 mm for ten updates, so e=10 mm throughout.

For the comparison, conditional integration accepts the candidate only when it lies within±1 A or the increment moves an already out-of-range state toward the allowed interval. This is the declared simplified rule, not a claim about every framework’s implementation.

02

Track the internal state as well as the output

Each update adds 0.20×10×0.10=0.20 A. Without anti-windup, I reaches 2.0 A after ten updates while output is clamped at 1 A from update 5 onward. With the declared conditional rule, I reaches 1 A and later outward increments are rejected.

Both can show the same 1 A output during saturation. Their internal stored state differs, which affects later recovery. Inspecting output alone can hide windup.

Integrator storage under an unreachable demandUnrestricted I: (0, 0); (1, 0.2); (2, 0.4); (3, 0.6); (4, 0.8); (5, 1); (6, 1.2); (7, 1.4); (8, 1.6); (9, 1.8); (10, 2). Conditional I: (0, 0); (1, 0.2); (2, 0.4); (3, 0.6); (4, 0.8); (5, 1); (6, 1); (7, 1); (8, 1); (9, 1); (10, 1). Horizontal axis Update count; vertical axis Stored integral contribution / A. Straight segments join supplied samples; values between samples are not additional observations.002.50.5517.51.5102Update countStored integral contribution / AUnrestricted IConditional I
Unrestricted I: (0, 0); (1, 0.2); (2, 0.4); (3, 0.6); (4, 0.8); (5, 1); (6, 1.2); (7, 1.4); (8, 1.6); (9, 1.8); (10, 2). Conditional I: (0, 0); (1, 0.2); (2, 0.4); (3, 0.6); (4, 0.8); (5, 1); (6, 1); (7, 1); (8, 1); (9, 1); (10, 1). Horizontal axis Update count; vertical axis Stored integral contribution / A. Straight segments join supplied samples; values between samples are not additional observations.
03

Use a supplied reverse-error replay to isolate state recovery

After update 10, a diagnostic replay supplies constant e=−2 mm. Each update subtracts 0.04 A. Starting from 2 A, the unrestricted state needs 25 updates=2.5 s to reach 1 A; starting from 1 A, the conditional state immediately becomes 0.96 A on the first update.

This replay holds error externally for comparison; it is not a closed-loop physical plant simulation. A real reachable-target test must log the actual changing position/error and compare task overshoot, settling and constraints. Anti-windup does not guarantee zero overshoot or correct tuning.

04

Record the treatment instead of assuming a default

Controllers can use conditional integration, back calculation, reset/tracking or other treatments. Record exact algorithm, gains, output/integral limits, update period and initial state. Official Kilted PID options are version-specific; selecting none differs from enabling a treatment.

On mode switch, stop or restart, specify what happens to I. Clearing a fault without a defined controller-state policy can reapply stored demand. Test that transition separately from nominal tracking.

05

Follow an unreachable target with a reachable one

A separate executed discrete arithmetic model adds a plant: x_next=clip(x+G u Δt, 0 mm, 5 mm), with G=1 mm/(A·s), Δt=0.10 s and initial x=0 mm, I=0 A. At each update, compute e from current x, update I using the declared rule, clamp u, then update x. The position clamp is an ideal range model, not a contact-force or real hard-stop model.

Use r=10 mm for updates 0–99, outside the plant range, then r=2 mm from update 100 onward. The table reports x before the plant update and I/u after the controller update. Values are rounded from executed original model arithmetic; no physical or external simulator run is claimed.

06

Compare target-change recovery

Both controllers share the exact plant and initial state. Each cell is x in mm; I in A; u in A.

Compare target-change recovery
Update/timer / mmNo treatment: x; I; uConditional: x; I; u
99 / 9.9 s105; 12.7494; 15; 0.992; 0.992
100 / 10 s25; 12.6894; 15; 0.932; 0.932
109 / 10.9 s25; 12.1494; 15; 0.392; 0.392
119 / 11.9 s25; 11.5494; 14.9736; -0.2072; -0.2072
149 / 14.9 s25; 9.7494; 12.603; -0.9984; -0.9984
200 / 20 s25; 6.6894; 10.1613; 0.3702; 0.3702
07

State what improved and what did not

At 10 s both plants are at 5 mm. The unrestricted controller still stores about 12.69 A after the target change and remains clamped positive even at 20 s. Conditional integration limits the stored contribution and reverses output by the 11.9 s recorded row, moving toward the reachable target.

The simple integral-only example later overshoots the 2 mm target and is not a well-tuned positioning controller. Anti-windup improves this recovery mechanism; it does not establish settling, stability under arbitrary plants or physical task qualification. Preserve the full calculation record with this example.

Why zero error does not erase stored demand

If the diagnostic error becomes exactly 0 mm, the update increment is zero. I remains 2 A in the unrestricted case or 1 A in the conditional case, and both can still request+1 A. Conditional integration prevented extra storage; it did not automatically reset stored state.

With e=−2 mm, after five updates unrestricted I=1.80 A and output remains 1 A, while conditional I=0.80 A and output 0.80 A. These are exact arithmetic results for the supplied replay, not measured robot responses.

Try the reasoning

  1. What is the integral increment for e=3 mm over 0.10 s?

    Show the answer and reasoning

    0.20×3×0.10=0.06 A.

  2. Can identical saturated outputs hide different controller state?

    Show the answer and reasoning

    Yes. Clamping 2 A and 1 A both gives 1 A.

  3. Does zero error force integral state to zero?

    Show the answer and reasoning

    No. The increment is zero; retained state remains unless another declared rule changes it.

  4. What additional evidence is needed for a physical recovery claim?

    Show the answer and reasoning

    Actual reference, measured state/error, controller state, applied/measured output, configuration and matched task response.

  5. Does the conditional target-change trace establish a settled 2 mm endpoint?

    Show the answer and reasoning

    No. It shows earlier controller-state recovery and reversal, then overshoot in this simple supplied model. A task-quality comparison needs its own suitable controller and acceptance evidence.

What to carry forward

Saturation changes the implementation problem. Compare internal state and recovery under a declared algorithm, then test the actual task.

References

Sources supporting this lesson’s explanations and examples.

  1. ros-controls project2 sources
    1. ros2_controllers: PID Controllerros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentationcontrol.ros.orgRead source
    2. ros2_control: Hardware Components and hardware interface typesros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentationcontrol.ros.orgRead source