# Capacitive Angle Sensor Research Using COMSOL Multiphysics
## 2 Basic Principle and Design
The air domain of the model was assumed the ideal insulator. In order to facilitate data statistics and collation, there were four fan-shaped electrodes in one cycle to simulate the capacitance value. Although an error was found during the simulation, the structure was improved. In COMSOL, sector electrodes can be separated from each other by dividing the domain, whereas during the simulation process, it was found that the result had an error if the split domains were close together. This is shown in the red box in Figure 5a (enlarged in Figure 5b). Therefore, an interval was designed at the boundary to reduce the error in the simulation, as shown in Figure 5c. A schematic diagram of the error is shown in Figure 6. Figure 6a shows the size of the interval angle between the two fan-shaped electrodes and the initial capacitance differences between A and D, and B and C. According to the previous principle, at the initial  
Figure 4: (**a**) Overall model with mesh generation and (**b**) middle section of Figure 4a with one cycle of fan-shaped electrodes. Figure 5: (**a**) Domain of division; (**b**) enlarged section corresponding to the red box in (**a**); and (**c**) improvements made to (**b**). moment, the capacitance values of C\({}_{\text{A}}\) and C\({}_{\text{D}}\), and C\({}_{\text{B}}\) and C\({}_{\text{C}}\) should have been the same because they were same area. The capacitance differences in C\({}_{\text{A}}\)-C\({}_{\text{D}}\) and C\({}_{\text{B}}\)-C\({}_{\text{C}}\) should have been zero. However, when the interval angle was zero, the capacitance difference was approximately 0.03 pF. According to the designed parameters, the capacitance value of a single sector electrode plate ranged from 0.15-1.8 pF; this error would affect the calculation of the angle. Figure 6b shows the final C\({}_{\text{A}}\)-C\({}_{\text{C}}\) and C\({}_{\text{B}}\)-C\({}_{\text{D}}\); the two functions were sine and cosine functions with a phase difference of 90 degrees during a complete circle rotation, and there were eight signal cycles within 360\({}^{\circ}\). However, due to the existence of an initial error, the two functions always had different values. Figure 6c shows a single cycle of 45\({}^{\circ}\) data; the difference can clearly be seen. The calculation angle of data in Figure 6c was compared with the theoretical angle; as shown in Figure 6d, there were some nonlinearities. Subtracting each, it was found that the error represented a sinusoidal signal, with a difference ranging from 0.7 to \(-\)0.4 degrees, as shown in the illustration of Figure 6d. The main source of the nonlinearities was the initial capacitance difference, which was primarily caused by fan-shaped electrodes segments without gaps left on the side between the electrodes; this could cause some calculation errors. In order to solve the problem, a certain angle was added between the fan-shaped electrodes. However, the increase in spacing would have occupied the electrode area and reduced the effective measurement area. As shown in Figure 6a, when the spacing reached 0.08\({}^{\circ}\), the error began to approach the constant of 0.0004 pF; therefore, the spacing angle was set at 0.1\({}^{\circ}\). After adjusting the curvature factor, the initial capacitance difference was further reduced to 0.001 pF, which was equivalent to the capacitance difference obtained by rotating 0.005\({}^{\circ}\), so that the final error could be ignored. The model was simulated again; the result is shown in Figure 7.  
Figures 7a and 7b show C\({}_{\text{A}}\)-C\({}_{\text{C}}\) and C\({}_{\text{B}}\)-C\({}_{\text{D}}\), respectively, within the range of 45\({}^{\circ}\) in a single cycle and within the range of 360\({}^{\circ}\) in a full cycle after adjustment. In comparison with Figure 6, it can be seen that the error between calculation angle and theoretical angle was eliminated after adjustment. When comparing Figures 6c and 6b, it can be seen that after adjustment, the original phase difference was maintained, whereas the error was eliminated.