## 1 Introduction  
Time-frequency analysis is an effective method to detect machine faults under variable speed conditions [1]. The conventional time-domain or frequency-domain analysis cannot fully describe the real-life signal, whose frequency content varies with time [2]. To gain frequency-related, as well as time-related information, of non-stationary and non-periodic signals, it is recommendable to use analysis in time-frequency domain [3]. In the process of fault diagnosis and condition monitoring, it is often necessary to display 3D graphics under different working conditions [4]. For example, the Short-Time Fourier transform (STFT) of signals require a time-frequency distribution map, for precise analyzing.  
The most common tool used for fault diagnosis and 3D display is general purpose computers, such as Personal Computers (PC) [5]. Usually the signal data will be collected in fields and then be taken to a PC for a thorough analysis. For example, a computer-based method for rolling element bearing defect diagnosis, under a variable speed operation, through an angel synchronous averaging of wavelet denoising estimation has been suggested in previous articles [6]. This kind of an online method can be powerful and comprehensive but also suffers from some drawbacks, such as not being a real-time system, having a long period, being expensive, and not being portable to transport [7].  
Embedded fault diagnosis devices are widely used in field testing, due to their good performance, in terms of size, and ease of showing wave forms on a Liquid Crystal Display (LCD) screen, in real time. However, at present, most of the embedded fault diagnosis devices can only provide two-dimensional (2D) forms, such as time-domain waves or frequency spectrum waves. Among them, [PERSON] and [PERSON] have analyzed rotor bar failures, based on the obtained Fast Fourier Transform spectrum in embedded systems [8]. [PERSON] et al. have successfully displayed several envelope-order spectrums of motor bearing vibration signals in a portable device [9]. In this paper, an embedded system, instead of a traditional PC, is used to carry out the time-frequency analysis and the three-dimensional (3D) time-frequency spectrogram display.  
MSG is a very common method in finite element modeling. The idea of using a mesh surface to represent 3D graphics is referenced and is specially applied to a spectrogram display, in this paper. In order to get correct 3D graphics, a very important problem--Hidden Surface Removal (HSR) must be solved. The commonly used algorithms of HSR, include the painter's algorithm, the Z-buffer algorithm, and the BSP tree algorithm [10]. Among these classical methods, the painter's algorithm is the most suitable way for dealing with the HSR problem of simple polygons. For example, [PERSON] et al. have implemented a painter's algorithm to render poly-ranges in a multiple-view oceanographic visualization system [11]. A kind of space hidden method of 2.5D statistical cartographic symbols, based on the painter's algorithm was put forward in a study by [PERSON] et al. [12]. [PERSON] et al. has established the occlusion model of truck, by applying the painter's algorithm [13]. However, there are few methods for 3D display in embedded devices. The painter's algorithm suffers from high complexity, heavy system spending, and long computation time. It cannot be used directly in embedded devices, which have limited memory sizes and strict timeliness requirements [8].  
In this paper, a Spectrogram Mesh Surface Generation (SMSG) algorithm for a time-frequency spectrogram display is presented, and the method is applied to an embedded fault diagnosis system. Although the method is based on the painter's algorithm, it requires no sorting algorithm for time-frequency spectrograms. Therefore, it costs little time and the graph can be rotated with a certain angle for observation, during the drawing process. The proposed algorithm can also be applied to plot other parametric equation surfaces.