  Currently, the engineering of miniature spectrometers mainly faces three
problems: the mismatch between the number of filters at the front end of the
detector and the spectral reconstruction accuracy; the lack of a stable
spectral reconstruction algorithm; and the lack of a spectral reconstruction
evaluation method suitable for engineering. Therefore, based on 20 sets of
filters, this paper classifies and optimizes the filter array by the K-means
algorithm and particle swarm algorithm, and obtains the optimal filter
combination under different matrix dimensions. Then, the truncated singular
value decomposition-convex optimization algorithm is used for high-precision
spectral reconstruction, and the detailed spectral reconstruction process of
two typical target spectra is described. In terms of spectral evaluation, due
to the strong randomness of the target detected during the working process of
the spectrometer, the standard value of the target spectrum cannot be obtained.
Therefore, for the first time, we adopt the method of joint cross-validation of
multiple sets of data for spectral evaluation. The results show that when the
random error of positive or negative 2 code values is applied multiple times
for reconstruction, the spectral angle cosine value between the reconstructed
curves becomes more than 0.995, which proves that the spectral reconstruction
under this algorithm has high stability. At the same time, the spectral angle
cosine value of the spectral reconstruction curve and the standard curve can
reach above 0.99, meaning that it realizes a high-precision spectral
reconstruction effect. A high-precision spectral reconstruction algorithm based
on truncated singular value-convex optimization, which is suitable for
engineering applications, is established in this paper, providing important
scientific research value for the engineering application of
micro-spectrometers.
