## 2 Position-Based Repetitive Torque Observer and Compensation Strategy  
### Disturbance Torque Observer  
In order to estimate the cogging torque of a PM machine, a classical disturbance torque observer, as shown in Figure 2a, utilizes the input current and the output speed information of the motor. For the case where the observer model is well estimated, i.e., \(\hat{J}=J\), \(\hat{B}=B\), and \(\hat{K}_{t}=K_{t}\) the PI controller suppresses the speed error \(E_{\omega}\) to approach zero, and the cogging torque \(\hat{T}_{Cog}\) can be estimated simultaneously. Figure 1: Proposed structure for cogging torque estimation and torque compensation strategy. Since the rotor speed information is obtained by a filtered derivation method based on the encoder position data, which might cause delay for the estimated rotor speed and then mislead the results, an alternative observer structure that utilizes the encoder data directly is proposed, as shown in Figure 2b. The output of the modified structure is the motor position, which is compared with the encoder position information directly to estimate the cogging torque. Since the rotor speed is replaced by the rotor position in the modified structure, the PI controller is replaced by the PD controller with gain designed as \(\widetilde{K}_{D\_TOB}=K_{P\_TOB},\widetilde{K}_{P\_TOB}=K_{I\_TOB}\) for the equivalence of these two structures. Another advantage of the proposed structure is that the motor speed information can be obtained directly from the observer as the speed control feedback. The physical cogging torque model can be represented as given below [10]:  
\[T_{Cog}(\theta_{m})=\sum_{n=1}^{\infty}C_{n}\sin(nN_{L}\theta_{m})=\sum_{n=1}^ {\infty}C_{n}\sin(nN_{L}\omega_{m}t), \tag{1}\]  
where \(N_{L}\) is the least common multiple of the stator slots number and the rotor poles number, and \(C_{n}\) is the amplitude of the \(n\) th harmonic. The fundamental frequency of the cogging torque can be expressed as \(\omega_{Cog}=N_{L}\omega_{m}\). Note that the observer bandwidth \(\omega_{TOB}\) should be designed to be 10 times higher than the fundamental cogging torque frequency such that  
\[\omega_{TOB}\geq 10\big{|}\omega_{Cog}\big{|} \tag{2}\]  
Correspondingly, the observer bandwidth is 10 times higher than that of the speed control loop such that  
\[\omega_{TOB}\geq\big{|}10\cdot 2\pi f_{\omega}\big{|} \tag{3}\]  
If the observer model is well estimated, the transfer function from the cogging torque to its estimation is given by  
\[\frac{\hat{T}_{Cog}(s)}{T_{Cog}(\theta_{m})}=\frac{(\widetilde{K}_{D\_TOB}+ \widetilde{K}_{P\_TOB})/\hat{\hat{\jmath}}}{s^{2}+(\hat{\beta}+\widetilde{K} _{D\_TOB})s/\hat{\hat{\jmath}}+\widetilde{K}_{P\_TOB}/\hat{\jmath}}=H(s) \tag{4}\]  
Let the magnitude of \(H(s)\) at the bandwidth frequency of \(\omega_{TOB}\) be described as:  
\[\frac{\big{|}H(j\omega_{TOB})\big{|}^{2}}{\big{|}H(0)\big{|}^{2}}=\frac{1}{2} \tag{5}\]  
Then,  
\[\hat{\jmath}^{2}\omega_{TOB}^{4}-(2\hat{\jmath}\widetilde{K}_{P\_TOB}+ \widetilde{K}_{D\_TOB}^{2}-2\hat{\beta}\widetilde{K}_{D\_TOB}-\hat{\beta}^{2} )\omega_{TOB}^{2}-\widetilde{K}_{P\_TOB}^{2}=0 \tag{6}\]  
Figure 2: (a) Torque disturbance observer; (b) Modified structure based on position measurement. Let the zero of \(H(s)\) be less than the designed bandwidth and close to the origin such as:  
\[s=\frac{-\overline{K}_{p\_TOB}}{\overline{K}_{D\_TOB}}=-n\cdot\omega_{TOB},\ n<<1 \tag{7}\]  
Combining Equations (7) and (8), the observer parameters can be solved as:  
\[\left\{ \begin{array}{c}\overline{K}_{D\_TOB}=\frac{-(2n\hat{f}\cdot\omega_{TOB }-2\hat{B})+\sqrt{(2n\hat{f}\cdot\omega_{TOB}-2\hat{B})^{2}+4(n^{2}+1)(P\omega_ {TOB}^{2}+\hat{B}^{2})}}{2(n+1)}\\ \overline{K}_{P\_TOB}=n\omega_{TOB}\cdot\overline{K}_{D\_TOB}\end{array} \right.