Home▸Articles▸Electromagnetism

Active Magnetic Levitation: A Dynamic Exploration of Electromagnetic Forces

An advanced simulation that demonstrates the principles of magnetic levitation and control systems in a 2D environment.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Active Magnetic Levitation Is

Active magnetic levitation is a phenomenon where an object can be suspended in mid-air using the repulsive force between two magnets. In this 2D simulation, a coil above the floating object generates a magnetic field that counteracts gravity and keeps the object aloft.

The system relies on a feedback controller to adjust the current through the coil based on the position of the object relative to a setpoint height, ensuring stability even when external disturbances are applied.

How It Works

The upward force exerted by the magnetic field is given by F = k I^2/d^2, where k is a constant related to the coil's properties and geometry, I is the current through the coil, and d is the distance between the object and the coil. This relationship shows that increasing the current or decreasing the distance increases the levitation force.

The feedback controller uses proportional control (Kp) to adjust the current in real time based on the error between the desired setpoint height and the actual position of the object, ensuring it remains stable.

live demo · related simulation● LIVE

Why It Matters

Understanding active magnetic levitation is crucial for applications ranging from microgravity experiments to precision manufacturing. It also provides insights into the behavior of electromagnetic fields and the principles of control systems.

In practical terms, this technology can be used in various devices such as magnetic bearings, non-contact sensors, and even in advanced robotics where precise positioning is required.

Real-World Examples

One notable application of active magnetic levitation is in the field of microgravity research. By suspending objects without physical contact, scientists can study phenomena that are difficult to observe under Earth's gravity.

In industry, magnetic levitation systems are used for precise positioning and handling of components in assembly lines, ensuring high accuracy and reducing wear on mechanical parts.

Frequently asked questions

What is Earnshaw's theorem and how does it relate to this simulation?

Earnshaw's theorem states that a collection of point charges cannot be maintained in a stable static equilibrium configuration solely by the electrostatic repulsion between them. In the context of magnetic levitation, this means that without additional forces (like those provided by a feedback controller), there is no way to achieve stable levitation with permanent magnets alone.

How does changing the setpoint height affect the simulation?

Adjusting the setpoint height changes the target position for the object. The feedback controller then adjusts the current through the coil to bring the object back to this new height, demonstrating how the system responds to different desired positions.

What happens when you switch off the feedback control?

Without feedback control, the magnetic levitation becomes unstable according to Earnshaw's theorem. The object will oscillate or fall due to the lack of a mechanism to counteract disturbances and maintain its position.

Can this simulation be used to teach about other types of forces?

Yes, this simulation can also illustrate concepts like gravitational force, electromagnetic fields, and the principles of feedback control. It provides a comprehensive view of how different physical phenomena interact in real-world applications.

Try it live

Everything above runs in your browser — open Active Magnetic Levitation (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Active Magnetic Levitation (2D) simulation

What did you find?

Add reproduction steps (optional)