Aiming at the non-linear error of the traditional turbidity sensor, which can"t meet the demand of directly measuring the turbidity in water, a support vector machine method is proposed to compensate its performance. The performance of compensation is determined by the penalty coefficient and kernel parameter in SVM. The traditional method of finding parameters in SVM is slow and requires a lot of computation, which has some limitations. An improved grid search method is proposed to optimize support vector machine (SVM) for the selection and optimization of its parameters. That is to say, the improved grid search method is used to optimize the selection and compensation of water quality turbidity monitoring sensor compensation system. The experimental results show that the measurement accuracy of SVM based on grid search method is 93.0%, and the measurement errors meet the actual standard requirements.