# A Method for Measurement of Absolute Angular Position and Application in a Novel Electromagnetic Encoder System

Authors: Zijian Zhang; Yangyang Dong; Fenglei Ni; Minghe Jin; Hong Liu
Journal: Journal of Sensors
 (2015)

---

## Abstract

For the encoders, especially the sine-cosine magnetic ones, a new method to measure absolute angular position is proposed in the paper. In the method, the code disc of the encoder has only two circle tracks and each one was divided intoN and (N-1) equal code cells. The cell angles, changing from 0° to 360° between any two neighboring code cells, are defined to represent any position on the code disc. The position value of the same point can be represented by different cell angle values of different tracks and the absolute angular position of the point can be obtained by the difference value between the cell angle value of the outer track and the inner one. To validate the correctness of the method theoretically, the derivation process of the method was provided. An electromagnetic encoder system was designed and the experimental platform was established to test the method. The experimental results indicate that the electromagnetic encoder can measure the absolute angular position. Besides, it shows that the method is easy to be realized in algorithm and can reduce computational complexity and decrease dimension of the encoder.


---

## Body

## 1. Introduction

Absolute angular position measurement is very important in industrial applications and robotic systems [1]. There are many different methods for the absolute position sensors especially the encoders.For the optical encoders, based on the arrangement forms of the photodetectors, the methods can be divided into two types. In the first type of the encoding method, the photodetectors are arranged along the radial direction. One method of this type is the natural binary encoding method which makes it easy for the encoders to obtain the absolute rotating angle. However, the encoders are prone to reading errors, especially the cross errors, since more bits may change between adjacent scale sectors [2]. The gray encoding method, another effective way to measure absolute angular position, is widely used in the optical encoders [3]. This method can eliminate the cross errors introduced by the natural binary encoding method. A shortcoming of this method is that it cannot read the angle value directly as the signals should be translated into the natural binary code. As the higher resolution of the encoder, the more tracks are required in these two methods. Therefore, the encoders using this type of method are relatively large and complex [4]. In the other type of the encoding method, all the photodetectors are arranged along the circumferential direction. The matrix encoding is one method of this type. According to it, the code disc of the encoder is divided into different fan-shaped areas. Besides, many reading heads, lying in the same track but different areas, are used to represent different bits of the position information. The dimension of the encoder can be largely reduced. However, measuring errors caused by installation errors of the encoders will be larger than the other two methods mentioned above [5]. The method of pseudorandom encoding is used in [6] to measure the absolute angular position. In this method, the encoder is composed of the synchronization code track and the index code track which helps to decrease the size of the encoder [7]. However, the numbers of the reading heads and the slits will increase exponentially with improving measuring precision of the encoder. Therefore, the method is rarely used in the high-bit encoders. The vernier-type encoders developed in [4, 8] have two or three tracks on the code disc to measure the absolute rotating position, which are simple in construction and compact with other ones. However, the method for measuring absolute position angle should know the numbers of the slits that the encoder has rotated around which is hardly to be obtained in the real application [9]. The M-code coding method proposed in [10] can avoid gross errors and is useful for minimizing the physical size of encoders. However, to achieve higher resolution, absolute encoders using M-code coding method need to incorporate a small slit pitch, which prevents the encoder’s photodetector from obtaining the fixed signal amplitude [11]. With respect to the quasi-absolute encoding method, the code disc of the encoder is composed of a cyclic code track and an index code track. All the effective coding bits of the position are listed on the index code track. Therefore, there should be many photodetectors along the circumferential direction. The method is useful for minimizing the dimension of the encoder, but it needs a bootstrap process to obtain the first position code [12]. Therefore, in some extent, it does not belong to the absolute position measurement method. Using the second-type method, the dimension of the encoders can be largely reduced compared with the other two methods of the first type. However, there are many photodetectors needed in these methods, which is another limitation to increase the measuring resolution and decrease the dimensions of the encoders. Comparing with the optical encoders, the number of the absolute angular position measurement methods of the magnetic encoders is small. For the magnetic encoders with hollow shaft, the encoder typically supports two output channels (channels A and B) which are dephased by 90 degrees with each other. As the Z phase generated once per circle is used to produce the reference point or the zero point in the magnetic encoders, most types of the magnetic encoders are the relative position sensors. Although the multipole ones were studied in [13], the multipoles ones are difficult to be magnetized [14] and to meet the requirements of small-size, high-resolution, and absolute angle detection [15]. For the type of the magnetic encoders with shaft [16, 17], only one circle of sine and cosine signals will be generated and, therefore, the absolute angular position can be easily obtained by the inverse trigonometric functions. However, this type of sensor cannot be fixed on the devices with hollow shaft such as the robot arms.Based on the analysis of the methods used in the optical encoders, developing an absolute angular position measurement method which can decrease dimensions of the encoders and the numbers of the reading heads is necessary. Moreover, if the method can be used not only in optical encoders but also in the magnetic or the electromagnetic encoders, it is much better. Based on this, a novel absolute angular position measurement method which can be widely used in different types of encoders is proposed in the paper. Without loss of generality in the paper, the attention will only focus on the electromagnetic angular encoders in the validation section. The structure of the paper is organized as follows: for a proper analysis of the method, physical modeling and mathematical validation process are required. Therefore, the paper starts with derivation process of the method in Section2. The analytical results have been experimentally verified using a novel electromagnetic sine-cosine encoder system and the implementation details of the validation systems including the sensor system and the experimental platform are discussed in Section 3, whereas the experimental data are presented in Section 4. Final comments and conclusions are stated in Section 5.


## 2. Derivation Process of the Method

According to the measurement method applied in the optical encoders, the method proposed in the paper to measure absolute rotating angle needs the code disc of the encoder to have two tracks. Unlike other methods mentioned above, the two tracks of the encoder can be divided intoN and (N-1) equal code cells, respectively. Angle values of any point on the disc are represented by the cell angle values which are defined in the paper instead of the unique binary codes used in other encoders. In each code cell, the code angles are defined to change from 0 to 360 degrees and any point within the same code cell can be uniquely represented by this angle value. Therefore, any point can be represented by two different angle values. The absolute angular position can be easily obtained from the difference values between code angle values of the same point on different tracks. If any point is represented by the same angle value of different tracks, it is the absolute zero point. Physical modeling and mathematical validation process are shown as follows.


### 2.1. Physical Modeling of the Method

As shown in Figure1, there are two circles, that is, O1 and O2, rotating around the same axis and they have the same absolute zero point O. However, there are N relative zero points which are A11,A12,…,A1N listed uniformly on the circle O1, while the circle O2 is divided equally into (N-1) parts by the relative zero points A21,A22,…,A2(N-1). θ1 and θ2 are the angle values of P1 and P2 relative to the nearest relative zero points along the rotating direction. In the model, the cell angle values changing range between any two neighboring relative zero points is defined from 0 to 360 degrees.Figure 1
Two circles rotating around the same axis.Therefore, the positions of any pointsP1 and P2 on these two circles relative to the absolute zero point O can be expressed as follows:(1)θP1=θ1N+N1×2πN+θ0θ1,θP1,θ0∈0,2π;N=1,2,3,…,n;N1=0,1,2,3,…,N-1(2)θP2=θ2N-1+N2×2πN-1+θ0′θ2,θP2,θ0′∈0,2π;N=1,2,3,…,n;N2=0,1,2,…,N-2,where N1 and N2 are the numbers of the relative zero points between O and P1 and O and P2, respectively. P1 and P2 are two different points on these two circles. θP1 and θP2 are the absolute rotating angle values of the points P1 and P2. θ1 and θ2 are angle values of these points, P1 and P2, relative to the nearest relative zero points, A1N1 and A2N2, along the rotating direction, respectively.Based on the model, ifP1 and P2 have the same rotating angle values relative to the absolute zero point O and θ0=θ0′, the absolute rotating angle position of any point on these two circles can be calculated as follows:(3)θP1=θP2=θ1-θ2ifθ1-θ2≥0θ1-θ2+2πifθ1-θ2<0θ1,θ2,θP1,θP2∈0,2π.


### 2.2. Mathematical Validation of the Method

According to the physical model above, ifP1 and P2 have the same rotating angle values relative to the absolute zero point O, θP1 is equal to θP2. Therefore, (1) is equal to (2). Consider(4)θP1=θ1N+N1×2πN+θ0=θP2=θ2N-1+N2×2πN-1+θ0′.Then(5)θ1-θ2=θ1N+N1×2πN-2πN1-N2+N-1θ0′-θ0θ2N-1+2πN1N-1+2πNN2-N1N-1+Nθ0′-θ0.Taking (1) and (2) into (5),(6)θP1=θ1-θ2+2πN1-N2+N-1θ0-θ0′θP2=θ1-θ2+2πN1-N2+Nθ0-θ0′.As known from the physical model established in the first part, there areN and (N-1) relative zero points on these two different circles and N1 (N2) is the number of the relative zero points between any point P1 (P2) and the absolute zero point O. Therefore, there are two different numerical relationships between N1 and N2 as N1=N2 and N1=(N2+1).(1)
WhenN1=N2, (6) can be simplified as(7)θP1=θ1-θ2+N-1θ0-θ0′θP2=θ1-θ2+Nθ0-θ0′.(2)
WhenN1=(N2+1), (6) can be simplified as(8)θP1=θ1-θ2+2π+N-1θ0-θ0′θP2=θ1-θ2+2π+Nθ0-θ0′.If θ0=θ0′, then(9)θP1=θP2=θ1-θ2whenN1=N2θ1-θ2+2πwhenN1=N2+1,where(10)θ1,θ2,θP1,θP2∈0,2π;N=1,2,3,…,n;N1=0,1,2,…,N-1,N2=0,1,2,…,N-2.The form of (9) is much similar to (3). However, the establishing conditions of the equations are different from each other. Therefore, in the next step, we should find relationships among N1, N2 and θ1, θ2.According to the physical model, there are two circles which haveN and (N-1) relative zero points. The numerical relationships between θ1(θ2) and θP1(θP2) can be established in the following two equations:(11)θ1=NθP1N1=0,θP1∈0,2πNNθP1-2πN1=1,θP1∈2πN,4πN⋮⋮NθP1-2N-1πN1=N-1,θP1∈2N-1πN,2π,(12)θ2=N-1θP2N2=0,θP2∈0,2πN-1N-1θP2-2πN2=1,θP2∈2πN-1,4πN-1⋮⋮N-1θP2-2N-2πN2=N-2,θP2∈2N-2πN-1,2π.From (11) minus (12), we get(13)θ1-θ2=θP1>0N1=N2=0,θP1∈0,2πNθP1-2π<0N1=N2+1=1,θP1∈2πN,2πN-1θP1>0N1=N2=1,θP1∈2πN-1,4πNθP1-2π<0N1=N2+1=2,θP1∈4πN-1,4πN⋮⋮θP1-2π<0N1=N2+1=N-1,θP1∈2N-1πN,2π.Therefore, the conclusion about the common condition which is similar to (13) is generated. Consider (14)N1=N2⟹θ1>θ2N1=N2+1⟹θ1<θ2.From (14), the numerical relationship between N1 and N2 is the sufficient condition to the relationship between θ1 and θ2. However, the relationship between θ1 and θ2 cannot derive relationship of N1 and N2. Therefore, it should be done in the following steps.Asθ0=θ0′ is assumed in the conclusion, (5) can be changed to the following form:(15)Nθ1-θ2=2πNN2-N1+2πN1+θ1.Ifθ1≥θ2, then(16)2πNN2-N1+2πN1+θ1≥0.It is known from the physical model that the numerical relationships betweenN1 and N2 are N1=N2 and N1=N2+1.IfN1=N2, (16) changes to the following form:(17)2πN1+θ1≥0.If N1=N2+1, then(18)2πNN2-N1+2πN1+θ1=2πN1-N+θ1∵N1=0,1,2,3,…,N-1∴2πN1-N+θ1≤2πN-1-N+θ1=-2π+θ1∵θ1<2π∴2πNN2-N1+2πN1+θ1<0.Therefore,(19)θ1≥θ2⟹N1=N2θ1<θ2⟹N1=N2+1.Therefore, from (14) and (19), the following conditions are equivalent: (20)θ1≥θ2⟺N1=N2θ1<θ2⟺N1=N2+1.Summarizing all the mathematical validation process of the method above, (3) has been proved and the method has been validated.


## 2.1. Physical Modeling of the Method

As shown in Figure1, there are two circles, that is, O1 and O2, rotating around the same axis and they have the same absolute zero point O. However, there are N relative zero points which are A11,A12,…,A1N listed uniformly on the circle O1, while the circle O2 is divided equally into (N-1) parts by the relative zero points A21,A22,…,A2(N-1). θ1 and θ2 are the angle values of P1 and P2 relative to the nearest relative zero points along the rotating direction. In the model, the cell angle values changing range between any two neighboring relative zero points is defined from 0 to 360 degrees.Figure 1
Two circles rotating around the same axis.Therefore, the positions of any pointsP1 and P2 on these two circles relative to the absolute zero point O can be expressed as follows:(1)θP1=θ1N+N1×2πN+θ0θ1,θP1,θ0∈0,2π;N=1,2,3,…,n;N1=0,1,2,3,…,N-1(2)θP2=θ2N-1+N2×2πN-1+θ0′θ2,θP2,θ0′∈0,2π;N=1,2,3,…,n;N2=0,1,2,…,N-2,where N1 and N2 are the numbers of the relative zero points between O and P1 and O and P2, respectively. P1 and P2 are two different points on these two circles. θP1 and θP2 are the absolute rotating angle values of the points P1 and P2. θ1 and θ2 are angle values of these points, P1 and P2, relative to the nearest relative zero points, A1N1 and A2N2, along the rotating direction, respectively.Based on the model, ifP1 and P2 have the same rotating angle values relative to the absolute zero point O and θ0=θ0′, the absolute rotating angle position of any point on these two circles can be calculated as follows:(3)θP1=θP2=θ1-θ2ifθ1-θ2≥0θ1-θ2+2πifθ1-θ2<0θ1,θ2,θP1,θP2∈0,2π.


## 2.2. Mathematical Validation of the Method

According to the physical model above, ifP1 and P2 have the same rotating angle values relative to the absolute zero point O, θP1 is equal to θP2. Therefore, (1) is equal to (2). Consider(4)θP1=θ1N+N1×2πN+θ0=θP2=θ2N-1+N2×2πN-1+θ0′.Then(5)θ1-θ2=θ1N+N1×2πN-2πN1-N2+N-1θ0′-θ0θ2N-1+2πN1N-1+2πNN2-N1N-1+Nθ0′-θ0.Taking (1) and (2) into (5),(6)θP1=θ1-θ2+2πN1-N2+N-1θ0-θ0′θP2=θ1-θ2+2πN1-N2+Nθ0-θ0′.As known from the physical model established in the first part, there areN and (N-1) relative zero points on these two different circles and N1 (N2) is the number of the relative zero points between any point P1 (P2) and the absolute zero point O. Therefore, there are two different numerical relationships between N1 and N2 as N1=N2 and N1=(N2+1).(1)
WhenN1=N2, (6) can be simplified as(7)θP1=θ1-θ2+N-1θ0-θ0′θP2=θ1-θ2+Nθ0-θ0′.(2)
WhenN1=(N2+1), (6) can be simplified as(8)θP1=θ1-θ2+2π+N-1θ0-θ0′θP2=θ1-θ2+2π+Nθ0-θ0′.If θ0=θ0′, then(9)θP1=θP2=θ1-θ2whenN1=N2θ1-θ2+2πwhenN1=N2+1,where(10)θ1,θ2,θP1,θP2∈0,2π;N=1,2,3,…,n;N1=0,1,2,…,N-1,N2=0,1,2,…,N-2.The form of (9) is much similar to (3). However, the establishing conditions of the equations are different from each other. Therefore, in the next step, we should find relationships among N1, N2 and θ1, θ2.According to the physical model, there are two circles which haveN and (N-1) relative zero points. The numerical relationships between θ1(θ2) and θP1(θP2) can be established in the following two equations:(11)θ1=NθP1N1=0,θP1∈0,2πNNθP1-2πN1=1,θP1∈2πN,4πN⋮⋮NθP1-2N-1πN1=N-1,θP1∈2N-1πN,2π,(12)θ2=N-1θP2N2=0,θP2∈0,2πN-1N-1θP2-2πN2=1,θP2∈2πN-1,4πN-1⋮⋮N-1θP2-2N-2πN2=N-2,θP2∈2N-2πN-1,2π.From (11) minus (12), we get(13)θ1-θ2=θP1>0N1=N2=0,θP1∈0,2πNθP1-2π<0N1=N2+1=1,θP1∈2πN,2πN-1θP1>0N1=N2=1,θP1∈2πN-1,4πNθP1-2π<0N1=N2+1=2,θP1∈4πN-1,4πN⋮⋮θP1-2π<0N1=N2+1=N-1,θP1∈2N-1πN,2π.Therefore, the conclusion about the common condition which is similar to (13) is generated. Consider (14)N1=N2⟹θ1>θ2N1=N2+1⟹θ1<θ2.From (14), the numerical relationship between N1 and N2 is the sufficient condition to the relationship between θ1 and θ2. However, the relationship between θ1 and θ2 cannot derive relationship of N1 and N2. Therefore, it should be done in the following steps.Asθ0=θ0′ is assumed in the conclusion, (5) can be changed to the following form:(15)Nθ1-θ2=2πNN2-N1+2πN1+θ1.Ifθ1≥θ2, then(16)2πNN2-N1+2πN1+θ1≥0.It is known from the physical model that the numerical relationships betweenN1 and N2 are N1=N2 and N1=N2+1.IfN1=N2, (16) changes to the following form:(17)2πN1+θ1≥0.If N1=N2+1, then(18)2πNN2-N1+2πN1+θ1=2πN1-N+θ1∵N1=0,1,2,3,…,N-1∴2πN1-N+θ1≤2πN-1-N+θ1=-2π+θ1∵θ1<2π∴2πNN2-N1+2πN1+θ1<0.Therefore,(19)θ1≥θ2⟹N1=N2θ1<θ2⟹N1=N2+1.Therefore, from (14) and (19), the following conditions are equivalent: (20)θ1≥θ2⟺N1=N2θ1<θ2⟺N1=N2+1.Summarizing all the mathematical validation process of the method above, (3) has been proved and the method has been validated.


## 3. Validation System of the Method

The validation system will be expatiated in two aspects: working principle of the sensor and the validation system including the encoder system and the experimental platform.


### 3.1. Working Principle of the Encoder System

Working principle of the encoder system is the law of electromagnetic induction which means the mutual inductance voltage can be generated under the effect of the changing magnetic field [18]. As the detailed working principle has been presented in [19], a short description will be given. Configuration of the highly integrated sensor and the code disc of the encoder system can be seen in the left part of Figure 2.Figure 2
Working principle of the sensor.Five copper windings integrated into the sensor are shown in the middle part of the figure. The larger one shown in the figure is injected by high frequency signals from outside and a time-varying magnetic field can be generated. Therefore, the other four small helices located under the larger winding will generate voltage signals. The amplitudes of the voltage signals induced by the four small coils are equal to each other as they have the same dimension and all the distances between central positions of the small coils and the larger one are equal to each other. Two of them with the opposite rotation directions are connected into a group to magnify amplitudes of the signals. Phase difference between voltage signals generated by each group is 90 degrees as there is a radius position difference between the corresponding coils in each group. As one of the copper sheets marked on the code disc moving under the four helices, the high frequency voltage signals will be generated. As copper sheets are with a certain dimension and are laid out with regulated positions relative to the sensor, the regular signals which are sine and cosine signals can be generated if the maximum and minimum values of the signals are selected as shown in the right part of Figure2. To be easily described, the generating process of the signals can be divided into five steps from A to E. Taking the two red secondary coils, for example, when the copper sheet moves to positions A, B, and F, it has little influence or the same effect as the proceeding one on the magnetic fields of the secondary coils. Therefore, the voltages induced by the coils are equal but opposite in direction and, consequently, the output voltage value is equal to zero. However, as the copper sheet moves to points C and E, the output sinusoidal signal obtains the maximum absolute value. As copper sheet moving to point E, the output sinusoidal signal is equal to zero owing to the fact that the sheet has the same impact on the magnetic field of the two secondary coils.


### 3.2. Validation System

All the components of the validation system can be seen from Figure3. The system is mainly composed of five parts: the encoder system, the driven system, the calibration device, the three-dimensional platform, and the assistant components. Configuration of the validation system can be seen in the lower left corner of Figure 3.Figure 3
Validation system.The encoder system is mainly composed of two sensors, the signal processing electrical circuit board and the code disc. Working principle of the encoder system has been illustrated in the section above. The other parts including the signal processing electrical circuit board and the code disc will be described in detail. The part of the system labeled ① in the figure is the electrical circuit board used to process signals and communicate with the CPU (central processing unit). Each sensor will produce two groups of difference signals which aresinP1+, sinP1- and cosP1+, cosP1- separately. Before converting the analog signals to digital ones through the ADC (analog to digital converter), the signals have been filtered and changed to single signals from difference ones. Besides, the signal processing and the absolute position angle calculation process are undertaken by the DSP (digital signal processor). Flow chart of the algorithm can be seen in the DSP part of the figure. To easily calculate P1(P2), a look-up table (Table 1) is established based on the relationships of sinP(P1,P2), cosP(P1,P2), and P(P1,P2). At last, the absolute position angle P should be delivered to the CPU through the SPI (serial peripheral interface) mode. The look-up Table 1 of P can refer to Table 1. The changing range of P is divided into 36 parts equally.Table 1
Look-up table ofP.
sin
⁡
⁡
P
0
0.1736
0.3420
⋯⋯
−0.1736
1
cos
⁡
P
1
0.9848
0.9396
⋯⋯
0.9848
0
P (°)
0
10
20
⋯⋯
350
360The code disc, another part of the encoder system, is labeled ② in Figure3. Substrate material of the encoder is copper-clad laminate. Two circles of copper sheets are listed on it and the numbers of copper sheets in each track are 177 and 176 to satisfy the requirement of the method. Besides, the rotating radiuses of these two sensors’ centers are similar to those of the two circles of copper sheets, respectively. The detailed parameters of the encoder can be seen in ② in Figure 3.Part ③ of the system is the driven system. As shown in the figure, the three main parts of the driven system including the controller board, the driver board, and the motor are numbered sequentially from 1 to 3 in the figure. The driven system can realize the purpose of position control, speed control, and current control. The code disc of the encoder system is fixed on the driven system through the other connection components to have the relative rotation with the electrical circuit board.In fact, part ④, a relative magnetic sensor used to calibrate the absolute electromagnetic position sensor system, has been fixed into the driven system for the purpose of reducing dimensions of the system. The resolution of the magnetic sensor is 14 bits and measuring precision is 0.0001 degrees which can satisfy requirements of calibrating the electromagnetic sensor system.To regulate the relative positions between the code disc and the sensors, the electrical circuit board has been fixed on a three-dimensional platform labeled ⑤ in the figure. It can move alongx-axis, y-axis, and z-axis to ensure the copper sheets and the sensors have the same rotating axis. The resolution of the three-dimensional platform is 0.01 mm.


## 3.1. Working Principle of the Encoder System

Working principle of the encoder system is the law of electromagnetic induction which means the mutual inductance voltage can be generated under the effect of the changing magnetic field [18]. As the detailed working principle has been presented in [19], a short description will be given. Configuration of the highly integrated sensor and the code disc of the encoder system can be seen in the left part of Figure 2.Figure 2
Working principle of the sensor.Five copper windings integrated into the sensor are shown in the middle part of the figure. The larger one shown in the figure is injected by high frequency signals from outside and a time-varying magnetic field can be generated. Therefore, the other four small helices located under the larger winding will generate voltage signals. The amplitudes of the voltage signals induced by the four small coils are equal to each other as they have the same dimension and all the distances between central positions of the small coils and the larger one are equal to each other. Two of them with the opposite rotation directions are connected into a group to magnify amplitudes of the signals. Phase difference between voltage signals generated by each group is 90 degrees as there is a radius position difference between the corresponding coils in each group. As one of the copper sheets marked on the code disc moving under the four helices, the high frequency voltage signals will be generated. As copper sheets are with a certain dimension and are laid out with regulated positions relative to the sensor, the regular signals which are sine and cosine signals can be generated if the maximum and minimum values of the signals are selected as shown in the right part of Figure2. To be easily described, the generating process of the signals can be divided into five steps from A to E. Taking the two red secondary coils, for example, when the copper sheet moves to positions A, B, and F, it has little influence or the same effect as the proceeding one on the magnetic fields of the secondary coils. Therefore, the voltages induced by the coils are equal but opposite in direction and, consequently, the output voltage value is equal to zero. However, as the copper sheet moves to points C and E, the output sinusoidal signal obtains the maximum absolute value. As copper sheet moving to point E, the output sinusoidal signal is equal to zero owing to the fact that the sheet has the same impact on the magnetic field of the two secondary coils.


## 3.2. Validation System

All the components of the validation system can be seen from Figure3. The system is mainly composed of five parts: the encoder system, the driven system, the calibration device, the three-dimensional platform, and the assistant components. Configuration of the validation system can be seen in the lower left corner of Figure 3.Figure 3
Validation system.The encoder system is mainly composed of two sensors, the signal processing electrical circuit board and the code disc. Working principle of the encoder system has been illustrated in the section above. The other parts including the signal processing electrical circuit board and the code disc will be described in detail. The part of the system labeled ① in the figure is the electrical circuit board used to process signals and communicate with the CPU (central processing unit). Each sensor will produce two groups of difference signals which aresinP1+, sinP1- and cosP1+, cosP1- separately. Before converting the analog signals to digital ones through the ADC (analog to digital converter), the signals have been filtered and changed to single signals from difference ones. Besides, the signal processing and the absolute position angle calculation process are undertaken by the DSP (digital signal processor). Flow chart of the algorithm can be seen in the DSP part of the figure. To easily calculate P1(P2), a look-up table (Table 1) is established based on the relationships of sinP(P1,P2), cosP(P1,P2), and P(P1,P2). At last, the absolute position angle P should be delivered to the CPU through the SPI (serial peripheral interface) mode. The look-up Table 1 of P can refer to Table 1. The changing range of P is divided into 36 parts equally.Table 1
Look-up table ofP.
sin
⁡
⁡
P
0
0.1736
0.3420
⋯⋯
−0.1736
1
cos
⁡
P
1
0.9848
0.9396
⋯⋯
0.9848
0
P (°)
0
10
20
⋯⋯
350
360The code disc, another part of the encoder system, is labeled ② in Figure3. Substrate material of the encoder is copper-clad laminate. Two circles of copper sheets are listed on it and the numbers of copper sheets in each track are 177 and 176 to satisfy the requirement of the method. Besides, the rotating radiuses of these two sensors’ centers are similar to those of the two circles of copper sheets, respectively. The detailed parameters of the encoder can be seen in ② in Figure 3.Part ③ of the system is the driven system. As shown in the figure, the three main parts of the driven system including the controller board, the driver board, and the motor are numbered sequentially from 1 to 3 in the figure. The driven system can realize the purpose of position control, speed control, and current control. The code disc of the encoder system is fixed on the driven system through the other connection components to have the relative rotation with the electrical circuit board.In fact, part ④, a relative magnetic sensor used to calibrate the absolute electromagnetic position sensor system, has been fixed into the driven system for the purpose of reducing dimensions of the system. The resolution of the magnetic sensor is 14 bits and measuring precision is 0.0001 degrees which can satisfy requirements of calibrating the electromagnetic sensor system.To regulate the relative positions between the code disc and the sensors, the electrical circuit board has been fixed on a three-dimensional platform labeled ⑤ in the figure. It can move alongx-axis, y-axis, and z-axis to ensure the copper sheets and the sensors have the same rotating axis. The resolution of the three-dimensional platform is 0.01 mm.


## 4. Experimental Results and Analysis

Based on the system established above, the experiment has been done. All the original signals of these two sensors monitored by oscillograph can be seen in Figure4. There are many cycles of signals shown in the upper window of the figure, while the below one is the amplified window of all the signals. CH1, CH2, CH3, and CH4 represent sin1, cos1, sin2, and cos2, respectively.Figure 4
Testing results monitored by oscillograph.There are 90 degrees of phase differences between the signals generated by the same sensor such assin1 and sin2. Therefore, according to the character of the inverse trigonometric function, the angle values of any point can be calculated and, consequently, the angular value curves can be obtained.Figure5 gives us an illustration to the generating process of the absolute angular position. The left part of the figure is the whole generating process of position, while the right part is the amplification window to be easily observed. In Figure 5(a), all the sine and cosine signals are illustrated and the amplitudes of the signal values are transformed to vary from −1 to 1 through signal processing part of the system including hardware and software. Figure 5(b) gives us an illustration to all the angle curves after the rotator rotates 360 degrees. The blue one has 177 circles and the red one has 176 circles. Absolute angular position can be easily obtained as shown in Figure 5(c). The blue one represents the magnetic sensor’s angular position curve, while the red one illustrates angle values measured by the electromagnetic sensor system, respectively. To calibrate the electromagnetic encoder, a magnetic sensor has been fixed in the experimental set-up. In the experiment, angle values measured by the magnetic sensor are defined to be the ideal values. Therefore, comparing with results measured by the magnetic sensor, the errors of the electromagnetic encoder can be obtained as shown in Figure 5(d).Figure 5
Testing results.From Figure5(d), it is easy to obtain that the measuring errors of the electromagnetic sensor are less than 1° which is relatively larger than other sensors. Many different reasons can lead to this. From (3), the calculation equation of the absolute angular position value in the electromagnetic sensor can be expressed as follows:(21)θP=θouter-θinnerifθouter≥θinnerθouter-θinner+2πifθouter<θinnerθouter,θinner,θP∈0,2π.According to the inverse trigonometric function,θouter and θinner can be calculated by sine and cosine signals using arctangent function which can be seen in the following equation: (22)θchange=θouter-θinner=arctansin⁡1cos⁡1-arctan⁡sin⁡2cos⁡2.Therefore, the absolute angular position value can be easily obtained using the four groups of the original signals.There is no error caused by the method ifθouter and θinner are the theoretic values. However, in fact, the values are not equal to their ideal values which will cause errors to the measuring precision of the sensor system. In this system, there are mainly two reasons that can lead to this.The first one is the approximation of thearctan function. As is known, the arctan function is not continuous curves in the interval [0, 2π] and the theoretic values of θouter and θinner cannot be acquired. Besides, the signals are analog ones and they should be transformed to the digital ones in the signal processing part which are the approximation values, too. However, all the reasons above cannot be avoided in the application and they play limited roles in causing errors of the sensor. Therefore, they can be ignored in the analysis of the error causing reasons.The second one is the changes of all the signals including the amplitudes and phases. Amplitude changes can be easily observed from Figure4. The influence of the reason on the absolute angular position can be expressed in the following equation: (23)θactual=arctan⁡A1Ssin⁡θ1+Δθ1SA1Ccos⁡θ1+Δθ1C-arctanA2Ssin⁡θ2+Δθ2SA2Ccos⁡θ2+Δθ2C.In the equation above,sinθ1, cosθ1, sinθ2, and cosθ2 correspond to sin1, cos1, sin2, and cos2, respectively.Consequently, the errors of the encoder system can be shown in the following equation:(24)Errors=θ-θactual=arctan⁡sin⁡θ1cos⁡θ1-arctan⁡sin⁡θ2cos⁡θ2-arctan⁡A1Ssin⁡θ1+Δθ1SA1Ccos⁡θ1+Δθ1C-arctanA2Ssin⁡θ2+Δθ2SA2Ccos⁡θ2+Δθ2C.In the equation above, the amplitudes ofA1S and A1C, A2S and A2C are not equal to each other in some cases. The phase difference of the signals such as Δθ1S and Δθ1C, Δθ2S and Δθ2C will exist and the phase of the signals generated by the same senor is not the same anymore. Therefore, the measurement errors will be brought about. Besides, the angle errors will be amplified if there are errors in the arctan function.The changes of amplitudes and phases are caused by different reasons such as the distance differences between the encoder and two sensors, the sensors not perpendicular to the encoder, and the errors of the input voltage. Therefore, in the near future, the manufacturing and assembly precisions of the sensor system and the experimental platform should be improved. All in all, correctness of the method has been validated by the experiment.


## 5. Conclusion

To measure the absolute angular position, a method including physical modeling and mathematical analysis has been proposed in the paper. Besides, to validate the method, an electromagnetic encoder system and the testing platform have been established. Comparing the experimental results of the electromagnetic encoder with position information obtained from a magnetic sensor, the conclusion that the method can be used to measure absolute angular position is obtained. Some prominent characteristics of the method can be listed as follows:(1)
Using this method, the structure of the encoder is simple and easy to be designed. Besides, the size of the encoder can largely be compacted. For example, the encoder system designed in the paper is based on an application in a robot arm. The inner diameter is required to be 45 mm. Based on the method, the outer diameter of the code disc is 70 mm and the width of the encoder system is just 5.9 mm (sensor width: 0.9 mm, encoder disc width: 1.5 mm, the electrical circuit board: 1.5 mm, the highest component: 1 mm, and distance between the code disc and the sensors: 0.2 mm). It is more compact than the other absolute sensors on the market such as the magnetic encoders.(2)
Algorithm of the method is simple and easy to be realized. The calculation algorithm can be decreased as there is no need to change analog signals to digital ones.(3)
It is friendly to customers. As the exporting signals are analog ones, the suitable interpolation ratio can be set by the customers as they are willing to.(4)
The method is suitable to be used in the encoders especially when their output signals are sine-cosine analog signals. It is because the code angle value, which is defined as changing from 0° to 360°, can be easily obtained if full circles of sine and cosine signals can be generated within a code cell.Although the purpose of validating the correctness of the method has been achieved, there are many limitations in the paper and some further works should be done. First, measurement precision of the sensor system is about ±0.5 degrees which is low compared with other sensors such as the optical sensors whose resolution can reach up to3.4e-4 degrees (20 bits). It is mainly caused by manufacturing and assembly errors of the encoder system and the testing platform. The further work should be focused on improving manufacturing and assemblage precisions of all the systems. On the other hand, the method is only applied to the electromagnetic encoder system exporting sine-cosine signals. In fact, the method has no demand for the forms of the signals whether they are the analog or the digital ones. Therefore, it may be an alternative choice for the measurement of absolute angular position used in other encoders such as the optical encoders. For example, under conditions of nonincreasing dimensions and complexity of the senor, the measuring precision can be improved if the encoder of the sensor is divided into several equal sections. This will be addressed in the near future.



---

*Source: 503852-2015-05-27.xml*