Skip to content

Changes and faults

interventions lists changes at given times. A planned change has a target and a value; a fault has a unit as target and a fault name.

seed: 3
duration: 1d
dt: 10s
library: process@1

units:
  - {id: TIC-101, template: temperature_loop, sp: 80}

interventions:
  - {at: 2h, target: TIC-101.sp, value: 85, profile: ramp, over: 30min}   # a setpoint ramp
  - {at: 6h, target: TIC-101.mode, value: MAN}                           # switch to manual
  - {at: 6h, target: TIC-101.man_out, value: 70}                         # and move the valve
  - {at: 8h, target: TIC-101.mode, value: AUTO}                          # back to automatic, bumplessly
  - {at: 10h, target: TIC-101.plant.K, action: scale, value: 0.8, profile: ramp, over: 12h}
  - {at: 16h, target: TIC-101, fault: sensor_bias, magnitude: 1.5}

Planned changes

A change applies to its target with an action:

  • set to value,
  • shift by value,
  • scale by the factor value,

either at once (profile: step, the default) or as a ramp over over. A new change starts from the current value, even in the middle of a ramp.

What a change may target:

Target Example
A setpoint TIC-101.sp
A controller mode: MAN, AUTO or CAS, always as a step TIC-101.mode
A manual output (used in MAN) TIC-101.man_out
A port that nothing drives, or a custom schedule TIC-101.feed_temp, FFC-102.ratio
A parameter of an operator TIC-101.plant.K, TIC-101.plant.tau

A parameter that a change targets becomes a signal: it appears in run.truth and in the causal graph, and it varies during the run. Parameters that no change targets stay constants. Structural parameters, such as a dead time or a buffer size, cannot change during a run.

Some targets are refused, with a fix that names the right one:

  • the regulated variable of a loop, such as TIC-101.cv: change its setpoint;
  • a controller output or the valve it drives: switch to MAN and set man_out;
  • a signal computed by a dynamic operator: change one of its parameters.

In MAN, a manual output of NaN holds the last output. Switching between modes is bumpless: the controller's integral follows the output, so returning to AUTO does not jump.

Faults

A fault is a named change from the domain library, applied to a unit:

interventions:
  - {at: 12h, target: TIC-101, fault: valve_stiction, magnitude: 3}
  - {at: 20h, target: TIC-101, fault: sensor_drift, magnitude: 2, over: 2d}

magnitude has each fault's own meaning, for example the friction band in % of valve travel for valve_stiction, or the bias in measurement units for sensor_bias. Each fault has a default profile: stiction and drift grow as ramps, a bias appears as a step; profile and over override it. The process library lists the faults, what their magnitude means and which templates they apply to.

A fault expands into ordinary events on the unit's parameters. The event log records both the fault (label: fault:sensor_bias) and where it came from (origin: fault:sensor_bias@TIC-101).

Where faults show

Faults inside a loop are often hidden where you would look first. The controller holds its measurement at the setpoint, so:

  • a transmitter bias leaves the reading on setpoint and moves the true value and the controller output instead;
  • valve stiction shows as a slow cycle in the reading and a sawtooth in the controller output;
  • a loss of process gain (fouling) shows as a larger controller output for the same setpoint.

Labels shows how to find, for each fault, when and on which recorded signal it first becomes visible.

Some lanes only

In a run with several lanes, lanes: [1] applies a change or a fault to lane 1 only. This is how a twin experiment compares a plant with and without a fault on exactly the same noise; see Twin runs and lanes.