← Billriz Condor · Portfolio

Digital twin · machine learning · energy systems

A digital twin of a biogas dual-fuel engine

An 18 kW, four-cylinder generator (Cat C2.2-based DE18E3) converted to run on biogas with a diesel pilot. Machine-learning models trained on 1,750 measured operating points predict its efficiency and exhaust temperature, and an energy balance works out the fuel it needs. Set a power output and diesel share below to run the twin.

Team Billriz Condor, Hafeez Bashir, Kien van HoProgramme PM3E/ME3+, IMT Atlantique NantesDate June 2025

Run the twin

Choose a load and a diesel energy share (DES). The twin predicts efficiency with the KNN model and exhaust temperature with the regression model, then solves the energy balance for the diesel and methane flows.

Alternator Biogas CH₄ Diesel Exhaust Efficiency 4-cylinder dual-fuel engine

Operating maps

Grey points are the 1,750 measured operating points. The line is the trained model and the orange marker is your current setting, as in the original Python dashboard.

Electrical efficiency

% vs. power output (KNN model)

Fuel mass flows

kg/h vs. power output

Exhaust gas temperature

°C vs. power output (linear regression)

Model validation

Predicted vs. measured values using 5-fold cross-validation, so each point is predicted by a model that never saw it. Points on the diagonal are perfect predictions.

Efficiency: KNN regression

Exhaust temperature: linear regression

How the twin works

1 · DataEngine mapping53 test runs from 0 to 14 kW and 40–70% methane, cleaned into one dataset
2 · PhysicsEngine equationsMethane content, CH₄ mass flow, diesel energy share and electrical efficiency from the sensor readings
3 · Machine learningPredictive modelsTuned KNN for efficiency (non-linear) and linear regression for exhaust temperature
4 · Visualisation3D twinBlender CAD model with sensor tags, deployed on the GreenTwin web platform via Azure and FastAPI

How it's calculated

This script trains the same models as the project's Tkinter dashboard, cross-validates them, and exports the model parameters and data this page runs on. The twin above re-implements the KNN prediction and the energy balance in JavaScript.

analysis/build_demo_data.pyOpen on GitHub →
Loading…