Files
2nd/10_Wiki/Topics/Architecture/Digital_Twin.md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

169 lines
6.0 KiB
Markdown

---
id: wiki-2026-0508-digital-twin
title: Digital Twin
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [digital-twin, virtual-replica, cyber-physical-system]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [digital-twin, iot, simulation, cps]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: python
framework: NVIDIA-Omniverse/Azure-Digital-Twins
---
# Digital Twin
## 매 한 줄
> **"매 digital twin 의 매 physical asset 의 living mirror"**. 매 sensor stream 가 매 simulation model 에 feed → 매 prediction / what-if / control. 2026 의 매 NVIDIA Omniverse + OpenUSD, Azure Digital Twins, AWS IoT TwinMaker 가 매 enterprise standard. 매 LLM-augmented reasoning over twin (Claude Opus 4.7 + DTDL graph query) 의 매 emerging.
## 매 핵심
### 매 3-tier
- **Digital Model** — 매 static representation, 매 sync X.
- **Digital Shadow** — 매 one-way sync (physical → digital).
- **Digital Twin** — 매 bidirectional sync (digital → physical control 의 가능).
### 매 ingredient
- **3D geometry** (OpenUSD, glTF).
- **Telemetry** (MQTT, OPC UA, AVRO over Kafka).
- **Physics / behavior** (FMU, Modelica, Isaac Sim, Omniverse PhysX).
- **Ontology / DTDL** (Digital Twins Definition Language).
- **AI layer** (anomaly detection, forecasting, RL policy).
### 매 응용
1. **Manufacturing**: BMW iFactory — 매 line 의 reconfigure 의 digital first.
2. **City** — Singapore Virtual Singapore, Helsinki 3D+.
3. **Energy grid** — 매 outage prediction, demand response.
4. **Healthcare** — patient-specific cardiac twin (Dassault Living Heart).
5. **Robotics fleet** — 매 Isaac Sim 의 sim-to-real RL training.
## 💻 패턴
### Azure Digital Twins (DTDL v3)
```json
{
"@context": "dtmi:dtdl:context;3",
"@id": "dtmi:com:factory:Pump;1",
"@type": "Interface",
"contents": [
{ "@type": "Property", "name": "serialNumber", "schema": "string" },
{ "@type": "Telemetry", "name": "rpm", "schema": "double" },
{ "@type": "Telemetry", "name": "temperature", "schema": "double" },
{ "@type": "Command", "name": "shutdown" },
{ "@type": "Relationship", "name": "feedsInto", "target": "dtmi:com:factory:Tank;1" }
]
}
```
### MQTT → twin update (Python)
```python
import paho.mqtt.client as mqtt
from azure.digitaltwins.core import DigitalTwinsClient
dt = DigitalTwinsClient("https://factory.api.weu.digitaltwins.azure.net", credential)
def on_msg(client, _, msg):
payload = json.loads(msg.payload)
patch = [{"op": "replace", "path": "/rpm", "value": payload["rpm"]},
{"op": "replace", "path": "/temperature", "value": payload["temp"]}]
dt.update_digital_twin(payload["twin_id"], patch)
c = mqtt.Client()
c.on_message = on_msg
c.connect("mqtt.factory.local", 1883)
c.subscribe("factory/+/telemetry")
c.loop_forever()
```
### Twin graph query (Cypher-like)
```text
SELECT pump, tank
FROM DIGITALTWINS pump
JOIN tank RELATED pump.feedsInto
WHERE pump.temperature > 85
AND IS_OF_MODEL(pump, 'dtmi:com:factory:Pump;1')
```
### Omniverse + OpenUSD scene composition
```python
from pxr import Usd, UsdGeom, Sdf
stage = Usd.Stage.CreateNew("factory.usda")
factory = UsdGeom.Xform.Define(stage, "/Factory")
pump = stage.OverridePrim("/Factory/Pump_42")
pump.CreateAttribute("custom:rpm", Sdf.ValueTypeNames.Float).Set(1480.0)
pump.CreateAttribute("custom:temperature", Sdf.ValueTypeNames.Float).Set(72.3)
stage.Save()
```
### Anomaly detection on twin stream
```python
from river import anomaly # online learning
detector = anomaly.HalfSpaceTrees(seed=42)
async for event in kafka_consumer("factory.telemetry"):
score = detector.score_one({"rpm": event.rpm, "temp": event.temp})
detector.learn_one({"rpm": event.rpm, "temp": event.temp})
if score > 0.95:
await dt.update_relationships(event.twin_id, "alert_state", "anomaly")
```
### LLM reasoning over twin graph
```python
graph_context = dt.query_twins("SELECT * FROM digitaltwins WHERE temperature > 80")
response = anthropic.messages.create(
model="claude-opus-4-7",
system="You analyze factory digital twin state for root-cause hypotheses.",
messages=[{"role": "user", "content": f"Twins: {graph_context}\nWhy is line 3 throughput dropping?"}],
)
```
### Sim-to-real RL (Isaac Sim)
```python
from omni.isaac.gym.vec_env import VecEnvBase
env = VecEnvBase(headless=True)
# 매 4096 parallel pump sims 의 train, 매 policy 가 real pump 에 deploy.
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| 매 high-fidelity physics | NVIDIA Omniverse + Isaac Sim |
| 매 enterprise IoT graph | Azure Digital Twins (DTDL) |
| 매 AWS-native | AWS IoT TwinMaker |
| 매 city / GIS | CesiumJS + 3D Tiles |
| 매 scientific sim | Modelica + FMU |
**기본값**: Azure Digital Twins or AWS TwinMaker for graph + telemetry; Omniverse for 3D/physics; OpenUSD for interchange.
## 🔗 Graph
- 부모: [[Cyber-Physical-Systems]]
- 응용: [[Predictive Maintenance]]
- Adjacent: [[Control_Systems_Engineering|Control-Systems-Engineering]] · [[MQTT]]
## 🤖 LLM 활용
**언제**: 매 twin graph 의 natural-language query → DTDL/SQL translation, 매 anomaly explanation, 매 maintenance work order generation.
**언제 X**: 매 hard-realtime control loop (sub-ms). 매 safety-critical actuation (deterministic controller 의 사용).
## ❌ 안티패턴
- **3D model only**: 매 telemetry 가 X — 매 just CAD viewer.
- **No bidirectional channel**: 매 just shadow, 매 not twin.
- **Monolithic schema**: 매 DTDL inheritance / interfaces 의 사용.
- **Synchronous queries on hot path**: 매 read replica / cache.
- **No data retention policy**: 매 telemetry storage cost 가 explodes — tiered storage (hot Kafka → warm Parquet → cold S3).
## 🧪 검증 / 중복
- Verified (Microsoft DTDL v3 spec, NVIDIA Omniverse docs, AWS IoT TwinMaker, Gartner 2025 digital twin report).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — digital twin tiers, DTDL, Omniverse, sim-to-real |