Ultrasonic assisted machining (UAM) is an efficient nontraditional machining operation for brittle, hard-to-cut and poor-machinability materials. In UAM, high frequency oscillation in ultrasonic range at low amplitude is imposed on the workpiece or cutting tool. In most cases, the equipments that generates and transfers the vibration, have a complicated structure, and requires significant effort to achieve their optimum function. In this work, a mathematical model is developed and an optimization method is employed for design process. This makes it possible to achieve proper setup and reduce the amount of calculation. For this purpose, the combination of a two level full factorial design is performed with data that are obtained from finite element model(FEM)are used. Based on the mathematical model, an objective function is defined with the objective of maximizing the vibration amplitude at longitudinal resonance frequency of 22 kHz. Genetic algorithm is used to optimize the design parameters according to the defined objective function. The obtained results are shown just an error about 0.03 percent between FEM modal analysis and mathematical model answer. The advantages of the proposed optimization method in ultrasonic setup design in case of complicated geometries is discussed. Therefore optimization methods via FEM data could be regarded as an efficient approach for design of complicated structures.