A command can change abruptly even when a robot sensor reports no movement. In a controller that differentiates tracking error, a change in the target enters the derivative calculation as directly as a change in the measurement. The resulting derivative kick has a different mathematical cause from the proportional term's finite jump.

Moving the derivative calculation onto the measurement removes that direct target-change contribution. It does not remove the proportional response, make all command changes smooth, or eliminate sensitivity to noisy measurements.

MathWorks' two-degree-of-freedom PID documentation separates the proportional, integral, and derivative inputs through setpoint weights. The CBE30338 teaching notebook presents the same separation algebraically. The explanation below uses original hypothetical numbers and prescribed samples. It is not a controller tuning procedure, a software execution report, or a model of a particular robot's closed-loop motion.

Define the signal paths before comparing outputs

Let r be a position setpoint in millimeters and y the measured position in millimeters. Define tracking error e = r − y. For this example, use a proportional-derivative controller with no integral term, no output limit, and zero added output bias.

The proportional term is P = Kp(r − y). A backward-difference derivative on error is D_error = Kd[(r_now − y_now) − (r_previous − y_previous)]/h, where h is the interval between samples in seconds.

An alternative derivative term is D_measurement = −Kd(y_now − y_previous)/h. The negative sign matters: increasing y reduces r − y when r is fixed. Replacing the error derivative with the positive derivative of y would reverse that relationship.

Both controllers in this comparison retain the same proportional term. Only the input to the derivative calculation changes.

Use command units, abbreviated CU, for the abstract controller output. Set Kp = 2 CU/mm and Kd = 0.1 CU·s/mm. These units ensure that both P and D produce CU; the gains are illustrative assumptions with no hardware recommendation.

A target step with an unchanged measurement

Immediately before a sample, suppose r_previous = 4 mm and y_previous = 4 mm. At the next sample, let r_now jump to 10 mm while y_now remains 4 mm. The error therefore changes from 0 to 6 mm.

For h = 0.02 s, the proportional term is 2 × 6 = 12 CU. The derivative on error is 0.1 × (6 − 0)/0.02 = 30 CU. Their sum is 42 CU.

For derivative on measurement, the measured change is zero. Its derivative term is therefore zero, and the total output is 12 CU.

The remaining 12 CU is not a failed removal of derivative kick. It is the deliberately retained proportional response to a 6 mm change in error. Calling every abrupt output change a derivative kick would hide that distinction.

Now evaluate the same prescribed step across an interval of 0.005 s. The proportional term remains 12 CU, but the unfiltered error derivative becomes 0.1 × 6/0.005 = 120 CU. The total is 132 CU.

These two intervals define different numerical evaluations of the same signal step. They do not predict that an actual robot moves faster or becomes unstable at either interval. The model only exposes the inverse dependence of this unfiltered derivative pulse on h.

Pulse height and pulse area describe different things

In the finite-difference example, the step contributes a derivative pulse for the interval containing the change. Multiplying its value by the interval gives 30 × 0.02 = 0.6 CU·s, or 120 × 0.005 = 0.6 CU·s.

Both equal Kd times the 6 mm target jump. Reducing h increases the pulse height while preserving that discrete area for this isolated step and this derivative definition.

An ideal continuous-time derivative of an instantaneous step is an impulse, not a finite ordinary peak. The finite sampled values above should not be presented as a universal physical impulse amplitude. Real implementations may include derivative filtering, different discretization, output limits, and other signal processing. Their responses require their own equations.

The distinction also explains why displaying only a peak value can mislead. The duration and derivative convention are part of the number's meaning.

Once the target is fixed, the derivatives agree

At a following sample 0.02 s later, keep r = 10 mm but prescribe y increasing from 4 to 4.2 mm. The error decreases from 6 to 5.8 mm.

The error derivative is 0.1 × (5.8 − 6)/0.02 = −1 CU. The measurement derivative is −0.1 × (4.2 − 4)/0.02 = −1 CU. Both produce the same result because the target did not change during this interval.

The proportional term is now 2 × 5.8 = 11.6 CU, giving a combined output of 10.6 CU in either form. This is a calculation from a prescribed measurement sequence; the earlier command values were not used to simulate that movement.

More generally, expanding the error difference gives D_error = Kd(Δr − Δy)/h. The measurement-only form retains −KdΔy/h and omits KdΔr/h. The two forms differ exactly in the explicit setpoint-change contribution under the declared model.

Weighting does not merge the causes

A weighted structure can use P = Kp(br − y) and D = Kd(cΔr − Δy)/h. The separate parameters b and c act on different paths. Holding their values fixed, a target jump contributes Kp b Δr to P and Kd c Δr/h to D.

With c = 0, the derivative's direct setpoint contribution vanishes. With b = 1, the proportional response remains as in the examples. Choosing a different b also changes the proportional input, so that comparison would involve an additional design choice.

Neither algebraic change identifies a real plant model or proves a particular tracking response. Measurement jumps still enter the derivative path, and noise can still affect its difference. There is also no integral accumulation in this example, so these pulses are distinct from integral windup.

The useful interpretation is precise: identify which signal changed, then identify the controller path through which that change entered. A derivative-on-measurement structure answers one specific signal-path question. It does not make every abrupt command a derivative problem or establish complete closed-loop behavior.

Sources checked October 23, 2026: MathWorks, Two-Degree-of-Freedom PID Control for Setpoint Tracking, documentation displayed as R2026b: https://www.mathworks.com/help/simulink/slref/two-degree-of-freedom-pid-control-for-setpoint-tracking.html

CBE30338, PID Control with Setpoint Weighting, author-maintained course notebook web edition as accessed; no revision date inferred: https://jckantor.github.io/CBE30338/04.02-PID_Control_with_Setpoint_Weighting.html

Illustration note: A generic robot, controller, or sensor concept image may accompany this article. It does not show a tested controller response, validate the invented gains, or document measured robot motion.