According to the difficult in selecting parameter of SVM when modeling on the gas quantitative analysis, and existing methods need long time,SVM optimized by improved grid search method was proposed to built an infra-red spectrum quantitative analysis of gas. According to this method,the spectrum data of CO2 in vehicle exhaust is optimized. The kernel function leads SVM and calcu-late the concentration. By using improved grid search and PSO to make the contr-ast,quantitatively analyzed 20 different concentrations of CO2 in the concentration range between 0.025%~20%. The experiment results show that this method gets c=0.25,g=2.828 4,PSO gets c=18.302 1, g=0.01,the time of modeling by improved grid search was reduced to one fifth of that of PSO optimization. And the prediction error is less than 5%,in line with national standar-ds for exhaust emissions.