# A New Modeling Method of Angle Measurement for Intelligent Ball Joint Based on BP-RBF Algorithm
## 1 Introduction  
Precision ball joints are widely used in parallel robots and measuring instruments, however, they cannot automatically acquire their orientation in space. With the support of the National Natural Science Foundation of China, we have developed a method to measure the rotation angle of a precision ball joint. As shown in Figure 1a, a permanent magnet (PM) was embedded on the ball and a Hall sensor array was arranged in the ball socket. When the ball rotates in any direction with the rod, the PM will also rotate around the ball center, resulting in a variation of the magnetic induction intensity component. The angle of rotation about the \(X\)-axis is given by \(\alpha\), while that about the \(Y\)-axis is given by \(\beta\). The Hall sensor array captures the variation. Based on the equivalent magnetic charge method (EMCM), a measuring model between the reading of the Hall sensor and the rotation angle in the space of the ball joint was established. Figure 1b shows the first prototype [1, 2]. The modeling process based on the EMCM is shown in Figure 2. The basic coordinate system \(O\)-\(XYZ\) was established with the ball center as the origin \(O\) and the axis of the ball joint as the \(Z\)-axis vertically upward. The ball moves from the initial position \(M\) to \(M^{\prime}\). The rotational motion of the ball in the ball socket can be decomposed into a rotation angle around the \(X\)-axis and a rotation angle around the \(Y\)-axis. At this time, the dynamic coordinate system \(O\)-\(X^{\prime}Y^{\prime}Z^{\prime}\) was established with the ball center as the origin and the axis of the ball joint as the \(Z\)-axis vertically upward. As shown in Figure 2, the three Hall sensors \(S_{1}\), \(S_{2}\), and \(S_{3}\) were placed in the ball socket. Taking one sensor \(S_{1}\) as an example, the modeling process based on the EMCM is described. It is supposed that the coordinates of \(S_{1}\) are (\(x_{0}\), \(y_{0}\), \(z_{0}\)) in the base coordinate system and (\(u\), \(v\), \(w\)) in the moving coordinate system. In the latter system of \(O\)-\(X^{\prime}Y^{\prime}Z^{\prime}\), using the EMCM, when the ball rotates from the initial position \(M\) to \(M^{\prime}\), the magnetic induction component at the position of \(S_{1}\) can be expressed as \(B_{M^{\prime}}=\) (\(B_{x}\), \(B_{y}\), \(B_{z}\)). According to the coordinate transformation formula, the three-dimensional component of the magnetic induction intensity at the position of \(S_{1}\) in the moving coordinate system \(O\)-\(X^{\prime}Y^{\prime}Z^{\prime}\) can be converted to the three-dimensional component in the basic coordinate system \(O\)-\(XYZ\)  
Figure 1: The prototype of intelligent ball joint. (**a**) Schematic diagram of intelligent ball joint; (**b**) photo of intelligent ball joint. \[\left\{ \begin{array}{c}B_{x}=B_{x}{{}^{\prime}}\cos\beta+B_{z}{{}^{\prime}}\sin \beta\\ B_{y}=B_{x}{{}^{\prime}}\sin\alpha\cdot\sin\beta+B_{y}{{}^{\prime}}\cos\alpha-B_ {z}{{}^{\prime}}\sin\alpha\cdot\cos\beta\\ B_{z}=-B_{x}{{}^{\prime}}\cos\alpha\cdot\sin\beta+B_{y}{{}^{\prime}}\sin\alpha+B _{z}{{}^{\prime}}\cos\alpha\cdot\cos\beta\end{array} \right. \tag{1}\]  
where \(B_{x}\), \(B_{y}\), and \(B_{z}\) are the magnetic induction components of the sensor in the base coordinate system and \(B_{x}\), \(B_{y}\), and \(B_{z}\) are the magnetic induction components of the sensor in the moving coordinate system; \(\alpha\) and \(\beta\) are as previously defined. The three Hall sensors were placed horizontally on the prototype and their magnetic induction values are their axis directions.