top of page
Search

Powering E-Motor Optimisation - A Machine Learning Approach

Writer: PaulPaul

Introduction

How can you employ machine learning to drive down costs in ubiquitous, mass-produced technologies such as electric motors?

This month's article looks at how we got on running a project to develop machine learning models capable of predicting the behaviour of an electric motor, aimed at replacing control sensors and optimising material usage in the machine. We got some unexpected results, and plenty of follow up ideas - Read on to find out how we did.

The motor in question is a permanent magnet design for automotive applications, and even small cost optimisations (such as removing sensors / reducing materials) can produce meaningful savings over a full production cycle, whilst jointly improving sustainability and reliability.

To give an impression of the economics - We are talking about the removal of one or two sensors worth £0.25-£0.50 each, from motors being produced in quantities of 100k-200k per annum - A decent potential saving from a software algorithm.



Our strategy involved training a variety of models to predict behaviour based on other motor characteristics, with the ultimate intention that the motor controller would use model predictions to replace sensor readings. An additional requirement was to ensure that the predictive models would be sufficiently small and efficient for embedded microcontroller use.

What did we do?

Our first step was to decide what the models would predict (the target variables); This was guided by the objectives of the project, and identifying which aspects of motor behaviour offered the best economic opportunities.

We investigated stator and rotor temperature profiles across a range of operating conditions:

  • Predicting rotor temperature enables rotor designs with less material / Enables a full utilisation control strategy

  • Predicting stator temperatures allows the sensors therein to be removed (and replaced)



Modelling these parameters requires the availability of a good training dataset (in any project, this is often the hardest part, and we took a shortcut ...)

The original motor dataset for this project was generated during bench tests, by the LEA department at Paderborn University, and made generally available on Kaggle (https://www.kaggle.com/wkirgsn/electric-motor-temperature).


140 hours of temperature and performance data were collected as the motor was subject to a range of speed-torque combinations, designed to mimic realworld driving cycles, creating just short of a million datapoints.

Our second step was to explore the data to build an intuitive understanding of parameter relationships, which guided the types of models we would train, and any preprocessing steps we might have wanted to apply to the data.

We then moved on to train a set of simpler models for baselining and evaluation purposes, and finally trained a series of deep neural networks for comparison against the baselines.



All of the machine learning models have the same overall objective: To fit an algorithm linking the input parameters (detectable temperatures, motor current and voltage) to the target variables (temperature predictions).

Where the models vary is in the strategies they use to do this, resulting in variations in accuracy, training time, time-to-prediction and algorithm size.

This is why a process-driven development approach, with simple models providing baseline KPIs and a progression of complexity, is important.

How did we get on?

Using this approach, we worked up two sets of models; A set for rotor temperature prediction (a single target), and a multioutput set for stator temperatures (windings, yoke and teeth).

You can see performance metrics for both sets in tables 1 and 2, below. As well as measuring predictive accuracy (through calculation of RMSE and MAE values), we also looked at size on disk and time-to-prediction, which are important determinants in selecting the best model for deployment in a control function on a microcontroller.

Table 1: Model Evaluation - Predicting Rotor Temperature


Table 2: Model Evaluation - Predicting Stator Temperatures


The results show some interesting things - There is no clear winner for either category, with simpler models having very small footprints and quick compute times, but inferior accuracy, and whilst the neural networks possess a good combination of accuracy and size, the prediction time is too long for control use.


Decision trees, and (optimised) random forests, may provide the best balance of size, accuracy and compute time. Both the neural networks and decision trees / random forests underwent some optimisation during development.

The level of accuracy provided by the algorithms is slightly inferior to that offered by modern temperature sensors (+/-0.1%), but it is probably sufficient for control and it may be possible to improve with further development.

Concluding Thoughts

In this month's article, we took a walkthrough the development of machine learning models capable of predicting important temperatures in the operation of an electric motor, which in turn enables cost reductions in the motor design through the removal of sensors and material.

We unexpectedly found that decision tree and random forest models may be slightly better suited to this than neural networks - I say unexpectedly, on the basis that neural networks are often top performers in this type of predictive task, and going forward we may investigate ways of improving calculation speed for the NN models.

In the coming months we'll also look at how to deploy these models into a motor control strategy, look at ways of improving accuracy to sensor-equivalent levels, and possibly write an article on how we investigated the raw data.

A similar modelling approach can applied to torque prediction, which we'll also cover in a future post. A precise torque estimate leads to more accurate control, reducing power losses and heat build-up, and making the motor lighter and more efficient.

I hope you've found this article interesting - If you have any questions, please do get in touch via LinkedIn or our website (www.cloudforest.tech).

Thanks,

Paul

 
 
 

Comments


bottom of page