1. Introduction
The design and optimization of electrical machines and other electromagnetic applications necessitate accurate models of electromagnetic fields to precisely predict their performance. As these systems and their structures get more complex, it is becoming more difficult to accurately model, e.g., eddy current effects [
1,
2] or hysteresis effects [
3] in both the spatial and time domain. To model electromagnetic field distributions and the related forces and power losses, the finite element method (FEM) is often used because of its ability to produce accurate results when it is correctly utilized. However, the method can be demanding in terms of memory and relatively slow in terms of computation time. Therefore, semi-analytical models have been proposed over the years for increasingly complex structures in both 2D and 3D. One of the semi-analytical models is the harmonic modeling technique [
4,
5,
6,
7], which uses a Fourier basis to describe the solutions to the electromagnetic field quantities. By including position dependent material properties, such as the electrical conductivity [
8] and the permeability [
9,
10,
11], into the solutions, the spatial distribution of electromagnetic fields can also be accurately modeled for complex devices.
In many electromagnetic configurations, accurate results are obtained using a relatively low number of harmonics. However, for more complex structures, with detailed features compared to the device size, the number of harmonics has to be increased to retain accuracy. Computationally, this leads to an increase in the required memory. In addition, as an electromagnetic configuration has to be divided into regions (or layers), the number of regions influences the required memory. As a result, the number of harmonics that can be considered is limited when a relatively large number of regions has to be incorporated. Consequently, the advantage in terms of memory of the harmonic model in comparison to FEM is reducing. The scattering matrix approach [
12,
13,
14,
15,
16] reformulates a multiple region electromagnetic problem in such a way that it can be expressed as a single region with in- and out-going fields. Consequently, the dependency of the computational memory on the number of regions is removed. All matrices that are manipulated with this method have a maximum size of
, where
L is the total number of harmonics. In [
12], where the scattering matrices are used to solve a high-frequent electromagnetic problem, the source is an incident wave on one side of the problem. However, to apply the scattering formulation in low-frequent problems in which sources (currents or magnets) are present in regions, the scattering formulation has to be extended to incorporate the related source terms.
In this paper, the scattering matrix approach for harmonic models of electromagnetic configurations is described. Using this approach, the memory required to obtain the solutions of the model is significantly reduced. The method presented in [
12] is extended to take electromagnetic sources inside regions into account. The method is verified by application to a 3D electromagnetic configuration presented in [
10], where the permeability varies in both periodic directions as a function of position.
2. Model Assumptions
The mathematical models of electromagnetic configurations that can be solved with the method described in this paper are subject to a number of assumptions. The considered models are set up in the Cartesian coordinate system, where, for 2D configurations in one direction, periodicity is assumed. For 3D configurations, two directions are assumed periodic. Because of the periodicity, the solution in the periodic directions is expressed by Fourier series. Based upon the electromagnetic material properties, such as the permeability, permittivity and conductivity, and the electromagnetic field sources, the model is divided into regions in the non-periodic direction. In the non-periodic direction, the properties of a region may not vary, whereas, in the periodic direction, they are allowed to change as a function of position. Lastly, any configuration needs to have an air region at both sides, extending to plus and minus infinity in the non-periodic direction, for the applied method.
3. Scattering Matrix Formulation
For all problems at hand, the Fourier coefficients of describing the electromagnetic fields have the same form. For the remainder of the paper, the non-periodic direction is the
z-direction. The
z-dependent solution describing the coefficients
and
of particular field components of a region
i is given by
where
is a vector with eigenvalues and
and
are eigenvector matrices. Combined,
and
describe the propagation of field components inside a region. The particular solutions described by
and
relate source terms, such as coil currents and magnetization, which are known in advance, to the solutions
and
. All these variables are determined by the properties of a region that is under consideration. The way to obtain these variables for a variety of problems has been described in e.g., [
8,
9,
10]. The unknown coefficients
and
in (
1) and (
2) are determined by applying continuity boundary conditions between regions.
The continuity boundary conditions force both
and
to be continuous on an interface between adjacent regions. Often in harmonic models used for electrical machines, all boundary conditions are gathered in a large matrix which forms a system of linear equations,
where
h specifies the height of a boundary in the
z-direction. By solving the system of equations, all unknowns can be obtained. A drawback of obtaining the unknowns in this way, is that the size of the matrix
depends on the number of harmonics that is considered for the problem and, on the number of regions that build up the model. Hence, with a certain amount of available computational memory, the number of harmonics has to be compromised when regions are added to the problem.
To develop a more memory efficient manner of solving, the scattering matrix approach presented in [
12] is applied. With this solving method, the unknowns of all regions between the top and bottom air region of the problem are eliminated. For the considered model formulations, the solution in the non-periodical direction is described by two waves, where one wave is traveling in the positive and the other in the negative
z-direction, as presented in (
1) and (
2). The scattering matrix, visually represented in
Figure 1, couples the incoming waves of a region to the outgoing waves of that region. The sub-matrices
and
represent the transfer, in negative and positive
z-direction respectively, from incoming to outgoing waves and
and
represent the reflection at each side of the region. The method described in [
12] is adapted, since sources can be located inside a region. The source terms in scattering vector form are represented by a vector
which describes the contribution of the sources to the outgoing waves of the region. By combining all scattering matrices of the regions in the model, a scattering matrix for electromagnetic configuration under consideration can be obtained.
To derive the sub-matrices of the scattering matrix, the continuity boundary conditions between a region with the index
i and the index
are written in matrix form
where
is the identity matrix and
where
is the height of region
i in the
z-direction. The scattering relation, denoted with index
, between the top region with index 0 and an arbitrary region
i is given by
The scattering matrices, denoted by
and
, for the scattering relation between region 0 and
can now be defined, thereby removing the unknowns of region
i from the problem as shown in
Figure 1.
This relation is given by
where the sub-matrices of
and vectors
and
can be computed by
and
In these equations, stability is ensured by the formulation where only decaying exponential functions are used. Starting from an initial scattering matrix
, which is an identity matrix, and vector
, which contains zeros, the scattering formulation of all regions can be found by repeating (
12) and (
13). Now, let the air region on the bottom of the problem be denoted with index
I, so a total of
regions is assumed. The unknowns of the top and bottom region are now related through
Because all field components of the bottom region have to disappear when
z goes to minus infinity, the vector of unknowns
has to equal zero. When applying the same analysis on the top region, it is obtained that also
has to equal zero. The non-zero unknowns of the top and bottom air region are then, using (
14), calculated through
The unknowns of all other regions can be computed from the unknowns
and
, by consequently applying (
4).
4. Application to an Electromagnetic Configuration
The scattering approach is applied to the electromagnetic configuration shown in
Figure 2, where a rectangular slab of magnetic material is placed above three permanent magnets. The configuration is divided into five regions in the
z-direction, as depicted in
Figure 2. The model is periodic in both the
x- and
y- direction and the permeability inside Regions 2 and 4 varies as a function of position. The configuration was analyzed in [
10], where also the expressions for the magnetic field components have been obtained and all geometric properties have been given. The magnetic properties are given in
Table 1. In [
10], however, the unknowns where obtained by solving a linear system of equations as presented in (
3).
Because only the magneto-static fields have to be considered for the configuration, the magnetic scalar potential,
, is introduced to obtain the expressions for the magnetic field quantities. In the boundary conditions, the continuity of this scalar potential and the
z-component of the magnetic flux density are forced. Therefore,
and
in (
1) and (
2), respectively. The expressions for
and
are described in [
10]. Note that, for a problem where also an electric field exists,
and
would consist of the tangential components of the
- and
-field, respectively, and their size would be twice that compared to the current magneto-static problem. Hence, the expressions for
and
and their size depend on the problem at hand.
The number of harmonics that is used to calculate the solution to the configuration of
Figure 2 is denoted by
L. The number of harmonics used in the
x- and
y-directions is denoted by
N and
M, respectively, and thus the total number of harmonics
. With the solving method of (
3), the matrix that has to be inverted has a size of
, while with the scattering approach the maximum size of any matrix that is inverted is equal to
. This means that the matrix size is reduced by 87.5%. Moreover, with the classical solving method, adding a region to the problem would mean that the matrix
becomes larger by
in both directions. In the scattering approach, the maximum size of any matrix would be
, independent of the number of regions that makes the method especially beneficiary when the number of regions in a model is relatively large. The solving method using (
3) is performed in Matlab R2017a using the command ‘A\b’, which means that the method of inversion is automatically chosen. It should be noted that properties reducing the computational effort of the inversion of a matrix, such as zeros in the off-diagonal entries and matrix symmetry are limited in the boundary condition matrix of (
3), in contrast to the matrices inverted in (
5), (
6), (
8), (
9), (
12) and (
13).
In
Figure 3a, the magnetic field strength, computed with the scattering matrix approach with a total of 6561 harmonics, in the center of Region 2 is depicted. The difference with the result computed by the finite element method (FEM) is shown in
Figure 3b. In the FEM analysis, a total of 2,384,628 second-order mesh elements is used. It has been verified that, with the applied mesh, the error of the FEM (compared to a FEM result obtained with a denser mesh) has converged to an error less than 1%. In [
10], a total of 1089 harmonics was used to obtain the same result. The maximum relative error with respect to FEM with 6561 harmonics is equal to 9.2%, where, computed with 1089 harmonics, the error was equal to 17.4%. For problems where the electromagnetic properties of a region are varying with a high spatial frequencies, the addition of harmonics can be necessary to obtain accurate field results.
Using the hardware available (quadcore Intel Core i7-4790 with 32 GB RAM), the computation time for the ‘classical’ solving method for a total of 1089 harmonics is equal to 20.4 s. With the developed scattering matrix approach, the computation time, for the same number of harmonics, is equal to 12.6 s. Hence, the number of calculations is increased in the scattering matrix approach, however, because all manipulations are performed on matrices of size
, the computation time is not significantly increased or even decreased compared to the classical solving method. On the same hardware, the FEM analysis takes around 125 s to mesh and solve the electromagnetic problem. The semi-analytical approach obtains the results for the electromagnetic configuration of
Figure 2 faster than the FEM; however, the solving time of the semi-analytical approach depends on the number of harmonics and number of regions in the model. This means that, for models where the geometry contains high spatial frequencies (relatively small details with respect to the periodic width), and the number of harmonics needs to be large to accurately compute the fields, and the advantage over FEM regarding computation time will decrease.