A C++ motor-control workbench for learning and testing a QDD servo—before touching power hardware.
Launch the live lab → · Signals & losses · Code & API
No installation, login or API key. The live joint starts automatically; pause whenever needed.
GIF: short event excerpts from actual C++–MuJoCo recordings. Restarting the loop replays the event.
A moving model does not explain a motor. This lab lets you follow command → FOC → PWM → inverter → phase current → torque → motion, then ask where the energy went.
The first screen connects Command → FOC → SVPWM / inverter → Output → Sensor feedback to the same running joint. Select one stage for its live values; pause to inspect without changing the physics.
Change a target, push the output, meet a stop or trip the driver. Inspect current and torque, open the motor housing, pause, advance 1 ms and export CSV. The browser compiles the existing C++ controller, plant and protection to WebAssembly; it is not a separate JavaScript approximation or a prerecorded pose animation.
- Open the lab and move Target angle.
- Press Push +4 N·m / 120 ms. Watch current rise and the link recover. Try Meet a stop, then Trip driver.
- Recalculate Powertrain for switched FOC, heat and torque–RPM maps. Open Signals & losses. Inspect actual native gate edges, current decay, heating and signed power—not just the final pose.
| Your question | One place to answer it |
|---|---|
| Can I change switching, noise, heat and motor-map conditions? | Recalculating C++/WASM Powertrain experiments |
| How does FOC work inside the loop? | Interactive control pipeline and coordinate calculator |
| What do the six gates do? Why does current continue after shutdown? | Native PWM, diode and current traces |
| Where do heat, friction and efficiency enter? | Reproducible thermal and power experiments |
| Can I see actual 3D contact and impacts? | Five C++ ↔ MuJoCo recordings |
| Which file or API should I change? | Code map, compiled example and complete API |
| Which claims have a sound basis? | Fidelity table · 14 annotated primary references |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
ctest --test-dir build --output-on-failure
./build/qdd_live_example
./build/qdd_signal_lab results/my-signalsUse a new output directory. Quickstart owns installation, native/MuJoCo commands and troubleshooting. The experiment tutorial explains what to change and what to compare.
The sinusoidal PMSM model includes R/L/back-EMF, current sensing and latency, two-inertia gearing, compliance/backlash, smooth friction, copper heating, R(T), DC-link regeneration and fault latches. Native switched experiments add gate events, dead time, conduction and diode paths.
Live joint: averaged inverter + 1-axis mechanics/compliant stop. Powertrain: switched electrical scope, prescribed-current heat, and averaged-inverter motor maps. MuJoCo: separate actual 3D mechanics/contact runs. Not established: a calibrated motor, manufactured PCB, STM32 worst-case execution time or hardware safety. Iron loss, switching-energy loss, magnetic saturation and winding hot spots are omitted; the displayed efficiency is a bounded synthetic calculation, not a product rating.
src/ + include/qdd/: shared model/control · web/: live UI and lessons · examples/: runnable native/MuJoCo code · tests/: contracts · tools/: reproducible assets/evidence · docs/: setup and implementation decisions.
