In this paper, a trajectory control method for nonminimum-phase system is developed. FZPETC(Frequency-based Zero Phase Error Tracking Control) is a feedforward control method which cancels both phase and gain errors induced by unstable zeros. For this, a trajectory generating method is provided using sinusoidal functions. The composition of sinusoidal functions and the range of frequencies is proposed to generate non-fluctuating shaped trajectory. To solve problems caused by trajectory transition at a via point, trajectory extension method is proposed. The effect of the proposed algorithms is verified through simulations and experiments on a single link flexible arm.