## 2 Materials and Methods
\begin{array}{c}x\prime=(y\sin\alpha+z\cos\alpha)\sin\beta+x\cos \beta\\ y\prime=y\cos\alpha-z\sin\alpha\\ z\prime=(y\sin\alpha+z\cos\alpha)\cos\beta-x\sin\beta\end{array} \right. \tag{6}\]  
Finally, the orthogonal projection coordinate (\(x,y\)) was as follows:  
\[\left\{ \begin{array}{c}x\prime=(y\sin\alpha+z\cos\alpha)\sin\beta+x\cos \beta\\ y\prime=y\cos\alpha-z\sin\alpha\end{array} \right. \tag{7}\]  
The rotation order could be changed, which depended on the users' need. The above formulas were only an example of rotation. As is shown in Equation (7), the depth value information of the \(Z\)-axis was contained in the orthogonal projection coordinate, after rotating by \(\alpha\) and \(\beta\) degrees. In some occasions, it might also be needed to rotate around the \(Z\)-axis by a certain angle of \(\gamma\). Then the transformation formula should have been changed as follows:  
\[\left[ \begin{array}{cccc}x^{\prime}&y^{\prime}&z^{\prime}&1\end{array} \right] =\left[ \begin{array}{cccc}x&y&z&1\end{array} \right]\cdot\left[ \begin{array}[] {cccc}\cos\gamma&\sin\gamma&0&0\\ -\sin\gamma&\cos\gamma&0&0\\ 0&0&1&0\\ 0&0&0&1\end{array} \right] \tag{8}\]  
In this paper, the STFT algorithm was used as the time-frequency analysis method in the embedded fault diagnosis devices. Given a signal \(x(\tau)\) and a sliding window function \(w(\tau)\), the STFT of the signal \(x\) was defined as follows [16]:  
\[F_{x}^{w}(t,f)=\int x(\tau)w_{t,f}(\tau-t)e^{-\jmath 2\pi f\tau}\mathrm{d}\tau \tag{9}\]  
Spectrogram was the squared magnitude of the STFT, expressed as the following:  
\[ \begin{array}{c}S_{s}^{w}(t,f)=\left|F_{x}^{w}(t,f)\right|^{2}\\ =\left|\int_{-\infty}^{+\infty}s(\tau)w(\tau-t)e^{-2\pi f\tau}\mathrm{d}\tau \right|^{2}\end{array}  \tag{10}\]  
As is shown in Equation (10), the time-frequency spectrogram contained three-dimensional information--time (\(T\)), frequency (\(F\)), and amplitude (\(A\)). The joint time-frequency distribution matrix was a 2D array. Supposed that the signal length was \(L\), the window length was \(W\), and the sliding step was \(s\), then the window number \(n\) could be obtained by Equation (11). \[n=\text{int}\bigg{(}\frac{L-W}{s}\bigg{)}+1 \tag{11}\]  
The matrix size was \(2m\times n\), where \(2m\) represented for \(2m\)-point fast Fourier transform (FFT). Due to the symmetry of a Fourier transform, only the first half \(m\times n\) data of the joint time-frequency distribution matrix was taken to display. Mesh surface was composed of longitude and latitude lines, corresponding to the intersection of time line and frequency line. Then the value of \((f,\,t,\,a)\) in the joint time-frequency distribution matrix was corresponded to the value of \((x,y,z)\), in the orthogonal projection formula. The proposed SMSG algorithm could be described by six steps. **Step 1**: Frequency axis (\(X\)-axis) was divided into \(m\) equal units, and time axis (\(Y\)-axis) was divided into \(n\) equal units. Let \(\Delta f\) and \(\Delta t\) denote the length and width of the mesh unit, respectively. All the points in the joint time-frequency distribution matrix were formed into a 3D coordinate matrix \(p[m][n]\). \(p[m][n]=(x_{i},\,y_{j},\,z_{ij})=(f_{i},\,t_{j},\,a_{ij})\). **Step 2**: The coordinates of the points should be rotated by a certain angle around the \(X\)-axis, \(Y\)-axis, and \(Z\)-axis, based on actual demand. **Step 3**: All 3D coordinates of \(p[m][n]\) was projected onto the 2D coordinates of \(proj[m][n]\), where \(proj[m][n]\) was obtained by an orthogonal projection of \(p[i][j]\). **Step 4**: Starting with \((i,j)=(0,0)\), the four vertices of \(proj[i][j]\), \(proj[i+1][j]\), \(proj[i+1][j+1]\) and \(proj[i][j+1]\) were connected with a brush to form a mesh. Then the mesh surface was rendered with a different color. **Step 5**: After each single mesh surface was drawn, the point of \(proj[i+1][j]=(f_{i}+\Delta f,t_{j})\) would be dealt in a sequential order of frequency, namely along the positive direction of the \(X\)-axis.