| Energy dispersive X-ray fluorescence spectrometer is an instrument used to measure the kinds and contents of elements in samples.Because of its advantages of non-destructive and multiple elements analysis,it has been widely used in prospecting,aerospace and other fields.A laboratory desktop energy dispersive X-ray fluorescence spectrometer is developed in this paper,.The data processing algorithm is improved to improve the intelligence and accuracy of the spectrometer.The spectrometer designed in this paper consists of excitation source,light path,detector,signal processing circuit,multi-channel pulse amplitude analyzer and computer.The excitation source chooses X-ray tube with adjustable energy and the detector chooses Si-PIN with electric refrigeration.The 3D model designed by SolidWorks is used to fabricate the optical path structure,and a variety of filters and collimators are used to reduce the background.Signal processing circuit and multi-channel pulse amplitude analyzer are designed to convert detector signal into spectrum.The computer is programmed by Labview and Python.The user interface is programmed by Labview,and the data processing algorithm is implemented by Python.The spectral data processing steps include denoising,background subtraction,peak detection and area calculation.In view of the disadvantage that most current denoising algorithms need more parameters,a Fourier transform denoising method based on cross-validation is proposed.This method uses cross validation theory to estimate the optimal threshold of Fourier transform denoising.In view of the characteristics of X-ray tube background,the polynomial fitting method based on maximum filtering is improved.The method first fits the spectrum by polynomial,then removes the points with large fitting deviation to automatically distinguish the peak area from the background area.Then,the optimal number of polynomials is determined according to whether there is a negative number of fitting results.Combining the advantages of Top-hat filter and Gauss derivative,this paper presents a feature peak detection method based on Top-hat filter and Gauss derivative.In this method,Top-hat filter is used to find the peak and Gauss first derivative is used to find the inflection point.In this paper,the Gauss function with linear background is used to fit the characteristic peaks,and the area of overlapping peaks can be estimated even if the spectrum contains noise and background. |