The MEGLEV system is based on PI controller using ARDUINO microcontroller, as the levitating object goes far from the reference point the current through the electromagnetic coil is increased to pull back the object on reference & vice versa, maintaining a constance from the electromagnetic coil.
The system is made robust so that to tolerate the external disturbance, event hitting it with a tennis ball it comes back to original reference point.