A Permanent Magnet Synchronous Spherical Motor for High-Mobility Servo-Actuation

: The development of direct-drive spherical motors offers a potential solution to the limitations of conventional multiple degree-of-freedom (DOF) actuators, which typically utilize single-DOF joints (rotational and/or prismatic), arranged in series or parallel and powered by multiple single-DOF actuators. These conﬁgurations can be accompanied by kinematic singularities, backlash, limited power density and efﬁciency, and computationally expensive inverse kinematics. This paper details the design, fabrication and experimental testing of permanent magnet synchronous spherical motors (PMSSM) for multi-DOF servo-actuation. Its stator-pole arrangement is based on a Goldberg polyhedron, with each pole comprised of hexagonal or pentagonal inner and outer plates. The stator geometry and winding conﬁgurations are optimized using electromagnetic ﬁnite element analysis. A custom-made controller board includes a microcontroller, servo drivers, a wireless serial interface, and a USB PC interface. Angular orientation is sensed using an inertial measurement unit in wireless communication with the microcontroller. A PID controller is implemented and demonstrated for time-varying reference trajectories.


Introduction
As servomechanism technologies and applications continue to advance, there is a growing need for innovative actuators with increased kinematic mobility and power density. Servomechanisms with multiple degrees-of-freedom (DOF) are typically realized using single-DOF joints (rotational and/or prismatic), arranged in series or parallel and powered by multiple single-DOF actuators. These configurations can be accompanied by kinematic singularities, backlash, limited power density and efficiency, and computationally expensive inverse kinematics. The development of direct-drive spherical motors offers the potential means to overcome these limitations by replacing multiple single-DOF actuators with a single multi-DOF actuator. Potential applications include satellite attitude control [1], encoder, camera and scanner gimbals [2], rotational stages for CNC machining and additive manufacturing [3], haptic feedback devices [4], and robotic actuation [5,6].
The research and development of spherical motors spans several decades and varies widely in the literature. Common characteristics of almost all spherical motors are a stator and a rotor with three angular DOF (simultaneous rotation about three orthogonal axes). Significant design variations address methods for rotor support, actuation, and orientation sensing. Most spherical motors utilize ball-and-socket joints [1,[6][7][8][9] for accommodating multi-DOF motion, although three-axis gimbals and other novel linkage configurations can be found in the literature [10]. An advantage of the gimbal architecture is that orientation sensing can be readily achieved via inverse kinematics of cascaded single DOF encoders [2]. However, the added weight of gimbal linkages and bearings reduces power density, and kinematic singularities (e.g., gimbal lock) limit the capabilities of these systems. Ball-andsocket joints are less kinematically problematic than gimbaled systems (i.e., are not prone position sensing diode [20] and an optical sensor specifically developed for spherical motor orientation sensing [22].

Stator Design
While the stators of conventional (1D) electric motors utilize large numbers of closely spaced axial slots and windings, each having identical geometry, such design approaches cannot be applied to spherical motors. Unlike conventional electric motors, which typically use radial patterns for poles and windings, the PMSSM pole-winding configuration is non-trivial. To accommodate near-spherical geometry, the stator poles of the PMSSM were arranged to form icosahedrons, including a subclass of Goldberg polyhedrons comprised of pentagons and hexagons. Goldberg polyhedrons are represented as GP(m,n), where m represents the number of steps in the given direction, and n represents the steps following a 60 • turn from one pentagon to the next. For the PMSSM stator geometry, a GP (3,0) consisting of 92 discrete faces (12 pentagons, 20 regular hexagons and 60 irregular hexagons) was chosen ( Figure 1). This geometry is desirable because it minimizes differences in surface area between the smallest and largest polygon pole faces.
stator and rotor to measure rotor surface displacements. Other methods include axis position sensing diode [20] and an optical sensor specifically developed for sp motor orientation sensing [22].

Stator Design
While the stators of conventional (1D) electric motors utilize large numbers of spaced axial slots and windings, each having identical geometry, such design app cannot be applied to spherical motors. Unlike conventional electric motors, whi cally use radial patterns for poles and windings, the PMSSM pole-winding config is non-trivial. To accommodate near-spherical geometry, the stator poles of the P were arranged to form icosahedrons, including a subclass of Goldberg polyhedro prised of pentagons and hexagons. Goldberg polyhedrons are represented as G where m represents the number of steps in the given direction, and n represents th following a 60° turn from one pentagon to the next. For the PMSSM stator geom GP(3,0) consisting of 92 discrete faces (12 pentagons, 20 regular hexagons and 60 ir hexagons) was chosen ( Figure 1). This geometry is desirable because it minimize ences in surface area between the smallest and largest polygon pole faces. Because the PMSSM stator must permit a specified range of motion for the ro its coupled load (in this case +/− 40°), the stator geometry is a hemisphere comp only 46 (of 92 possible) poles. Each stator pole consists of a top plate, a stem and a plate. The top plates of adjacent stator poles are separated by small air annular mm), while the bottom plates are in direct contact to provide low reluctance retur for magnetic flux. Figure 2a shows an assembly of three adjacent stator poles (a hexagon, an irregular hexagon, and a pentagon), while Figure 2b shows the key sions of a pentagonal stator pole. The stator poles were manufactured using 10 rolled steel, due to its machinability, high magnetic permeability, and low cost. Because the PMSSM stator must permit a specified range of motion for the rotor and its coupled load (in this case +/−40 • ), the stator geometry is a hemisphere comprised of only 46 (of 92 possible) poles. Each stator pole consists of a top plate, a stem and a bottom plate. The top plates of adjacent stator poles are separated by small air annular gaps (2 mm), while the bottom plates are in direct contact to provide low reluctance return paths for magnetic flux. Figure 2a shows an assembly of three adjacent stator poles (a regular hexagon, an irregular hexagon, and a pentagon), while Figure 2b shows the key dimensions of a pentagonal stator pole. The stator poles were manufactured using 1018 cold rolled steel, due to its machinability, high magnetic permeability, and low cost.
The stator pole dimensions were iteratively optimized to provide a peak stem flux density, B, in excess of 1.0 T, while simultaneously minimizing pole materials (steel and magnet wire). The specified PMSSM rotor diameter (D r = 152.4 mm) and stator/rotor air gap (g = 2.0 mm) enabled direct calculation of each major diameter p i [23]. The stem diameter d, stem length l and plate thickness t were optimized to provide adequate volumes for the copper windings, while simultaneously restricting the outer diameter of the stator (D s = 213.5 mm). To prevent flux saturation in the top and bottom plates, thickness t must be large enough to provide adequate cross-sectional areas for the flux produced in one stem to return through the neighboring stems. The stator pole dimensions were iteratively optimized to provide a peak stem flux density, B, in excess of 1.0 T, while simultaneously minimizing pole materials (steel and magnet wire). The specified PMSSM rotor diameter (D = 152.4 mm) and stator/rotor air gap (g = 2.0 mm) enabled direct calculation of each major diameter [23]. The stem diameter d, stem length and plate thickness were optimized to provide adequate volumes for the copper windings, while simultaneously restricting the outer diameter of the stator ( = 213.5 mm). To prevent flux saturation in the top and bottom plates, thickness t must be large enough to provide adequate cross-sectional areas for the flux produced in one stem to return through the neighboring stems.

≥ 4
(1) Based on orthocyclic windings (which have a packing factor of 90.7% [24]), the number of turns N in a fully wound coil of magnet wire (diameter , packing factor , and rectangular cross-sectional area of width and height ℎ) can be computed as the following: To optimize these stator pole dimensions, three-dimensional magnetostatic simulations were conducted using finite element analysis (FEA) software (ANSYS Electronics Desktop, Canonsburg, PA, USA). Each simulation utilized more than 300,000 tetrahedral elements, with curvilinear meshing automatically generated. Parametric sweeps quantified the nonlinear relationships between magnetic flux density and stator pole dimensions, most notably stem diameter and length . Figure 3 shows the FEA results for the adjacent stator poles simultaneously excited with the maximum 300 A-t; case 3b (d = 12 mm) effectively addresses the tradeoff between stator stem mass and magnetic saturation. While the stator pole excitations used in these simulations do not necessarily correspond to those used for rotor torque production, they provided useful insights into dimensional optimization.
Based on orthocyclic windings (which have a packing factor of 90.7% [24]), the number of turns N in a fully wound coil of magnet wire (diameter d w , packing factor p, and rectangular cross-sectional area of width b and height h) can be computed as the following: To optimize these stator pole dimensions, three-dimensional magnetostatic simulations were conducted using finite element analysis (FEA) software (ANSYS Electronics Desktop, Canonsburg, PA, USA). Each simulation utilized more than 300,000 tetrahedral elements, with curvilinear meshing automatically generated. Parametric sweeps quantified the nonlinear relationships between magnetic flux density and stator pole dimensions, most notably stem diameter d and length l. Figure 3 shows the FEA results for the adjacent stator poles simultaneously excited with the maximum 300 A-t; case 3b (d = 12 mm) effectively addresses the tradeoff between stator stem mass and magnetic saturation. While the stator pole excitations used in these simulations do not necessarily correspond to those used for rotor torque production, they provided useful insights into dimensional optimization.
Similar parametric sweeps were used to optimize the remaining stator pole dimensions, as summarized in Table 1. The regular hexagons are the largest in size, followed by the irregular hexagons and the pentagons.  Similar parametric sweeps were used to optimize the remaining stator pole dimensions, as summarized in Table 1. The regular hexagons are the largest in size, followed by the irregular hexagons and the pentagons.

Stator Fabrication
The top and bottom stator pole plates and stems were individually fabricated with waterjet cutting and machining process and assembled using 3M Scotch Weld MC100 adhesive ( Figure 4a). The stems of regular hexagon poles (10 total) were drilled and tapped to accommodate the M6 threads of Hudson bearings (MP-6, NBK, Seki, Gifu, Japan) to ensure low-friction support of the rotor (Figure 4b). These Hudson bearings have a static and dynamic load bearing capacity of 29 N and 9.8 N, respectively, which will be shown in the Rotor Methods section.
Prior to winding, the stems and plates of each stator pole were lined with 0.25 mm insulation (CG100 Fish Paper, 145PTags.com, Maitland, FL, USA) to prevent abrasion and shorting of the magnet wire. Each stator pole was wound with 522 turns of 24 AWG magnet wire (Remington Industries, Johnsburg, IL, USA), with a tabletop CNC milling machine (Sherline 2000, Vista, CA, USA) and a custom 3D-printed fixture. Two small holes (2 mm diameter) drilled into the bottom plates of each stator pole allowed the winding terminations to pass through the bottom plate of the stator pole to electrical terminations outside the stator housing. A photograph of a completed regular hexagonal pole is shown in Figure 4c.

Stator Fabrication
The top and bottom stator pole plates and stems were individually fabricated with waterjet cutting and machining process and assembled using 3M Scotch Weld MC100 adhesive ( Figure 4a). The stems of regular hexagon poles (10 total) were drilled and tapped to accommodate the M6 threads of Hudson bearings (MP-6, NBK, Seki, Gifu, Japan) to ensure low-friction support of the rotor (Figure 4b). These Hudson bearings have a static and dynamic load bearing capacity of 29 N and 9.8 N, respectively, which will be shown in the Rotor Methods section.  A hemispherical stator housing ( Figure 5) was designed to maintain support and proper spacing for the 46 stator poles and organize the phase conductors. This housing (Figure 5a) was 3D printed using fused deposition modeling (F370, Stratasys, Eden Prairie, MN, USA) with ABS material. The stator poles were secured into the housing using a top ring assembly and M6 bolts (Figure 5b). Through-holes in the housing (92 total) enabled external stator phase connections (Figure 5c). Prior to winding, the stems and plates of each stator pole were lined with 0.25 mm insulation (CG100 Fish Paper, 145PTags.com, Maitland, FL, USA) to prevent abrasion and shorting of the magnet wire. Each stator pole was wound with 522 turns of 24 AWG magnet wire (Remington Industries, Johnsburg, IL, USA), with a tabletop CNC milling machine (Sherline 2000, Vista, CA, USA) and a custom 3D-printed fixture. Two small holes (2 mm diameter) drilled into the bottom plates of each stator pole allowed the winding terminations to pass through the bottom plate of the stator pole to electrical terminations outside the stator housing. A photograph of a completed regular hexagonal pole is shown in Figure 4c.
A hemispherical stator housing ( Figure 5) was designed to maintain support and proper spacing for the 46 stator poles and organize the phase conductors. This housing ( Figure 5a) was 3D printed using fused deposition modeling (F370, Stratasys, Eden Prairie, MN, USA) with ABS material. The stator poles were secured into the housing using a top ring assembly and M6 bolts (Figure 5b). Through-holes in the housing (92 total) enabled external stator phase connections (Figure 5c). A hemispherical stator housing ( Figure 5) was designed to maintain support and proper spacing for the 46 stator poles and organize the phase conductors. This housing ( Figure 5a) was 3D printed using fused deposition modeling (F370, Stratasys, Eden Prairie, MN, USA) with ABS material. The stator poles were secured into the housing using a top ring assembly and M6 bolts (Figure 5b). Through-holes in the housing (92 total) enabled external stator phase connections (Figure 5c).

Rotor Design
The design process for the PMSSM rotor addressed unique challenges associated with its geometry. This included optimizing the number, location, size and polarity of internally-mounted permanent magnets (PMs), while providing a smooth, thin outer shell to contact the Hudson bearings for rotor support. These design parameters were optimized to provide smooth and adequate torque without excessive mass and without exceeding the bearings' load capacity (29.0 N static, 9.8 N dynamic). The rotor's outer radius was specified during the stator design process to provide a nominal air gap of 2 mm, Dor = 154.4 mm.
Grade N42 neodymium-iron-boron magnets (NdFeB) were selected for the rotor, based on their extremely high energy density (42 MGOe) and widespread availability in common shapes and sizes. To optimize their size, number, location and polar orientations, magnetostatic simulations were performed using FEA software (ANSYS Electronics Desktop, Canonsburg, PA, USA). These simulations helped balance the tradeoffs between motor torque and normal bearing loads. Figure 6 illustrates the relationship between magnet size and normal bearing load for maximum stator pole excitation (300 A-t).

Rotor Design
The design process for the PMSSM rotor addressed unique challenges associated with its geometry. This included optimizing the number, location, size and polarity of internally-mounted permanent magnets (PMs), while providing a smooth, thin outer shell to contact the Hudson bearings for rotor support. These design parameters were optimized to provide smooth and adequate torque without excessive mass and without exceeding the bearings' load capacity (29.0 N static, 9.8 N dynamic). The rotor's outer radius was specified during the stator design process to provide a nominal air gap of 2 mm, D or = 154.4 mm.
Grade N42 neodymium-iron-boron magnets (NdFeB) were selected for the rotor, based on their extremely high energy density (42 MGOe) and widespread availability in common shapes and sizes. To optimize their size, number, location and polar orientations, magnetostatic simulations were performed using FEA software (ANSYS Electronics Desktop, Canonsburg, PA, USA). These simulations helped balance the tradeoffs between motor torque and normal bearing loads. Figure 6 illustrates the relationship between magnet size and normal bearing load for maximum stator pole excitation (300 A-t). These simulation results reveal that bearing loads increase steadily with PM diameter and thickness up to and beyond the stator pole major diameter pi (33.32 mm). Based on these results, a PM diameter of 25.4 mm and thickness of 4.76 mm were chosen to maximize motor torque, without exceeding the bearing's static load capacity at peak stator pole excitation. These simulation results reveal that bearing loads increase steadily with PM diameter and thickness up to and beyond the stator pole major diameter p i (33.32 mm). Based on these results, a PM diameter of 25.4 mm and thickness of 4.76 mm were chosen to maximize motor torque, without exceeding the bearing's static load capacity at peak stator pole excitation.
After specifying PM size, algorithms were developed to optimize the number and uniform spacing of rotor PMs; details on these algorithms can be found in Shah's work [25]. One algorithm uniformly distributed a specified number (n) of PMs on the rotor's interior surface, while the other calculated bearing loads associated with PM-stator pole interaction forces as functions of rotor orientation. Various methods for uniformly distributing points on a spherical surface have been discussed in the literature; these include replicating Goldberg polyhedron geometries [26], minimizing the distance between points based on a Coulomb's law analogy [27], and employing Voronoi diagrams [28] and spiral schemes [29]. Goldberg polyhedrons impose geometric restrictions on the values of n, while Voronoi diagrams and Coulomb's law analogies are computationally expensive. Spiral schemes failed to generate uniform distributions for n < 32. These limitations prompted the utilization of the nearest neighbor method (NNM) [30] for n > 4 PMs. Figure 7a shows an initial random distribution of 34 PMs on the surface of the rotor before location optimization. Figure 7b shows the optimized PM distribution after 2100 algorithm iterations, upon which the associated cost function had declined from an initial value of 48.01 to 0.07 for the three nearest neighbors. It is worth noting that, due to rotational limitations of the rotor, PMs mounted near the top of the rotor (specifically, located within 0.38 Steradians of the z-axis, Figure 7c) do not interact with stator poles, and hence do not contribute to torque production. Figure 6. Normal bearing force as functions of diameter and thickness for cylindrical N42 NdFeB PM centered over a stator pole with maximum excitation of 300 Amp-turns. Static and dynamic load capacities for the Hudson bearing (MP-6, NBK, Seki, Gifu, Japan) are indicated.
These simulation results reveal that bearing loads increase steadily with PM diameter and thickness up to and beyond the stator pole major diameter pi (33.32 mm). Based on these results, a PM diameter of 25.4 mm and thickness of 4.76 mm were chosen to maximize motor torque, without exceeding the bearing's static load capacity at peak stator pole excitation.
After specifying PM size, algorithms were developed to optimize the number and uniform spacing of rotor PMs; details on these algorithms can be found in Shah's work [25]. One algorithm uniformly distributed a specified number (n) of PMs on the rotor's interior surface, while the other calculated bearing loads associated with PM-stator pole interaction forces as functions of rotor orientation. Various methods for uniformly distributing points on a spherical surface have been discussed in the literature; these include replicating Goldberg polyhedron geometries [26], minimizing the distance between points based on a Coulomb's law analogy [27], and employing Voronoi diagrams [28] and spiral schemes [29]. Goldberg polyhedrons impose geometric restrictions on the values of n, while Voronoi diagrams and Coulomb's law analogies are computationally expensive. Spiral schemes failed to generate uniform distributions for n < 32. These limitations prompted the utilization of the nearest neighbor method (NNM) [30] for n > 4 PMs. Figure 7a shows an initial random distribution of 34 PMs on the surface of the rotor before location optimization. Figure 7b shows the optimized PM distribution after 2100 algorithm iterations, upon which the associated cost function had declined from an initial value of 48.01 to 0.07 for the three nearest neighbors. It is worth noting that, due to rotational limitations of the rotor, PMs mounted near the top of the rotor (specifically, located within 0.38 Steradians of the z-axis, Figure 7c) do not interact with stator poles, and hence do not contribute to torque production. After uniformly distributing the n PMs, PM-stator pole interaction forces were calculated for a full range of rotor orientations. For normal bearing loads, the highest load scenario was a PM positioned directly over a stator pole with maximum current density (300 A-t). The interaction forces were computed along each axis, with total directional forces represented by F x , F y and F z . The ten Hudson bearing locations were designated P kx , P ky , and P kz , where k represents the Hudson bearing index. Equation (4) shows the relation between the total forces on the bearings, the bearing reaction forces (RF 01 . . . RF 10 ) and the normalized bearing locations.
Machines 2022, 10, 612 8 of 16 The bearings can only provide compressive loads; this condition is represented by Equation (4), which is as follows: The optimal number of PMs (n) was determined by minimizing a cost function, f, of the bearing forces (Equation (5)) subject to the compressive force constraint (Equation (4)), using MATLAB's 'fmincon' algorithm (Mathworks Inc., Natick, MA, USA). A factor of safety of 2.0 was added to the bearing capacity to account for the weight of the rotor and to prevent mechanical failure. f = minimize RF 2 01 + . . . + RF 2 10 10 (5) The final rotor design task was specifying the polarity of each PM. The spherical geometry of the spherical motor creates a challenge to generating any symmetric alternating pattern of opposing polarities in a PMSSM, as compared to a conventional electric motor. A genetic algorithm (GA) [31,32] was implemented to obtain a uniform distribution of polarities. The cost function of the GA was a metric to track the polarities of each magnet location in accordance with its neighbors. Each magnet location was assigned an initial cost function value of zero. The value was incremented by −1 for a neighbor with an opposing polarity and + 1 for a magnet location with the same polarity. The final cost function of every design is the sum of the individual cost functions of all the magnet locations.
The results of the GA included multiple designs with the same cost function value. To further evaluate these designs, the different magnet locations were divided into five sectors based on the value of their z coordinates. Figure 8a shows the rotor divided into different sectors (s1, s2, s3, s4 and s5). Each sector was assigned a weight (0.15, 0.25, 0.3, 0.2, 0.1, respectively) based on its size and the duration of interaction with the stator poles (the magnet located in rotor sector S1 interacts continually). The individual cost function at each location was multiplied by its sector weight, and the cost function was updated. The cost function with the lowest value provided the solution for the best distribution of magnet polarities. Figure 8b shows the optimized polarity distribution for 11 magnets on the surface of a sphere.  Table 2.   Table 2.

Rotor Fabrication
To facilitate manufacturing, and to allow access to the inertial navigation system (VN-100, Vectornav, Dallas, TX, USA), the rotor was comprised of two parts, the rotor bowl and the removable lid. The bowl housed the 11 PMs and provided a hard, smooth bearing surface, while the lid housed the electronics used for orientation sensing. The rotor bowl consisted of an inner support structure (Figure 9a), which was 3D printed using the same equipment and material as that of the stator housing, outlined above. An outer layer of hard epoxy resin (EpoxAcast 690, SmoothOn, Macungie, PA, USA) was cast around this inner structure using a two-part mold that was 3D printed using the same FDM material (Figure 9b). After removing the mold, this rotor was machined to final dimensions using a CNC lathe (Prototrack 1840 SLX, Southwestern Industries, Los Angeles, CA, USA).

axis.
The optimized rotor is comprised of 11 N42 NdFeB magnets 25.4 mm in diameter and 4.76 mm thick (Applied Magnets, Plano, TX, USA). The normalized magnet locations and polarities are provided in Table 2.

Rotor Fabrication
To facilitate manufacturing, and to allow access to the inertial navigation system (VN-100, Vectornav, Dallas, TX, USA), the rotor was comprised of two parts, the rotor bowl and the removable lid. The bowl housed the 11 PMs and provided a hard, smooth bearing surface, while the lid housed the electronics used for orientation sensing. The rotor bowl consisted of an inner support structure (Figure 9a), which was 3D printed using the same equipment and material as that of the stator housing, outlined above. An outer layer of hard epoxy resin (EpoxAcast 690, SmoothOn, Macungie, PA, USA) was cast around this inner structure using a two-part mold that was 3D printed using the same FDM material (Figure 9b). After removing the mold, this rotor was machined to final dimensions using a CNC lathe (Prototrack 1840 SLX, Southwestern Industries, Los Angeles, CA, USA).
(a) (b) Figure 9. Fabrication of the rotor bowl: (a) the ABS inner structure of the rotor around which epoxy is cast; (b) the two-part mold assembly surrounding the inner structure.
The PMs were secured to the inner rotor bowl (Figure 9a) using an adhesive epoxy (Clear Multi-Purpose, Loctite, Düsseldorf, Germany). The rotor lid houses the IMU, the RF transciever module (Digi International, MN, USA), and associated electronics. The rotor bowl and the lid are assembled with an interference fit to form a complete sphere. The final PMSSM prototype, detailing the fully assembled rotor and stator sub-assemblies, is shown in Figure 10.

Control Theory
To enable orientation control, the rotor orientation and the orientation error must be defined. The 3D orientation of the PMSSM can be represented using Euler angles; the device's rotation about three orthogonal axes is represented by angles α, β and γ, as shown in Figure 11. is cast; (b) the two-part mold assembly surrounding the inner structure.
The PMs were secured to the inner rotor bowl (Figure 9a) using an adhesive epoxy (Clear Multi-Purpose, Loctite, Düsseldorf, Germany). The rotor lid houses the IMU, the RF transciever module (Digi International, MN, USA), and associated electronics. The rotor bowl and the lid are assembled with an interference fit to form a complete sphere. The final PMSSM prototype, detailing the fully assembled rotor and stator sub-assemblies, is shown in Figure 10.

Control Theory
To enable orientation control, the rotor orientation and the orientation error must be defined. The 3D orientation of the PMSSM can be represented using Euler angles; the device's rotation about three orthogonal axes is represented by angles α, β and γ, as shown in Figure 11. Quaternions were utilized, as they provided singularity-free representations (unlike Euler angle representations). Details involving the relationships between quaternions, Euler parameters, and Euler's axis-angle theorem can be found in Shah's work (2020). The The final PMSSM prototype, detailing the fully assembled rotor and stator sub-assemblies, is shown in Figure 10.

Control Theory
To enable orientation control, the rotor orientation and the orientation error must be defined. The 3D orientation of the PMSSM can be represented using Euler angles; the device's rotation about three orthogonal axes is represented by angles α, β and γ, as shown in Figure 11. Quaternions were utilized, as they provided singularity-free representations (unlike Euler angle representations). Details involving the relationships between quaternions, Euler parameters, and Euler's axis-angle theorem can be found in Shah's work (2020). The Figure 11. Euler angles α, β and γ used for quantifying angular rotor displacement.
Quaternions were utilized, as they provided singularity-free representations (unlike Euler angle representations). Details involving the relationships between quaternions, Euler parameters, and Euler's axis-angle theorem can be found in Shah's work (2020). The orientation error vector can be expressed in inertial (fixed) coordinates asê = e xι + e yĴ + e zk ; it represents the axis about which the rotor must be rotated to achieve the desired orientation. To design a proportional orientation controller for this system, the desired torque vector τ d should be pointed alongê, as this would result in rotor motion towards the desired trajectory. Such a proportional controller could be implemented in the body (moving) coordinate system, shown by the following equation: where K P is the proportional controller gain. If τ d = d 1ι B + d 2Ĵ B + d 3k B , this approach can be extended to proportional + integral + derivative (PID) control by where K P , K I , and K D are the proportional, integral, and derivative gains, respectively. The phase currents that result in the desired torque, τ d , can be computed using the characteristic torque relation [33]; τ m = KL u where K is the characteristic torque matrix, L is the phase group matrix, and u = I 1 I 2 . . . I 9 is a vector of phase currents. This results in the following control law: where (KL) † is the least-squares pseudoinverse, which can be calculated using the right inverse.

Control Hardware
The controller is implemented on a custom-made circuit board, which consists of a microcontroller unit (MCU), servo drivers, a wireless serial interface, and a USB interface. The servo drivers utilized the DRV8801 module (Texas Instruments, Dallas, TX, USA). Each module uses N-channel power MOSFETs in full H-bridge configuration, which can drive each motor phase with peak maximum currents of 2.8 A at up to 36 V. The VN-100 IMU was used to measure the motion and orientation of the rotor in real-time. This sensor's capabilities include onboard sensor fusion, calibrated measurements with accuracies exceeding 0.5 • in pitch/roll, and a customizable serial interface that can directly output relevant information, such as quaternion orientation and angular velocity. To communicate with the IMU without interfering with the motion of the rotor, a wireless serial interface was established using XBee S2C transceiver modules (Digi International, Hopkins, MN, USA). An STM32F407VG (STMicroelectronics, Geneva, Switzerland) MCU was used to capture current and IMU sensor readings, perform control algorithm computations, and control each EM driver. In addition, a USB interface was used between the MCU and a desktop PC for viewing and recording data.
The 46 stator poles were connected in individual phases similar to conventional electric motors. However, the stator's Goldberg polyhedron geometry and the multi-DOF nature of the rotor implied that the stator could not be wound in conventional 3-phase groupings. The stator poles were grouped in phases based on the geometry of the Goldberg polyhedron and ensuring that no two consecutive stator poles are of the same phase. Figure 12 shows the five different geometric patterns used to wind all the stator poles into phases. Because stator poles in the same phase can be excited with opposing magnetic polarities, these polarities should be chosen to maximize synnergistic efforts between stator poles in the same phase. For example, the five stator poles in Phase 9, as shown in Figure 12e, can each be connected with either a northward or southward polarity. If the torque vectors generated by any pair or stator poles in the same phase tend to point in the same direction, then the poles should have the same polarity. However, if the torque vectors tend to point in opposite directions, then the poles should have opposite polarities. This helps ensure that all poles in a given phase are working in unison to produce the largest net torque possible.
This synnergistic effort can be quantitatively assessed by computing the inner product of the characteristic torque vectors ( ⃑ and ⃑ ), summed over a subset of possible rotor orientations ( ). This is shown by the finite sum in Equation (9) below. Here, represents the set of all possible rotor orientations from which individual orientations are selected. These orientations are selected so that the inner product is summed over the expected range of motion. Because stator poles in the same phase can be excited with opposing magnetic polarities, these polarities should be chosen to maximize synnergistic efforts between stator poles in the same phase. For example, the five stator poles in Phase 9, as shown in Figure 12e, can each be connected with either a northward or southward polarity. If the torque vectors generated by any pair or stator poles in the same phase tend to point in the same direction, then the poles should have the same polarity. However, if the torque vectors tend to point in opposite directions, then the poles should have opposite polarities. This helps ensure that all poles in a given phase are working in unison to produce the largest net torque possible.
This synnergistic effort can be quantitatively assessed by computing the inner product of the characteristic torque vectors ( K i and K j ), summed over a subset of possible rotor orientations (q). This is shown by the finite sum in Equation (9) below. Here, S q represents the set of all possible rotor orientations from which individual orientations are selected. These orientations are selected so that the inner product is summed over the expected range of motion.
The sign of V ij indicates the relative polarity between the i th and j th stator poles. If V ij is positive, there is a tendency for the i-j pair to produce torque vectors in similar directions; thus, they should be connected with the same polarity. A negative value for V ij indicates the tendency for the pair to produce antagonistic torque vectors and indicates that the pair should should be assigned opposing polarities. Applying this technique to the phase groupings in Figure 12 results in the polarities shown in Figure 13. This figure shows the inner surface of the rotor bowl, with individual stator poles labeled with a color corresponding to their phase grouping and north or south corresponding to their polarity. Here, "N" indicates that the north pole of the electromagnet points inwards, according to the direction of the conventional current flow and the right-hand rule.
Machines 2022, 10, x FOR PEER REVIEW 13 of 17 Figure 13. Stator phases and polarities. The phase groupings of Figure 12, together with Equation (9), produce these groupings and polarities. "N" and "S" correspond to north and south polarities, respectively, on the inner surface of the rotor bowl, as determined by the conventional current righthand rule.

Results
The initial PMSSM controller development involved manually tuning the individual phase current controllers. The PID loops for the motor phases were tuned using Ziegler Nichols' heuristic approach [34]. The current controllers exhibited reasonable responses with a rise time of 20 ms, although tracking errors were observed below 50 mA, due to limited current sensing at lower magnitudes.
Subsequently, the step response of the PMSSM was evaluated using step commands of 20°, 30° and 90° for the α, β and γ angles, respectively. Figure 14 shows the response of the PMSSM to the step input. The steady state errors were 0.25°, 0.44° and 0.16° for the α, β and γ angles, respectively. The data were collected with MATLAB (Mathworks Inc., Natick, MA, USA) from the MCU using serial communication with a sampling rate of 50 Hz. Figure 13. Stator phases and polarities. The phase groupings of Figure 12, together with Equation (9), produce these groupings and polarities. "N" and "S" correspond to north and south polarities, respectively, on the inner surface of the rotor bowl, as determined by the conventional current right-hand rule.

Results
The initial PMSSM controller development involved manually tuning the individual phase current controllers. The PID loops for the motor phases were tuned using Ziegler Nichols' heuristic approach [34]. The current controllers exhibited reasonable responses with a rise time of 20 ms, although tracking errors were observed below 50 mA, due to limited current sensing at lower magnitudes.
Subsequently, the step response of the PMSSM was evaluated using step commands of 20 • , 30 • and 90 • for the α, β and γ angles, respectively. Figure 14 shows the response of the PMSSM to the step input. The steady state errors were 0.25 • , 0.44 • and 0.16 • for the α, β and γ angles, respectively. The data were collected with MATLAB (Mathworks Inc., Natick, MA, USA) from the MCU using serial communication with a sampling rate of 50 Hz. with a rise time of 20 ms, although tracking errors were observed below 50 mA, due to limited current sensing at lower magnitudes.
Subsequently, the step response of the PMSSM was evaluated using step commands of 20°, 30° and 90° for the α, β and γ angles, respectively. Figure 14 shows the response of the PMSSM to the step input. The steady state errors were 0.25°, 0.44° and 0.16° for the α, β and γ angles, respectively. The data were collected with MATLAB (Mathworks Inc., Natick, MA, USA) from the MCU using serial communication with a sampling rate of 50 Hz. Separate testing was conducted to track time-varying references about multiple axes. The reference trajectory for α was sinusoidal, with an amplitude of 30° and a frequency of 72°/s, while the reference for γ was a ramp with a slope of 72°/s. The setpoint for β remained fixed at 0. Figure 15a provides snapshots of the first 5.0 s of this rotor reference trajectory. Figure 15b shows the tracking performance for the time-varying reference. The average absolute tracking error was 3.10°, 3.94° and 6.38° for α, β and γ, respectively, while the maximum tracking error was 10.56°, 19.70° and 14.30°. The associated phase currents Separate testing was conducted to track time-varying references about multiple axes. The reference trajectory for α was sinusoidal, with an amplitude of 30 • and a frequency of 72 • /s, while the reference for γ was a ramp with a slope of 72 • /s. The setpoint for β remained fixed at 0. Figure 15a provides snapshots of the first 5.0 s of this rotor reference trajectory. Figure 15b shows the tracking performance for the time-varying reference. The average absolute tracking error was 3.10 • , 3.94 • and 6.38 • for α, β and γ, respectively, while the maximum tracking error was 10.56 • , 19.70 • and 14.30 • . The associated phase currents are shown in Figure 15c. Phase currents were saturated at 1.5 A to prevent damage to the phase windings.

Discussion and Conclusions
While the PMSSM successfully tracked both step and time-varying reference trajectories, it did so with a relatively large overshoot (up to 55.13° for the step responses of Figure 14), long settling times (up to 2.98 s), and large tracking errors (a mean of 4.47° and a peak of 19.70° for the time-varying reference responses of Figure 15). Numerous factors contributed to this suboptimal performance, most notably limitations in the control algorithm (which did not account for rotor dynamics or stator back-iron) and stick-slip behavior, resulting from the friction between the surface of the rotor and the Hudson bearings.

Discussion and Conclusions
While the PMSSM successfully tracked both step and time-varying reference trajectories, it did so with a relatively large overshoot (up to 55.13 • for the step responses of Figure 14), long settling times (up to 2.98 s), and large tracking errors (a mean of 4.47 • and a peak of 19.70 • for the time-varying reference responses of Figure 15). Numerous factors contributed to this suboptimal performance, most notably limitations in the control algorithm (which did not account for rotor dynamics or stator back-iron) and stick-slip behavior, resulting from the friction between the surface of the rotor and the Hudson bearings. These factors caused the PMSSM orientation to overshoot and oscillate about the setpoint, as evident in Figure 15a. Inaccuracies in the electromechanical model, which did not account for the stator back-iron when computing the characteristic torque vector, resulted in discrepancies between the actual and commanded torque vector. Additionally, torque generated by the PM/stator-pole interaction near the edges of the bowl differed significantly from the torque generated away from the edges, due to differences in the reluctance of the magnetic circuits. Eddy current losses also contributed to performance limitations by producing additional torque, which opposes the rotor's motion. The sampling time of the main control loop was constrained to 50 Hz by the computationally expensive calculation of the characteristic torque matrix, further restricting the bandwidth of the motor. A higher sampling rate (which could be achieved using a more sophisticated microcontroller) would help dampen high-frequency signal oscillations about the desired orientations, as observed in Figure 15a. The IMU was susceptible to drift over time (1.5 • /h), inducing errors in calculating the orientation of the rotor as experiments were repeated over time.
Maintaining a uniform air gap between the stator and the rotor using multiple Hudson bearings was challenging. For certain rotor orientations, some bearings were not in contact with the rotor, while other bearings were overloaded.
The asymmetric rotor, overloaded bearings, and inadequate hardness of the epoxy rotor caused dents on the rotor surface, created "stick-slip" friction, and distorted the torque vector, making the motor more difficult to control. Machining the epoxy layer to produce a more spherical and smooth rotor was also problematic. Air bubbles formed while casting the epoxy layer persisted even after degassing the mold during the casting process and appeared as dents on the surface of the rotor after CNC turning. To address these defects, the surface was coated with another thin layer of epoxy and hand sanded. Maintaining a spherical shape and smooth surface throughout this process was challenging, as even small deviations in roundness caused variations in rotation. Future refinements to the PMSSM design should focus on improved bearings and enhanced rotor materials (with appropriate mechanical and magnetic properties) and fabrication methods (that ensure spherical geometry and uniform bearing support).
This research addresses many of the design and fabrication challenges associated with spherical motors, including selecting appropriate methods for orientation sensing and optimizing the distribution of PMs within the rotor and stator phases. However, the optimization algorithms used to govern this design process could be improved in future research. Developing a more sophisticated system model, one that accounts for rotordynamics, bearing friction and actuator nonlinearities, and using this model for nonlinear control synthesis would address the issues of stick-slip and significantly improve tracking performance. Ongoing research is investigating the development of such models, and their utilization in the development of more sophisticated control strategies (including multivariable, nonlinear, and intelligent controllers).