Pump controller virtual commissioning

Executed the actual controller against a synthetic reservoir and motor-feedback model. Selected reference service is 1 L/s with one-pump standby capacity and an attended power-restoration procedure. Tests include normal cycles, capacity loss, invalid sensors and power interruption.

Methods and declared inputs

Reservoir capacity 200 L; dry stop below 20 L, start at 80 L, assist at 120 L and reported high level at 180 L. The mass balance is V[k+1] = V[k] + (inflow - delivered outflow) * dt, with spill recorded separately. These are reference inputs, not plant dimensions.

Each available pump delivers a constant 4 L/s once proved, with 0.2 s start delay and instantaneous stop. The controller uses its actual 3 s start, 1 s feedback loss and 10 s minimum-run timers. The standard scan is 100 ms.

The power-loss case intentionally remains inhibited after restoration because no quiet reset occurs. Its spill is a design consequence of the existing restart policy, not a successful capacity result. An operating process requiring unattended recovery needs a separately approved restart policy or independent storage/alarm response.

The selected attended recovery case isolates the inlet 50 s after the modeled power loss, drains externally at 10 L/s, resets with quiet inputs, then restores inflow. It clears inhibition without spill. The original unacknowledged-restart case remains a rejected unattended operating condition.

Checks pass when observed behavior matches the specified expectation. This includes expected adverse conditions: capacity overrun and process overflow while restart is inhibited.

Executed cases

casemax_volume_loverflow_llead_rotationslatched_fault_asensor_faultrestart_inhibited
normal_cycles80.299999999999970.07FalseFalse
assist_demand120.400000000000490.00FalseFalse
lead_start_failure83.299999999999540.02START_TIMEOUTFalseFalse
one_pump_unavailable80.299999999999970.04FalseFalse
capacity_exceeded200.0144.399999999987360FalseFalse
power_loss_restart_inhibit200.039.999999999990650FalseTrue
attended_power_recovery119.999999999997460.02FalseFalse
invalid_level_switches111.199999999997490.00TrueFalse
running_feedback_loss80.299999999999840.02RUN_FEEDBACK_LOSTFalseFalse
short_feedback_dropout80.299999999999840.02FalseFalse
manual_dry_interlock0.00.00FalseFalse

Acceptance checks

iddescriptionexpectedobservedpassedmethod
balance-normal_cyclesReservoir volume balanceAbsolute residual < 1e-8 L8.162714948412031e-11TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-normal_cyclesLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-assist_demandReservoir volume balanceAbsolute residual < 1e-8 L-6.93574975230149e-10TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-assist_demandLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-lead_start_failureReservoir volume balanceAbsolute residual < 1e-8 L-1.0786038728838321e-11TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-lead_start_failureLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-one_pump_unavailableReservoir volume balanceAbsolute residual < 1e-8 L1.382716163789155e-11TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-one_pump_unavailableLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-capacity_exceededReservoir volume balanceAbsolute residual < 1e-8 L1.780335878720507e-10TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-capacity_exceededLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-power_loss_restart_inhibitReservoir volume balanceAbsolute residual < 1e-8 L0.0TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-power_loss_restart_inhibitLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-attended_power_recoveryReservoir volume balanceAbsolute residual < 1e-8 L1.1382894626876805e-11TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-attended_power_recoveryLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-invalid_level_switchesReservoir volume balanceAbsolute residual < 1e-8 L-1.6484591469634324e-12TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-invalid_level_switchesLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-running_feedback_lossReservoir volume balanceAbsolute residual < 1e-8 L-1.06439301816863e-11TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-running_feedback_lossLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-short_feedback_dropoutReservoir volume balanceAbsolute residual < 1e-8 L-1.06439301816863e-11TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-short_feedback_dropoutLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
balance-manual_dry_interlockReservoir volume balanceAbsolute residual < 1e-8 L0.0TrueIntegrate incoming, pumped, spilled and retained volume independently
dry-manual_dry_interlockLow level overrides both commandsFalseFalseTrueCheck every scan of the coupled reservoir/controller run
normal-cyclesAutomatic cycles alternate the leadAt least 5 rotations and no spill{'rotations': 7, 'overflow_l': 0.0}True600 s closed-loop run, 1 L/s inlet
assist-capacityTwo-pump demand stays within tank capacityNo spill at 6 L/s0.0TrueEach proved pump removes 4 L/s
failed-leadFailed start latches and standby clears demandSTART_TIMEOUT and no spillSTART_TIMEOUTTrueSuppress motor A start/feedback
maintenanceAvailable standby carries declared demandNo spill0.0TrueMotor A unavailable, 1 L/s inlet
overloadInsufficient installed capacity is reported as adversePositive spill at 9 L/s144.39999999998736TrueDemand exceeds both pumps combined; no automatic design acceptance
restartRestored power does not cause an automatic restartInhibited with positive spill{'inhibited': True, 'spill': 39.99999999999065}True5 s interruption; no operator drain or reset follows
attended-recoverySelected operating response restores service without spillNo spill and inhibit cleared{'case': 'attended_power_recovery', 'scan_s': 0.1, 'max_volume_l': 119.99999999999746, 'overflow_l': 0.0, 'lead_rotations': 2, 'latched_fault_a': '', 'sensor_fault': False, 'restart_inhibited': False, 'dry_command': False, 'volume_balance_error_l': 1.1382894626876805e-11, 'high_level_reached': False}TrueAt 120 s isolate inlet and drain externally, reset at 133 s, reopen inlet at 134 s
sensor-faultImpossible level ordering latches alarmTrueTrueTrueForce assist true while start false at 90 s
feedback-latchSustained feedback loss trips motorRUN_FEEDBACK_LOSTRUN_FEEDBACK_LOSTTrueRemove feedback after 90 s while flow can persist until command removal
feedback-debounceShort feedback interruption does not tripNo latched faultTrue0.4 s drop vs 1 s timer
timer-0.05Start timeout includes scan quantization3 <= delay <= 3 + scan3.0000000000000004TrueDiscrete scan-period sweep
timer-0.1Start timeout includes scan quantization3 <= delay <= 3 + scan3.0TrueDiscrete scan-period sweep
timer-0.25Start timeout includes scan quantization3 <= delay <= 3 + scan3.0TrueDiscrete scan-period sweep
refinementReservoir peak is stable when scan is halvedPeak difference <= 0.5 L0.05000000000238458TrueCompare 50 and 100 ms scans; deterministic event model

Scope of the evidence

This completes a virtual commissioning exercise. It does not assert PLC timing, switch debounce, contactor feedback, motor hydraulics, electrical protection, or field reliability.

Constant flow and instantaneous stopping omit pump curves, inertia, pressure transients and stuck-on physical outputs. Independent electrical and process protections are not implemented by this supervisory state machine.

High-level indication is recorded by the plant harness. It is not a new hardware alarm output or a claim of safe unattended operation.

Reproduce

python -m pip install -r requirements.txt
python run.py

Acceptance matrix · Evidence record and source hashes · Original analysis

Selected plant envelope and restoration policy

Synthetic reservoir traces: 200 L capacity and 180 L high-level reference
Synthetic reservoir traces: 200 L capacity and 180 L high-level reference

Reservoir case summary

All coupled reservoir and command traces

Scan timing sweep