Skip to content
tinmanlabPublic

About

BLDC motor simulation with STM32 driver board

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Actuator Lab

See the current. Feel the load. Explain the loss.

A C++ motor-control workbench for learning and testing a QDD servo—before touching power hardware.

Launch the live lab → · Signals & losses · Code & API

Browser lab and Pages Native and MuJoCo verification

Short sequential tour of actual MuJoCo tracking, loads, contact, impact and driver trip

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.

Why this is useful

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.

Start in 30 seconds

  1. Open the lab and move Target angle.
  2. Press Push +4 N·m / 120 ms. Watch current rise and the link recover. Try Meet a stop, then Trip driver.
  3. 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.

Choose your depth

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

Run the code

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-signals

Use a new output directory. Quickstart owns installation, native/MuJoCo commands and troubleshooting. The experiment tutorial explains what to change and what to compare.

Realistic mechanisms, explicit limits

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.

Repository map

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.

Architecture · Web build/deploy contract · MIT license

About

BLDC motor simulation with STM32 driver board

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages