For cooperative adaptive cruise control (CACC) system, a robust following control algorithm based on fuzzy PID principle is adopted in this paper. Firstly, a nonlinear vehicle dynamics model considering the lag of driving force and acceleration constraints was established. Then, with the vehicle’s control hierarchic, the upper controller takes the relative speed between vehicles and the spacing error as inputs to output the following vehicle's target acceleration, while the lower controller takes the target acceleration as inputs and the throttle opening and brake master cylinder pressure as outputs. For the setting of target spacing, this paper additionally considers the relative speed between vehicles and the acceleration of the front vehicle. Through testing, compared with the traditional variable safety distance model, the average distance reduces by 5.43% when leading vehicle is accelerating, while increases by 2.74% in deceleration. For the fixed-speed cruise mode, a set of logic judgment algorithm is used to replace the traditional method of designing an extra set of PID controller, which reduces the algorithm complexity while achieving the same control effect. Finally, Simulink/Carsim co-simulation test was carried out in different conditions. The distance error was less than 0.2m under the variable speed following condition, and the spacing error was less than 0.8m under the sudden braking condition where the acceleration of the pilot vehicle was -0.7g. The vehicle can easily switch smoothly between the following mode and the constant speed mode under the cutting-in and cutting-out conditions of the leading vehicle. Our system meets the safety requirements under all conditions, the changing trend of the speed curve and acceleration curve of the following car in each working condition and is more moderate than that of the front car, so as to ensure the comfort of passengers.