Keyword

1 Introduction

Positioning system is a device for spatial position measurement, which is widely used in virtual reality, artificial intelligence and other fields. At present, the more common positioning methods are ultrasonic positioning, photoelectric positioning, inertial positioning and electromagnetic positioning. Motion tracking technology is a practical research topic with wide application prospects. Its application fields include animation, games, virtual reality, medicine, biomechanics and so on. Positioning technology and navigation system are the methods to obtain the spatial position and attitude of the target. They play a very important role in many fields, such as mobile communication, medical instruments, transportation, wearable portable devices and military [1, 2]. It is necessary to track the head position and attitude parameters of pilots in aviation simulation aircraft. According to the implementation means of positioning, the system can be divided into:

  1. (1)

    Electromagnetic navigation system

    Use electric field, magnetic field or electromagnetic field to locate and navigate the target. The advantage of this navigation method is that it can penetrate some obstacles for information transmission and realize six degrees of freedom positioning and tracking; The disadvantage is that it is easy to be disturbed by metals or ferromagnetic substances in the environment. Electromagnetic positioning technology is widely used in radar positioning, GPS positioning system and navigation system of medical instruments. Electromagnetic positioning and navigation technology can be applied not only in long-distance positioning system, but also in short-distance precision positioning system. Because human physiological activities do not affect the distribution of magnetic field in the body, electromagnetic positioning technology has unique advantages in the field of medicine.

  2. (2)

    Optical navigation system

    Although light wave is also a kind of electromagnetic wave, the light wave navigation system is very huge, which is introduced and studied separately as a navigation system. Optical navigation system is a navigation system that uses visible light, infrared light or X-ray to locate. It is widely used in military and medical fields. The utility model has the advantages of simple structure, portability, easy carrying and high positioning accuracy; The disadvantage is that it is limited to the line of sight and cannot pass through or around obstacles. Although X-ray penetration is strong, it will cause radiation damage to human body when used in medical field.

  3. (3)

    Ultrasonic navigation system

    Ultrasound is widely used in the medical field, which can be used for medical imaging, medical diagnosis and other applications. For example, in gastroscope, ultrasonic probe is usually included for navigation and imaging. The advantages of ultrasonic positioning and navigation technology are simple, convenient and cheap; The disadvantage is that the transmission distance of ultrasonic wave is relatively short, and the attenuation speed is different in different substances, so the range of positioning and navigation is limited.

  4. (4)

    Inertial navigation system

    Inertial navigation system applies the gravity of the earth and the inertial navigation of moving objects. It is mainly used to judge the motion state and attitude of moving objects. Before, the inertial navigation system was relatively large and heavy, so it was inconvenient to apply. With the progress of microelectronic technology, there are micro acceleration sensors and micro gyroscopes, and even inertial sensors (make the accelerometer and gyroscope in one chip), so the inertial navigation system has become simple and lightweight. However, the application of inertial navigation in the measurement of head pose has some disadvantages, such as large volume, long-time use of gyroscope drift, alignment and poor accuracy of position parameters.

To sum up, electromagnetic tracking is a suitable means of head posture. The receiving coil is small and can be placed in the helmet, and the transmitting coil is placed on the engine room opening frame [3].

At present, in order to improve the accuracy, speed and anti-interference of electromagnetic positioning, researchers have put forward more and more electromagnetic positioning methods. According to different classification methods, electromagnetic positioning technology is divided into different categories. According to the number of magnetic field sources in the positioning system, the electromagnetic positioning system can be divided into two categories [4].

  1. (1)

    Single source system

    Single source system refers to the electromagnetic positioning system that contains only one electromagnetic field source. Early electromagnetic positioning systems used this design method. This kind of positioning system is relatively simple, with fast positioning speed and small amount of calculation, but the positioning accuracy is not high, so it can be used in occasions with low accuracy requirements.

  2. (2)

    Multi source system

    The multi-source system contains two or two electromagnetic field sources, which are combined into a certain form of array, which can greatly improve the positioning accuracy.

    In terms of anti noise ability, the traditional model-based magnetic positioning system is vulnerable to the electromagnetic interference of the surrounding environment, so the service conditions are relatively harsh. If it is used in occasions with serious electromagnetic noise, the accuracy will be greatly reduced [5, 6].

Aiming at the main problems existing in the current electromagnetic tracking system, from the perspective of improving the positioning accuracy and tracking speed of the system, this paper proposes a six-dimensional magnetic tracking algorithm based on weighted double transmitting coils and a magnetic positioning algorithm based on phase discrimination technology.

2 Method

2.1 Positioning Principle

The standard attitude positioning system is composed of two three-axis magnetic field sources and three-axis magnetic sensors. As shown in Fig. 1, the coordinate systems S1 and S2 are established with the center point of the two magnetic field sources as the coordinate origin respectively. The three axes of the two coordinate systems coincide with the three axes of the magnetic field source respectively, and the coordinate system S3 is established with the midpoint of the magnetic sensor as the coordinate origin, and its three axes coincide with the three axes of the magnetic sensor. Assuming that the distance between the center points of two magnetic field sources is D, the spatial position (x, y, z) and attitude of the magnetic sensor can be calculated according to formulas (1) and (2).

$$\mathrm{x}=\frac{\mathrm{dtan}{\upgamma }_{2}}{\mathrm{tan}{\upgamma }_{1}+\mathrm{tan}{\upgamma }_{2}}$$
$$\mathrm{y}=\frac{\mathrm{dtan}{\upgamma }_{2}\mathrm{tan}{\upgamma }_{2}}{\mathrm{tan}{\upgamma }_{1}+\mathrm{tan}{\upgamma }_{2}}$$
(1)
$$\mathrm{z}=\frac{\mathrm{x}}{\mathrm{tan}{\updelta }_{1}}$$
$${\mathrm{R}}_{13}={\mathrm{R}}_{43}{\mathrm{R}}_{14}={{\mathrm{R}}_{34}}^{-1}{\mathrm{R}}_{14}$$
(2)

As shown in Fig. 1, γj, j = 1, 2 is the included angle between the projection of the sensor on the xoy plane of the coordinate system SJ and the positive half axis of the X axis, and j represents the number of the coordinate system; δ 1 is the included angle between the projection of the sensor on the xoz plane of the coordinate system S2 and the positive half axis of the Z axis. In order to express the attitude of the sensor conveniently, that is, the relationship between the sensor coordinate system S3 and the system coordinate system S1, this paper defines two additional coordinate systems S4 and S5. S4 takes the center point of magnetic field source 1 as the coordinate origin, and its X-axis direction is connected along the coordinate origin of S1 and S3, that is, R1 and S5 take the center point of magnetic field source 2 as the coordinate origin, and its X-axis direction is connected along the coordinate origin of S2 and S3, R2. At the same time, Rab represents the rotation matrix from Sa to sb.

Fig. 1.
figure 1

Schematic diagram of electromagnetic positioning system

If the coil of magnetic field source 1 in the y-axis direction is excited with a sinusoidal signal of a certain frequency and amplitude, and the coil of magnetic field source 1 in the z-axis direction is excited with a cosine signal of the same frequency and amplitude, as shown in Fig. 2. Obviously, there is a phase difference between the square of the synthetic magnetic induction detected by the magnetic sensor and the square of the cosine excitation signal. We found that the magnitude of the phase difference will change with the relative position between the magnetic sensor and the magnetic field source. Therefore, it is assumed that there is some relationship between the two. After repeated theoretical derivation and experimental verification, it shows that there is not only a relationship between them, but also a linear relationship—the phase difference is twice the projection angle [7]. If the coil is excited in some way, the projection angle can be obtained by measuring the phase difference between the square of the synthetic magnetic induction intensity at the position of the sensor and the square of the excitation signal of the magnetic field source, and then the six degree of freedom position of the target can be calculated [8].

Fig. 2.
figure 2

Schematic diagram of transmitting coil and receiving coil

2.2 Location Algorithm

The projection angle is derived below γ1. The same method can also be used to calculate γ2 and δ1. Figure  1 shows a schematic of the process. If the coil 1 and coil 2 in the magnetic source 1 represented by S11 and S12 flow through the phase orthogonal currents I1 and I2, the phase difference between the square of the excitation of the magnetic source and the square of the total magnetic flux density at the sensor position will change when the target moves. Through theoretical derivation, it can be seen that this relationship is not only fixed, but also linear. The phase difference between the square of the cosine excitation of the magnetic source and the square of the total magnetic flux density at the sensor position is the projection angle γ Twice as much as 1. The derivation is as follows [9, 10].

We use B = (BX, BY, BZ) to represent the total magnetic flux density, which can be expressed as:

$$\left\{\begin{array}{c}{\mathrm{B}}_{\mathrm{x}}=\frac{{\upmu }_{0}\mathrm{SI}}{4\uppi {\mathrm{r}}^{3}}\left(\frac{3\mathrm{x}(\mathrm{mx}+\mathrm{ny}+\mathrm{pz})}{{\mathrm{r}}^{2}}-\mathrm{m}\right)\\ {\mathrm{B}}_{\mathrm{y}}=\frac{{\upmu }_{0}\mathrm{SI}}{4\uppi {\mathrm{r}}^{3}}\left(\frac{3\mathrm{y}(\mathrm{mx}+\mathrm{ny}+\mathrm{pz})}{{\mathrm{r}}^{2}}-\mathrm{n}\right)\\ {\mathrm{B}}_{\mathrm{z}}=\frac{{\upmu }_{0}\mathrm{SI}}{4\uppi {\mathrm{r}}^{3}}\left(\frac{3\mathrm{z}(\mathrm{mx}+\mathrm{ny}+\mathrm{pz})}{{\mathrm{r}}^{2}}-\mathrm{p}\right)\end{array}\right.$$
(3)

where (m, N, P) represents the magnetic moment of the magnetic dipole, μ 0 represents the vacuum permeability, s represents the area surrounded by circular current, I represents the current intensity, and R represents the distance between the center of the sensor and the center of the magnetic source. Now, suppose that S11 is fed with current I1 = I cos(ωt + ϕ 0), S12 is fed with current I2 = I sin(ωt + ϕ 0), and S13 is fed without current. Therefore, we can see that (m, N, P) = (COS(ωt + ϕ0), sin(ωt + ϕ 0), 0). For simplicity, we define k = (u0SI/4 π R3) as a constant related to the target position and assume φ 0 equals zero. The magnetic field strength (BX,BY, BZ) can be expressed as:

$$\left\{\begin{array}{c}{\mathrm{B}}_{\mathrm{x}}=K\left(\frac{3\mathrm{x}(\mathrm{xcos\omega t}+\mathrm{ysin\omega t})}{{\mathrm{r}}^{2}}-\mathrm{cos\omega t}\right)\\ {\mathrm{B}}_{\mathrm{Y}}=K\left(\frac{3\mathrm{y}(\mathrm{xcos\omega t}+\mathrm{ysin\omega t})}{{\mathrm{r}}^{2}}-\mathrm{sin\omega t}\right)\\ {\mathrm{B}}_{\mathrm{z}}=K\left(\frac{3\mathrm{z}(\mathrm{xcos\omega t}+\mathrm{ysin\omega t})}{{\mathrm{r}}^{2}}\right)\end{array}\right.$$
(4)

B generated by such excitation coils is the total flux density at the sensor position, which can be expressed as Bx, By and Bz as follows:

$${\mathrm{B}}^{2}={\mathrm{B}}_{\mathrm{x}}^{2}+{\mathrm{B}}_{\mathrm{y}}^{2}+{\mathrm{B}}_{\mathrm{z}}^{2}$$
$$=\frac{{\mathrm{k}}^{2}}{{\mathrm{r}}^{2}}(3{\left(\mathrm{xcos\omega t}+\mathrm{ysin\omega t}\right)}^{2}+{\mathrm{r}}^{2})$$
$$=\frac{{\mathrm{k}}^{2}}{{\mathrm{r}}^{2}}(3{\left(\sqrt{{x}^{2}+{y}^{2}}\mathrm{sin}(\mathrm{\omega t}+\upgamma 1)\right)}^{2}+{\mathrm{r}}^{2})$$
(5)

where, tanγ1 = y/x. According to the double angle formula, B2 can be expressed in the following form:

$${\mathrm{B}}^{2}=-\frac{3{\mathrm{k}}^{2}\left({x}^{2}+{y}^{2}\right)}{2{\mathrm{r}}^{2}}\mathrm{cos}\left(2\mathrm{\omega t}+2\upgamma 1\right)+\frac{3{\mathrm{k}}^{2}\left({x}^{2}+{y}^{2}\right)}{2{\mathrm{r}}^{2}}+{\mathrm{k}}^{2}$$
$$=\mathrm{cos}\left(2\mathrm{\omega t}+\Delta \mathrm{\varphi }\right)+\mathrm{N}$$

where \(\Delta \mathrm{\varphi }=2\upgamma 1\), M = −(3k2(x2 + y2)/2r2), N = −M + k2.

M and N are constants related to the target position. S11 square can be expressed as (Fig. 3):

$${\mathrm{i}}_{1}^{2}={\mathrm{I}}^{2}{\mathrm{cos}}^{2}\mathrm{\omega t}=\mathrm{Ucos}2\mathrm{\omega t}+\mathrm{V}$$
(6)
Fig. 3.
figure 3

Schematic diagram of emitter current

Where U and V are constants. It is obvious from formulas (5) and (6) that the phase difference between the square of the total flux density at the sensor position and the square of the excitation current i1 is 2γ1. γ1 is the included angle between the projection of the sensor on the xoy plane and the positive x-axis, as shown in Fig. 2. Therefore, we can obtain the projection angle by measuring the phase difference between B2 and i12.The position of the target can be determined from three angles γ1, γ2 and δ1. Confirm. The projection angle is obtained according to formula (5) and formula (6) γ1. When S11 is fed with current i1, S12 is fed with current i2. Because in our method, the two magnetic sources are constructed in the same way. Therefore, using the same method, when S21 feeds in the current i1 and S22 feeds in the current i2, it can be obtained γ2, and when S13 feeds in current i1 and S11 feeds in current i2, it can be obtained δ1.Then, the position of the target can be calculated according to formula (1).

Figure 4 shows the relationship between positioning error and signal-to-noise ratio of phase difference algorithm and amplitude algorithm.

Fig. 4.
figure 4

Location error and signal-to-noise ratio of different algorithms

2.3 Orientation Algorithm

Define rotation matrix R = rot (y, β) Rot(x, α), among

$$\mathrm{Rot}(\mathrm{Z},\upgamma )=\left(\begin{array}{ccc}\mathrm{cos\gamma }& -\mathrm{sin\gamma }& 0\\ \mathrm{sin\gamma }& \mathrm{cos\gamma }& 0\\ 0& 0& 1\end{array}\right)$$
$$\mathrm{Rot}(\mathrm{y},\upbeta )=\left(\begin{array}{ccc}\mathrm{cos\beta }& 0& \mathrm{sin\beta }\\ 0& 1& 0\\ -\mathrm{sin\beta }& 0& \mathrm{cos\beta }\end{array}\right)$$
$$\mathrm{Rot}(\mathrm{x},\mathrm{\alpha })=\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos\alpha }& -\mathrm{sin\alpha }\\ 0& \mathrm{sin\alpha }& \mathrm{cos\alpha }\end{array}\right)$$
(7)

Then the component of the magnetic field in each direction in the positioning coordinate system is the product of the magnetic field component of the rotation matrix and the emission coordinate system, and the component of the magnetic field in each direction in the positioning coordinate system is the product of the magnetic field component of the rotation matrix and the emission coordinate system.

$$\begin{gathered} \left(\begin{array}{c}{\mathrm{B}}_{\mathrm{x}}^{\mathrm{^{\prime}}}\\ {\mathrm{B}}_{\mathrm{y}}^{\mathrm{^{\prime}}}\\ {\mathrm{B}}_{\mathrm{z}}^{\mathrm{^{\prime}}}\end{array}\right)=\mathrm{R}\left(\begin{array}{c}{\mathrm{B}}_{\mathrm{x}}\\ {\mathrm{B}}_{\mathrm{y}}\\ {\mathrm{B}}_{\mathrm{z}}\end{array}\right) \hfill \\ =\left(\begin{array}{c}\mathrm{cos\alpha cos\beta }\times {\mathrm{B}}_{\mathrm{x}}+\left(-\mathrm{sin\alpha cos\gamma }+\mathrm{cos\alpha sin\beta sin\gamma }\right)\times {\mathrm{B}}_{\mathrm{y}}+(\mathrm{sin\alpha sin\beta }+\mathrm{cos\alpha sin\beta cos\gamma })\times {\mathrm{B}}_{\mathrm{z}}\\ \mathrm{sin\alpha cos\beta }\times {\mathrm{B}}_{\mathrm{x}}+\left(\mathrm{cos\alpha cos\gamma }+\mathrm{sin\alpha sin\beta sin\gamma }\right)\times {\mathrm{B}}_{\mathrm{y}}+(-\mathrm{cos\alpha sin\gamma }+\mathrm{sin\alpha sin\beta cos\gamma })\times {\mathrm{B}}_{\mathrm{z}}\\ -\mathrm{sin\beta }\times {\mathrm{B}}_{\mathrm{x}}+\mathrm{cos\beta sin\gamma }\times {\mathrm{B}}_{\mathrm{y}}+\mathrm{cos\beta cos\gamma }\times {\mathrm{B}}_{\mathrm{z}}\end{array}\right) \hfill \\ \end{gathered} $$
(8)

3 Different Coil Opening Options

The distance between the magnetic induction device and the transmitting coil is too close and too far, which will bring large errors. Figure 5 shows the curve between the distance and position error of one receiving device and two left and right transmitting devices.

Fig. 5.
figure 5

Distance and position error curve of receiving device and transmitting device

It can be seen that taking the left transmitting coil as the coordinate zero point, when the detected distance is within 680 mm, the receiving coil receives the data of the left transmitting coil. When it exceeds 680 mm, the right transmitting coil is opened and the receiving coil receives the magnetic data of the right transmitting coil.

4 Build the Actual System

Build a magnetic sensing device in the laboratory as shown in Fig. 6. In the Fig. 1 is the magnetic induction system, 2 and 3 are two transmitting coils, and 4 is the signal acquisition equipment. Figure 7 is a comparison diagram of the position parameters actually calculated and tested by the laser positioning system. The attitude parameters are determined by the rotation angle of the manipulator. Table 1 shows the positioning and attitude errors of the magnetic position and attitude sensing system.

Fig. 6.
figure 6

Laboratory magnetic positioning system

Fig. 7.
figure 7

Position error diagram of magnetic positioning system

Table 1. Positioning and attitude error table

5 Conclusion

This paper describes an algorithm based on phase difference to realize the pilot's head position and attitude test system of flight simulator. Compared with the amplitude calculation of position and attitude, the accuracy and anti-interference ability have been greatly improved. At the same time, in order to improve the accuracy, two transmitting coils and one receiving coil are used. The coils have different distances and the errors are inconsistent. Different weighting processing is used to reduce the system error.