# Investigation on the Measurement Method for Output Torque of a Spherical Motor
## 3 Experimental Test of Output Torque for a PMSM
### Principles of Experimentation  
The coordinate system \(\mathrm{O_{p}X_{p}Y_{p}Z_{p}}\) of the rotor is defined as a reference to describe the position of the rotor. It is a right-hand dynamic coordinate system. The origin O is always coincident with the origin of the stator coordinate system OXYZ, which is defined in Figure 2. As shown in Figure 9, the coordinate system OXYZ is coincident with \(\mathrm{O_{p}X_{p}Y_{p}Z_{p}}\) when the rotor does not rotate. When the rotor of the PMSM is moving to one direction, without considering friction force its dynamics can be expressed according to [PERSON]'s Equations of second kind [17,18], and its output torque can be derived as follows:  
\[\mathbf{Torque}_{output}=\mathbf{M}\ddot{\mathbf{Q}}+\mathbf{C}(\mathbf{Q}, \dot{\mathbf{Q}})\dot{\mathbf{Q}} \tag{6}\]  
where \(\mathbf{Torque}_{output}\in\mathbf{R}^{3}\) is the output torque vector of the PMSM. \(\mathbf{Q}\in\mathbf{R}^{3}\) is the rotor angular displacement vector; \(\mathbf{M}\) is the rotor inertia matrix. \(\mathbf{C}(\mathbf{Q},\dot{\mathbf{Q}})\) is the Gothic and centrifugal force matrix and can be ignored under the condition of rotation around the constant axis. \(\mathbf{M}\) is denoted as:  
\[\mathbf{M}=\left( \begin{array}{ccc}I_{xx}&0&0\\ 0&I_{yy}&0\\ 0&0&I_{zz}\end{array} \right) \tag{7}\]  
where \(I_{xx}\), \(I_{yy}\) and \(I_{zz}\) are the moments of inertia that are relative to each coordinate axis of OXYZ. Substituting Equation (8) into Equation (7) the relationship between the output torque and the rotor angular acceleration is expressed as:  
\[\mathbf{Torque}_{output}=I_{xx}\alpha_{x}+I_{yy}\alpha_{y}+I_{zz}\alpha_{z} \tag{8}\]  
Figure 8: Current of No. 2 stator coil. Figure 9: The motion trajectory in the measurement coordinate system. \(\mathbf{\alpha}_{x}=\left[ \begin{array}{cccc}\alpha_{x}&0&0\end{array} \right]^{T}\), \(\mathbf{\alpha}_{y}=\left[ \begin{array}{cccc}0&\alpha_{y}&0\end{array} \right]^{T}\) and \(\mathbf{\alpha}_{z}=\left[ \begin{array}{cccc}0&0&\alpha_{z}\end{array} \right]^{T}\) are rotor angular acceleration components decomposed into X-, Y-, Z-axis, respectively. Moreover, the rotor angular acceleration vector \(\tilde{\mathbf{Q}}\) can be expressed as \(\tilde{\mathbf{Q}}=\mathbf{\alpha}_{x}+\mathbf{\alpha}_{y}+\mathbf{\alpha}_{z}\). Obviously, \(\mathbf{Torque}_{output}\) can be obtained if the moment of inertia and angular acceleration vector \(\tilde{\mathbf{Q}}\) can be measured on the basis of the known rotor material, size and structure. The moments of inertia can be calculated by using the ADAMS software. The simulation results of the moment of inertia of each coordinate axis in the coordinate system are respectively obtained as \(I_{xx}=0.00798(\text{kg}\cdot\text{m}^{2})\), \(I_{yy}=0.00797(\text{kg}\cdot\text{m}^{2})\), \(I_{\text{zz}}=0.00803(\text{kg}\cdot\text{m}^{2})\). The remaining challenge is to obtain the components of rotor angular acceleration \(\alpha_{x}\), \(\alpha_{y}\), and \(\alpha_{z}\) using the dynamic information obtained by the MEMS gyroscope sensor. Define \(S_{x}\), \(S_{y}\) and \(S_{z}\) as components of the unit position vector of the rotor \(\mathbf{S}\) on each coordinate axis of OXYZ. \(i\) represents the time sequence number of the rotor position vector that is collected by the sensor, and \(T_{s}\) represents the sampling time. By using the MPU6050 gyroscope sensor, the components \(S_{x}(i)\), \(S_{y}(i)\), and \(S_{z}(i)\) can be measured during the sampling time [19]. The formula for calculating \(S_{x}(i)\), \(S_{y}(i)\), and \(S_{z}(i)\) via Euler angles can be obtained as follows:  
\[\left\{ \begin{array}{l}S_{x}(i)=\sin\gamma(i)\cos\psi(i)+\cos\gamma(i)\sin \theta(i)\sin\psi(i)\\ S_{y}(i)=\sin\gamma(i)\sin\psi(i)-\sin\theta(i)\cos\gamma(i)\cos\psi(i)\\ S_{z}(i)=\cos\theta(i)\cos\gamma(i)\end{array} \right.