In many robotic applications and inertially stabilized electro-optic gimbal systems, precise positioning and speed control are highly important concepts. Due to size and weight limitations, motor is required to be small but torque density is desired to be high. In high torque and cheap PMSM and BLDC motors, cogging torque and friction are usually the challenging disturbance sources. In this study, cogging torque and friction are identified using position sensors which already exist in gimbal systems, so the cost of the system is not increased. Identified disturbances are rejected with feedforward algorithms. With only cogging torque compensation, 30-65% of the tracking error is removed in a feedback control system. The development of a controller design for a low-cost gimbal motor is presented and the following topics are discussed; accurate frequency response function measurement of gimbal system, controller design with "loop shaping" method according to system requirements, output disturbance sensitivity analysis. We also examine the controller implementation issues in an embedded world with their practical considerations.