In order to realize the high-precision simulation of star spectrum by star simulator, firstly, the integrated sphere light source mixed with LED and xenon lamp is used to output stable star simulation spectrum, and then an improved genetic algorithm is proposed as the algorithm to solve spectral matching, combining the crossover probability and mutation probability of genetic algorithm with the iteration number, so that it can find the optimal solution by self-evolution. Finally, the Gaussian distribution curve is used as the spectral model of LED, and the improved genetic algorithm is used to simulate the star spectrum of the integrating sphere mixed light source, and compared with simulated annealing algorithm, genetic algorithm and particle swarm optimization algorithm. The simulation results show that the improved genetic algorithm is better than the other three algorithms in spectral matching, and the maximum relative error of star spectral curve matching with color temperature of 2700K is 7.68% in the range of 400 nm-900 nm.