Research

A digital twin you can script, cite and check.

Studio is deterministic to the bit and documented down to the sources of its model parameters. Use it for control, machining, metrology or AI research and reproduce every result — and, with the MC-1, make microfluidic chips, optical mounts and fixtures in your own lab the same day.

Lockstep API

One JSON request per line; virtual time moves only when you say so. A standard-library Python package wraps it, with batch runs and parameter sweeps over processes.

FMI-shaped co-simulation

Variables, get/set and doStep with FMPy’s names, to couple the twin with models in Modelica, Simulink or Python.

MTConnect

An SHDR adapter with 35 data items and a device file, for dashboards and data pipelines.

Recordings

From the command line: MCAP for the official mcap tools, VCD with every step pulse for sigrok and logic-analyser comparisons, CSV curves.

Cutting mechanics

Mechanistic force model with kc(h, vc), time-domain regenerative chatter and a semi-discretization check, static deflection from the frame FEA.

Metrology on the twin

Geometric error model (lead, periodic, straightness, angular, squareness, backlash, thermal) with ISO 230-2 and 230-4 test scripts.

AI agents over MCP

Forty-seven tools, deterministic replay hashes and an audit log of every call make experiments with language models reproducible and checkable.

Per-line profiling

Time per program line that sums exactly to the run, and the reason each feed was not reached, from the controller's own planner arithmetic.

CAM and optimizer

Toolpaths with cutting data estimated from the twin's physics, and an optimizer with explicit acceptance rules, verified on fresh twins.

How the twin is checked

422 acceptance checks
run on every change on Linux; on Windows the window's own self-test, 396 checks
28 golden fingerprints
seven scenarios at four drive levels, identical on Windows and Linux
Controller firmware
26,701 random programs compared with a reference engine, fuzz runs to seed 42,500 under sanitizers, 84 FreeCAD programs and 78 programs from open-source projects
Example parts
the four 1.0 examples run to the end in the twin from their shipped programs: 99.98–100 % of the surface within 0.02 mm of the design
CAM
37 reference jobs give byte-identical programs on Windows and Linux; every program is probed for overcut and leftover material
OpenCAMLib
drop-cutter comparison of the material-removal model
Property-based tests
randomised motion, holds and soft limits with shrinking to a minimal case
MCP replay
the same MCP session gives the same replay hash on Windows and Linux; result pictures are byte-identical

Known limits of the model

What the twin does not do well yet. We publish these so that results are read with them in mind.

  • Parameters are design and literature values until the prototypes are measured; before calibration, cutting forces can be off by up to a factor of two.
  • Material removal takes most of the computing time: cutting programs usually run several times faster than real time (the 1.0 examples: 8–28×), and dense stretches such as helical entries into a deep pocket can briefly run slower than real time (example 14: 0.6× over its slowest five seconds).
  • Sender software connects over TCP; a virtual USB serial port that looks like the real controller is planned.

Cite

BibTeX
@software{twinwright_studio_2026,
  title   = {Twinwright Studio: a deterministic digital twin of the MC-1 desktop CNC mill},
  author  = {{Twinwright}},
  year    = {2026},
  url     = {https://twinwright.com/research/}
}

Work with us

We welcome joint projects: twins of other machines, measurement campaigns on the MC-1 prototypes, machining data sets pairing recordings of the twin and the real machine, and teaching research.