In this paper, the levitation rigidity for the levitated crossbeam of the gantry numerical control machine tool which can eliminate friction and increase machining precision is discussed. The feedback linearization and sliding mode control methods are presented in this paper in order to achieve steady levitation. The nonlinear electromagnetic levitation system is transformed into linear system by using feedback linearization method. The sliding mode control method is adopted for improving the robustness of the levitation system. Simulation results show that the system has more powerful ability of suppressing disturbance and high rigidity compared with that using conventional PI control method.