Skip to main content
EnergyFaultDetector Logo

Energy Fault Detector - Autoencoder-based Fault Detection for the Future Energy System

Python PyPI version License: MIT Tests Documentation

Energy Fault Detector is an open-source Python package for automated anomaly detection in operational data from renewable energy systems and power grids. It uses autoencoder-based normal-behaviour models to identify irregularities and includes the ARCANA method for interpretable root cause analysis.

drawing

Features (at a glance)

  • User-friendly interface: One-command CLI (quick_fault_detector) demo and a simple Python API.
  • Built-in data preprocessing (clipping, imputation, counter→rate, angle transforms, etc.)
  • Fault Detection: Autoencoder-based normal behaviour modelling for time series and tabular data.
  • Root Cause Analysis: Pinpoints the specific sensor values responsible for detected anomalies using ARCANA.
  • Scalability: Algorithms can easily be adapted to various datasets and trained models can be transferred to and fine-tuned on similar datasets. Quickly evaluate many different model configurations
  • Support for benchmark datasets (CARE2Compare, PreDist) and CARE-Score evaluation

See the online documentation for concepts, model types, and configuration details.

Installation

pip install energy-fault-detector

Requirements: Python 3.10–3.12, TensorFlow ≥ 2.15

For development (tests, linting):

pip install energy-fault-detector[dev]

Quickstart

import pandas as pd
from energy_fault_detector import FaultDetector, Config
from energy_fault_detector.config import generate_quickstart_config

### 1. Load your data
df = pd.read_csv("my_data.csv", parse_dates=["timestamp"], index_col="timestamp")
sensor_data = df[["power", "wind_speed", "pitch"]]
normal_index = df["status"] == "normal"  # optional boolean mask

### 2. Generate a default configuration
config = generate_quickstart_config()

### 3. Train a normal-behaviour model
fault_detector = FaultDetector(config=config, model_directory="my_model")
fault_detector.fit(sensor_data=sensor_data, normal_index=normal_index)

### 4. Predict anomalies
results = fault_detector.predict(sensor_data=sensor_data)

print(results.predicted_anomalies.sum(), "anomalies detected")

More examples: Usage examples.

Quick Fault Detection (CLI)

Run the full pipeline (train → predict → events → ARCANA) in a single command:

quick_fault_detector path/to/data.csv

For CARE2Compare data:

quick_fault_detector path/to/c2c_dataset.csv --c2c_example

The CLI saves plots and CSV results to a results directory. See the CLI documentation for details.

Documentation

Full docs (concepts, available models, configuration reference, evaluation, and examples): https://aefdi.github.io/EnergyFaultDetector/

Examples and notebooks

The repository contains Jupyter notebooks with end-to-end examples and evaluation workflows in the notebooks/ folder, for example:

  • Quick fault detection on a CSV file
  • Standard FaultDetector training and prediction
  • Sequence models (LSTM/CNN) on time-series data
  • CARE2Compare and PreDist benchmark evaluations

These notebooks complement the documentation and are a good starting point for interactive exploration.

Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests. All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. Please see CONTRIBUTING.md for guidelines on how to contribute.

Planned updates and features

  • Demo: Easy demo website
  • Extending the core models:
    • Variational autoencoders
    • Model ensembles
  • Unification, standardisation and generic improvements
    • Data preparation (e.g. extend imputation strategies).
    • No or low configuration need (e.g. use defaults where possible).
    • Upgrade to Keras 3.0
  • Root cause analysis expansion
    • integrate SHAP and possibly other xAI-methods.
  • Integrations
    • logging/tracking to MLFlow for hyperparameter tuning and easy model deployment.
    • Edge deployment

License

This project is licensed under the MIT License.

Background

This project was initially developed by the research team AEFDI at the Fraunhofer IEE in the research project ADWENTURE (funded by the German Federal Ministry for Economic Affairs and Climate Action (BMWK)), to create a software for early fault detection in wind turbines. The software was developed in such a way that the algorithms do not depend on a specific data source and can be applied to other use cases as well.

References

If you use this work, please cite us:

Fault detection in district heating substations:

ARCANA Algorithm: Autoencoder-based anomaly root cause analysis for wind turbines. Energy and AI. 2021;4:100065. https://doi.org/10.1016/j.egyai.2021.100065

CARE to Compare dataset and CARE-Score:

Transfer learning methods: Transfer learning applications for autoencoder-based anomaly detection in wind turbines. Energy and AI. 2024;17:100373. https://doi.org/10.1016/j.egyai.2024.100373

Autoencoder-based anomaly detection: Evaluation of Anomaly Detection of an Autoencoder Based on Maintenance Information and Scada-Data. Energies. 2020; 13(5):1063., https://doi.org/10.3390/en13051063.

Contact

For questions, feedback, or support integrating the EnergyFaultDetector into your operations, please contact aefdi@iee.fraunhofer.de.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

energy_fault_detector-0.6.1.tar.gz (358.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

energy_fault_detector-0.6.1-py3-none-any.whl (162.3 kB view details)

Uploaded Python 3

File details

Details for the file energy_fault_detector-0.6.1.tar.gz.

File metadata

  • Download URL: energy_fault_detector-0.6.1.tar.gz
  • Upload date:
  • Size: 358.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for energy_fault_detector-0.6.1.tar.gz
Algorithm Hash digest
SHA256 f27a1f89e6d9a0f6f4dd2e3305257bb79d18ccea4a32b61d3ad67ca8e2a66b46
MD5 feb00f2a1c3e2948026a04bb61356f53
BLAKE2b-256 aa4d4f80e3405263a3c617b042037d9395ff144a4dcb86fdd2fe12c2d57eb004

See more details on using hashes here.

Provenance

The following attestation bundles were made for energy_fault_detector-0.6.1.tar.gz:

Publisher: publish-package.yml on AEFDI/EnergyFaultDetector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file energy_fault_detector-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for energy_fault_detector-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c1a4c6e500859f5e68f2fe240a418961de1256eec4b8fd833e9e1b25ef15622
MD5 f4c8121ecafbf53c95d52f334c8f0ef4
BLAKE2b-256 6913db970715f9589927a40479d66642ad5c35c1a963332f24e277c7fe8aca67

See more details on using hashes here.

Provenance

The following attestation bundles were made for energy_fault_detector-0.6.1-py3-none-any.whl:

Publisher: publish-package.yml on AEFDI/EnergyFaultDetector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.2

2 files

This release

0.6.1 This release

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page