Edge AI Imitation of Event-Triggered Model Predictive Control for an Inverted Pendulum
Santiago Díaz-Romero, Manuel Domínguez-Morales, Antonio Rios-Navarro, Alejandro Linares-BarrancoEvent-triggered model predictive control (MPC) updates the control input only when needed, but it still solves an optimization problem at every event, which on the studied cart–pole can exceed its 10 ms control period. We propose a compact multi-task neural network that replaces the whole scheme: it decides when to update the input and which value to apply, using only online measurements. It is trained on 500 physical recordings, adapted to a simulated teacher and refined with DAgger. Feeding it the held input produces a copycat policy that is accurate in open loop but sluggish in closed loop; in a matched comparison over four training seeds, removing that input raises full-episode success from three to 39 of 40 episodes. In simulation, at the default sensor noise, the final network completes all swing-up and tracking episodes, with time to upright and tracking error close to the teacher’s, whereas on the simulated teacher, tree ensembles have 1.4–1.6 times its open-loop error. In an open-loop replay on an ESP32-S3 microcontroller, a step takes under 40% of the period. In tracking and full episodes, it updates the input 33–39% more often than the teacher, mainly because it does not learn the rule’s sparsity.