In order to realize the positioning and precise detection of small objects such as electronic chips,two kinds of low distortion optical lens which can be used in machine vision are designed with Zemax software.The focal length is 28.5 mm,and the object field of view is 10 mm. A traditional refractive lens,with all spherical surfaces,consisting of six lenses with a total length of 90 mm is obtained through optimization design. At the spatial frequency of 100lps/mm,the MTF of all fields of view is higher than 0.5,and the maximum distortion is-0.078%.On the basis,a refractive diffractive hybrid lens,consisting of four lenses,is further optimized. The total length is 75 mm,MTF is above 0.55 at the same spatial frequency,and the maximum distortion of 0.071%. Considering the influence of diffraction efficiency of the diffractive surface on MTF,the actual MTF of the mixed system is still higher than 0.52.Through simulation design,students can not only understand the design characteristics of machine vision lens,but also exercise their innovative ability.