Building an 8-Motor Motor Control Center Hardware-in-the-Loop Rig
Part 2 — What we actually achieved, what the whole project taught us, and where it goes from here.
Part 2 of 2 — Part 1 covers goals, architecture, and the debugging journeyWhere it landed
After every layer described in Part 1 was found, fixed, and re-verified, the rig reached a state that’s genuinely end-to-end validated rather than validated-in-pieces:
Every motor has been started, stopped, and driven through overcurrent, thermal, phase-loss, and short-circuit fault injection, with both the PLC’s FB chain and F446RE’s independent hardware layer confirmed to react — at their own, deliberately different thresholds. The dashboard reflects Start/Stop state within about 5 seconds end-to-end (browser click through the PLC, through the physics model, and back), fault indication animates live on the motor card that’s actually affected, and the SQLite historian now genuinely holds what the dashboard displays, closing out the invalid-query bug from Part 1.
What the whole project taught us
A handful of lessons showed up over and over, in different disguises, across every layer of the system — controls logic, physics modeling, data handling, and low-level firmware alike. These are the ones worth carrying into the next project, not just this one.
What’s planned next
The rig as it stands validates protection and sequencing logic convincingly. The next phase is about deepening that into something closer to an industrial-grade digital twin platform, and about broadening the motor-control depth beyond direct-on-line starting alone.
Parameterized starting methods: DOL, reversing, star-delta, soft starter, VFD
Replacing the single hardcoded DOL physics model with a strategy-pattern library covering five real industrial starting methods, each with its own current/timing profile and its own protection-coordination requirements — generalizing the existing 3-second start-inhibit fix into a per-method configuration instead of one fixed timer.
Formal control-systems modeling on top of the physics engine
Moving from an empirical slip-current blend to a derived equivalent-circuit model, a linearized transfer function, and a closed-loop PI speed controller for the VFD starting method — Bode plots, step response, and root locus analysis, not just simulation.
MCSDK-based field-oriented control on the existing Nucleo-F446RE
Adding a motor control expansion shield and a small test motor to run ST’s Motor Control SDK — automated system identification via the Motor Profiler, tuned current and speed control loops on real PMSM/BLDC hardware, and optionally a telemetry bridge back into the existing dashboard as a genuine physical-twin motor card.
Industrial protocol integration and predictive capability
An OPC UA server and MQTT telemetry egress so the rig speaks the protocols a real plant historian/SCADA system expects, followed by anomaly detection and eventually remaining-useful-life estimation built on the historian data this rig already generates.
Test automation, authentication, and functional-safety documentation
A pytest-based hardware-in-the-loop test harness automating the fault-injection sequences that are currently run by hand, dashboard authentication ahead of any remote-access work, and a lightweight HARA/FMEA writeup formalizing the dual-protection-layer design’s safety reasoning.
Every item above will get the same treatment as everything already built: a versioned file, a changelog explaining the real problem that drove it, and a debug log entry for whatever goes wrong along the way — because in this project, the wrong turns have consistently been as instructive as the working result.
