The dynamic transmission error between driving and driven gears of a gear mechanism with torsional mode is induced by periodic time-varying mesh stiffness. In this study, to minimize the adverse effect of this time-varying mesh stiffness, a nonlinear controller which adjusts the torque acting on the driving gear is proposed. The basic approach is to modulate the input torque such that it compensates the periodic change in mesh stiffness. It is assumed that gears are assembled with high precision and gearbox is analyzed by a finite element software to calculate the mesh stiffness curve. Thus, change in the mesh stiffness, which is inherently nonlinear, can be predicted and canceled by a feed-forward loop. Then, remaining linear dynamics is controlled by pole placement techniques. Under these premises, it is claimed that any acceleration and velocity profile of the input shaft can be tracked accurately. Thereby, dynamic transmission error is kept to a minimum possible value and a spur gearbox, which does not emit much noise and vibration, is designed. (C) 2016 Elsevier Ltd. All rights reserved.