As one of advanced driver assistance systems (ADAS), automatic parking system has great market prospect and application value. In this paper, based on an intelligent vehicle platform, an automatic parking system is designed by using multi-point preview theory. The vehicle kinematics model was established, based on Ackermann steering principle. By analyzing working conditions of parallel parking, complex constraint condition of parking trajectory is established and reference trajectory based on sine wave is proposed. In addition, combined with multi-point preview theory, the design of trajectory following controller for automatic parking is completed. The cost function is designed, which consider the trajectory following effect and the degree of easy handling. The optimization of trajectory following control is completed by using the cost function. In order to validate automatic parallel parking algorithm proposed in this paper, the simulation based on DYNA4 and real vehicle test are carried out. According to the simulation and real vehicle test results, the vehicle can well follow the reference trajectory to complete automatic parking. In the simulation, the longitudinal error and the lateral error are 4cm and 6cm, respectively. In the real vehicle test, longitudinal error is less than 3cm, lateral error is less than 5cm, and the test results meet the requirements of parallel parking.