## 4 Design of Roll Angle Detection Module
### Parameter Optimization of Tracking Loops  
In addition to the noise bandwidth and damping ratio, the integration time \(T_{roll}\) of the integrate and dump process in the roll angle detection module, also has great influence on the tracking loops. As shown in Figure 9, the integrate and dump process works as a low-pass filter to filter out high-frequency noises in \(i_{r}(n)\) and \(q_{r}(n)\). When the integration time is not large enough, the discriminators could suffer, due to residual errors caused by high-frequency components of \(i_{r}(n)\) and \(q_{r}(n)\) which eventually lead to a reduction of the tracking accuracy. After the integration process, \(I_{r}(n)\) and \(Q_{r}(n)\) can be represented as:  
\[I_{r}(n)=\sin\mathrm{c}(\Omega_{e}T_{roll})\cos\Bigl{[}\Omega_{e}\Bigl{(}t(n)+ \tfrac{1}{2}T_{roll}\Bigr{)}+\Phi_{e}\Bigr{]}-\sin\mathrm{c}(\Omega_{0}T_{roll} )\cos\Bigl{[}\Omega_{0}\Bigl{(}t(n)+\tfrac{1}{2}T_{roll}\Bigr{)}+\Phi\Bigr{]} \tag{27}\]  
\[Q_{r}(n)=\sin\mathrm{c}(\Omega_{e}T_{roll})\sin\Bigl{[}\Omega_{e}\Bigl{(}t(n)+ \tfrac{1}{2}T_{roll}\Bigr{)}+\Phi_{e}\Bigr{]}-\sin\mathrm{c}(\Omega_{0}T_{roll} )\sin\Bigl{[}\Omega_{0}\Bigl{(}t(n)+\tfrac{1}{2}T_{roll}\Bigr{)}+\Phi\Bigr{]} \tag{28}\]  
where \(\Omega_{e}\) is the frequency error, \(\Omega_{0}\) is the sum of frequencies, \(\Phi_{e}\) is the phase error and \(\Phi\) is the sum of phases between the roll modulation signals and local replicas. Generally, \(\Omega_{0}\) can be taken as high-frequency components of \(I_{r}(n)\) and \(Q_{r}(n)\) that can be removed by the integration process, as long as the integration time is more than 5 times the period of input signals. In that case, the longest integration time could reach 1.67 s at 3 Hz, which is barely possible to achieve, because the integration time cannot be too long, due to the limitation of real-time performance and pull-in ranges of the frequency discriminators [22]. The high-frequency components of \(I_{r}(n)\) and \(Q_{r}(n)\) must be eliminated by other methods, except for extending the integration time. One method to solve this problem is to set the integration time equal to integer multiple of the period of input signals. The formula derivation of this method is given by:  
\[\sin\mathrm{c}(\Omega_{0}T_{roll})=\sin\mathrm{c}(2 nf_{r}T)=\sin\mathrm{c}(2n )=\sin(2n\pi)/2n\pi=0 \tag{29}\]  
where \(\Omega_{0}=2f_{r}\), \(T_{roll}=n/f_{r}=nT\), (\(n=1,2,\dots\) ), at the circumstances that the frequency of the input signals \(f_{r}\) has been locked by FLL. To verify the theoretical analysis and figure out the optimal parameter settings, simulations have been carried out. The typical simulation results are shown in Figures 14-16. The sampling rate is 1000 Hz. As we can see from Figures 14-16, when the integration time \(T_{roll}\) is half of the period (\(T_{roll}=(2n-1)\ T/2\), \(n=1,\,2,\,3\ \dots\)), the phase errors of tracking results appear to be larger. When the integration time \(T_{roll}\) is integer multiple of the period (\(T_{roll}=nT\), \(n=1,\,2,\,3\ \dots\)), the phase errors appear to be the slightest. And when the integration time is more than 5 times larger than the period of input signals (\(T_{roll}\geq 5T\)), it has little effect on the tracking precision, which exactly proves our analysis. When the frequency of the roll modulation signals changes during the tracking process, and the period of the input signals becomes longer than the original integration time, the tracking accuracy would be worse, or even, the loop could be unlocked. In order to track the frequency-varying signals  
Figure 14: Tracking process at rotational speed of 5 Hz, \(B_{\rm FLL}=0.3\) Hz, \(B_{\rm PLL}=0.3\) Hz, \(\zeta=0.3\). (**a**) is the tracking result at \(T_{roll}=100\) ms, (**b**) is at \(T_{roll}=200\) ms.  
Figure 15: Tracking process at rotational speed of 40 Hz, \(B_{\rm FLL}=0.3\) Hz, \(B_{\rm PLL}=0.5\) Hz, \(\zeta=0.5\).