| X-ray spectrometer is widely used in mineral exploration,harmful metal detection,aerospace and environmental protection because of its characteristics of nondestructive testing,short measuring time,high degree of automation and harmless to the environment.In this paper,we design an energy dispersive X-ray fluorescence(EDXRF)spectrometer.Through the design of the lower computer hardware system and the improvement of the spectral data processing algorithm,the accuracy is improved to meet the requirements of industrial applications.The energy dispersive X-ray fluorescence(EDXRF)spectrometer designed in this paper is mainly divided into two parts,one is the hardware system of collecting data,the other is the upper computer system of processing spectral data.The hardware system includes the selection of excitation source,the design of optical system,the design and improvement of signal processing circuit,the circuit of multichannel pulse amplitude analyzer and the design of FPGA control program.The upper computer system mainly designs human-computer interface through Lab VIEW,and realizes spectrum data processing with Python.Data processing algorithms includes denoising,background subtraction,recognition of characteristic peaks,and calculation of peak area.In this paper,the advantages and disadvantages of common filtering algorithms are studied and analyzed Stationary wavelet threshold denoising is realized,which has a good result.According to the characteristics of the background produced in this design,we study and analyze the common background subtraction algorithms,the SNIP background subtraction algorithm has the best effect.In the process of feature peak recognition,we propose a peak finding algorithm based on the combination of second-order spline wavelet convolution and Gaussian derivative.The second-order spline wavelet function is used to find the peak.The first-order derivative of Gaussian confirms the inflection point to obtain accurate peak information.Finally,by using the obtained accurate information of the characteristic peaks,the model combining polynomial and Gaussian function is used to fit the characteristic peaks and calculate the peak area,which can also obtain more accurate results when there is noise and background. |