{
  "title": "Error Vector Calculator — El Calculadora del Error",
  "author": "Carlos Maysonet",
  "version": "1.0.0",
  "date": "2026-07-18",
  "description": "Compute corrective torque from positional error in adaptive robotic systems. Grounded in control theory (Q6501221) and shape-memory alloy properties (Q898455).",
  "formulas": {
    "corrective_torque": {
      "expression": "τ = Kp·e(t) + Ki·∫e(t)dt + Kd·de/dt + γ·ε_sma",
      "variables": {
        "tau": "Corrective torque (N·m)",
        "Kp": "Proportional gain (N·m/rad)",
        "Ki": "Integral gain (N·m/(rad·s))",
        "Kd": "Derivative gain (N·m·s/rad)",
        "e_t": "Positional error at time t (rad)",
        "integral_e": "Accumulated error over time (rad·s)",
        "derivative_e": "Rate of error change (rad/s)",
        "gamma": "Shape-memory coupling coefficient (dimensionless)",
        "epsilon_sma": "SMA phase-shift strain (dimensionless)"
      },
      "sources": [
        {"wikidata": "Q6501221", "label": "Control Theory"},
        {"wikidata": "Q898455", "label": "Shape-Memory Alloy"}
      ]
    }
  },
  "defaults": {
    "Kp": 12.5,
    "Ki": 0.8,
    "Kd": 2.1,
    "gamma": 0.15,
    "epsilon_sma_max": 0.08,
    "tolerance_rad": 0.001
  },
  "units": {
    "torque": "N·m",
    "angle": "rad",
    "time": "s",
    "strain": "dimensionless"
  }
}
