Skip to main content

ML Training on a Tiny Microcontroller for a Self-adaptive Neural Network-Based DC Motor Speed Controller

  • Conference paper
  • First Online:
IoT Streams for Data-Driven Predictive Maintenance and IoT, Edge, and Mobile for Embedded Machine Learning (ITEM 2020, IoT Streams 2020)

Abstract

Neural-Network (NN)-based controllers have the potential to achieve better control performance than classical PID controllers. Yet NN deployment on tiny microcontrollers, which are used in DC motor control due to strict cost requirements, is challenging as NNs are computationally intensive and memory demanding. We propose a lightweight direct inverse NN-based control approach for controlling the angular speed of a permanent magnet DC motor, which runs on a tiny Arm Cortex-M0 microcontroller with only 4 kB of RAM. Moreover, the NN-based controller can self-adapt to the DC motor characteristics without the need of any external machine learning frameworks such as TensorFlow. For this, we are not deploying a pre-trained network for inference but implement a fully automated training process on the microcontroller, which also includes the dataset collection.

The result is a self-adaptive control algorithm that is able to drive the motor at the desired speed after it learned the motor characteristics in an initial training phase. Furthermore, the approach is extended such that it enables the controller to constantly self-adapt to later changes in the motor characteristics caused by heating or wear-out while it is operating in standard control mode.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. TensorFlow lite for microcontrollers (2020). https://www.tensorflow.org/lite/microcontrollers

  2. Abadi, M., et. al.: TensorFlow: Large-scale machine learning on heterogeneous systems (2015). http://tensorflow.org/, software available from tensorflow.org

  3. Cotton, N.J., Wilamowski, B.M., Dundar, G.: A neural network implementation on an inexpensive eight bit microcontroller. In: 2008 International Conference on Intelligent Engineering Systems, pp. 109–114 (2008)

    Google Scholar 

  4. Fedorov, I., Adams, R.P., Mattina, M., Whatmough, P.: Sparse: sparse architecture search for CNNs on resource-constrained microcontrollers. In: Wallach, H., Larochelle, H., Beygelzimer, A., d’Alché-Buc, F., Fox, E., Garnett, R. (eds.) Advances in Neural Information Processing Systems, vol. 32, pp. 4977–4989. Curran Associates, Inc. (2019)

    Google Scholar 

  5. Hafner, R., Riedmiller, M.: Neural reinforcement learning controllers for a real robot application. In: Proceedings 2007 IEEE International Conference on Robotics and Automation, pp. 2098–2103 (2007)

    Google Scholar 

  6. ARM Inc.: CMSIS DSP software library (2020). http://www.keil.com/pack/doc/CMSIS/DSP/html/index.html

  7. Infineon Technologies AG: Infineon TLE9855QX microcontroller (2020). https://www.infineon.com/cms/en/product/microcontroller/embedded-power-ics-system-on-chip-/h-bridge-driver-ic-integrated-arm-cortex-m0/tle9855qx/

  8. Infineon Technologies AG: Infineon TLE985X evaluation board (2020). https://www.infineon.com/cms/en/product/evaluation-boards/tle985x-evalboard/

  9. Khalid, M., Omatu, S.: A neural network controller for a temperature control system. IEEE Control Syst. Mag. 12(3), 58–64 (1992)

    Article  Google Scholar 

  10. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. In: Bengio, Y., LeCun, Y. (eds.) 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, 7–9 May 2015, Conference Track Proceedings (2015)

    Google Scholar 

  11. Lai, L., Suda, N., Chandra, V.: CMSIS-NN: efficient neural network kernels for Arm Cortex-M CPUs. arXiv e-prints, January 2018. http://arxiv.org/abs/1801.06601

  12. Liu, K., Tokar, R.L., McVey, B.D.: An integrated architecture of adaptive neural network control for dynamic systems. In: Tesauro, G., Touretzky, D.S., Leen, T.K. (eds.) Advances in Neural Information Processing Systems, vol. 7, pp. 1031–1038. MIT Press (1995)

    Google Scholar 

  13. Psaltis, D., Sideris, A., Yamamura, A.A.: A multilayered neural network controller. IEEE Control Syst. Mag. 8(2), 17–21 (1988)

    Article  Google Scholar 

  14. Schley, C., Chauvin, Y., Henkle, V., Golden, R.: Neural networks structured for control application to aircraft landing. In: Lippmann, R.P., Moody, J.E., Touretzky, D.S. (eds.) Advances in Neural Information Processing Systems 3, pp. 415–421. Morgan-Kaufmann (1991)

    Google Scholar 

  15. Weerasooriya, S., El-Sharkawi, M.A.: Identification and control of a dc motor using back-propagation neural networks. IEEE Trans. Energy Convers. 6(4), 663–669 (1991)

    Article  Google Scholar 

  16. Zhang, Y., Suda, N., Lai, L., Chandra, V.: Hello edge: keyword spotting on microcontrollers. CoRR abs/1711.07128 (2017). http://arxiv.org/abs/1711.07128

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Mueller-Gritschneder .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Funk, F., Bucksch, T., Mueller-Gritschneder, D. (2020). ML Training on a Tiny Microcontroller for a Self-adaptive Neural Network-Based DC Motor Speed Controller. In: Gama, J., et al. IoT Streams for Data-Driven Predictive Maintenance and IoT, Edge, and Mobile for Embedded Machine Learning. ITEM IoT Streams 2020 2020. Communications in Computer and Information Science, vol 1325. Springer, Cham. https://doi.org/10.1007/978-3-030-66770-2_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-66770-2_20

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-66769-6

  • Online ISBN: 978-3-030-66770-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics