Skip to content
@otwin-core

otwin

AI Powered Digital Twins
otwin: open digital twins of real equipment. A battery plant at dusk with a live dashboard over it: state of health 87.4 %, coverage 91 %, and a warning that the band width is trending up.




Welcome to the Otwin project

License

A model of a real asset or a real industrial process becomes a digital twin when it stays connected to the real machine and can say how far to trust itself. Otwin is open-source software for building those twins. You describe the equipment as components and connections, the way its drawing reads — or bring a model from Modelica or Julia — and Otwin fits it to the machine's measurements, forecasts with a range whose coverage is measured on data the model never saw, audits what the model promised against what the machine did, and refuses to answer outside what was validated. It reads the measurements from the plant itself, over Modbus, SunSpec and OPC UA.


Where to start

pip install otwin

You want to Start here
See a complete twin working otwin-hybrid, a battery degradation twin in Python, Julia and R
Try a twin on your own home, in the browser otwin-home, a digital copy of a household built from its bills and meter readings — files never leave the computer
Build a model from physical parts otwin, with ten tutorials that cover every component on real equipment
Check whether a model of your equipment can be trusted otwin: fit, calibrate, audit and refuse, in tutorial 10
Work in Julia Otwin.jl, the same implementation with Julia types in and out
Connect a twin to the plant otwin with the modbus, sunspec or opcua extras
Verify an implementation of the model format otwin-spec, the specification and its test suite

A battery cell on a cycler. The twin follows its capacity cycle by cycle, forecasts it with a 90 % range, and asks for a replacement before the cell reaches end of life.

Real data from 44 cells the twin had never seen (Severson et al., 2019). On every one of them the replacement order came before end of life, a median of 76 cycles ahead.



The grid is simulated, with PMU noise; the twin is the swing equation built from Otwin's rotational parts. Across 43 small disturbances the median inertia estimate error was 1.1 %, and the twin asks for battery fast response two hours ahead. The numbers · the animation.



The line is built with Otwin's hydraulic parts; the cloth fouling is recovered from a pressure sensor with 2 % noise, and the cleaning is ordered when the extra energy passes its cost.



Repositories

Repository What it is
otwin The library: components in six physical domains, the port-Hamiltonian compiler, the Rust engine, estimation, forecasting, auditing and field connectors — and Otwin.jl inside it
otwin-spec What an Otwin model means, written down, with a test suite any implementation must pass
otwin-hybrid A complete example: a battery degradation twin that combines physics and machine learning
otwin-home A digital copy of one household's home, built in the browser from the bills and readings the household already has; runs on Otwin
otwin-systems A growing catalogue of physical systems with known reference results

About this project

The code behind Otwin has been public for more than eight years. It began with a Towards Data Science post in 2021 Towards Data Science at a time when very little open software for digital twins existed, and has grown since then into the library, the specification and the examples above. In 2026 the project was presented at the IEEE PES General Meeting, in a panel on digital twins, at the invitation of Sandia National Laboratories. IEEE PES General Meeting 2026


Resources

Documentation: otwin.readthedocs.io · Where the project is going: ROADMAP.md · Questions and ideas: Discussions · Bugs and agreed work: Issues · A new component, a system or an example is the easiest way to contribute: Contributing guide


Each repository includes a CITATION.cff. Otwin is released under the Apache License 2.0. Copyright Javier Marín, 2026

OPC UA® is a trademark of the OPC Foundation. Otwin's connector is an independent implementation; its use of the name follows the Foundation's trademark guideline (OPC 20100), and the logo is not shown here because that guideline governs who may display it.

Pinned Loading

  1. otwin otwin Public

    Otwin is an open-source physics engine for building digital twins of real assets

    Python 1

  2. otwin-hybrid otwin-hybrid Public

    In this repo we will show how to build a simple but useful Digital Twin using python. Our asset will be a Li-ion battery. This Digital Twin will allow us to model and predict batteries behavior and…

    Python 122 45

  3. otwin-spec otwin-spec Public

    The normative Otwin specification: Twin Manifest schema, golden fixtures with analytic answers, and a language-agnostic conformance runner.

    Python

Repositories

Showing 5 of 5 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Python

Most used topics

Loading…