AWS Builder Center

VAJRATWIN: AI-Enabled Real-Time Digital Twin System for Health Monitoring, Fault Prediction and Mission Reliability Enhancement of Aero Piston Engines used in MALE UAVs.

VajraTwin is an AI-enabled, real-time Digital Twin platform for MALE UAV aero-piston engines like the Rotax 914. Built for defense agencies, GCS operators, and maintenance teams, it solves the issue of false alarms and missed mechanical degradation caused by altitude and weather shifts. By computing physics-based residual baselines, VajraTwin isolates true mechanical wear from environmental noise, ingesting telemetry to output actionable flight advisories like GO or MAINTENANCE REQUIRED.

AI Product Builder | Security • FinTech • Developer Tools
VajraTwin
A Real-Time Digital Twin for MALE UAV Aero-Piston Engines, Built on AWS Serverless
Predictive maintenance for aircraft engines usually means racks of sensors, heavyweight simulation software, and infrastructure that's anything but real-time. For Medium-Altitude Long-Endurance (MALE) UAVs running Rotax 914 F/UL engines, that gap matters — a ground crew watching raw telemetry numbers scroll by has no way to know, in the moment, whether an EGT spike is normal load or the first sign of a failing wastegate.
VajraTwin closes that gap. It's a cloud-native digital twin that ingests live engine telemetry, runs it through a physics-based thermodynamic model, and layers generative AI on top to explain why a reading looks off and what to do about it — all inside a single serverless Lambda invocation, with sub-30-second round trips from telemetry to actionable advisory.

The Core Idea: Physics First, AI Second

A lot of "AI for aerospace" projects try to have a model learn engine behavior from scratch. VajraTwin does the opposite. At its center is  physics_surrogate.py , an algebraic thermodynamic model of the Rotax 914 F/UL engine that computes expected engine behavior analytically — no lookup tables, no training data, no black box.
The surrogate runs in under 25 milliseconds using nothing but Python's built-in  math  library, and it covers:
  • Volumetric efficiency — a parabolic algebraic curve centered on the engine's peak RPM (5500)
  • Inlet temperature — isentropic compression combined with compressor efficiency and intercooler effectiveness
  • Mass airflow — the speed-density equation, factoring in MAP, displacement volume, RPM, and volumetric efficiency
  • EGT and CHT baselines — ambient temperature plus load-weighted rise, minus airflow cooling
  • Thermal dynamics — an exact first-order discrete update,  T[n+1] = T[n] + ΔT · (1 − e^(−dt/τ)) , with separate time constants for EGT (τ = 2.5 s) and CHT (τ = 25 s), reflecting how fast exhaust gas versus cylinder head actually responds to a change in load
From there, the math is simple but powerful: residual = actual − expected. Every telemetry frame produces a ΔEGT and a ΔCHT — the gap between what the engine is doing and what a healthy engine should be doing under those exact conditions. That residual, not the raw sensor value, is the real signal.

Where Generative AI Comes In

Once you have a residual vector, you still need to translate it into something a ground crew can act on. That's where Amazon Bedrock comes in. VajraTwin passes the Δ-vector and current thermodynamic state to Claude 3 Haiku on Bedrock, which returns a one- or two-sentence root-cause explanation alongside a flight advisory state — the kind of judgment call a flight engineer would make, but generated in milliseconds.
Because this is safety-adjacent telemetry, the system can't afford to go silent if Bedrock is unreachable. So VajraTwin backs every AI call with a deterministic rule engine that fires instantly, with zero network calls, whenever Bedrock is unavailable:
Condition
Advisory
|ΔEGT| > 40 °C or |ΔCHT| > 30 °C
GO WITH DERATE
load_factor > 1.2
GO WITH MONITORING
Minor scatter
GO WITH MONITORING
All nominal
GO
The result is a system with 100% advisory uptime: rich, explainable AI reasoning when Bedrock is available, and a safe deterministic fallback when it isn't. The four advisory states — GO, GO WITH MONITORING, GO WITH DERATE, and MAINTENANCE REQUIRED — are colour-coded straight through to the Ground Control Station UI, so a crew chief can read engine health at a glance.

Architecture: All Serverless, All Managed

GCS (React + Vite + Tailwind + Recharts, hosted on AWS Amplify)
│ POST /telemetry
▼
Amazon API Gateway (REST)
│
▼
AWS Lambda — VajraTwinEngine (Python 3.12, 256 MB, 30 s timeout)
1. Validate telemetry
2. Run physics_surrogate.calculate_residuals()
3. Call Amazon Bedrock (Claude 3 Haiku) → fallback to rule engine
4. Write to DynamoDB
5. Return JSON
│
├──▶ Amazon DynamoDB (TelemetryStore, pay-per-request)
└──▶ Amazon Bedrock (anthropic.claude-3-haiku)

Every piece of this stack is managed and pay-per-use. There's no fleet of EC2 instances idling between telemetry frames, no capacity to provision ahead of a flight test, and no infrastructure to patch. The whole backend — API Gateway, Lambda, DynamoDB, and IAM roles scoped tightly to  bedrock:InvokeModel  and  dynamodb:PutItem  — is defined as code in a single  template.yaml  and deployed with AWS SAM.

A Sample Request

Here's what a single telemetry frame looks like going in and coming out:
Request:
{
"engine_id": "rotax-914-001",
"rpm": 5500,
"map_kpa": 125.0,
"oat_c": 15.0,
"egt_c": 780.0,
"cht_c": 118.0,
"dt_s": 0.05
}

Response:
{
"physics_model": {
"egt_expected": 741.06,
"cht_expected": 118.19,
"load_factor": 1.2337,
"mass_airflow_kg_s": 0.07354,
"volumetric_efficiency": 0.9037,
"inlet_temp_c": 23.91
},
"residuals": { "delta_egt": 38.94, "delta_cht": -0.19 },
"xai_advisory": {
"root_cause": "Minor elevated EGT residual consistent with slightly lean mixture at high MAP. Wastegate function nominal.",
"advisory": "GO WITH MONITORING",
"advisory_source": "bedrock"
}
}

In one round trip: the physics engine computed what the engine should be doing at 5,500 RPM and 125 kPa MAP, flagged a ~39 °C EGT residual, and Bedrock turned that number into a plain-language diagnosis and a flight-ready recommendation — without a human in the loop.

Getting It Running

The project ships as a complete SAM application. On the backend:
sam build
sam deploy --config-env default

# or test locally, no AWS account required
sam local start-api
curl -X POST http://127.0.0.1:3000/telemetry -H "Content-Type: application/json" -d @scripts/sample_event.json

The frontend is a standard Vite + React + TypeScript app; point it at your deployed API Gateway URL and run  npm run dev , or build it and push to AWS Amplify for hosting.
One prerequisite worth calling out: you'll need Amazon Bedrock model access enabled for  anthropic.claude-3-haiku-20240307-v1:0  in your target region ( ap-south-1  by default) before the XAI path will work — otherwise the system gracefully runs on the rule-engine fallback.

Why This Approach Works

The interesting design decision in VajraTwin isn't the AI — it's where the AI sits. Generative models are good at turning structured signals into human-readable explanations, but they're a poor substitute for a physics model when the question is "what should this engine's exhaust gas temperature be right now, given RPM, manifold pressure, and ambient conditions." VajraTwin uses each tool for what it's good at: closed-form thermodynamics for ground truth, Bedrock for interpretation and communication, and a deterministic rule engine as a safety net that never depends on network availability.
Combined with a fully serverless AWS backend, that adds up to a digital twin that's cheap to run between flights, scales instantly during them, and never leaves a ground crew without an answer.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article