A New Rotor Position Measurement Method for Permanent Magnet Spherical Motors

This paper proposes a new high-precision rotor position measurement (RPM) method for permanent magnet spherical motors (PMSMs). In the proposed method, a LED light spot generation module (LSGM) was installed at the top of the rotor shaft. In the LSGM, three LEDs were arranged in a straight line with different distances between them, which were formed as three optical feature points (OFPs). The images of the three OFPs acquired by a high-speed camera were used to calculate the rotor position of PMSMs in the world coordinate frame. An experimental platform was built to verify the effectiveness of the proposed RPM method.


Introduction
A spherical motor can make complex motions of three degree-of-freedom (DOF) with its simple structure, which can be applied to many applications, such as robotics, aerospace and military.It has advantages over traditional three DOF motors, which are composed of several single-DOF [1,2], such as low manufacturing cost and high efficiency.Many researchers have studied and developed different kinds of spherical motors.For example, a spherical induction motor was developed by Williams and Laithwaite as early as 1959 [3]. Lee et al. developed a spherical stepper wrist motor based on the principle of variable reluctance spherical motor [4].Son et al. studied the control methods and working characteristics of a spherical wheel motor [5].A permanent magnet spherical motor (PMSM), with variable pole pitch and 96 stator poles, was proposed by Kahlen et al. [6].Chirikjian et al. studied the kinematic design and commutation of a spherical stepper motor [7].A three-DOF cylindrical spherical ultrasonic motor was developed by Takefumi et al. [8].The research topics that encompass the field of spherical motors include structural design, magnetic field analysis, rotor position measurement, control strategy, and drive circuit design.Rotor position measurement is a necessary precondition that must be taken into account when attempting to achieve precise control of spherical motors.
Rotor position measurement (RPM) in spherical motors is necessary when considering rotation angles in three directions.It is much more complicated than the RPM in traditional single-DOF motors when only one rotation angle needs to be calculated.Many multi-DOF RPM methods have been proposed, which are generally divided into contact type and non-contact type methods.The contact type method adds a mechanical detection mechanism to the rotor [9][10][11][12][13][14].This type of the RPM can achieve high-precision results, but the heavy structure of the RPM system increases the moment of inertia to the rotor and brings huge friction resistance to the bearings.In order to avoid extra moment of inertia and friction resistance, the non-contact type method has been put forward to measure rotor position.A non-contact RPM method based on a photoelectric sensor has been proposed by Lee et al. [14][15][16][17].Garner et al. have proposed a non-contact RPM method based on machine vision [18].Both mothods provide high-precision results by increasing the density of the grid pattern, but it is difficult to ensure clear grid pattern on the spherical shell when the spherical motor is moving.A non-contact laser-based orientation RPM method has been proposed by Yan et al. [19].This method is capable of achieving high-precision results, but the bulky structure makes it difficult to be installed in spherical motors.Hall-effect sensors have been used to measure the rotor position for spherical motors [20][21][22][23][24][25][26][27][28], however the magnetic field varies so slowly that the signal induced in the Hall-effect sensor cannot be used to differentiate different rotor positions with high precision.In addition, the terrestrial magnetic field may influence the Hall-effect sensor, leading to a large error in the RPM.
Given the limitations and trade-offs observed from the existing techniques, a novel high-precision non-contact RPM method based on machine vision is proposed for PMSMs in this paper.A LED light spot generation module (LSGM) was installed at the top of the rotor shaft in a spherical motor to form three optical feature points (OFPs).A high-speed camera was used to obtain the images of these three OFPs to compute rotation angles in three directions through image processing, obtaining the rotor position of PMSMs.Compared with other non-contact RPM methods, the proposed method provided reliable and accurate RPM with a simple structure.It was not affected by the environmental field or the moving surface of spherical rotors and, as such, is suitable for other types of spherical motors.
The remaining content of this paper is organized as follows.Section 2 presents the structure of a PMSM.Section 3 introduces the composition of the measurement device, and the principle of the proposed RPM method.Section 4 shows the experimental results for validation of the proposed RPM method.Conclusions are summarized in Section 5.

Structure of a PMSM
The structure of a PMSM used in this paper [29] is shown in Figure 1.The PMSM consists of two parts: A spherical rotor and a spherical-shell stator.The radius of the rotor is 65 mm, and the length of the rotor shaft is 40 mm.There are 40 NdFeB permanent magnets on the spherical rotor, which are divided into four layers symmetrically distributed around the equatorial plane of a rotor.24 air-core coils are assembled on the spherical-shell stator, which are divided into two layers and evenly distributed on both sides of the equator.
Figure 2 shows three-DOF motion of a PMSM. Figure 2a shows the motion range of three-DOF PMSM's rotor shaft.A stator coordinate frame (SCF) and a rotor coordinate frame (RCF) are used in a PMSM to describe the motion of a spherical rotor.The SCF is stationary relative to the earth, and the center of sphere is defined as the origin (O).The RCF also defines the center of sphere as the origin (o).The centers of the SCF and RCF are completely coincided at the initial position.Figure 2b,c shows the spinning motion and tilting motion of a PMSM, respectively.

The Structure of the Measurement Device
Figure 3 shows the structure of the RPM device for the PMSM, which consists of two parts: A high-speed camera and a LED LSGM.The LSGM was installed at the top of the rotor shaft.The Figure 2 shows three-DOF motion of a PMSM. Figure 2a shows the motion range of three-DOF PMSM's rotor shaft.A stator coordinate frame (SCF) and a rotor coordinate frame (RCF) are used in a PMSM to describe the motion of a spherical rotor.The SCF is stationary relative to the earth, and the center of sphere is defined as the origin (O).The RCF also defines the center of sphere as the origin (o).The centers of the SCF and RCF are completely coincided at the initial position.Figure 2b,c shows the spinning motion and tilting motion of a PMSM, respectively.

The Structure of the Measurement Device
Figure 3 shows the structure of the RPM device for the PMSM, which consists of two parts: A high-speed camera and a LED LSGM.The LSGM was installed at the top of the rotor shaft.The distance between the bottom of the rotor shaft and the top surface of the LSGM is 90 mm, and the distance between the lens of the high-speed camera and the top of the LSGM is l .

The Structure of the Measurement Device
Figure 3 shows the structure of the RPM device for the PMSM, which consists of two parts: A high-speed camera and a LED LSGM.The LSGM was installed at the top of the rotor shaft.The distance between the bottom of the rotor shaft and the top surface of the LSGM is 90 mm, and the distance between the lens of the high-speed camera and the top of the LSGM is l.The parameters of the high-speed camera are shown in Table 1.Arrangement of three LEDs on the top surface of light spot generation modul eters of the high-speed camera are shown in Table 1.The parameters of the high-speed camera are shown in Table 1. Figure 5 shows the images of three OFPs photographed by the high-speed camera at different exposure times.It can be seen that, when the exposure time of the high-speed camera was 5000 µs, only three OFPs in the image could be identified, which brought great convenience to the subsequent image processing and could be used to extract the coordinates from the three light spots in the ICF.

The Principle of Camera Imaging Based on Pin-Hole Model
A pin-hole model is often used to establish the mathematical model of images in machine vision, which is shown in Figure 6.We define a world coordinate frame (WCF) which constitutes W X , W Y , and W Z to describe the position of the camera in the CCF.The transformation relationship between the WCF and CCF can be expressed as: Where: R is a rotation matrix of 3 3× ; t  In Figure 6, the point o c represents the optical center of the camera, and o c , X C , Y C , and Z C form the camera coordinate system (CCF).The ICF includes an imaging plane I, the horizontal ordinates X C , and α, which are parallel and the vertical ordinates Y C and β, which are parallel too, and the optical axis of camera Z C , which is vertical to the imaging plane.The intersection of the optical axis and the imaging plane is the origin of the ICF, which is expressed as O αβ .The distance between o c and O αβ is f , which is the focal length of the camera.A point (u, v) in the imaging plane can be expressed as: where (u 0 , v 0 ) is the coordinate values of O αβ , d α and d β is the pixel size of the camera.We define a world coordinate frame (WCF) which constitutes X W , Y W , and Z W to describe the position of the camera in the CCF.The transformation relationship between the WCF and CCF can be expressed as: where: R is a rotation matrix of 3 × 3; As observed from triangulation in Figure 6, we can get Equation ( 3) can be expressed in the form of matrix as: Substituting Equations ( 1) and ( 2) into Equation ( 4) leads to where: ; M a is the intrinsic parameters matrix of a camera, which is determined by a α , a β , u 0 and v 0 ; M b is the extrinsic parameters matrix of a camera, which is determined by the relationship between the CCF and WCF.Equation ( 5) can be used to calculate the position of objects, such as rotor position in this study.In the following analysis and experiments, the high-speed camera was fixed on a tripod and its distance to the top of LSGM was l ∈ M b , which was the main parameter in the experiments.

Analysis of Rotor Motion in a PMSM
When the PMSM was working in the maximum motion range of three-DOF with the maximum tilting angle of 37.5 • , the output shaft tip of the rotor produced a spherical trajectory (gray color) and the midpoint LED in the LSGM also produced another spherical trajectory (red color), as shown in Figure 7.The sphere centers of the two trajectories were the same, the two tilting angles were also the same, but the radii of them were different.Therefore, the spherical trajectory generated by the midpoint LED could be used to determine the position of the rotor shaft.
Substituting equations ( 1) and (2) into equation ( 4) leads to where: a M is the intrinsic parameters matrix of a camera, which is determined by M is the extrinsic parameters matrix of a camera, which is determined by the relationship between the CCF and WCF.Equation ( 5) can be used to calculate the position of objects, such as rotor position in this study.In the following analysis and experiments, the high-speed camera was fixed on a tripod and its distance to the top of LSGM was b l M ∈ , which was the main parameter in the experiments.

Analysis of Rotor Motion in a PMSM
When the PMSM was working in the maximum motion range of three-DOF with the maximum tilting angle of 37.5°, the output shaft tip of the rotor produced a spherical trajectory (gray color) and the midpoint LED in the LSGM also produced another spherical trajectory (red color), as shown in Figure 7.The sphere centers of the two trajectories were the same, the two tilting angles were also the same, but the radii of them were different.Therefore, the spherical trajectory generated by the midpoint LED could be used to determine the position of the rotor shaft.

Calculation of the Rotor Position in a PMSM
The rotor position in a PMSM can be represented by three rotation angles: The tilting angle_θ , the yaw angle_ ϕ , and the spinning angle_ ω .Three rotation angels can be calculated by computing the coordinate values of three OFPs in the ICF, which are captured by a high-speed camera.Figure 8 shows the procedure to calculate the three rotation angles.

Calculation of the Rotor Position in a PMSM
The rotor position in a PMSM can be represented by three rotation angles: The tilting angle_θ, the yaw angle_ϕ, and the spinning angle_ω.Three rotation angels can be calculated by computing the coordinate values of three OFPs in the ICF, which are captured by a high-speed camera.Figure 8 shows the procedure to calculate the three rotation angles.

Calculation of the Tilting angle_θ
When the tilting angle of the rotor shaft is θ , Figure 9 shows the relationship between the camera and the midpoint LED, where R is the distance between the sphere center and the midpoint LED.

Calculation of the Tilting angle_θ
When the tilting angle of the rotor shaft is θ, Figure 9 shows the relationship between the camera and the midpoint LED, where R is the distance between the sphere center and the midpoint LED.

Calculation of the Tilting angle_θ
When the tilting angle of the rotor shaft is θ , Figure 9 shows the relationship between the camera and the midpoint LED, where R is the distance between the sphere center and the midpoint LED.When θ = 0 • , i.e., the rotor shaft is perpendicular to the horizontal plane, the distance between the lens of high-speed camera and the midpoint LED is l.When θ varies between 0 • and 37.5 • , the angle δ can be computed by where d and ∆r are the deflection distances in the horizontal and vertical directions, respectively, Num is the pixel coordinate distance in the ICF.Substituting Equations ( 6) and ( 7) into Equation ( 8) yields Then, the tilting angle is

Calculation of the Yaw angle_ϕ
When the rotor moves within the maximum angle, the high-speed camera captures the image of the three OFPs, which are located within a circle at the radius of VR max (the value of VR max is correlation with the experimental parameters), as indicated in Figure 10.
ere d and r Δ are the deflection distances in the horizontal and vertical directions, respectiv m is the pixel coordinate distance in the ICF.
Substituting equations ( 6) and ( 7) into equation ( 8  Similarly, the angle ϕ can be computed by where: d u and d v are the distances between the midpoint LED and the origin in the ICF.
With the calculated ϕ , the tilting angle_ϕ in the range of 0~2π can be expressed as: Thus, the rotor position expressed by the tilting angle_θ and yaw_ϕ in a spherical coordinate frame can be converted to a position [x, y, z] in a rectangular coordinate frame as where R s is the distance between the tip of the rotor shaft and sphere center.

Calculation of the Spinning angle_ω
While the rotor shaft moved within the maximum angle, the rotor was spinning around z axis in the RCF as shown in Figure 11 and the spinning angle ω is needed to determine the rotor position.shows the images of the three OFPs taken by the high-speed camera wh ning.Figure 12 shows the images of the three OFPs taken by the high-speed camera when the rotor shaft was spinning.Figure 12 shows the images of the three OFPs taken by the high-speed camera when the rotor shaft was spinning.The angle ω can be computed by where O v is the distance between L * l and L * s in the direction of v axis, and O u is the distance between L * l and L * s in the direction of u axis.With the rotation angle ω , the spinning angle_ω in the range of 0~2π can be expressed in the four quadrants as:

Experimental Results
According to the proposed method, the tilting angle_θ, the yaw angle_ϕ, and the spinning angle_ω can be calculated to determine a rotor position of the PMSMs.In order to verify the RPM method for PMSMs, an experimental platform, as shown in Figure 13a, was constructed, which consisted of a PMSM and its control circuit, a LSGM and its driver circuit, a high-speed camera (Revealer, Hefei, Anhui, China) and tripod, a power supply (Tradex, Beijing, China), and a computer (Lenovo, Beijing, China).Figure 13b shows the block diagram of the control system.The block diagram of the rotor position measurement system is shown in Figure 13c.

Experimental Results
According to the proposed method, the tilting angle_θ , the yaw angle_ϕ , and the spinning angle_ ω can be calculated to determine a rotor position of the PMSMs.In order to verify the RPM method for PMSMs, an experimental platform, as shown in Figure 13a, was constructed, which consisted of a PMSM and its control circuit, a LSGM and its driver circuit, a high-speed camera (Revealer, Hefei, Anhui, China) and tripod, a power supply (Tradex, Beijing, China) , and a computer (Lenovo, Beijing, China).Figure 13b shows the block diagram of the control system.The block diagram of the rotor position measurement system is shown in Figure 13c.Table 2 shows the parameters of the spherical motor driver circuit.In the following experiment, we set the resolution, the sampling time, and the exposure time of the high-speed camera as 1100 × 1100, 20 ms and 5000 us, respectively.The distance between the LSGM's tip and high-speed camera lens l was 420mm, we can measure through equation ( 11) that the maximum value of θ is 42°, (the maximum tilting angle of PMSM is 37.5°).Consequently, the intrinsic parameter matrix of the camera generated by the calibration method [30] is , the focal length of the camera can be computed as: Measurement results obtained by the MEMS were set as the reference (analytical results), Table 3 shows the parameters of the MEMS.Although MEMS can get a precise position of PMSM in a certain time (about 10 min) after calibration, it is known that the measurement error will gradually increase after a certain time.Every measurement time was 10 s in the following experiment.Table 2 shows the parameters of the spherical motor driver circuit.In the following experiment, we set the resolution, the sampling time, and the exposure time of the high-speed camera as 1100 × 1100, 20 ms and 5000 µs, respectively.The distance between the LSGM's tip and high-speed camera lens l was 420 mm, we can measure through Equation ( 11) that the maximum value of θ is 42 • , (the maximum tilting angle of PMSM is 37.5 • ).Consequently, the intrinsic parameter matrix of the camera generated by the calibration method [30] is From Table 1, d α = d β = 0.007 mm, the focal length of the camera can be computed as: Measurement results obtained by the MEMS were set as the reference (analytical results), Table 3 shows the parameters of the MEMS.Although MEMS can get a precise position of PMSM in a certain time (about 10 min) after calibration, it is known that the measurement error will gradually increase after a certain time.Every measurement time was 10 s in the following experiment.

Experimental Measurement on Tilting Motion of PMSM Rotor
The rotor shaft can make a tilting motion with respect to the z axis in the SCF, the tilting angle varied between 0 • to 37.5 • .The initial position was determined by drawing two lines on the stator shell and spherical rotor, respectively, as shown in Figure 14.

Experimental Measurement on Tilting Motion of PMSM Rotor
The rotor shaft can make a tilting motion with respect to the z axis in the SCF, the tilting angle varied between 0° to 37.5°.The initial position was determined by drawing two lines on the stator shell and spherical rotor, respectively, as shown in Figure 14. Figure 15a shows the images obtained by the high-speed camera when the rotor made a tilting motion; the coordinate values of three OFPs in the ICF were calculated by image processing.Further, we get the position of rotor output shaft tip by the tilting angle_θ through equation ( 11) and the yaw angle_ϕ through equation ( 13), which is shown in Figure 15b.Figure 15a shows the images obtained by the high-speed camera when the rotor made a tilting motion; the coordinate values of three OFPs in the ICF were calculated by image processing.Further, we get the position of output shaft tip by the tilting angle_θ through Equation ( 11) and the yaw angle_ϕ through Equation ( 13), which is shown in Figure 15b.Figure 16a shows the tilting angle_θ when the PMSM made a tilting motion.The maximum tilting angle was about 22°, and the rotor wiggled 11.5 times in 10 s.The maximum difference between the experimental and analytical results of the tilting angle was about 0.32°, as shown in Figure 16b.Figure 16c shows the yaw angle_ϕ .It moved between 90° and 270° in the first 5 s, which means the rotor made a tilting motion about 5 times near the XZ plane.In the next 5 s, the rotor made a tilting motion about 6.5 times near the YZ plane and the yaw angle moved between 180° and 360°.The maximum difference between the experimental and analytical results of the yaw angle was about 0.3°, as shown in Figure 16d.Figure 16e shows the spinning angle_ ω .It was about 330° in the first 5 s and was changed into about 255° in the next 5 s.The maximum difference between the experimental and analytical results of the spinning angle was about 0.31°, as shown in Figure 16f.Figure 16a shows the tilting angle_θ when the PMSM made a tilting motion.The maximum tilting angle was about 22 • and the rotor wiggled 11.5 times in 10 s.The maximum difference between the experimental and analytical results of the tilting angle was about 0.32 • , as shown in Figure 16b.Figure 16c shows the yaw angle_ϕ.It moved between 90 • and 270 • in the first 5 s, which means the rotor made a tilting motion about 5 times near the XZ plane.In the next 5 s, the rotor made a tilting motion about 6.5 times near the YZ plane and the yaw angle moved between 180 • and 360 • .The maximum difference between the experimental and analytical results of the yaw angle was about 0.3 • , as shown in Figure 16d.Figure 16e shows the spinning angle_ω.It was about 330 • in the first 5 s and was changed into about 255 • in the next 5 s.The maximum difference between the experimental and analytical results of the spinning angle was about 0.31 • , as shown in Figure 16f.Figure 16a shows the tilting angle_θ when the PMSM made a tilting motion.The maximum tilting angle was about 22°, and the rotor wiggled 11.5 times in 10 s.The maximum difference between the experimental and analytical results of the tilting angle was about 0.32°, as shown in Figure 16b.Figure 16c shows the yaw angle_ϕ .It moved between 90° and 270° in the first 5 s, which means the rotor made a tilting motion about 5 times near the XZ plane.In the next 5 s, the rotor made a tilting motion about 6.5 times near the YZ plane and the yaw angle moved between 180° and 360°.The maximum difference between the experimental and analytical results of the yaw angle was about 0.3°, as shown in Figure 16d.Figure 16e shows the spinning angle_ ω .It was about 330° in the first 5 s and was changed into about 255° in the next 5 s.The maximum difference between the experimental and analytical results of the spinning angle was about 0.31°, as shown in Figure 16f.

Experimental Measurement on Spinning Motion of PMSM Rotor at the Center Point
When the rotor was rotating around the z axis at the center point, i.e., the tilting angle_θ was 0°, as shown in Figure 17.The spinning angle of the rotor shaft can be calculated from the images which were taken by the high-speed camera.

Experimental Measurement on Spinning Motion of PMSM Rotor at the Center Point
When the rotor was rotating around the z axis at the center point, i.e., the tilting angle_θ was 0 • , as shown in Figure 17.The spinning angle of the rotor shaft can be calculated from the images which were taken by the high-speed camera.

Experimental Measurement on Spinning Motion of PMSM Rotor at the Center Point
When the rotor was rotating around the z axis at the center point, i.e., the tilting angle_θ was 0°, as shown in Figure 17.The spinning angle of the rotor shaft can be calculated from the images which were taken by the high-speed camera.Figure 18a shows the images taken by the high-speed camera and the coordinate values of the three OFPs in the ICF.After calculating the tilting angle_θ and yaw angle_ ϕ , we can get the position of rotor output shaft tip, which is shown in Figure 18b.Figure 19a shows the tilting angle_ θ when the PMSM rotor made a spinning motion at the center point, however the maximum tilting angle was about 2.8°.This may be caused by the position direct (PD) control algorithm and the time delay of position detection applied in this PMSM.The maximum difference between the experimental and analytical results was about 0.25°, as shown in Figure 19b.Figure 19c shows the yaw angle_ϕ , it varied from 90° to 210°, the maximum difference between the experimental and analytical values was about 0.3°, as shown in Figure 19d.Figure 19e shows the spinning angle_ ω .It can be seen that the PMSM rotor rotated clockwise at about 5.5 turns in 10 s, and the maximum difference between the experimental and analytical values was about 0.3°, as shown in Figure 19f.Figure 19a shows the tilting angle_θ when the PMSM rotor made a spinning motion at the center point, however the maximum tilting angle was about 2.8 • .This may be caused by the position direct (PD) control algorithm and the time delay of position detection applied in this PMSM.The maximum difference between the experimental and analytical results was about 0.25 • , as shown in Figure 19b.Figure 19c shows the yaw angle_ϕ, it varied from 90 • to 210 • , the maximum difference between the experimental and analytical values was about 0.3 • , as shown in Figure 19d.Figure 19e shows the spinning angle_ω.It can be seen that the PMSM rotor rotated clockwise at about 5.5 turns in 10 s, and the maximum difference between the experimental and analytical values was about 0.3 • , as shown in Figure 19f.Figure 19a shows the tilting angle_ θ when the PMSM rotor made a spinning motion at the center point, however the maximum tilting angle was about 2.8°.This may be caused by the position direct (PD) control algorithm and the time delay of position detection applied in this PMSM.The maximum difference between the experimental and analytical results was about 0.25°, as shown in Figure 19b.Figure 19c shows the yaw angle_ϕ , it varied from 90° to 210°, the maximum difference between the experimental and analytical values was about 0.3°, as shown in Figure 19d.Figure 19e shows the spinning angle_ ω .It can be seen that the PMSM rotor rotated clockwise at about 5.5 turns in 10 s, and the maximum difference between the experimental and analytical values was about 0.3°, as shown in Figure 19f.

Experimental Measurement on Edge Spinning Motion of PMSM Rotor
Figure 20 shows that the PMSM rotor shaft spinning at a tilted angle.When the rotor shaft was in motion in three-DOF, the spherical rotor span around the tilted z axis at the same time.Figure 22a shows the tilting angle_ θ when the PMSM rotor made an edge spinning motion, its average value was about 24°.The variation of the tilting angle might be caused by the PD control algorithm and the time delay of position detection used in the PMSM.The maximum difference of the tilting angle between the experimental and analytical results was about 0.22°, which is shown in Figure 22b.Figure 22c shows the yaw angle_ϕ .It can be seen that the PMSM rotor is rotating anticlockwise at the approximate 4.5 turns around the z axis in the SCF.The maximum difference of the yaw angle between the experimental and analytical results was about 0.3°, as shown in Figure 22d.
Figure 22e shows the spinning angle_ ω , we can see that the PMSM rotor was rotating clockwise at the approximate 4 turns around the z axis in the RCF.The maximum difference of the spinning angle between the experimental and analytical results was about 0.45°, as shown in Figure 22f, this difference was mainly caused by the three LEDs in the LSGM which were not at the same level when the rotor was tilted.Figure 22a shows the tilting angle_θ when the PMSM rotor made an edge spinning motion, its average value was about 24 • .The variation of the tilting angle might be caused by the PD control algorithm and the time delay of position detection used in the PMSM.The maximum difference of the tilting angle between the experimental and analytical results was about 0.22 • , which is shown in Figure 22b.Figure 22c shows the yaw angle_ϕ.It can be seen that the PMSM rotor is rotating anti-clockwise at the approximate 4.5 turns around the z axis in the SCF.The maximum difference of the yaw angle between the experimental and analytical results was about 0.3 • , as shown in Figure 22d.Figure 22e shows the spinning angle_ω, we can see that the PMSM rotor was rotating clockwise at the approximate 4 turns around the z axis in the RCF.The maximum difference of the spinning angle between the experimental and analytical results was about 0.45 • , as shown in Figure 22f, this difference was mainly caused by the three LEDs in the LSGM which were not at the same level when the rotor was tilted.Figure 22a shows the tilting angle_ θ when the PMSM rotor made an edge spinning motion, its average value was about 24°.The variation of the tilting angle might be caused by the PD control algorithm and the time delay of position detection used in the PMSM.The maximum difference of the tilting angle between the experimental and analytical results was about 0.22°, which is shown in Figure 22b.Figure 22c shows the yaw angle_ϕ .It can be seen that the PMSM rotor is rotating anticlockwise at the approximate 4.5 turns around the z axis in the SCF.The maximum difference of the yaw angle between the experimental and analytical results was about 0.3°, as shown in Figure 22d.
Figure 22e shows the spinning angle_ ω , we can see that the PMSM rotor was rotating clockwise at the approximate 4 turns around the z axis in the RCF.The maximum difference of the spinning angle between the experimental and analytical results was about 0.45°, as shown in Figure 22f, this difference was mainly caused by the three LEDs in the LSGM which were not at the same level when the rotor was tilted.

Comparison of Different Rotor Position Measurement Methods
To date, four types of sensors have been widely used for the RPM including MEMS, photoelectric sensor, Hall-effect sensor, and high-speed camera The experimental results obtained by the MEMS were set as the reference values because the MEMS has been found to have the highest accuracy among four of them.The experimental results obtained by the other three methods were compared with those by the MEMS.Table 4 shows their differences.It can be seen that the high-speed camera based RPM has shown higher accuracy than the other two methods.

Comparison of Different Rotor Position Measurement Methods
To date, four types of sensors have been widely used for the RPM including MEMS, photoelectric sensor, Hall-effect sensor, and high-speed camera The experimental results obtained by the MEMS were set as the reference values because the MEMS has been found to have the highest accuracy among four of them.The experimental results obtained by the other three methods were compared with those by the MEMS.Table 4 shows their differences.It can be seen that the high-speed camera based RPM has shown higher accuracy than the other two methods.

Conclusions
Rotor position measurement (RPM) is a precondition for closed-loop operation of spherical motors.This paper presents a novel RPM method for a PMSM based on image processing.In the proposed RPM, a LSGM was installed at the top of a PMSM rotor shaft, where three LEDs in the LSGM were arranged in a straight line with different distances to form three optical feature points (OFPs).A high-speed camera was used to capture the images of these three OFPs.The coordinate values of the three OFPs in the images were extracted to compute the tilting angle_θ, the yaw angle_ϕ and the spinning angle_ω of the PMSM rotor, and thus obtain the rotor position of a PMSM.As there was no physical contact between a high-speed camera and a PMSM, extra moment of inertia and friction resistance, which may compromise the working performances of spherical motors, were avoided.The experimental platform was set up to verify the effectiveness of the proposed RPM method with high detection precision.In the future, we will install a tiny camera in a PMSM to measure the rotor position, which has negligible influence on the motion of rotor and structure of a PMSM.Combining with the other sensors, we will use the multiple sensor fusion method to further improve the precision of the RPM.

Figure 4 .
Figure 4. Arrangement of three LEDs on the top surface of light spot generation module (LSGM).

Figure 3 .
Figure 3. Schematic diagram of rotor position measurement.Three LEDs were installed at the top surface of the LSGM, which were arranged in a straight line, as shown in Figure 4.The LED L c is located at the center, the distance between L c and L s was 7 mm and the distance between L c and L l was 10 mm.The three optical feature points (OFPs) were identified through the different distances between them.The three LEDs are represented by L * c , L * s , and L * l in the image coordinate frame (ICF), respectively.

Figure 4 .
Figure 4. Arrangement of three LEDs on the top surface of light spot generation module (LSGM).

Figure 5 .
Figure 5. Images taken by a high-speed camera at different exposure times.

Figure 6 .
Figure 6.Pin-hole model in machine vision: (a) Camera pin-hole model; (b) Image coordinate system.
d and β d is the pixel size of the camera.

Figure 6 .
Figure 6.Pin-hole model in machine vision: (a) Camera pin-hole model; (b) Image coordinate system.

Figure 8 .
Figure 8.The procedure to calculate three rotation angles for rotor position in a PMSM.

Figure 8 .
Figure 8.The procedure to calculate three rotation angles for rotor position in a PMSM.

Figure 8 .
Figure 8.The procedure to calculate three rotation angles for rotor position in a PMSM.

3 .
Calculation of the Yaw angle_ϕ When the rotor moves within the maximum angle, the high-speed camera captures the imag three OFPs, which are located within a circle at the radius of max VR (the value of m VR elation with the experimental parameters), as indicated in Figure 10.
rotor position expressed by the tilting angle_θ and yaw_ ϕ in a spher onverted to a position [ x , y , z ] in a rectangular coordinate frame as tip of the rotor shaft and sphere center.on of the Spinning angle_ ω rotor shaft moved within the maximum angle, the rotor was spinning hown in Figure11and the spinning angle ω is needed to determine the

Figure 11 .
Figure 11.Spinning motion of the rotor.

Figure 11 .
Figure 11.Spinning motion of the rotor.

Figure 11 .
Figure 11.Spinning motion of the rotor.

Figure 12 .
Figure 12.Images of three optical feature points (OFPs) for calculation of spinning angle_ω.

21 Figure 12 .L
Figure 12.Images of three optical feature points (OFPs) for calculation of spinning angle_ ω .The angle ' ω can be computed by

Figure 13 .
Figure 13.Experimental platform for measuring the position of the PMSM rotor: (a) Experimental prototype; (b) Block diagram of the control system; (c) Block diagram of rotor position measurement system, micro-electro-mechanical system(MEMS): MPU6050.

Figure 13 .
Figure 13.Experimental platform for measuring the position of the PMSM rotor: (a) Experimental prototype; (b) Block diagram of the control system; (c) Block diagram of rotor position measurement system, micro-electro-mechanical system(MEMS): MPU6050.

Figure 15 .
Figure 15.Experimental measurement on tilting motion: (a) Images captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 15 .
Figure 15.Experimental measurement on tilting motion: (a) Images captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 15 .
Figure 15.Experimental measurement on tilting motion: (a) Images captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 16 .
Figure 16.Experimental results of rotor tilting motion: (a) Experimental and analytical results of θ ; (b) difference between experimental and analytical results of θ ; (c) experimental and analytical results of ϕ ; (d) difference between experimental and analytical of ϕ ; (e) experimental and analytical results of ω ;(f) difference between experimental and analytical of ω .

Figure 17 .
Figure 17.Spinning motion of PMSM rotor at center point.

Figure
Figure18ashows the images taken by the high-speed camera and the coordinate values of the three OFPs in the ICF.After calculating the tilting angle_θ and yaw angle_ ϕ , we can get the position of rotor output shaft tip, which is shown in Figure18b.

Figure 16 .
Figure 16.Experimental results of rotor tilting motion: (a) Experimental and analytical results of θ; (b) difference between experimental and analytical results of θ; (c) experimental and analytical results of ϕ; (d) difference between experimental and analytical of ϕ; (e) experimental and analytical results of ω; (f) difference between experimental and analytical of ω.

Figure 16 .
Figure 16.Experimental results of rotor tilting motion: (a) Experimental and analytical results of θ ; (b) difference between experimental and analytical results of θ ; (c) experimental and analytical results of ϕ ; (d) difference between experimental and analytical of ϕ ; (e) experimental and analytical results of ω ;(f) difference between experimental and analytical of ω .

Figure 17 .
Figure 17.Spinning motion of PMSM rotor at center point.

Figure 17 .
Figure 17.Spinning motion of PMSM rotor at center point.

Figure
Figure18ashows the images taken by the high-speed camera and the coordinate values of the three OFPs in the ICF.After calculating the tilting angle_θ and yaw angle_ϕ, we can get the position of rotor output shaft tip, which is shown in Figure18b.

Figure 18 .
Figure 18.Experimental measurement on the spinning motion of PMSM rotor at center point: (a) Images captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 18 .
Figure 18.Experimental measurement on the spinning motion of PMSM rotor at center point: (a) Images captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 18 .
Figure 18.Experimental measurement on the spinning motion of PMSM rotor at center point: (a) Images captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 19 .
Figure 19.Experimental results on spinning motion of PMSM rotor at center point: (a) Experimental and analytical results of θ ; (b) difference between experimental and analytical results of θ ; (c) experimental and analytical results of ϕ ; (d) difference between experimental and analytical of ϕ ; (e) experimental and analytical results of ω ; (f) difference between experimental and analytical of ω .

Figure 21
Figure21shows the experimental measurement on the edge spinning motion of PMSM rotor.

Figure 19 .
Figure 19.Experimental results on spinning motion of PMSM rotor at center point: (a) Experimental and analytical results of θ; (b) difference between experimental and analytical results of θ; (c) experimental and analytical results of ϕ; (d) difference between experimental and analytical of ϕ; (e) experimental and analytical results of ω; (f) difference between experimental and analytical of ω.

4. 3 .
Experimental Measurement on Edge Spinning Motion of PMSM Rotor

Figure 20
Figure20shows that the PMSM rotor shaft spinning at a tilted angle.When the rotor shaft was in motion in three-DOF, the spherical rotor span around the tilted z axis at the same time.

Figure 19 .
Figure 19.Experimental results on spinning motion of PMSM rotor at center point: (a) Experimenta and analytical results of θ ; (b) difference between experimental and analytical results of θ ; (c experimental and analytical results of ϕ ; (d) difference between experimental and analytical of ϕ ; (e) experimental and analytical results of ω ; (f) difference between experimental and analytical o ω .

Figure 21
Figure21shows the experimental measurement on the edge spinning motion of PMSM ro

Figure 21
Figure21shows the experimental measurement on the edge spinning motion of PMSM rotor.

Figure 21 .
Figure 21.Experimental measurement on the edge spinning motion: (a) Image captured by highspeed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 21 .
Figure 21.Experimental measurement on the edge spinning motion: (a) Image captured by high-speed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 21 .
Figure 21.Experimental measurement on the edge spinning motion: (a) Image captured by highspeed camera and coordinate values of optical feature points; (b) Position of rotor shaft tip.

Figure 22 .
Figure 22.Experimental results of edge spinning motion of PMSM rotor: (a) Experimental and analytical results of θ; (b) difference between experimental and analytical results of θ; (c) experimental and analytical results of ϕ; (d) difference between experimental and analytical results of ϕ; (e) experimental and analytical results of ω; (f) difference between experimental and analytical results of ω.

Table 1 .
Parameters of the high-speed camera

Table 2 .
Parameters of the spherical motor driver circuit.

Table 2 .
Parameters of the spherical motor driver circuit.

Table 3 .
Parameters of the MEMS.

Table 3 .
Parameters of the MEMS.

Table 4 .
Comparison of different rotor position measurement methods.
* e θ is the error of tilting angle_θ ; e ϕ is the error of yaw angle_ϕ ; e ω is the error of spinning angle_ ω .

Table 4 .
Comparison of different rotor position measurement methods.e θ is the error of tilting angle_θ; e ϕ is the error of yaw angle_ϕ; e ω is the error of spinning angle_ω. *