This paper introduces the principle of dynamic optimized Partial Least Squares Regression.The effect of the principal component number on results has been studied by using the gasoline olefin as the detecting objects.Study results show that using the principal component number of Gasoline olefin model recommended by the method of cross-validation is not optimal and using the method of dynamic optimization to identify principal component number can improve predicted results.The dynamic optimization to identify principal component number can obtain better predicted results than cross-validation.This method can not only effectively improve the predicted effect of the PLS mathematical model,but also is an effective way to setting up a more adaptable mathematical model.