Intelligent vehicles face considerable challenges in the complex traffic environment since they need to deal with various constraints and elements. This dissertation puts forward a novel trajectory planning framework for intelligent vehicles to generate safe and optimal driving trajectories. First, we design a spatiotemporal occupancy framework to deal with all kinds of elements in the complex driving environment based on the Frenét frame. This framework unifies various constraints on the road in the three-dimensional spatiotemporal representation and clearly describes the collision-free configuration space. Then we use the convex approximation method to construct a time-varying convex feasible region based on the above accurate temporal and spatial description. We formulate the trajectory planning problem as a standard quadratic programming formulation with collision-free and dynamics constraints. Finally, we apply the iterative convex optimization algorithm to solve the quadratic programming problem in the time-varying convex feasible region. Moreover, we design several typical experimental scenarios and have verified that the proposed method has good effectiveness and real-time.