FaultMap is a data-driven, model-free process fault detection and diagnosis tool. It identifies causal links between process elements using information-theoretic measures (transfer entropy) and represents the resulting information flows as directed graphs. Network centrality algorithms (eigenvector centrality) are then applied to rank process elements by the strength and quality of their influence on connected nodes, enabling root cause identification.
These directed graphs and rankings serve as troubleshooting aids for plant-wide fault diagnosis.
FaultMap follows a three-step process:
- Weight calculation -- Transfer entropy is computed between all pairs of process signals to quantify directional information flow. This produces edge weights for a directed graph.
- Node ranking -- Graph centrality algorithms (primarily eigenvector centrality) are applied to the weighted directed graph to rank nodes by their influence on the network.
- Graph reduction -- The full graph is reduced to highlight only the most significant edges and nodes, producing a simplified view for diagnosis.
The analysis pipeline also includes data preprocessing (normalization, FFT, band-pass filtering, detrending) and visualization of results.
For detailed usage guides, method descriptions, and API reference, see the documentation on Read the Docs.
To build the documentation locally:
uv sync --extra docs
uv run sphinx-build -b html docs/ docs/_build/html- Python 3.11+
- Java JDK 8+ (required by JIDT, which computes transfer entropy)
- The
JAVA_HOMEenvironment variable must point to the JDK installation directory.
- The
- C++ compiler compatible with your Python version (required by some dependencies)
- On Windows, install the
VC++ 2015.3 v14.00 (v140) toolset for desktopfrom the Visual Studio installer.
- On Windows, install the
- HDF5 development libraries (required by the
tablesdependency)- On Debian/Ubuntu:
sudo apt-get install libhdf5-dev pkg-config
- On Debian/Ubuntu:
git clone https://github.com/SimonStreicher/FaultMap.git
cd FaultMap
uv sync --extra test
uv run pytest # Verify the installationIf you don't have uv installed yet:
curl -LsSf https://astral.sh/uv/install.sh | shA Docker image with all dependencies pre-installed is available:
docker pull simonstreicher/faultmapTo build the image locally, see the FaultMapDocker repository.
After installation, create a case_config.json file in the project root directory that specifies paths to your data, configuration files, results directory, and the JIDT jar file.
An example case_config.json:
{
"data_loc": "~/faultmap/faultmap_data",
"config_loc": "~/repos/faultmapconfigs",
"save_loc": "~/faultmap/faultmap_results",
"infodynamics_loc": "~/repos/FaultMap/infodynamics.jar"
}| Key | Description |
|---|---|
data_loc |
Directory containing input time series CSV files |
config_loc |
Directory containing case configuration JSON files |
save_loc |
Directory where results will be written |
infodynamics_loc |
Path to the infodynamics.jar file (a tested version is included in the repository) |
Each analysis case requires a set of JSON configuration files in the directory specified by config_loc. See the example_configs/ directory for templates.
The following configuration files are needed:
| File | Purpose |
|---|---|
config_full.json |
Specifies which cases to run and global settings |
config_weightcalc.json |
Transfer entropy calculation parameters |
config_noderank.json |
Node ranking settings |
config_graphreduce.json |
Graph reduction parameters |
config_plotting.json |
Visualization settings |
A config_full.json file lists the cases to process:
{
"mode": "cases",
"write_output": true,
"cases": [
"tennessee_eastman"
]
}To run all analysis steps for every case listed in config_full.json:
python run_full.pyThis executes the following stages in order:
run_weightcalc.py-- Compute transfer entropy weightsrun_createarrays.py-- Reconstruct result arraysrun_trendextraction.py-- Extract trends from resultsrun_noderank.py-- Rank nodes by centralityrun_graphreduce.py-- Reduce graphs to top edgesrun_plotting.py-- Generate visualizations
Each stage can also be run independently.
The demo/ directory contains standalone scripts demonstrating individual components:
demo_entropycalc.py-- Single-signal entropy calculationdemo_generators.py-- Synthetic test data generationdemo_leadlag_analysis.py-- Lead/lag transfer entropy analysisdemo_networkranking.py-- Network ranking with eigenvector centrality
Install development and test dependencies:
uv sync --extra dev --extra testRun the test suite:
uv run pytest tests/ -vRun the linter:
uv run ruff check .
uv run ruff format --check .If you use FaultMap in your research, please cite:
Streicher, S.J. (2019). FaultMap. Zenodo. https://doi.org/10.5281/zenodo.2543739
FaultMap is released under the GPL-3.0-or-later license.