
What happened
After logging 1,000 samples of PD control at a 5 ms cycle, the author trained a 2-4-1 MLPRegressor and ran only its output on the M5Stack Core2, achieving 60 seconds of continuous balancing with repeated finger-push disturbances.
Why it matters
The experiment shows that a very small network (four hidden neurons) can imitate an existing controller well enough for real-time robot control, suggesting imitation learning is an accessible entry point for physical AI projects.
Summaries like this, every morning.
The project addresses a practical hurdle in physical AI: training directly on real hardware risks damaging the robot during trial and error. By first getting the pendulum to balance with a conventional PD controller, the author could safely collect 1,000 samples of stable behavior over about 5 seconds. Those samples then served as training data for a small neural network on a PC.
The network itself is deliberately minimal — two inputs (tilt angle and angular velocity), four hidden neurons, and one output (motor command). After training with scikit-learn's MLPRegressor, the weights and biases were transferred to the Core2, where a short MicroPython function performs inference. The author notes that this is closer to behavior cloning than to reinforcement learning; the AI reproduces the controller's input-output relationship rather than discovering a new balancing strategy.
Safety measures remained in place even during AI-only control: the PD command was computed in parallel, and the system stopped if the AI and PD commands diverged too much, if tilt exceeded 20 degrees, or if the control cycle became abnormal. The author also cautions that the disturbance magnitude was not measured, so the comparison between PD and AI disturbance rejection is not quantitative.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
After four months and 418 scripts under scripts, handing the Claude Code-built kit to a buyer, 15 spots stoppe…

After a Fable 5 review found one command form that slipped past both the Claude Code hook and the Git pre-push…

ABB Robotics confirmed to The Robot Report that China's Office of the Working Mechanism for Foreign Investment…

GitHub says it saw more than 1.2 billion commits in one week in October, over 400% more than a year earlier, a…

Kajima has begun full-scale deployment of robots running FieldAI's autonomous control software

ugo said Canon Electronics began producing its ugo mini G2 inspection robot in October 2026 at the Misato site…
