STMicroelectronics Applied TinyML to Enhance Performance of Field-Oriented Control
An End-to-End Workflow Using MATLAB and Simulink
“STMicroelectronics and MATLAB and Simulink AI tools provide a perfect combination to build a methodology, which should be very simple for everyone to use in order to deploy on microcontrollers for specific use cases.”
Key Outcomes
- By integrating a tinyNN into the FOC system, the solution significantly reduced deviations and overshoot in the reference current, leading to near-optimal performance. STMicroelectronics achieved this by using Deep Learning Toolbox to design, train, prune, and quantize the neural network.
- The optimized neural network was successfully deployed on MCUs, meeting real-time control requirements with minimal inference time and memory footprint. This deployment was validated using the ST Edge AI Developer Cloud platform, ensuring the neural network’s suitability for embedded applications.
- The project demonstrated an end-to-end workflow from concept to deployment, using MATLAB and Simulink for modeling the FOC system, training the neural network, and integrating it into the control loop. This approach improved the development process, enabling rapid prototyping and testing of the enhanced control system.
STMicroelectronics designs and manufactures microcontrollers (MCUs) that are widely used in industrial, automotive, and consumer applications. This project aimed to improve the efficiency and precision of field-oriented control (FOC) for permanent magnet synchronous motors (PMSMs). Traditional PID controllers used in FOC often result in deviations and overshoot, leading to suboptimal performance when regulating motor speed and torque.
To enhance FOC performance, the STMicroelectronics team applied a two-step approach using MATLAB® and Simulink®. They designed and integrated a tiny neural network (tinyNN) to correct deviations in the reference current Iq generated by the speed PID controller. Deep Learning Toolbox™ was used to train, prune, and quantize the neural network. The corrected current signals improved the accuracy of the FOC system. Simulink was used to model and validate the AI-enhanced control system, while deployment tests on the ST Edge AI Developer Cloud confirmed real-time feasibility. The solution reduced overshoot, improved dynamic response, and ensured efficient MCU implementation.