These coilguns with levitation control circuits are great! Now… How can you use them for magnetic levitation? This is slightly off-topic from coilguns, but magnetic levitation has many common design principles and is a little easier to build!
If you hold two permanent magnets close together, you see that one of them will jump strongly toward (or away) from the other. In 1842, Samuel Earnshaw expressed the perversity of inanimate magnetic objects in his theorem. It explains this frustrating behavior will always prevent you from suspending one permanent magnet above or below another, no matter how one arranges the two magnets. However, an active control circuit can get around this problem by rapidly adjusting the magnet’s strength.