A Novel Analytical Formulation of the Magnetic Field Generated by Halbach Permanent Magnet Arrays

: This paper presents an analytical study of the air-gap magnetic ﬁeld of a surface permanent magnet (SPM) linear, slot-less machine with a Halbach PM conﬁguration, under the no-load condition. While other analytical formulations of the magnetic ﬁeld generated by PMs are available, they exhibit some drawbacks, such as only providing a Fourier series, or being suitable to determine magnetic ﬁeld average values, but not local magnetic ﬁeld distributions. On the contrary, the proposed approach allows the determination of a unique, closed-form formulation for the slot-less machine air-gap ﬁeld. This is obtained starting from the complex expression of the magnetic ﬁeld of a conductor, inside the air gap, between two parallel smooth iron surfaces, obtained by means of the method of images. The magnetic ﬁeld due to an inﬁnitesimal conductor belonging to a current sheet is then integrated along a segment, providing the expression of the magnetic ﬁeld due to the corresponding linear current density distribution, for current sheets perpendicular or parallel to the iron surfaces. Any Halbach PM segment disposition can, hence, be obtained via a suitable combination of ﬁeld distributions generated by couples of current sheets with perpendicular and parallel orientation. Lastly, the no-load magnetic ﬁeld expression with a Halbach array of PMs is retrieved. The proposed analytical model provides an accurate representation of the magnetic ﬁeld distribution produced by any Halbach array, with an arbitrary number of segments and orientations. Additionally, the results obtained from the proposed analytical expressions are compared with FEM simulations realized by commercial software, and show an excellent agreement.


Introduction
The Halbach configuration of surface permanent magnet (SPM) machines has been extensively studied in the last years, and widely used in several electrical machines, thanks to its relevant operating features, such as the good quality of the air-gap flux density distribution, and the limited impact of the armature reaction on the air-gap field.Compared to classical configurations, where the permanent magnets are magnetized in a normal direction with respect to the iron surfaces, the Halbach configuration exhibits several benefits, the most remarkable and important of which are: the presence of a higher flux density in the air gap, together with a mass reduction in the mover core [1], and the presence of a nearly sinusoidal air-gap flux density distribution, which generates an almostsinusoidal back electromotive force (BEMF) with a low harmonic content.The reduction in the air-gap flux density harmonics drastically reduces the cogging torque, with no need to apply rotor or stator skewing [2].
However, the magnetization procedure of an ideal Halbach array is complex and expensive, which is clearly in contrast with the need to cut costs in electric motor serial production.Consequently, the use of this technology is limited to special applications, where performance cannot be degraded in favour of costs.In order to overcome these issues, the most common and cheap solution applied in industry is segmented magnetization, which consists of dividing the magnet into several segments, which are magnetized to reproduce a normal flux density component as close as possible to a sine wave [3][4][5].However, a closed-form analytical model of the air-gap field resulting from this configuration is not available in the literature.
Indeed, several analytical methods have been developed to study the air-gap magnetic field distribution produced by permanent magnets, and some of them can also be applied to Halbach arrays.
The most popular analytical method is the subdomain method, which derives an overall model via solving several two-dimensional problems, each referring to different regions (slots, slot opening, air gap, rotor magnets, etc.).Subsequently, through a variable separation, the magnetic vector potential distribution is obtained as a Fourier series [6][7][8][9].The method also works well with slot openings, and with machines with iron cores, although the obtained solution is not provided in closed form, but in a Fourier series.
The lumped parameter magnetic circuit method is sometimes used alternatively, and consists of dividing the magnetic flux paths inside the air gap into several branches [10][11][12][13].Unfortunately, this method, although practical and simple to implement, is only suitable for calculating magnetic field average quantities, and not local magnetic field distributions.
More suitable models for the study of local magnetic field distributions are presented in [14,15], where an analytical closed-form solution is found, making use of the Ampère and Biot-Savart laws.However, these methods are valid only for non-magnetic core machines (no iron is present).
In order to overcome these limitations, in this paper, a novel closed-form analytical solution for the magnetic field generated by a permanent magnet with any magnetizing angle is retrieved.This is obtained through the use of the method of images, and through taking advantage of the duality principle between the electric and magnetic field.Then, the model of the air-gap field is obtained for any Halbach array of electrical machines equipped with iron cores.The proposed method is very easy to implement, and provides a quick field solution compared with FEM simulation, while maintaining a very high accuracy level.
The paper is organized as follows.In Section 2, the disposition of the Halbach array is described, together with the main properties of this configuration.
The analytical expression of the magnetic field distribution produced by a single PM segment is retrieved in Section 3. In particular, in Section 3.1, the initial assumptions of the method are introduced, together with its starting formulas.In Sections 3.2 and 3.3, current sheets with normal and tangential disposition with respect to the iron surfaces are considered, and the corresponding field formulations are retrieved.Then, in Sections 3.4 and 3.5, making use of two couples of parallel normal and tangential current sheets, the elementary blocks of surface permanent magnets, normally and tangentially magnetized, are obtained, and the generated field distributions are compared with FEM simulations.In Section 3.6, by combining the two permanent magnet elementary blocks, the formulation of a Halbach PM segment, magnetized according to an angle θ pm , is retrieved, and is compared with FEM simulations.
In Section 4, the analytical expressions of the magnetic field distribution generated by two different Halbach arrays, composed of 6 and 10 identical-width segments, are built.The field distributions obtained by those two arrays were compared with FEM simulations, and an outstanding agreement was shown, validating the model.In conclusion, the total harmonic distortion (THD) and harmonic spectra of the normal flux density distribution are shown for a different number of PM segments.
Finally, in Section 5, the computational times of the analytical formulation and of the FEM simulations are compared, for the different configurations, in order to support the effectiveness of the proposed method in providing a fast, accurate evaluation of the magnetic field generated by Halbach arrays.
A Halbach array consists of a peripheral sequence of PM segments, with the progressive rotation of the magnetization orientation, as shown in the example of Figure 1.
Magnetism 2023, 3, FOR PEER REVIEW 3 effectiveness of the proposed method in providing a fast, accurate evaluation of the magnetic field generated by Halbach arrays.
A Halbach array consists of a peripheral sequence of PM segments, with the progressive rotation of the magnetization orientation, as shown in the example of Figure 1.A degree of freedom in this array is the number of PM segments per pole (six in the example depicted in Figure 1, including, in each pole, the left segment with a horizontal magnetization orientation).
The main features of this disposition are: the flux density distribution amplitude is reinforced in the upper surface of the array, in the air gap, while it is weakened in the lower surface; -this different distribution leads to the strengthening of the magnetic field where the tangential force is produced, while it reduces the need for a thick yoke width, lightening the mass and the inertia of the moving part; -through the increase in the number of segments per pole, the shape of the normal flux density distribution in the air gap becomes almost sinusoidal, which leads to the obtention of more sinusoidal EMF waveforms in the windings, and a smoother force with reduced ripple; -of course, the increase in the number of segments per pole implies increasing tolerance issues in the Halbach array assembly, and higher costs for the device: this requires to find a trade-off between the performance quality and system complexity.

Magnetic Field between Smooth Ferromagnetic Surfaces
In this section, the analytical model developed for the study of the no-load air-gap magnetic field between parallel, smooth, ideal ferromagnetic surfaces is introduced, and its initial assumptions and limitations are discussed.

Introduction to the Model and Elementary Blocks
In [22], the magnetic field distribution generated by a surface permanent magnet inside the air gap of a linear slotted machine has been investigated, and in [23], the air-gap field distribution has been obtained for the armature reaction, due to stator windings.Both the models were created via an analytical approach based on the method of images [24].
In the following, the aforementioned method, which has been proven to work very well for surface permanent magnets magnetized normally with respect to the iron surfaces, will be adapted in order to model the field produced by more complexly magnetized permanent magnet dispositions, such as the Halbach example.
The entire model lies on a complex analytical formulation of the magnetic field, and it makes use of the following assumptions and limitations: A degree of freedom in this array is the number of PM segments per pole (six in the example depicted in Figure 1, including, in each pole, the left segment with a horizontal magnetization orientation).
The main features of this disposition are: the flux density distribution amplitude is reinforced in the upper surface of the array, in the air gap, while it is weakened in the lower surface; -this different distribution leads to the strengthening of the magnetic field where the tangential force is produced, while it reduces the need for a thick yoke width, lightening the mass and the inertia of the moving part; -through the increase in the number of segments per pole, the shape of the normal flux density distribution in the air gap becomes almost sinusoidal, which leads to the obtention of more sinusoidal EMF waveforms in the windings, and a smoother force with reduced ripple; -of course, the increase in the number of segments per pole implies increasing tolerance issues in the Halbach array assembly, and higher costs for the device: this requires to find a trade-off between the performance quality and system complexity.

Magnetic Field between Smooth Ferromagnetic Surfaces
In this section, the analytical model developed for the study of the no-load air-gap magnetic field between parallel, smooth, ideal ferromagnetic surfaces is introduced, and its initial assumptions and limitations are discussed.

Introduction to the Model and Elementary Blocks
In [22], the magnetic field distribution generated by a surface permanent magnet inside the air gap of a linear slotted machine has been investigated, and in [23], the air-gap field distribution has been obtained for the armature reaction, due to stator windings.Both the models were created via an analytical approach based on the method of images [24].
In the following, the aforementioned method, which has been proven to work very well for surface permanent magnets magnetized normally with respect to the iron surfaces, will be adapted in order to model the field produced by more complexly magnetized permanent magnet dispositions, such as the Halbach example.
The entire model lies on a complex analytical formulation of the magnetic field, and it makes use of the following assumptions and limitations: 1.The stator and moving surfaces are supposed to be smooth, and separated by an air gap of uniform width; 2. The magnetic field is solved in 2D, lying in the paper plane, and assumed invariant in the direction perpendicular to the paper plane; 3. The machine is supposed to extend indefinitely in the direction perpendicular to the paper plane, so that the end effects are negligible; 4. The relative recoil permeability (typically in the range 1.05-1.10for rare earth PM materials) is assumed to be equal to the vacuum permeability (µ r = 1); thus, at each point inside the air-gap width, it is assumed that B(z) = µ o •H(z) occurs, both in air and in the PMs; 5.The iron permeability is assumed to be infinite, so the method of superimposition can be used; 6.The iron parts are perfectly laminated; thus, no eddy current can be induced in the iron by the varying magnetic field; 7. The conductors placed inside the air gap extend indefinitely perpendicular to the paper plane; 8.The skin effect due to alternating currents flowing in the conductors is neglected.
It is well known in the literature that permanent magnets can be modeled using current sheets (the principle of equivalence, introduced by Ampère); the current densities of these current sheets are set equal to the magnet linearly extrapolated coercivity H c0 [25,26].The use of current sheets, suitably positioned in the space, allows us to model permanent magnets with different directions of magnetization.The problem is then usually solved according to the subdomain method, and the solution is retrieved in a Fourier series.
On the contrary, in the following, the magnetic field formulation of the current sheets that model the permanent magnet is retrieved analytically, giving a novel solution in closed form.The developed method starts from the complex formula [22]: which describes the magnetic field produced via an indefinite wire powered by a current I, flowing outside the paper plane, and positioned between two smooth ideal iron surfaces, where z = x + jy is the complex coordinate of the point in which the field is calculated; z p = x p + jy p is the complex coordinate where the current-carrying conductor is positioned; and z and z p are the respective complex conjugates.With the use of this formula, the elementary blocks consisting of current sheets are built, in order to model different magnetization directions.

Air-Gap Magnetization Due to a Current Sheet Disposed Normally to the Iron Surfaces
The first disposition of the current sheet to be analyzed is shown in Figure 2.
point inside the air-gap width, it is assumed that B(z) = µo•H(z) occurs, b in the PMs; 5.The iron permeability is assumed to be infinite, so the method of su can be used; 6.The iron parts are perfectly laminated; thus, no eddy current can be i iron by the varying magnetic field; 7. The conductors placed inside the air gap extend indefinitely perpendic per plane; 8.The skin effect due to alternating currents flowing in the conductors is It is well known in the literature that permanent magnets can be mode rent sheets (the principle of equivalence, introduced by Ampère); the curre these current sheets are set equal to the magnet linearly extrapolated coerciv The use of current sheets, suitably positioned in the space, allows us to mod magnets with different directions of magnetization.The problem is then u according to the subdomain method, and the solution is retrieved in a Four On the contrary, in the following, the magnetic field formulation of the that model the permanent magnet is retrieved analytically, giving a nov closed form.The developed method starts from the complex formula [22]:

H
, which describes the magnetic field produced via an indefinite wire powere I, flowing outside the paper plane, and positioned between two smooth i faces, where z = x + jy is the complex coordinate of the point in which the field zp = xp + jyp is the complex coordinate where the current-carrying conductor and z and zp are the respective complex conjugates.With the use of this for mentary blocks consisting of current sheets are built, in order to model diff ization directions.

Air-Gap Magnetization Due to a Current Sheet Disposed Normally to the Iron
The first disposition of the current sheet to be analyzed is shown in Fig  Figure 2 shows a single vertical current sheet, normal to the iron surfaces, distributed along the points p, with coordinates z p = x p + jy p , inside an air gap between two smooth ferromagnetic surfaces.The current sheet is powered by a current density ∆, equal to the magnet linearly extrapolated coercive force H c0 , flowing outside the paper plane.
If we consider an infinitesimal current sheet element ∆ × dy p , according to (1), the infinitesimal magnetic strength air-gap complex vector at the point z can be written as: Integrating ( 2) between y p1 = 0 and y p2 = h cs , the expression of the magnetic strength H ncs (z) distribution, due to a current sheet orientated normally to the iron surfaces, is retrieved:

Air-Gap Magnetization Due to a Current Sheet Disposed Tangentially to the Iron Surfaces
The second current sheet disposition to be analyzed is depicted in Figure 3: it shows a single horizontal current sheet, tangential to the iron surfaces, distributed along the points p, with coordinates z p = x p + jy p , inside an air gap between two smooth ferromagnetic surfaces.The current sheet is powered by a current density ∆ = H c0 flowing outside the paper plane.If we consider an infinitesimal current sheet element ∆ × dx p , according to (1), the infinitesimal-magnetic-strength air-gap complex vector in the point z can be written as: Integrating (2) between yp1 = 0 and yp2 = hcs, the expression of the magnetic s Hncs(z) distribution, due to a current sheet orientated normally to the iron surface trieved:

Air-Gap Magnetization Due to a Current Sheet Disposed Tangentially to the Iron Su
The second current sheet disposition to be analyzed is depicted in Figure 3: i a single horizontal current sheet, tangential to the iron surfaces, distributed alo points p, with coordinates zp = xp + jyp, inside an air gap between two smooth ferrom surfaces.The current sheet is powered by a current density ∆ = Hc0 flowing outs paper plane.If we consider an infinitesimal current sheet element ∆ × dxp, accordin the infinitesimal-magnetic-strength air-gap complex vector in the point z can be as: Through integrating (4) between xp1 and xp2, the expression of the magnetic s distribution Htcs(z), due to a current sheet orientated tangentially to the iron surf retrieved: Through integrating (4) between x p1 and x p2 , the expression of the magnetic strength distribution H tcs (z), due to a current sheet orientated tangentially to the iron surfaces, is retrieved: Through using ( 3) and ( 5), both normally and tangentially magnetized PMs can be modelled.

PM Magnetized along an Axis Orientated Normally to the Iron Surfaces
The first PM we want to model is a magnet magnetized normally with respect to the iron surfaces, orientated along the y axis, as shown in Figure 4.

PM Magnetized along an Axis Orientated Normally to the Iron Surfaces
The first PM we want to model is a magnet magnetized normally with respe iron surfaces, orientated along the y axis, as shown in Figure 4.
In the case that the PM is south magnetized, it is enough to put a minus sig the second member of (6).
Moreover, if the PM magnetized normally to the iron surfaces is displaced the right of the origin, the corresponding magnetic strength follows from (6), vi lowing translation:

HPM.n_Δx(z) = HPM.n(z − Δx).
Figure 5 shows the distribution of the y and x components of BPM.n = µo•HPM sponding to By = Im(BPM.n)and to Bx = Re(BPM.n),respectively, due to a single n magnetized PM, obtained via the proposed closed-form, analytical expression pared with a FEM 2D simulation realized with a commercial software [27], u benchmark, for bm = 102 mm, hm = 10 mm, g = hm + δ = 11.5 mm.As can be obser A PM with h m height and b m width, centered with respect to the origin, and magnetized normally with respect to the iron surfaces, along the y axis (north PM), is modelled with two current sheets: one positioned in x p = +b m /2, and with a negative linear current density (−∆); the other one positioned in x p = −b m /2, and with a positive linear current density (+∆).For both the current sheets, it holds that y p2 = h cs = h m ; thus, via (3), the magnetic strength distribution H PM.n (z), due to a centered PM, magnetized normally to the iron surfaces, can be expressed as follows: In the case that the PM is south magnetized, it is enough to put a minus sign before the second member of (6).
Moreover, if the PM magnetized normally to the iron surfaces is displaced by ∆x to the right of the origin, the corresponding magnetic strength follows from (6), via the following translation: Figure 5 shows the distribution of the y and x components of B PM.n = µ o •H PM.n , corresponding to B y = Im(B PM.n ) and to B x = Re(B PM.n ), respectively, due to a single normally magnetized PM, obtained via the proposed closed-form, analytical expression (6), compared with a FEM 2D simulation realized with a commercial software [27], used as a benchmark, for b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.As can be observed, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.
agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.

PM Magnetized along an Axis Tangentially Orientated to the Iron Surfaces
In this subsection, we consider a PM tangentially magnetized, as shown in Figure 6.A PM with hm height and bm width, centered with respect to the origin, and tangentially magnetized, in a horizontal direction along the x axis (north PM toward the right), is modelled with two current sheets: one positioned in yp = 0, and with a negative linear current density (−Δ); the other one positioned in yp = hm, and with a positive linear current density (+Δ).Both the current sheets are centered at the origin, with xp1 = −bm/2; xp2 = +bm/2.Thus, via (5), the magnetic strength distribution between the two smooth ferromagnetic surfaces, due to a centered, tangentially right-magnetized PM, HPM.t(z), is expressed as:

PM Magnetized along an Axis Tangentially Orientated to the Iron Surfaces
In this subsection, we consider a PM tangentially magnetized, as shown in Figure 6.A PM with h m height and b m width, centered with respect to the origin, and tangentially magnetized, in a horizontal direction along the x axis (north PM toward the right), is modelled with two current sheets: one positioned in y p = 0, and with a negative linear current density (−∆); the other one positioned in y p = h m , and with a positive linear current density (+∆).Both the current sheets are centered at the origin, with x p1 = −b m /2; Magnetism 2023, 3, FOR PEER REVIEW 7 agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.

PM Magnetized along an Axis Tangentially Orientated to the Iron Surfaces
In this subsection, we consider a PM tangentially magnetized, as shown in Figure 6.A PM with hm height and bm width, centered with respect to the origin, and tangentially magnetized, in a horizontal direction along the x axis (north PM toward the right), is modelled with two current sheets: one positioned in yp = 0, and with a negative linear current density (−Δ); the other one positioned in yp = hm, and with a positive linear current density (+Δ).Both the current sheets are centered at the origin, with xp1 = −bm/2; xp2 = +bm/2.Thus, via (5), the magnetic strength distribution between the two smooth ferromagnetic surfaces, due to a centered, tangentially right-magnetized PM, HPM.t(z), is expressed as: Thus, via (5), the magnetic strength distribution between the two smooth ferromagnetic surfaces, due to a centered, tangentially right-magnetized PM, H PM.t (z), is expressed as: Additionally, for this kind of magnetization, if the PM is displaced by ∆x to the right of the origin, the corresponding magnetic strength follows from (8) via the following translation: Figure 7 shows the distribution of the y and x components of B PM.t = µ o •H PM.t , corresponding to B y = Im(B PM.t ) and to B x = Re(B PM.t ), respectively, due to a single tangentially magnetized PM, obtained via the proposed closed-form, analytical expression (8), compared with a FEM 2D simulation realized with commercial software [27], used as a benchmark, for b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.In this case, also, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.
Additionally, for this kind of magnetization, if the PM is displaced by Δx to the right of the origin, the corresponding magnetic strength follows from (8) via the following translation:

HPM.t_Δx(z) = HPM.t(z − Δx). (9)
Figure 7 shows the distribution of the y and x components of BPM.t = µo•HPM.t,corresponding to By = Im(BPM.t)and to Bx = Re(BPM.t),respectively, due to a single tangentially magnetized PM, obtained via the proposed closed-form, analytical expression (8), compared with a FEM 2D simulation realized with commercial software [27], used as a benchmark, for bm = 102 mm, hm = 10 mm, g = hm + δ = 11.5 mm.In this case, also, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.

Halbach PM Segment with Magnetization Orientated according to an Angle θpm
As known, if the magnetization vector M of a PM is that of a generic Halbach seg- ment, orientated according to an angle θpm with respect to the x axis, it can be decomposed in the form: where x and ŷ are versors of the x and y axis, respectively.

Halbach PM Segment with Magnetization Orientated according to an Angle θ pm
As known, if the magnetization vector → M of a PM is that of a generic Halbach segment, orientated according to an angle θ pm with respect to the x axis, it can be decomposed the form: where x and ŷ are versors of the x y axis, respectively.This situation can be represented as shown in Figure 8, where the superposition of the x and y magnetization vectors is applied, and the corresponding current sheet couples are shown.The amplitudes of the two magnetization vector components are as: Based on (11), considering ( 6) and ( 8), the following resultant magnetic strength expression can be written at any point z between the two iron smooth surfaces, for a Halbach PM segment centered at the origin, with the orientation θ pm : Of course, via ( 7) and ( 9), the following translation equation can be applied to ( 12): This situation can be represented as shown in Figure 8, where the superposition of the x and y magnetization vectors is applied, and the corresponding current sheet couples are shown.The amplitudes of the two magnetization vector components are expressed as: Based on (11), considering ( 6) and ( 8), the following resultant magnetic strength expression can be written at any point z between the two iron smooth surfaces, for a Halbach PM segment centered at the origin, with the orientation θpm: Of course, via ( 7) and ( 9), the following translation equation can be applied to (12): Figure 9 shows the distribution of the y and x components of BH.1 = µo•HH.1,corresponding to By = Im(BH.1)and to Bx = Re(BH.1),respectively, due to a single magnetized PM with orientation θpm = 30°, obtained via the proposed closed-form, analytical expression (12), compared with a FEM 2D simulation realized with commercial software [27], used as a benchmark, for bm = 102 mm, hm = 10 mm, g = hm + δ = 11.5 mm.In this case, also, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.M, orientated according to the angle θ pm with respect to the x axis, decomposed in the two PM with magnetization orientated according to the x and y vector components, respectively.The PM magnet orientated according to the x axis is modelled by means of two current sheets positioned, respectively, in y p = 0 and y p = h m , with a linear current density, respectively, equal to (−∆) and (+∆), while the PM magnet, orientated according to the y axis, is modelled by means of two current sheets positioned, respectively, in x p = +b m /2 and x p = −b m /2, with a linear current density, respectively, equal to (−∆) and (+∆).
Figure 9 shows the distribution of the y and x components of B H.1 = µ o •H H.1 , corresponding to B y = Im(B H.1 ) and to B x = Re(B H.1 ), respectively, due to a single magnetized PM with orientation θ pm = 30 • , obtained via the proposed closed-form, analytical expression ( 12), compared with a FEM 2D simulation realized with commercial software [27], used as a benchmark, for b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.In this case, also, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.Figure 8.A Halbach permanent magnet segment with hm height and bm width and magnetization vector M , orientated according to the angle θpm with respect to the x axis, decomposed in the two PM with magnetization orientated according to the x and y vector components, respectively.The PM magnet orientated according to the x axis is modelled by means of two current sheets positioned, respectively, in yp = 0 and yp = hm, with a linear current density, respectively, equal to (−Δ) and (+Δ), while the PM magnet, orientated according to the y axis, is modelled by means of two current sheets positioned, respectively, in xp = +bm/2 and xp = −bm/2, with a linear current density, respectively, equal to (−Δ) and (+Δ).
Based on (11), considering ( 6) and ( 8), the following resultant magnetic strength expression can be written at any point z between the two iron smooth surfaces, for a Halbach PM segment centered at the origin, with the orientation θpm: Of course, via ( 7) and ( 9), the following translation equation can be applied to (12): Figure 9 shows the distribution of the y and x components of BH.1 = µo•HH.1,corresponding to By = Im(BH.1)and to Bx = Re(BH.1),respectively, due to a single magnetized PM with orientation θpm = 30°, obtained via the proposed closed-form, analytical expression ( 12), compared with a FEM 2D simulation realized with commercial software [27], used as a benchmark, for bm = 102 mm, hm = 10 mm, g = hm + δ = 11.5 mm.In this case, also, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.

The Halbach PM Arrays Halbach Array Using the PM Segment Model
In this paper, we limit our analysis to Halbach PM arrays consisting of PM segments, all with the same peripheral width b m .Figure 10 shows some examples of this type of Halbach array.The PM segments belonging to the same pole are shown with magnetization vectors drawn in red, and the change in the orientation angle between adjacent segments is the same.The number of PM segments per pole is indicated with N sp : Figure 10 shows some Halbach array dispositions, from N sp = 1 (which is a degenerate case) to N sp = 6.
In this paper, we limit our analysis to Halbach PM arrays consisting of PM segments, all with the same peripheral width bm. Figure 10 shows some examples of this type of Halbach array.The PM segments belonging to the same are shown with magnetization vectors drawn in red, and the change in the orientation angle between adjacent segments is the same.The number of PM segments per pole is indicated with Nsp: Figure 10 shows some Halbach array dispositions, from Nsp = 1 (which is a degenerate case) to Nsp = 6.Let us define the pole pitch τ as the peripheral extension of one pole, measured along the air gap.Based on the hypothesis of uniform segment peripheral extension, the following equation holds: Moreover, considering that the angular extension of one pole equals π electrical radians, the angular displacement βm between adjacent magnetization vectors, equal all along the periphery, is given by: The angle of the magnetization vector of the jm-th PM segment (jm = 1, 2,…, Nsp) equals: From ( 12), for a PM segment centered at the origin, acting alone, the flux density distribution in the air gap is expressed as: Let us define the pole pitch τ as the peripheral extension of one pole, measured along the air gap.Based on the hypothesis of uniform segment peripheral extension, the following equation holds: Moreover, considering that the angular extension of one pole equals π electrical radians, the angular displacement β m between adjacent magnetization vectors, equal all along the periphery, is given by: The angle of the magnetization vector of the j m -th PM segment (j m = 1, 2,. .., N sp ) equals: From ( 12), for a PM segment centered at the origin, acting alone, the flux density distribution in the air gap is expressed as: and via ( 13), the j m -th segment, acting alone, produces the following flux density: Thus, the group of N sp PM Halbach segments of one pole produces the following flux density distribution in the air gap: However, in order to obtain a correct periodic distribution of flux density in the air gap, (19) must be extended on the left and on the right of the initial pole, by adding further distributions similar to (19) and displaced by integer multiples of the pole pitch τ.
If the extension is operated p times, both on the left and on the right, the multi-pole flux density distribution results in: In (20), the factor k equals 1 for even k values and −1 for odd k values, corresponding to the north and south pole groups of Halbach segments, respectively.
Figure 11 shows the field map of a Halbach array with N sp = 6, calculated via a FEM 2D magnetostatic simulation realized with commercial software [27], used as a benchmark.In order to ensure the condition of periodicity, the adopted boundary conditions at the left and right ends are master-slave.
However, in order to obtain a correct periodic distribution of flux density in the air gap, (19) must be extended on the left and on the right of the initial pole, by adding further distributions similar to (19) and displaced by integer multiples of the pole pitch τ.
If the extension is operated p times, both on the left and on the right, the multi-pole flux density distribution results in: In (20), the factor (−1) k equals 1 for even k values and −1 for odd k values, corresponding to the north and south pole groups Halbach segments, respectively.
Figure 11 shows the field map of a Halbach array with Nsp = 6, calculated via a FEM 2D magnetostatic simulation realized with commercial software [27], used as a benchmark.In order to ensure the condition of periodicity, the adopted boundary conditions at the left and right ends are master-slave.Figure 12 shows the corresponding y and x components of the flux density distribution along a line in the middle of the air gap, calculated via the proposed closed-form, analytical expression (20), and by FEM 2D simulation realized with commercial software [27], used as a benchmark.It can be observed that the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.Additionally, as expected, By exhibits a roughly sinusoidal shape, while Bx is limited in amplitude, with a peak value in the order of 10% of the By peak value.Figure 12 shows the corresponding y and x components of the flux density distribution along a line in the middle of the air gap, calculated via the proposed closed-form, analytical expression (20), and by FEM 2D simulation realized with commercial software [27], used as a benchmark.It can be observed that the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.Additionally, as expected, B y exhibits a roughly sinusoidal shape, while B x is limited in amplitude, with a peak value in the order of 10% of the B y peak value.
Figure 13 shows the field map of a Halbach array with N sp = 10 segments/pole, each with the same width, calculated via FEM 2D magnetostatic simulation realized with commercial software [27], used as a benchmark.In this case, also, in order to ensure the condition of periodicity, the boundary conditions at the left and right ends are master-slave.
Figure 14 shows the corresponding y and x components of the flux density distribution along a line in the middle of the air gap, calculated via the proposed closed-form, analytical expression (20), and via FEM 2D simulation realized with commercial software [27], used as a benchmark.As can be observed, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.Additionally, as expected, the increase in N sp implies a flux density distribution improvement, with an almost-sinusoidal shape of B y , and a greatly reduced amplitude of the component B x , with a peak value in the order of 5% of the B y peak value.Figure 13 shows the field map of a Halbach array with Nsp = 10 segments/pole, each with the same width, calculated via FEM 2D magnetostatic simulation realized with commercial software [27], used as a benchmark.In this case, also, in order to ensure the condition of periodicity, the boundary conditions at the left and right ends are master-slave.Figure 14 shows the corresponding y and x components of the flux density distribution along a line in the middle of the air gap, calculated via the proposed closed-form, analytical expression (20), and via FEM 2D simulation realized with commercial software [27], used as a benchmark.As can be observed, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.Additionally, as expected, the increase in Nsp implies a flux density distribution improvement, with an almost-sinusoidal shape of By, and a greatly reduced amplitude of the component Bx, with a peak value in the order of 5% of the By peak value.Figure 13 shows the field map of a Halbach array with Nsp = 10 segments/pole, each with the same width, calculated via FEM 2D magnetostatic simulation realized with commercial software [27], used as a benchmark.In this case, also, in order to ensure the condition of periodicity, the boundary conditions at the left and right ends are master-slave.Figure 14 shows the corresponding y and x components of the flux density distribution along a line in the middle of the air gap, calculated via the proposed closed-form, analytical expression (20), and via FEM 2D simulation realized with commercial software [27], used as a benchmark.As can be observed, the agreement is excellent, with the curves obtained by means of the proposed closed-form analytical expressions being perfectly superimposed with the benchmark obtained from the commercial FEM solver.Additionally, as expected, the increase in Nsp implies a flux density distribution improvement, with an almost-sinusoidal shape of By, and a greatly reduced amplitude of the component Bx, with a peak value in the order of 5% of the By peak value.In particular, Figure 15a reports the total harmonic distortion of the B y flux density distribution as a of the number of segments/pole N sp in the Halbach array.As expected, the THD decreases with the increase in N sp .Figure 14b reports the harmonic spectra of the B y flux density distribution, evaluated on the basis of the proposed closedform, analytical expression (20), expressed in a percentage with respect to the fundamental, and limited to a harmonic order equal to 40, for the cases of N sp = 3 (red), N sp = 5 (green), and N sp = 7 (blue).
It is worth noting that, for any number of segments per pole N sp , harmonics are present only in correspondence of harmonic orders satisfying the condition: where h is the harmonic order, and k ∈ N. In particular, Figure 15a reports the total harmonic distortion of the By flux density distribution as a function of the number of segments/pole Nsp in the Halbach array.As expected, the THD decreases with the increase in Nsp. Figure 14b reports the harmonic spectra of the By flux density distribution, evaluated on the basis of the proposed closedform, analytical expression (20), expressed in a percentage with respect to the fundamental, and limited to a harmonic order equal to 40, for the cases of Nsp = 3 (red), Nsp = 5 (green), and Nsp = 7 (blue).In particular, Figure 15a reports the total harmonic distortion of the By flux density distribution as a function of the number of segments/pole Nsp in the Halbach array.As expected, the THD decreases with the increase in Nsp. Figure 14b reports the harmonic spectra of the By flux density distribution, evaluated on the basis of the proposed closedform, analytical expression (20), expressed in a percentage with respect to the fundamental, and limited to a harmonic order equal to 40, for the cases of Nsp = 3 (red), Nsp = 5 (green), and Nsp = 7 (blue).

Calculation Time Comparison between Analytical and FEM Approaches
In order to support the effectiveness of the proposed method in providing a fast, accurate evaluation of the magnetic field generated by Halbach arrays, the computational times of a number of PM arrangements, previously analyzed, are evaluated, for analytical and FEM field solutions.The same PC was used for both the analytical and FEM calculations, the features of which are detailed in Table 1, along with the software used.For the sake of conciseness, five example configurations have been considered, which are summarized in Table 2.The comparison between the FEM and analytical simulations is reported in Table 3.For a correct interpretation of the presented results, it is worth considering that: the number of calculated points adopted in the analytical method (500), uniformly distributed within the pole pitch τ, is chosen in a such a way to correctly reproduce the flux density distribution everywhere within τ, for all the considered cases of Table 2; -the calculation time in the analytical method corresponds to the total time needed to evaluate the x and y flux density components in the chosen number of points; -the calculation time in the FEM numerical approach corresponds to just the time to solve the field; it does not include the time needed to calculate the x and y flux density components in the chosen number of points.
Additionally, with respect to the accuracy of the results: the accuracy of FEM analysis depends on the mesh refinement level, while the analytical field calculation in each point is direct, without any discretization refinement; -the calculation times of the cases 1, 2, and 3 are low (of the order of 0.1 s), while the calculation times of the cases 4 and 5 are higher (of the order of 0.2-0.3s): in fact, the cases 1 and 2 include 2 current sheets, the case 3 includes 4 current sheets, while the case 4 includes 6 × (1 + 2 × 2) = 30 current sheets; finally, the case 5 includes

Figure 1 .
Figure 1.Example of Halbach PM disposition: each segment magnetization is orientated as rotated by a constant angle with respect to the previous one; the group of segments identified by magenta arrows forms a north pole, while the group of segments identified by blue arrows forms a south pole.

Figure 1 .
Figure 1.Example of Halbach PM disposition: each segment magnetization is orientated as rotated by a constant angle with respect to the previous one; the group of segments identified by magenta arrows forms a north pole, while the group of segments identified by blue arrows forms a south pole.

Figure 2 .
Figure 2. Graphical representation of the magnetic field Hncs(z) evaluated at a point = x + jy in an air gap between two smooth, parallel iron surfaces, generated by a cur mally orientated with respect to the iron surfaces, distributed along the points p, w zp = xp + jyp.

Figure 2 .
Figure 2. Graphical representation of the magnetic field H ncs (z) evaluated at a point of coordinates z = x + jy in an air gap between two smooth, parallel iron surfaces, generated by a current sheet, normally orientated with respect to the iron surfaces, distributed along the points p, with coordinates z p = x p + jy p .

Figure 3 .
Figure 3. Graphical representation of the magnetic field Htcs(z) evaluated at a point of coord = x + jy in an air gap between two smooth, parallel iron surfaces, generated by a current sh gentially orientated with respect to the iron surfaces, distributed along the points p, with coo zp = xp + jy.

Figure 3 .
Figure 3. Graphical representation of the magnetic field H tcs (z) evaluated at a point of coordinates z = x + jy in an air gap between two smooth, parallel iron surfaces, generated by a current sheet, tangentially orientated with respect to the iron surfaces, distributed along the points p, with coordinates z p = x p + jy.

Figure 4 .
Figure 4. Permanent magnet with hm height and bm width, centred with respect to the or magnetization orientated normally to the iron surfaces along the y axis (north PM, magn angle θpm = π/2 with respect to the x axis), modelled with two current sheets positioned, res in xp = +bm/2 and xp = −bm/2, with a linear current density, respectively, equal to (−Δ) and (+

Figure 4 .
Figure 4. Permanent magnet with h m height and b m width, centred with respect to the origin, with magnetization orientated normally to the iron surfaces along the y axis (north PM, magnetization angle θ pm = π/2 with respect to the x axis), modelled with two current sheets positioned, respectively, in x p = +b m /2 and x p = −b m /2, with a linear current density, respectively, equal to (−∆) and (+∆).

Figure 6 .
Figure 6.Permanent magnet with hm height and bm width, centered at the origin, with magnetization orientated tangentially with respect to the iron surfaces along the x axis (north PM, magnetization angle θpm = 0 with respect to the x axis), modelled with two current sheets positioned, respectively, in yp = 0 and yp = hm, with a linear current density, respectively, equal to (−Δ) and (+Δ).

Figure 5 .
Figure 5. Distribution of the (a) y and (b) x components of B PM.n = µ o •H PM.n , due to a single normally magnetized PM, obtained analytically (continuous red line) via (6), and via a FEM 2D simulation (dashed blue line), for b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.

Figure 6 .
Figure 6.Permanent magnet with hm height and bm width, centered at the origin, with magnetization orientated tangentially with respect to the iron surfaces along the x axis (north PM, magnetization angle θpm = 0 with respect to the x axis), modelled with two current sheets positioned, respectively, in yp = 0 and yp = hm, with a linear current density, respectively, equal to (−Δ) and (+Δ).

Figure 6 .
Figure 6.Permanent magnet with h m height and b m width, centered at the origin, with magnetization orientated tangentially with respect to the iron surfaces along the x axis (north PM, magnetization angle θ pm = 0 with respect to the x axis), modelled with two current sheets positioned, respectively, in y p = 0 and y p = h m , with a linear current density, respectively, equal to (−∆) and (+∆).

Figure 7 .
Figure 7. Distribution the (a) y and (b) x components of B PM.t = µ o •H PM.y , due to a single tangentially magnetized PM, obtained analytically (continuous red line) via (8), and via an FEM 2D simulation (dashed blue line), for b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.

Figure 8 .
Figure 8.A Halbach permanent magnet segment with hm height and bm width and magnetization vector M , orientated according to the angle θpm with respect to the x axis, decomposed in the two PM with magnetization orientated according to the x and y vector components, respectively.The PM magnet orientated according to the x axis is modelled by means of two current sheets positioned, respectively, in yp = 0 and yp = hm, with a linear current density, respectively, equal to (−Δ) and (+Δ), while the PM magnet, orientated according to the y axis, is modelled by means of two current sheets positioned, respectively, in xp = +bm/2 and xp = −bm/2, with a linear current density, respectively, equal to (−Δ) and (+Δ).

Figure 8 .
Figure 8.A Halbach permanent magnet segment with h m height and b m width and magnetization vector

Figure 9 .
Figure 9. Distribution of the (a) y and (b) x components of B H.1 = µ o •H H.1 , due to a single PM magnetized with orientation θ pm = 30 • , obtained analytically (continuous red line) via (12) and via a FEM 2D simulation (dashed blue line), for b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.

Figure 10 .
Figure 10.Halbach permanent magnet arrays with Nsp segments/pole ranging from 1 to 6, and magnetization vectors highlighted in red; all segments have the same peripheral width bm = τ/Nsp and the same angular displacement between adjacent magnetization vectors, equal to βm = π/Nsp [rad].

Figure 10 .
Figure 10.Halbach permanent magnet arrays with N sp segments/pole ranging from 1 to 6, and magnetization vectors highlighted in red; all segments have the same peripheral width b m = τ/N sp and the same angular displacement between adjacent magnetization vectors, equal to β m = π/N sp [rad].

Figure 11 .
Figure 11.Field map of a Halbach array with Nsp = 6 segments/pole, each with the same width bm, calculated via FEM 2D magnetostatic simulation realized with commercial software (numerical periodic solution based on master-slave boundary conditions): bm = 17 mm; hm = 10 mm; g = hm + δ = 11.5 mm.

Figure 11 .
Figure 11.Field map of a Halbach array with N sp = 6 segments/pole, each with the same width b m , calculated via FEM 2D magnetostatic simulation realized with commercial software (numerical periodic solution based on master-slave boundary conditions): b m = 17 mm; h m = 10 mm; g = h m + δ = 11.5 mm.

Figure 12 .
Figure 12.Distribution of the (a) y and (b) x components of BH = µo•HH, due to the Halbach array of Figure 11, with Nsp = 6 PM segments/pole, all with width bm = τ/Nsp: analytically calculated distribution (continuous red line) obtained via (20); numerically calculated distribution (dashed blue line), based on FEM 2D simulation with master-slave boundary conditions at the left and right ends, bm = 17 mm, hm = 10 mm, g = hm + δ = 11.5 mm.The distributions have been calculated along the line at one-half the air-gap width, as drawn in Figure 11.

Figure 13 .
Figure 13.Field map of a Halbach array with Nsp = 10 segments/pole, each with the same width bm, calculated via FEM 2D magnetostatic simulation realized with commercial software (numerical periodic solution based on master-slave boundary conditions): bm = 10.2 mm; hm = 10 mm; g = hm + δ = 11.5 mm.

Figure 12 .Figure 12 .
Figure 12.Distribution of the (a) y and (b) x components of B H = µ o •H H , due to the Halbach array of Figure 11, with N sp = 6 PM segments/pole, all with width b m = τ/N sp : analytically calculated distribution (continuous red line) obtained via (20); numerically calculated distribution (dashed blue line), based on FEM 2D simulation with master-slave boundary conditions at the left and right ends, b m = 17 mm, h m = 10 mm, g = h m + δ = 11.5 mm.The distributions have been calculated along the line at one-half the air-gap width, as drawn in Figure 11.

Figure 13 .
Figure 13.Field map of a Halbach array with Nsp = 10 segments/pole, each with the same width bm, calculated via FEM 2D magnetostatic simulation realized with commercial software (numerical periodic solution based on master-slave boundary conditions): bm = 10.2 mm; hm = 10 mm; g = hm + δ = 11.5 mm.

Figure 13 .
Figure 13.Field map of a Halbach array with N sp = 10 segments/pole, each with the same width b m , calculated via FEM 2D magnetostatic simulation realized with commercial software (numerical periodic solution based on master-slave boundary conditions): b m = 10.2 mm; h m = 10 mm; g = h m + δ = 11.5 mm.Finally, Figure 15 shows the harmonic content of the B y flux density distribution, evaluated on the basis of the proposed closed-form, analytical expression (20) for Halbach arrays with different numbers of segments/pole.In particular, Figure15areports the total harmonic distortion of the B y flux density distribution as a of the number of segments/pole N sp in the Halbach array.As expected, the THD decreases with the increase in N sp .Figure14breports the harmonic spectra of the B y flux density distribution, evaluated on the basis of the proposed closedform, analytical expression(20), expressed in a percentage with respect to the fundamental, and limited to a harmonic order equal to 40, for the cases of N sp = 3 (red), N sp = 5 (green), and N sp = 7 (blue).It is worth noting that, for any number of segments per pole N sp , harmonics are present only in correspondence of harmonic orders satisfying the condition:

Magnetism 2023, 3 292Figure 14 .Figure 15 .
Figure 14.Distribution of the (a) y and (b) x components of BH = µo•HH, due to the Halbach array of Figure13, with Nsp = 10 PM segments/pole, all with width bm = τ/Nsp: analytically calculated distribution (continuous red line) obtained via(20); numerically calculated distribution (dashed blue line), based on FEM 2D simulation with master-slave boundary conditions, bm = 17 mm, hm = 10 mm, g = hm + δ = 11.5 mm.The distributions have been calculated along the line at one-half the air-gap width, as drawn in Figure13.Finally, Figure15shows the harmonic content of the By flux density distribution, evaluated on the basis of the proposed closed-form, analytical expression (20) for Halbach arrays with different numbers of segments/pole.

Figure 14 .Figure 14 .Figure 15 .
Figure 14.Distribution of the (a) y and (b) x components of B H = µ o •H H , due to the Halbach array of Figure with N sp = 10 PM segments/pole, all with width b m = τ/N sp : analytically calculated distribution (continuous red line) obtained via (20); numerically calculated distribution (dashed blue line), based on FEM 2D simulation with master-slave boundary conditions, b m = 17 mm, h m = 10 mm, g = h m + δ = 11.5 mm.The distributions have been calculated along the line at one-half the air-gap width, as drawn in Figure 13.

Figure 15 .
Figure 15.Harmonic content of the y component of the flux density distribution in the air gap of a Halbach PM array: (a) THD as a function of the number N sp of segments/pole; (b) harmonic spectra of the y component of the flux density distribution in the air gap of a Halbach PM array for a number of segments/pole N sp = 3 (red), N sp = 5 (green), N sp = 7 (blue), with τ = N sp • b m = 102 mm, h m = 10 mm, g = h m + δ = 11.5 mm.

Case N • Description 1 3 Single
Single permanent magnet, centred with respect to the origin, with magnetization orientated normally to the iron surfaces (as depicted in Figures4 and 5)2Single permanent magnet centered in the origin, with tangential magnetization with respect to the iron surfaces (as depicted in Figures6 and 7) Halbach permanent magnet segment with magnetization vector → M orientated according to an angle θ pm = 30 • with respect to the x axis (as depicted in Figures8 and 9) 4 Halbach array with N sp = 6 segments/pole, with the same peripheral width b m (as depicted in Figures 11 and 12); two Halbach arrays at the left and at the right of the central array, for a total of five Halbach arrays 5 Halbach array with N sp = 10 segments/pole, with the same peripheral width b m (as depicted in Figures 13 and 14); two Halbach arrays at the left and at the right of the central array, for a total of five Halbach arrays

Table 1 .
Features of the PC and software used.

Table 2 .
Cases for the comparative analysis of the calculation times of the analytical and FEM approaches.

Table 3 .
Analytical and FEM approach calculation data.Number of calculation sampling points within one pole pitch: 500.