VLabs logo

Virtual Labs
IIT Kharagpur

IIT KGP Logo

Study and Operation of Magnetic Levitation



Fig. 1. Schematic of the Magnetic Levitation (MAGLEV) system



Fig. 2. Experimental setup for Magnetic Levitation control simulation


Steps to perform the simulation

    • The control panel consists of three input signals 'Step', 'Sinusoidal' and 'Square'.
    • After clicking on any input, input parameter box will appear. The parameter values can be changed maintaining the following ranges.
    • Step : 1 ≤ Step size ≤ 5, 1 ≤ Step time ≤ 25. Sinusoidal : 1 ≤ Amplitude ≤ 5, 0.1 ≤ Frequency ≤ 1, Square : 1 ≤ Amplitude ≤ 5, 0.01 ≤ Frequency ≤ 0.1.
    • Click on 'Ok' button in the input parameter box after changing the parameters. Set the desired time for the experiment simulation by changing the value of the corresponding input box (just beside the 'Connect to Target' icon). 10 ≤ Desired time of simulation ≤ 50.
    • The experiment is done for fixed controller values. These can be seen by clicking on PID block in the control panel. Click on 'Ok' button in it.


  1. Fig. 3. Magnetic Levitation (MAGLEV) control panel in simulation

  2. Click on 'Incremental Build' icon in the control panel . Wait till the MAGLEV model is successfully built and an alert message is shown.

  3. Click on 'Connect to Target' icon in the control panel. Wait for the 'Run' icon to get enabled, then click on it.

    • Drag the red ball to exactly between the IR sensors (green boxes) and put there.
    • The response for corresponding input will be shown during levitation of the ball, the red curve shows the input signal and the black curve shows the output signal in the plot.
    • After the given time the ball will fall down.

  4. Click on 'Download Plot' button to download plots. Click on 'Ok' button below the plot to restart the experiment with different input signal following the steps (1-4).