Hypehypehypehypehypehypehypehypehype

Alright, let’s be serious. Interest in machine learning is booming.

(And I refuse to use the term artificial intelligence or AI – there’s nothing intelligent in being able to do a very tightly defined task quite well).

Your typical AI.

Anyways, I’ve gotten some questions about how it can be applied to electrical machines. So, being a lazy fuck person, I took the liberty of posting one of my replies below, only in a slightly modified form. It focuses on the use of machine learning in optimization of electrical machines. Moreover, it overlines a rough study path for somebody only getting started in the topic.

Disclaimer: I’m not a machine learning person myself. I’m not even a good optimizer. Caveat emptor and all that.

Here goes:

In my understanding machine learning in optimization is most commonly used as a so-called metamodel. Basically it goes like:

  1. Compute enough data points with e.g. FEA
  2. Train some machine learning model (like neural network) to map inputs (like geometry dimensions) into outputs (like torque and losses)
  3. Run a separate optimization algorithm using the neural network instead of FEA. Muuuuuch faster than using FEA.

So basically, you need

  1. Understanding of how to set up the optimization problem in the first place. Like what are you varying, what do you want? Basic engineering skills.
  2. Using some optimization algorithm. You can either use an existing one (like fminsearch or fmincon in Matlab, or something in Python), or if you want to learn better you can code your own. Wikipedia articles on differential evolution or particle swarm optimization are good starting points, both are simple to code.
  3. Training the machine learning model.

The last point is something I have very little experience on, but there are probably some tutorials online. To get things running in the first place, I would use some fast analytical cost function instead of FEA. There are many commonly used test functions for optimization, like Rosenbrock function. The reasoning is that you don’t have to spend minutes computing each solution, so debugging code is faster. Once you have the code working, you can move on to actual machine optimization.

So that would be my longish answer.  A rough study path would then be

  1. Checking the basics of machine learning and optimization from online tutorials would be a nice start.
  2. Then you could check some research on using machine learning for electrical machines, there should be some available.
  3. And of course you need to know the basics of electrical machine design, otherwise you might get some really good-looking optimized designs that won’t work in reality (overheating, too weak mechanically, impossible to manufacture, stuff like that).

Finally, check out the tutorial Gerd and I gave at ICEM 2018 – it has a section on machine learning-based metamodels.


Check out EMDtool - Electric Motor Design toolbox for Matlab.

Need help with electric motor design or design software? Let's get in touch - satisfaction guaranteed!
A.I. and Electrical Machines

Leave a Reply

Your email address will not be published. Required fields are marked *