Description
Calculate a delayed ring-buffer index using exact integer modulo.
Control terms depend on error sign, units, sample timing, saturation direction and state conventions. Hysteresis retains state between thresholds, while deadband mapping and output clamping describe different operations. A negative loop-sign product or small scalar derivative does not establish closed-loop stability or safe operation.
Calculate a delayed ring-buffer index using exact integer modulo.
When to use this tool
Use Discrete Delay Ringbuffer Slot when you already have writeIndex, delaySteps, capacity and need to calculate a delayed ring-buffer index using exact integer modulo.
How to use the tool and how it works
- Enter writeIndex, delaySteps, capacity. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read readIndex. Use the output convention below.
Require safe whole capacity>=1, writeIndex within [0,capacity-1] and delaySteps within the same range; return (writeIndex-delaySteps+capacity) modulo capacity using BigInt.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| writeIndex | Reference slot used directly; delay zero returns it with no implied next-write/previous-sample correction. | Required. Safe integer; minimum 0. |
| delaySteps | Delay Steps | Required. Safe integer; minimum 0. |
| capacity | Capacity | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| readIndex | Read Index | Required. Safe integer. |
{
"input": {
"writeIndex": 2,
"delaySteps": 4,
"capacity": 8
},
"output": {
"readIndex": 6
}
} Limitations and assumptions
- Delay zero returns writeIndex; no implicit one-step offset is added. Buffer contents, write-pointer meaning, sample availability and actual delay are not verified.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete plant, controller, actuator and timing model with verified operating constraints for control decisions. Check interactions among saturation, integrator state, gains and delays; individual algebraic terms do not tune a controller or validate system stability or safety.
References
Similar or alternative tools
- Feedback Delay Sample Count Label
Convert supplied discrete delay samples to seconds and a label.
- Sensor Dropout Time Step Flag
Count consecutive missing observations ending at a selected step.