# kreaver/observer-based-fault-detection-isolation-for-industrial-systems architecture

> Architecture diagram of the GitHub repository kreaver/observer-based-fault-detection-isolation-for-industrial-systems, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems
- Repository: https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems

## Overview

This repository models and visualizes a quadruple-tank process, with additional observer, fault, and experiment modules indicated by the file tree. The visible runtime workflow is to advance tank levels using the plant dynamics and display the resulting simulation. The experiment and diagnostic files are empty in the supplied excerpts, so their internal behavior and connections cannot be verified; those capabilities are represented without asserting unsupported calls.

Main entry points: [`experiments/plot_results.py`](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/plot_results.py) (Result plotting), [`sim.py`](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/sim.py) (Batch simulation), [`animate.py`](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/animate.py) (Live animation), [`experiments/02_observer_test.py`](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/02_observer_test.py) (Observer test)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plant["Tank plant"]
  node_dynamics["Tank dynamics<br/>[quad_tank.py]"]
  node_steady["Steady state<br/>[quad_tank.py]"]
end

subgraph group_runtime["Simulation views"]
  node_sim["Batch simulation<br/>[sim.py]"]
  node_animation["Live animation<br/>[animate.py]"]
end

subgraph group_diagnostics["Fault and observer"]
  node_state_observer["State observer<br/>[state_observer.py]"]
  node_residuals["Residuals<br/>[residuals.py]"]
  node_sensor_fault["Sensor fault<br/>[fs_sensor.py]"]
  node_actuator_fault["Actuator fault<br/>[fs_actuator.py]"]
end

subgraph group_experiments["Experiment analysis"]
  node_baseline["Baseline experiment<br/>[01_baseline.py]"]
  node_observer_test["Observer test"]
  node_sensor_experiment["Sensor experiment<br/>[03_fs_sensor.py]"]
  node_actuator_experiment["Actuator experiment<br/>[04_fs_actuator.py]"]
  node_sweep["Fault sweep<br/>[05_fs_sweep.py]"]
  node_plot_results["Result plotting<br/>[plot_results.py]"]
end

node_user(("Operator"))

node_user -->|"runs"| node_sim
node_sim -->|"calls"| node_dynamics
node_sim -->|"calls"| node_steady
node_user -->|"runs"| node_animation
node_animation -->|"calls"| node_dynamics
node_animation -->|"calls"| node_steady
node_observer_test -.->|"may exercise"| node_state_observer
node_observer_test -.->|"may exercise"| node_residuals
node_sensor_experiment -.->|"may use"| node_sensor_fault
node_actuator_experiment -.->|"may use"| node_actuator_fault
node_sweep -.->|"may evaluate"| node_sensor_experiment
node_sweep -.->|"may evaluate"| node_actuator_experiment
node_plot_results -.->|"may plot"| node_baseline
node_plot_results -.->|"may plot"| node_observer_test
node_plot_results -.->|"may plot"| node_sensor_experiment
node_plot_results -.->|"may plot"| node_actuator_experiment

click node_dynamics "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/plant/quad_tank.py"
click node_steady "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/plant/quad_tank.py"
click node_sim "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/sim.py"
click node_animation "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/animate.py"
click node_state_observer "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/observer/state_observer.py"
click node_residuals "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/observer/residuals.py"
click node_sensor_fault "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/faults/fs_sensor.py"
click node_actuator_fault "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/faults/fs_actuator.py"
click node_baseline "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/01_baseline.py"
click node_observer_test "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/02_observer_test.py"
click node_sensor_experiment "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/03_fs_sensor.py"
click node_actuator_experiment "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/04_fs_actuator.py"
click node_sweep "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/05_fs_sweep.py"
click node_plot_results "https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/plot_results.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dynamics,node_steady toneBlue
class node_sim,node_animation toneAmber
class node_state_observer,node_residuals,node_sensor_fault,node_actuator_fault toneMint
class node_baseline,node_observer_test,node_sensor_experiment,node_actuator_experiment,node_sweep,node_plot_results toneRose
class node_user toneIndigo
```

## Components

### Tank plant

- [Tank dynamics](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/plant/quad_tank.py): `plant/quad_tank.py`
- [Steady state](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/plant/quad_tank.py): `plant/quad_tank.py`

### Simulation views

- [Batch simulation](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/sim.py): `sim.py`
- [Live animation](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/animate.py): `animate.py`

### Fault and observer

- [State observer](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/observer/state_observer.py): `observer/state_observer.py`
- [Residuals](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/observer/residuals.py): `observer/residuals.py`
- [Sensor fault](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/faults/fs_sensor.py): `faults/fs_sensor.py`
- [Actuator fault](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/faults/fs_actuator.py): `faults/fs_actuator.py`

### Experiment analysis

- [Baseline experiment](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/01_baseline.py): `experiments/01_baseline.py`
- [Observer test](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/02_observer_test.py): `experiments/02_observer_test.py`
- [Sensor experiment](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/03_fs_sensor.py): `experiments/03_fs_sensor.py`
- [Actuator experiment](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/04_fs_actuator.py): `experiments/04_fs_actuator.py`
- [Fault sweep](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/05_fs_sweep.py): `experiments/05_fs_sweep.py`
- [Result plotting](https://github.com/kreaver/observer-based-fault-detection-isolation-for-industrial-systems/blob/main/experiments/plot_results.py): `experiments/plot_results.py`

### Other components

- **Operator**

## Connections

- Operator → Batch simulation: runs (evidence: `sim.py`)
- Batch simulation → Tank dynamics: calls (evidence: `sim.py`)
- Batch simulation → Steady state: calls (evidence: `sim.py`)
- Operator → Live animation: runs (evidence: `animate.py`)
- Live animation → Tank dynamics: calls (evidence: `animate.py`)
- Live animation → Steady state: calls (evidence: `animate.py`)
- Observer test → State observer: may exercise
- Observer test → Residuals: may exercise
- Sensor experiment → Sensor fault: may use
- Actuator experiment → Actuator fault: may use
- Fault sweep → Sensor experiment: may evaluate
- Fault sweep → Actuator experiment: may evaluate
- Result plotting → Baseline experiment: may plot
- Result plotting → Observer test: may plot
- Result plotting → Sensor experiment: may plot
- Result plotting → Actuator experiment: may plot
