In this paper an adaptive controller is presented that addresses the coupling effects between two groups of electromagnetic trains. The main application of DEM (Double Electro-Magnet) is rapid rail transportation. Since the number of passengers is stochastic, the mass of the train will be variable too. On the other hand, due to the variation of the DEM parameters (such as coil inductance) in a real environment, the system is to be controlled in a proper manner. The proposed method in this paper overcomes all of these problems. The module, based on some reasonable assumptions of nonlinear mathematical model, is modeled as a double-electromagnet system. The proposed algorithm has a satisfying performance in tracking in presence of unknown changes in the mass. The advantage of the proposed algorithm in comparison to non-linear controllers is that knowing the mass changes is not necessary. It is also important to make sure that a control system is robust against measurement noises, because all sensors collect noise from the environment. Due to the presence of input and output perturbation, the new proposed algorithm shows satisfying performance. The results show that the proposed method is less sensitive to perturbation in the input.