1. Introduction
Permanent magnet synchronous machines (PMSMs) are the machine of choice for high energy density applications due to their high efficiency and mechanical simplicity. The PMSM has seen widespread adoption in the automotive space [
1,
2], and is a promising candidate for more-electric and all-electric air propulsion drives [
3,
4].
The controller performance for a PMSM depends on the accuracy of the machine parameters, such as the stator inductances, stator resistance, and permanent magnet (PM) flux. These parameters can change in real time and have dependencies on the temperature, position, and current. The stator resistance increases nonlinearly with the temperature [
5], the PM flux can decrease (demagnetize) at high temperatures [
6], and the stator inductance saturates in high currents [
7]. These variations are typically accounted for using online parameter estimation, offline parameter look-up tables (LUTs), or a combination of the two.
Online parameter estimation uses real-time feedback of the drive system to estimate the parameters. The feedback can include the current, voltage, speed, and position. Online parameter estimation methods include receding horizon estimation [
8], recursive least squares [
9], neural networks [
10], and extended kalman filters [
11].
The offline parameter LUTs use the data of the machine from analytical calculations [
12], FEA analysis [
6,
13], and experimentation [
14,
15] (or any combination) to approximate the parameters given various operating points of the machine. The datapoints are interpolated in various ways to produce various desirable properties depending on the parameter and application.
Online parameter estimation requires more computation time than offline LUTs but is more accurate over the lifetime of the vehicle by detecting degradation and partial faults in the machine [
9,
11]. Online parameter estimation also requires either more sensors or sensorless techniques [
16] than offline LUTs.
The focus of this study is the flux linkage magnetic model (MM) of the PMSM and the modeling of the stator inductance parameters. To build an offline MM, the current and flux values are processed offline, and continuous inductance functions are created using linear interpolation, Hermite spline interpolation [
15,
17,
18], polynomials [
13,
19], piecewise nonlinear functions [
14], nonlinear functions [
12,
20], or piecewise affine functions [
21]. The results of these methods vary greatly in their properties, as summarized in
Table 1 (the MM accuracy for the linearized inductance, spline-interpolated LUT, and piecewise linear methods is shown in
Section 5).
Model predictive control (MPC) is desirable for the PMSM for its stability and robustness properties [
22,
23]. A virtual-flux MPC (VF-MPC) is a type of VF control that requires a linear flux linkage MM to operate effectively. For this reason, typically, VF-MPC for the PMSM uses linearized stator inductances, which have the effect of linearizing the state-space equation. This greatly simplifies the model, reducing the control error and decreasing the computation time. However, this leads to a flux error of up to
in full saturation and 5–20% flux error due to cross-saturation [
14,
15,
19,
21].
In this study, we propose using piecewise affine (PWA) functions to build the MM of a PMSM machine. This MM allows for the use of VF-MPC while also taking into account the saturation and cross-saturation effects in the MM. The PWA MM is optimized for current operation, derated operation, and MTPA operation. The experimental flux is compared with the FEA-simulated flux to show the accuracy of the MM.
This paper is organized as follows. The PMSM machine model is described in
Section 2, and the construction of the PWA MM is shown in
Section 3. The optimization of the PWA MM to the full current range, derated range, and MTPA range is presented in
Section 4. Analysis via simulated and experimental results is presented in
Section 5, and the paper is concluded in
Section 6.
2. PMSM Model
The PMSM is a three-phase synchronous machine that can be dynamically described by the state-space model
where
and
are the q-axis and d-axis stator flux linkages, respectively,
and
are the terminal voltages,
and
are the stator currents,
is the electrical speed of the machine,
is the stator resistance, and
is the
operator.
This formulation makes use of the Parke–Clarke transformation, which is a linear transformation from a three-phase (three-dimensional) to a direct-quadrature (two-dimensional) space. The power-invariant Clark transform is used, and the magnetic axis of the PM is the reference angle for the d-axis in the Park transformation.
The compensated terminal voltages
and
are the terminal voltages without the resistive voltage drop. The compensated terminal voltages are capable of including the inverter non-idealities, such as the switch’s on-voltage drops and dead times [
13,
23]. The PWA formulation, presented later, is capable of including parameters not present, such as damper windings and zero-sequence currents, but they are omitted for simplicity. Additionally, position-dependent effects can be added to the PWA model as third, fourth, ...
dimensions of the existing two-dimensional dq PWA model. This formulation is compatible with any PMSM machine, regardless of the salience ratio (IPMSM, SPMSM, etc.).
The torque of a PMSM is modelled as follows:
where the number of pole pairs is
p,
is the current vector,
is the flux vector, and
is
which is the cross-coupling matrix. The sets
and
describe the full operating current and flux range of the machine.
The relationship between the current
i and flux
is nonlinear. Cross-saturation makes the d-axis flux dependent on the d-axis current and q-axis current. The same holds for the q-axis flux. The functions
and
model this relationship:
The function
is useful for calculating or estimating the flux of the machine
given the feedback currents, while
is useful when estimating
i using an observer instead of direct measurement [
8,
10]. Typically,
is more computationally difficult to obtain than
.
An example motor drive controller set-up is shown in
Figure 1, where a three-phase inverter is supplied by
and supplies the PMSM with three-phase voltages
and currents
. The input to the controller is a reference torque
, which is translated to a set of reference dq phase currents
by an MTPA function. This reference current
and the fedback and transformed current
are independently converted to flux using the
flux linkage map. The resulting reference flux
, feedback flux
, and feedback angle
go into a virtual flux (VF) controller, such as a VF-MPC. The output is a set of reference dq voltages
which are transformed to phase voltages
and modulated into duty cycles
fed to the inverter. This controller demonstrates the order of operations that a DSP can use to implement VF control and the importance of the MM, as it is the only control block used twice in the diagram.
The map
is typically a LUT that is built using measured or Finite Element Analysis (FEA) points that are sampled and interpolated by some method. The map
and torque, created using spline-interpolated FEA datapoints, for a machine with parameters in
Table 2 is shown in
Figure 2. The FEA method uses a simulated machine model which includes the machine’s geometry and magnetic properties to approximate the (nonlinear) inductance throughout the machine for a wide range of operating points using the Finite Element Method (FEM). This inductance map is then sampled at high resolution and spline interpolated to create a high fidelity reference MM,
(capital S denoting reference), which is the reference for error calculations in
Section 5.
The compensated terminal voltages can be described by the vector
, where
is the voltage operating range of the machine. Thus, the machine can be described as a standard linear state-space system in the form
where the
and
matrices are
The flux is the state, the compensated voltages are the input, and the current i is the output. This state-space model can be used in an MPC controller. The state will be linearized using a piecewise affine map according to the machine’s operating point.
3. Piecewise Affine Magnetic Model
This research proposes using a PWA map to represent the PMSM magnetic model. PWA maps take a nonlinear map and divide it into
M domains. In each domain, the function is linearized [
24]. The PWA current to flux map can be described as
where
maps the currents
onto fluxes
as an affine function and the image of the domain
is
. The affine map is defined by a set of equations with a specific inductance matrix
and a flux offset vector
for each region.
The inverse of
is
such that
.
The process to create this PWA MM can be divided into four steps: (1) choose
, (2) Delaunay triangulation of
, (3) compute all
and
values, and (4) assign all
and
values to
. This process is shown in
Figure 3. The following subsections describe each step.
3.1. Choosing
is the set of measured [
12,
13,
14,
15,
17,
18,
19,
20], simulated [
12,
13,
17], or estimated [
8,
9,
10] current points that will be used to create the PWA MM. The corresponding flux set
must also be known. In general, there are too many points to all be used to create the MM as, at some point, the PWA function becomes too large for a DSP with finite memory.
can be regularly gridded (i.e.,
and
datapoints are evenly separated). The corresponding flux points
will not necessarily be regularly gridded. This can be seen in the vertices of the triangles in
Figure 4. The particular shape of
and
will depend on the machine’s operating points or regions. In this case,
is bounded by the box constraint
. The shape of the flux image is found using Equation (
7) and depends on the inductance throughout the machine. In this case,
becomes an irregular shape resembling a bulged rectangle. Other bounds may be a continuous (or derated) current, the MTPA region, etc. These are explored in more detail in
Section 5.
An irregularly gridded
can yield a higher-accuracy MM for the same number of points as the regularly gridded value because the flux error is not evenly distributed (explored in
Section 4). Irregularly gridded current points can also target areas in
and
that may be more frequently used, such as derated operation and MTPA. The method for obtaining these sets will be shown in
Section 4.
3.2. Subdomains and the Delaunay Triangulation
Building the PWA function requires the domain and image to be split up into M non-overlapping regions or subdomains and subimages, denoted by and , respectively. A point can only be in two (or more) subdomains if it is on the border of two (or more) subdomains. Points on the borders of two (or more) subdomains guarantee continuity and will also be on the border of the corresponding flux subimages . Otherwise, points that are not on the border of subdomains are only part of one subdomain and subimage.
The Delaunay triangulation
[
25] of the set of points
creates a set of unique, connected simplices
. The Delaunay triangulation is the dual version of the more familiar Voronoi diagram. The Voronoi diagram of a set of points
splits the space
into
“Voronoi cells”, where the points in each cell are closer to some point
than any of the other points
. An example of the Delaunay triangulation in the current and flux space is shown in
Figure 5, and a Voronoi diagram in the current domain with the corresponding Delaunay triangulation for an example set
is shown in
Figure 4.
Each subdomain and subimage is a simplex, which is a triangle in the two dimensions (
) of this problem. (In general, a simplex is the simplest possible polytope given the dimension of the problem.) A simplex can be defined by the convex hull
of
vertices or as a set of
affine inequalities (where
D is the dimensionality of the problem). These definitions are called V-notation and H-notation, respectively [
26]. A simplex in the current domain comprising the vertices
is
Each current simplex
forms a domain of an affine map that maps onto a flux simplex comprising the vertices
, and the flux simplex is
The definition of the Delaunay triangulation (via the Voronoi diagram) implies that the vertices of each simplex are not degenerate (full dimensions) and are linearly independent (in both and spaces).
3.3. Subdomain Coefficients
As previously explained, a current simplex for the PMSM
is defined by
(three) vertices as shown in Equaiton (
9). A shifted dimension is defined by letting (any) of the vertices
become the new reference origin
. The whole simplex thus shifts and becomes
where the set of new current vectors
spans the simplex. As with the current, we shift the flux space by the corresponding flux vector
, which results in
where
spans the simplex and
. The shifted simplices are shown in
Figure 6.
The affine map is an isomorphism, and the vertices form the basis, so the position of a vector in the current space relative to the shifted origin is the same as the position of the flux vector from the origin of the shifted flux simplex:
The process of computing the
a coefficients is similar to computing the relative on times in space vector modulation (SVM) [
24]. We start by projecting
onto the basis vectors of
:
Then, we divide the magnitude of this projection by the magnitude of the shifted basis vectors to obtain the
a vector:
To calculate the flux, we simply multiply the basis vectors of
by the
a coefficients:
Finally, we un-shift the flux to obtain the machine flux at this current point:
Equations (
13)–(
17) can be compressed using matrix notation. We define the bases of the shifted simplices
and
as
In addition,
. Equations (
13) and (
16) can be rewritten as
and
, respectively. Because the simplices are nondegenerate, the bases are nonsingular, and we can find a linear relation:
This expression is useful because as long as
and
exist and are invertible (which they are by the definition of a basis), then the current and flux can be related to each other (in either direction). The flux in terms of the current can be solved by unshifting the basis vectors
and rearranging them to obtain
with
and
. Matrix algebra can be employed to solve for the reverse map
from Equation (
8) just as easily.
3.4. Assign Coefficients to Simplices
The coefficients
and
are assigned to their simplex
. Grouping all such functions produces the PWA MM of Equation (
7). Examples of differently sized, regularly gridded PWA MM functions are shown in
Figure 7.
4. Magnetic Model Optimization
Choosing which areas to minimize the flux error in
by selectively choosing the points to use
depends on the application. The metric chosen to measure the flux error of a PWA MM to the reference (FEA spline) MM at any given point is the 2-Norm flux error. An example of the two-norm flux error distribution using a
regularly gridded
to create
is shown in
Figure 8. The flux error is the highest where the flux linkage is the most nonlinear (see
Figure 2).
Given an allotted size for
, where
, an algorithm is devised that chooses
to minimize the maximum two-norm flux error. In this algorithm, first, the minimum number of points (
and
) to cover the full current domain
are chosen (step A). In the dq current space, this is a square and thus has four points. Then, steps 2–4 of building
(see
Figure 3) are executed (step B). If the size of
is less than
N, then we compute the two-norm flux error of
k random current points in
(step C). The number
k should be much larger than
N, where
. Then, we identify the maximum error point (
) (step D). Next, we add the maximum error point to
and
(step F). This will ensure that the error at this new point in
is
, and the error surrounding this point will be significantly reduced. Steps B, C, D, E, and F repeat until
. The PWA MM algorithm optimization steps (A–F) and PWA MM creation steps (1–4) are shown in
Figure 9.
The three areas of interest that will be explored are: the full current range (
), the approximate MTPA trajectory region (
), and the approximate derated current region (
).
represents all currents within absolute maximum current limits,
.
represents the typical rated or continuous current limit,
, where in this case
.
follow the MTPA trajectory [
23], and is an area instead of a region to account for temperature variations in the machine parameters. These three regions are shown in
Figure 10.