The linear flux-switching permanent-magnet (LFSPM) machine is a novel linear brushless ac machine with magnets and armature windings in the short mover, which is a competitive candidate for direct-drive applications due to the inherent sinusoidal back-electromotive force and high force capability. However, the resulting cogging force is serious because of the double salient structure. In this paper, a one-tooth model for the cogging force mechanism and a method for cogging force analysis are introduced. Moreover, an optimization method for minimizing the cogging force and an optimized design for the LFSPM machine are proposed. Both the finite-element analysis and the test measurement verify that the analytical method and the optimization technique are correct and effective, and these methods can be applied to cogging force analysis in the other double salient permanent-magnet machines.