Original teaching model

One discrete feedback response

Change the gain to see how a correction affects the next state. This deliberately simple model is not an equation from Maxwell or Ashby.

y[n+1] = y[n] + k(r − y[n])
e[n] = r − y[n]   →   e[n+1] = (1 − k)e[n]

Here the fixed target r is 0, so the initial state is y[0] = −e[0]. The correction k(r − y) has derivative −k with respect to y. That correction sign is distinct from 1 − k, the multiplier governing successive errors.

Change the conditions

Use arrow keys to adjust a focused slider. Home and End select its limits.

Error over time

Error trajectoryThe plotted error at each step. The table below gives the values.

Red points show error; the shaded band is the selected tolerance around zero. The vertical scale changes with the data.

Analytic behaviour

Observed tolerance

Values at every observed step

The band test uses JavaScript floating-point values. Displayed values are rounded; y = −e because r = 0.

Trajectory and tolerance at each step
Step nState y[n]Error e[n]Within band?

What the example assumes

Measurement is exact and immediate at each discrete step. The target and gain are fixed. The recurrence already contains an integrating state update. No additional plant or delay dynamics, noise, saturation, or disturbance are represented. The initial state counts in the band test. A finite observed run cannot by itself establish asymptotic stability, and asymptotic decay does not ensure every observed state lies in the band.