← All projects

Pump sequencing · Control systems

Duplex pump controller

Control logic for a pair of pumps that share duty. It handles lead rotation, assist demand, failed starts, and recovery after a power interruption.

Executable controller model tested

Synthetic reservoir response when the leading pump fails to start.
Synthetic reservoir response when the leading pump fails to start.

Implementation

Implemented OFF, STARTING, RUNNING and FAULT states with scan-ordered interlocks.

Executed 23 regression tests, a 14,336-case one-scan interlock sweep, and a 46-second fault trace.

Executed synthetic/theoretical validation with a selected operating envelope, adverse conditions, and reproducible acceptance evidence.

Inputs and assumptions

  • Three ordered level switches; reference timers of 3 s start timeout, 1 s feedback loss, and 10 s minimum run.
  • Quiet-input manual reset is required at initial boot and after control-power loss.

Results

Recorded results for the included reference case
Automated tests23
Interlock snapshots14336
Independent trace checkpoints10
Virtual validation checks36 / 36
Virtual plant cases11
Reference 1 L/s cycles7
Report figures (2)
Recorded commands during the reference fault sequence.
Recorded commands during the reference fault sequence.
Synthetic reservoir traces: 200 L capacity and 180 L high-level reference
Synthetic reservoir traces: 200 L capacity and 180 L high-level reference

Open the full report ↗

Verification

23 tests and 10 independent trace checkpoints passed. Additional virtual validation: 36 checks matched their expected outcomes. Adverse design conditions remain in the results.

python run.py
Download the verification record ↓

Additional scenarios

36 outcomes checked through synthetic/theoretical. The report lists the expected and observed outcomes for each check.

Read the validation report ↗

Project files

The ZIP contains the source, inputs, results, and instructions. These files are also available individually.

Download project ZIP · 412 KB
Archive checksum

SHA-256

92717bb5d1bf4c544cffd32a34e5c2fea02cb715344b8a699cce1b7dda8a37c6
Original project scopeArchived brief PDF ↗

Run locally

Python 3.10+ / NumPy and Matplotlib for report plots; the controller and tests use the Python standard library.

Extract the ZIP and open a terminal in the duplex-pump-controller folder. The README includes setup and usage details.

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

Limits

  • An executable supervisory model, not deployed PLC firmware or commissioned pump hardware.
  • External availability inputs stand in for motor protection, emergency circuits, and mechanical safeguards.
  • Timers are evaluated on scans. A physical implementation must bound scan time and feedback latency.
  • The input sweep is exhaustive for one scan at seven representative states, not for all continuous-time histories.
  • Persistent fault/lead memory is modeled in a live process; a deployed controller needs specified nonvolatile storage behavior.