Finding the operating point of an electric motor is no longer as simple as it used to be. I mean, in the past, or in the textbooks and course slides we often see during our studies, it was simple. Just set the supply voltage that you have, and then iterate either the pole angle (for synchronous motors) or slip (induction motors) until your torque or power matches the required.

Thanks to the spread of power electronics and not-direct-on-line applications, that approach is no longer valid, at least not always.

Instead, we typically have at least two degrees of freedom, like slip and voltage for induction motors, or the d- and q-axis components for a synchronous machine.

Thus, a simple iteration is no longer a very smart approach. It can be done, but its implementation is no longer trivial, and it’s easy to waste lots of computation time by, I don’t know, sweeping all the possible combinations with a given step size.

You can find examples even in the published literature, ranging from using the control parameters as optimization variables to design-of-experiments type approaches with response surfaces and similar.

Next, I will briefly describe the approach I’ve personally found to work rather well.

What we’re really after

So, we are trying to find the operating point of a motor. This, at least for me, means we want it to produce a certain shaft power at a certain speed. That’s one degree of freedom gone.

However, like mentioned, since the voltage can normally vary between zero and maximum values, we have at least one extra. So, something needs to be fixed, too – otherwise we’ll get an infinite number of solutions.

That’s where different control schemes step in. Here, I will be using the MTPA scheme as an example, mainly because it’s quite easy to understand. And since it’s the only one I have personally used, but let’s not get too fixated on that now, alright?

Formalizing the problem

All control schemes – at least as far as I can imagine – can be formalized as an optimization problem. For MTPA, which stands for maximum torque per Ampere, the goal is to minimize the resistive losses while still reaching the torque.

In maths, the problem can thus be written as

    \[\min\limits_{x_\text{dq}} P_\text{Cu}\]


such that

    \[T(x)=T\]


    \[U(x) \leq U_\text{max}\]

In other words, indeed minimizing the losses while still reaching the torque, and staying below the voltage limit. I’ve chosen a plain x as the variable, standing for either the supply voltage or a fixed current, split into its d- and q-axis components. You could use amplitudes and angles just as well, but in my experience, control folks tend to love components.

How to actually solve it?

Nope, a simple formulation isn’t enough. Well, you could technically feed it into a black-box solver, but you would most likely be wasting looooots of time that way.

Why?

Well, unless you tinker with the settings, black-box solvers tend to aim for a precision wayyyy to fine for motor problems. Like, getting the results and step size under a one-per-million change or error, while at the same time you can get sub-percent change in behaviour by remeshing the problem and using a different time-step length.

In other words, stuff that counts for mathematics, perhaps counts if you’re an automotive manufacturer trying to shave of 1 USD per battery back cost while still reaching 300 km NEDC or what not, but does not count the rest of the time.

Anyways, that’s reason number 1 why black boxes are bad.

The second reason is that we are leaving plenty of available information unused. A black-box solver knows nothing of the problem.

We, on the other hand, know plenty.

Utilizing a priori information

Indeed, we know that it’s a motor we’re analysing. And luckily, we have more than a decade of know-how to utilize, unless we’re dealing with a weird novel topology or stuff.

Specifically, we also know how a motor should behave, more or less. Indeed, we all know how the torque and voltage equations look like, with fluxes and inductances as the parameters.

Now, you might be tempted to just use the analytical model alone for determining the operating point or supply. Sadly, this does not work, usually. Motors are, after all, nonlinear and their exact behaviour depends on the operating point. Additionally, equivalent circuits typically ignore more complex phenomena like eddy-current losses in magnets or shields, which can often have a notable effect on the current.

But, without further teasing and digressing, let’s move on to the actual favourite approach of mine.

Actual optimization

I’m a fan of using the Newton’s method. Now, blindly using Newton with FEA would be tricky, since we need at least first-order derivatives for it to work, and second-order Hessian matrices for actual optimization problems. Using numerical finite difference approaches for those would again take plenty of time, and leave you at the mercy of the numerical noise you get from different convergence criteria (of the FEA problem, not the optimization one).

We will soon see how the derivatives can be handled, in what seems like a smart way to me.

But before we go there, let’s take a brief look on how ‘Newton’ might actually look like. Indeed, for typical cases, there are two options.

Actual MTPA

If we know or expect to stay below the voltage limit, we can just as well drop the voltage constraint. After all, Newton the optimization method does not handle inequality constraints very easily.

Thus, we are left with the loss minization, and an equality constraint for the torque. This is a textbook optimization problem. With two seconds of googling, you find that a single iteration step looks like

    \[\begin{bmatrix}\mathbf{H} & \nabla T \\ \nabla T^\text{T} & 0 \end{bmatrix} \begin{bmatrix} \delta \mathbf{x} \\ \lambda \end{bmatrix} = \begin{bmatrix} - \nabla P \\ -T(\mathbf{x}_\text{prev}) \end{bmatrix}\]

What you have in the equation are the Hessian matrix of the copper losses and the gradient of the torque on the left-hand side, and the gradient of the resistive losses and the value of the torque on the right-hand side.

Voltage-constrained case

In the case that the voltage limit is being exceeded, we are obviously no longer operating under MTPA.

Luckily, the situation is even simpler now, since we have two equality constraints: we want to hit both the torque and voltage targets.

And yes, we need to be exactly on the voltage limit. We cannot exceed it, and if we could go below, we’d again be in MTPA mode.

In any case, since we now have a two-variable problem with two equality constraints, we can use plain (non-optimization) Newton’s method to solve it. I trust you can find the formulation yourself – we just need the Jacobian matrix, or alternatively said the gradients of the voltage amplitude and the torque.

Handling the derivatives

Here comes the beef of this article. The derivatives don’t need to be that exact. After all, quasi-Newton methods are used in optimization all the time, and those are all about approximate derivatives updated with this recursion formula or that.

And we, we don’t even need to go that far. We have the equivalent analytical model for the motor, remember.

So, finally, my general formula for the iterative process is as follows:

  1. Get a reasonable starting point. Here, an analytical model computed at no-load is a good idea.
  2. Compute, with FEA the behaviour (torque and voltage) at the current point.
  3. Re-compute the equivalent model for the new operating point. This should be rather negligible computational cost, compared to the original simulation on step 2.
  4. Use the equivalent model to get the gradients and Hessians.
  5. Compute the new operating point.
  6. Go back to 2, or quit if sufficiently converged.

As you can see, we’ve now ridded ourselves from computing derivatives based on FEA alone. Instead, we are getting them from a well-understood analytical model. Thus, we can either use our brains to get a closed-form solution for them, or just hit them with finite differences. Those are no longer a problem, as analytical models are essentially noiseless and compute in a microsecond.

Miscellaneous comments

Some bits and pieces follow.

The correct equivalent model to use

I’m completely fed up with the concept of ‘inductances’. Things get tricky immediately once you hit moderate saturation.

So, my favourite approach for a synchronous machine is to write

    \[\mathbf{\Psi}(\mathbf{i}) = \mathbf{\Psi}(\mathbf{i_0}) + \frac{\partial \mathbf{\Psi} }{\partial \mathbf{i}}(\mathbf{i} + \mathbf{i}_0)\]

In other words, we are writing the fluxes as a first-order approximation (truncated Taylor series if you like) in the neighbourhood of some previous point \mathbf{i}_0. You can see that this approach – like the more-traditional method with secant-like inductances – exactly matches the fluxes at the center point, but offers better accuracy in its neighbourhood.

Furthermore, you can choose to call the Jacobian matrix of the flux vector \frac{\partial \mathbf{\Psi} }{\partial \mathbf{i}} as the differential inductance or whichever term you prefer.

The drawback is that the constant flux vector \mathbf{\Psi}(\mathbf{i_0}) generally also has a non-zero q-axis flux, which makes many people’s eyes glaze over.

Voltage or current source

The same methodology can be used both with voltage or current supply.

The drawback of voltage supply is of course that it takes some time to reach steady-state, meaning current supply is typically much faster.

On the flip side, you positively need voltage supply to accurately model PWM effects, especially if strong eddies are present.

Furthermore, the voltage-constrained case is trivially easy. You can choose the angle of the voltage (with respect to whatever) as a new variable, to get a single-dof system and make sure you exactly match the voltage amplitude.

Switching control modes

Technically, you could keep the inequality constraint for the voltage in the system, and then use e.g. the active-set method to handle it.

I, pretty much due to laziness and time constraints, just prefer the aforedescribed approach.

Often, you simply know you are gonna be either in MTPA or field-weakening mode.

For the rare edge cases, my current approach is the compute the next iterate as though we were in MTPA. Then, before computing the new FEA solution, I check whether or not the next iterate would result in an too large a supply voltage. With voltage supply, with voltage components as the variables, this is trivial. For current supply, I can use the equivalent model to get an idea, and then double-check this after after the FEA solution has been computed.

3-dof systems

The same methodology also works for systems with 3 degrees of freedom, like electrically excited synchronous machines with the excitation current/voltage as a third variable.

Saturation can still be a pain

Sadly, even this is not fireproof against saturation, and sometimes your iterates will just start bouncing around. You can try adding backtracking to the iteration, or precomputing a rough current-flux map and using it as a look-up table for the derivatives, to get some global information into the play.

Bringing us into our next topic.

When it’s better to precompute

Indeed, a completely alternative approach is to pre-compute a mapping from the currents into the fluxes (and for the sake of all that’s good, please use interpolation rather than a second-order polynomial surface or anything like that), use that for determining an operating point, and then optionally do a more detailed simulation on that point.

Both methods have their merits. Pre-computation tends to take longer for one or two operating points (unless your iteration is really bouncy), but then you can get an entire drive cycle at practically no extra cost (this is for synchronous machines with no significant eddy damping only).


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!
Finding the operating point of a motor

2 thoughts on “Finding the operating point of a motor

  • Hi…I am working on the design of synchronous reluctance motor…May i know some research ideas to work upon

  • Thanks, Antti. Very nice explanation.
    Sometimes, we would need to consider additional constraints related to temperature transient. Following your method for the optimization problem can easily include them. As you already mentionned it, the optimal point relies on how accurate is the model.

Leave a Reply

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