An improved experimental device based on the wavelength scanning method was developed to measure the polarization mode dispersion of polarization maintaining fiber. The algorithm of density of extrema was used to calculate the polarization mode dispersion of fiber. A method to reduce the affection of the noise was applied and the accuracy of the measurement was improved.