A Measurement Method for Ball Joint Spatial Rotation Angle

The precision spherical joint is a key movement execution unit in robotics and in equipment with a parallel mechanism. When it works in passive motion, its arbitrary rotation angle cannot be determined. On the basis of the theory of equivalent magnetic charge, a measurement method through the installation of a ring permanent magnet (PM) and several Hall sensors was proposed. Firstly, the measurement model is developed on the basis of the theory of the permanent magnetic field model and the theory of equivalent magnetic charge. Then, a measurement prototype system is designed and developed; at the same time, a special data acquisition and process system is established to match the prototype. To test the sensor performance and its accuracy, an angle-comparing measurement and calibration device were developed. Experimental data show that in the ±15° cone space, the rod rotation angle can be determined steadily and the measurement accuracy can reach 1 min. With further study, expansion of the measurement range and improvement of the accuracy and resolution can hopefully be achieved. The sensor and method will have wide application prospects in the near future.


Introduction
Precision spherical joints and ball joints are widely used in robotics, parallel mechanisms, and parallel machine tools or other equipment with many structural variations. To realize motion control on equipment, the joint motion and its rotation angle must be identified. (1,2) At present, all types of traditional angle sensors, such as a round grating encoder, a magnetic grating, and a round inductosyn, can only measure one dimension. To achieve multi-axis angle rotation detection, the conventional method is to measure one axis at a time and then combine them together; this has been employed successfully in many applications such as in industrial robots, flexible joint coordinate measuring machines (CMMs), 3-D inertial navigation test devices, and laser trackers. This combined method not only increases the cost, but also increases the equipment complexity and the workload of the corresponding circuit and data acquisition system. Thus, it will be limited in some applications. Hence, it is necessary to study a high-precision measurement method or sensor to realize rotation angle measurement of spherical motion in any direction.
Many types of automated processing equipment, such as spherical motors, mobile vehicles, and propellers for boats, helicopters, and gyroscopes, also have requirements for orientation and angle measurement in their motion control. Lee and Velinsky (3) and Lee and Ga (4) provided a method of detecting spherical motor motion. A half ball shell that looks like a half-tellurion with latitude and longitude lines is situated concentrically on the rotor. A vision system is placed on the stator to capture pictures, and the angle is obtained with a designed algorithm. (3,4) Stein and co-workers (5,6) at Johns Hopkins University, who also studied spherical motors, developed binary sphericalmotion encoders to solve the same question. Eaton and Ferrari at Hexagon Metrology Company (7) designed a new style of flexible arm CMM with a special spherical joint. Many dots or points were sculptured and scattered on a ball's surface, forming many adjacent triangles. Each triangle was preferably uniquely shaped and sized, such that it could be correlated to a particular location on the ball's surface. Then, the optical camera in the socket captured a photo to calculate the angle. (7) All optical detection methods could realize the orientation and angle detection of spherical motion, but the measurement accuracy and resolution were relatively low. They also had the disadvantage of being too sensitive to the environment. The motivation of this study is to use the magnetic effect to substitute for the optical image to realize angle measurement, since it is not sensitive to the environment and vibration. The method of Spratte gave us confirmation and support, but its resolution and accuracy are low with only one permanent and one magnetic sensor. (8) Johnson et al. invented an implantable joint angle transducer to provide command-control and feedback-control information for chronic use with functional neuromuscular stimulation neuroprotheses. In their study, three Hall effect sensors were used to enlarge the measurement range; the resolution and accuracy were also improved with a redundant algorithm. (9) The structure of this paper is as follows. First, the measurement metrology and the error model of the proposed method are established. Then, the prototype is fabricated and the experimental verification is described in § 3. Finally, the discussion and conclusion are presented.

Measurement Model
As Fig. 1 shows, a ring permanent magnet (PM) is installed on a joint rod, and several Hall sensors are arrayed evenly on a ring base, which was manufactured using a non-magnetic material. As the PM follows the motion of the joint rod in space, the magnetic field rotates synchronously. This results in the variation of magnetic induction in any point in space. Thus, the Hall sensors can capture this variation, and each sensor detects the component of the magnetic induction vector perpendicular to the sensor working plane and gives out a voltage signal. The most important step is to establish a mathematical model to determine the relationship between the sensor output signal and the rotation angle of the joint rod. Furthermore, some numerical integral algorithms and data fusion algorithms are needed to deal with the complex calculation; then, the measurement result can be obtained. The structure and size of this device can be adjusted in different ways according to all types of joints with different forms and sizes. After installing the device on joints, it requires a simple calibration before operation.
With the development of rare-earth permanent magnetic materials, their applications continue to expand and their manufacturing technology also continuously improves. Developing a method to calculate the PM magnetic field has attracted much attention and has become an important issue for researchers. At present, three main types of PM field analysis model are commonly used: the magnetic dipole model, the equivalent magnetic charge model (EMCM), and the equivalent current model. EMCM is closer to the topic; the measurement model is derived from the combination of the EMCM and the numerical integration method. (10,11) Here, the model of a single sensor on the ring PM is introduced in detail. As Fig. 2 shows, for the cylindrical PM, the magnetic charge density inside ρ m is zero owing to its even magnetization axially, but in the boundary of a cylinder, a surface magnetic charge density σ m exists and can be described as (12) In the formula, n is the outside normal unit vector of the boundary surface, and B r is the remanence of PM. The positive and negative magnetic charges distribute on the upper and lower surfaces, respectively, according to the concept of scalar magnetic potential. The magnetic field strength of any point in space, which is determined by the cylindrical PM, can be calculated using the following integral formulas: (13)  where H is the magnetic field strength, B is the magnetic strength, µ r is the magnetized material relative permeability, µ 0 is the permeability of vacuum, r + and r − are the point-topoint distance vectors of positive and negative magnetic charge sources, and s + and s − are the source areas of the positive and negative magnetic charges, respectively. The ring PM here can be described as having two cylinders: one has the same outer diameter as the ring PM, and the other diameter is equal to the inner diameter of the ring PM; then, the magnetic strength B is calculated. (14) According to the vector superposition principle, the magnetic field component of the ring PM in space can be obtained as (15) where B D stands for the magnetic strength produced by the large cylindrical PM, and B d stands for the small one.
The center of the ball joint is defined as the point of origin in Fig. 3. The upward direction perpendicular to the joint base is the Z-axis, and the arbitrary rotation of a joint rod in space can be decomposed into rotations around X-and Y-axes. A moving coordinate frame named O-X 1 Y 1 Z 1 is found along the actual joint position after rotating. The axis of the joint rod is directed to Z 1 . Sensor A's position (x, y, z) in O-XYZ is determined after installation, according to the coordinate transformation matrix. Sensor A's location (x', y', z') in O-X 1 Y 1 Z 1 can be expressed as (16) x y z Equation (5) shows that point A coordinates in the O-X 1 Y 1 Z 1 contain the important information-angle components α and β. The ring PM coordinate values in two coordinate frames are the same, because the ring PM is fixed on the joint rod and follows the rod rotation. Therefore, r is defined as the distance of the positive and negative magnetic charge sources to any point in the magnetic field in eq. (2), and it can be understood as the distance vector of PMs to the Hall sensor in the coordinate system. Generally, it can be summarized as a function of α and β.
By substituting eq. (6) into eq. (3) and integrating, the magnetic induction intensity of any point in space produced by the ring PM can also be expressed as a function of α and β.
The Hall sensor A's sensitive measurement direction is the Z-axis, so it could only detect the component of the magnetic induction intensity B Z . The magnetic induction intensity of the A point in the motion frame O-X 1 Y 1 Z 1 is (B X1 , B Y1 , B Z1 ), and it is more convenient and easy to integrate in the moving coordinate frame using eqs. (2) and (3). Thus, by obtaining (B X1 , B Y1 , B Z1 ) in advance and then carrying out coordinate transformation, B Z can finally be obtained.
The output voltage of the Hall sensor is basically proportional to the detected magnetic induction intensity: where K is the sensitivity coefficient of the Hall sensor. According to the rule described, considering the input and output characteristics of the Hall sensor, the relationship between the Hall voltage U and the turning angles α and β can be generally summarized as U i = G(α, β). There are two unknowns; that means that only two equations are needed to obtain results and we just need two Hall sensors in practice. Considering that the magnetic induction intensity exists with a nonlinear variation with the rotation angle, the magnetic induction intensity variation is larger when the distance between the PM and the sensor is smaller. More sensors not only enlarge the range and improve the resolution but also increase the accuracy of the results of the iterative calculation.

Selection and position matching
The ring PM in this experiment was made by sintering a rubidium iron boron permanent magnet N35 in advance. The performance parameters include a remanence of 1.23 T and a relative permeability of 1.1. The ring PM is designed to have an outer radius of 10 mm, an inner radius of 8 mm, and thickness of 4 mm. SS495A1 linear Hall sensors are used in the experiment; their measurement scope of linear induction is −640 to 640 Gauss. For the realization of multi-sensor information fusion, every sensor must work in its own linear range, so the relative position between the PM and the Hall sensors needs adjustment.

Experiment design
The experimental prototype consists of two parts, as Fig. 4 shows. The first part is a comparison calibration device, which not only simulates spherical motion for the ring PM but also provides a standard angle value in the experiment. The structure is very similar to a gyroscope frame, including internal and external frames. The ring PM is installed on the joint rod and then connected to the inside frame. The composite motions of the inner and outer frames make the ring PM achieve spherical rotary motion. Two mechanical angle division heads, which are installed on internal and external shafts, provide standard rotation angle values with 1' accuracy. (17) The second part is the combination of magnets and a Hall sensor. The ring PM is installed on the aluminum alloy rod; the aluminum alloy does not affect the magnetic field distribution. Four sensors are uniformly distributed on the X-Y micromotion stage, and it is convenient for us to adjust the relative position between the Hall sensor and the PM. Figure 5 gives a more detailed description.

Data acquisition system design
In this experiment, four Hall sensors are employed to verify the practicability of the idea. Considering the Hall sensor's temperature drift, four pairs of sensors with similar performance are prepared. One in each pair serves as a measuring sensor installed on a micromotion stage; the other coated with a magnetic shield acts as a reference. The differential output of the Hall sensor is magnified using an AD620 amplifier. Then, the signal is filtered using a Butterworth second-order low-pass filter to become a steady output. An MPC08 data acquisition card picked the signal filtered by the low-pass filter. The follow-up data acquisition and processing were completed using a Labview software platform. Activex technology synthetically calls a Matlab server to complete the data fusion and give a solution. The configuration of the real-time detection system is shown in Fig. 6.

Discussion
A comparison between the measured results of α and β and the given standard angle provided by the mechanical angle division heads was carried out. Figure 7 shows the error distributions of α and β.
The gradation of color represents different error variations in the middle of the image. The angle measurement error distributions of α and β are very similar. The dark area means that the measurement error is large, as the joint rod rotates at large angle. When the input angle is smaller, the measurement error decreases. As α and β both vary in the range of −15° to +15°, the error value is relatively small. Taking the error distribution of α as an example, we show the detailed error data in Table 1.
According to the distribution of error values, the measurement error gradually increases with the expansion of the measurement range. It is very clear that the current accuracy of the method described in this paper cannot satisfy the requirement from precision engineering. Further research must be carried out to improve accuracy and resolution. The main error factors include temperature drift, zero drift, and nonlinear error of Hall sensors. At the same time, the manufacturing and assembling errors of parts also cause some errors. The next step is to focus on the improvement of resolution and accuracy. A hardware circuit can be optimized to overcome the intrinsic characteristics of Hall sensors. On the other hand, a special error separation method may be developed to separate several main errors and perform compensation.

Conclusions
In this paper, a new measurement method for spherical rotation angle is presented, and the experimental results have demonstrated its practicability. In the range of −15° to +15°, the average measurement error of α is 1°6' and that of β is 44'. The next step will focus on optimization of the mechanical and electrical system on sensors. At the same time, the error separation and accuracy calibration will be done. The sensor measurement accuracy and resolution will be improved in the near future.