The paper is focused on creating a mathematical model of a magnetic levitation plant and usage of the model for a design of a predictive controller. The magnetic levitation laboratory plant CE 152 by Humusoft Company is used to determine values of model parameters and for real time control experiments. From the control point of view, the CE152 represents a nonlinear and very fast system. Both the mathematical model and the model predictive controller are created using MATLAB / Simulink environment. This environment extended by Real time toolbox is used for real time experiments with the laboratory plant.