# A New Modeling Method of Angle Measurement for Intelligent Ball Joint Based on BP-RBF Algorithm
## 4 Training Modeling and Experimental Testing  
Similar to the previous simulation analysis, the new prototype requires learning and training to complete the modeling process, that is, to establish the relationship between the five magnetic induction components and the rotation angle in the space of the ball joint. This process is completed on the biaxial angle self-developed calibration device. The experimental process is shown in Figure 12. The M-060.DG angle encoder, of the PI company in Germany, provides a standard rotation angle \(\alpha\) around the \(X\)-axis. The maximum permissible error of the platform is \(\pm 2\)'' and the smallest indexed angle increments is 0.02''. The DP300 rotary table, of the RPI Company in the UK, is used in the vertical direction. It provides the standard angle \(\beta\). Its maximum permissible error is \(\pm 1\)'' and the resolution is 0.2''. To adjust conveniently, the ball socket is removed and three Hall sensor positioning fixtures are fixed directly on the three-dimensional stage. The three-dimensional stage comprises a vertical elevator and a two-axis horizontal displacement stage. The relative position between the Hall sensor and ball (or PM) is adjusted accurately by the microdisplacement mechanism at every stage. Figure 11: Flowchart of upper computer program. Figure 12: Image of experimental device prototype. During learning and training, the experimental device rotates the ball joint in any orientation, and it provides the standard angles of \(\alpha\) and \(\beta\) stepwise at 1\({}^{\circ}\) intervals of rotation. At the same time, the computer records the angle value and the corresponding reading values of the five magnetic sensors, so the data samples can be obtained for training the BP and RBF ANN. After modeling, the actual comparison measurement was still completed on the calibration device. As the \(\beta\) of \(-13^{\circ}\) and the \(\alpha\) from 0\({}^{\circ}\) to \(-4^{\circ}\) are representative, these values were taken as examples. Firstly, the rotation angle \(\beta\) of the RPI controller around the \(Y\)-axis was unchanged at \(-13^{\circ}\), while \(\alpha\) of the PI controller around the \(X\)-axis varied from \(-20^{\circ}\) to \(20^{\circ}\) every \(30^{\prime}\). The output angle value was compared with the indexed value from the PI turntables, the error of which is shown in Figure 13. The variation of the errors in each interval is not obvious. The maximum and minimum \(\alpha\) errors were 7\({}^{\circ}\)58\({}^{\prime\prime}\) and \(-5^{\prime}34^{\prime\prime}\), respectively, and the average error was 1\({}^{\prime}\)44\({}^{\prime\prime}\). The maximum and minimum \(\beta\) angle errors were 6\({}^{\prime}\)18\({}^{\prime\prime}\) and \(-3^{\prime}36^{\prime\prime}\), respectively, and the average error was 46\({}^{\prime\prime}\). The selection of \(\alpha\) was similar to that mentioned above. The control angle of the PI displacement platform was fixed at 8\({}^{\circ}\), and the control angle of the RPI displacement platform changed from \(-7^{\circ}\) to 6\({}^{\circ}\)39\({}^{\prime}\) every 36\({}^{\prime\prime}\). The output value of the intelligent ball joint was measured as shown in Table 1. Within the range of measurement, the maximum value of the \(\alpha\) angle error was 47\({}^{\prime\prime}\), the minimum value was 18\({}^{\prime\prime}\), and the average error was 32\({}^{\prime\prime}\). The maximum value of angle \(\beta\) error was \(-21^{\prime\prime}\) and the minimum value was \(-7^{\prime\prime}\) with an average error of \(-11^{\prime\prime}\).