In this paper, we design an optimal robust control to address the problem of position tracking control for permanent magnet linear motor (PMLM). The uncertainties in PMLM system, including parameters uncertainty and external disturbance, are nonlinear and time-varying. The uncertainties are assumed to be bounded, and the bounds are described via fuzzy sets. Then, a model-based robust control in deterministic form is proposed. Furthermore, an optimal robust control for PMLM system is formulated as a fuzzy performance index optimization problem, which associated with both the fuzzy system performance and the control cost. The resulting optimal control can guarantee the uniform boundedness and uniform ultimate boundedness. Moreover, on the experimental platform, rapid controller prototyping cSPACE is designed to avoid long time programming and debugging, and provides great convenience for practical operation. Numerical simulations and real-time experimental results are finally presented to illustrate the effectiveness of the optimal robust control for PMLM. INDEX TERMS Fuzzy set theory, optimal control, permanent magnet motors, robust control, uncertainty.