🚄 Maglev Train Simulator (3D)

Written by MySimulator Team · Reviewed by MySimulator Editorial Review

Last updated: 7 July 2026

Magnetic levitation · EDS vs EMS · lift, drag & lift-off speed

Presets

Suspension mode

Operating point

Readout

Levitation gap
Lift force
Magnetic drag
Lift / drag ratio
Levitating?
Levitation power

About this simulator

A maglev train floats on a magnetic field instead of wheels. There are two main ways to do it. EDS (electrodynamic suspension) uses superconducting or permanent magnets on the train that induce currents in the guideway as they move. By Lenz's law those induced currents repel the magnets, so the lift grows with speed: below a lift-off speed the train still rides on wheels, and only above it does it rise. EDS is passively stable but pays a price in magnetic drag, which peaks near lift-off and then falls off, so the lift/drag ratio keeps improving as the train accelerates.

EMS (electromagnetic suspension) uses electromagnets that are attracted upward to a steel rail. Attraction grows stronger as the gap shrinks, which is inherently unstable — pull too close and the magnet slams into the rail. EMS therefore needs fast active control: a sensor measures the gap and a controller adjusts the coil current thousands of times per second to hold a small, constant gap (typically ~10 mm) even at standstill. Here the control gain governs that loop; too little gain and the train sags, too much and the gap oscillates and the suspension goes unstable.

In both cases the lift must balance weight, F_lift = m·g. A simplified model is used: EDS lift rises with speed as F ∝ v²/(v²+v₀²) and decays with gap, while drag follows F_drag = F_lift·(v₀/v). Propulsion comes from a separate linear motor: the guideway acts as the stator and a travelling magnetic wave pushes the train forward, so there is no contact and no traction limit from wheels.

About this simulation

This simulator computes magnetic levitation from first principles for two suspension types. For EDS (electrodynamic), lift is modelled as F0·v²/(v²+v₀²)·e−(gap−8)/22 — zero at rest, saturating at speed, and decaying with gap — while the actual ride gap is found each frame via a 30-step bisection search for where this lift balances the train's weight; drag follows F_drag = F_lift·(v₀/v). For EMS (electromagnetic), lift scales as 1/gap², an inherently unstable relationship, so the gap is instead integrated as a real second-order spring-mass system driven by the lift/weight imbalance plus a proportional–derivative feedback term (gain·error − gain²·velocity); too little gain lets the train sag, too much makes the gap oscillate. A separate phase variable animates the travelling magnetic wave of the linear-motor propulsion, independent of the levitation physics.

What it shows

Two live plots — lift & drag versus speed, and lift versus gap — plus a 3D cross-section of the train riding its computed gap above the guideway, with field-line sway that reacts to suspension mode and gap size.

How to use it

Switch between EDS and EMS, drag the speed/magnet-strength/payload/gain sliders, or jump straight to the four presets (EDS high-speed, EMS hover, Overloaded, Unstable gain) to see each regime's failure and success modes.

Did you know?

Because EDS lift needs relative speed to exist, every EDS maglev — including Japan's SCMaglev — must ride on ordinary wheels below its lift-off speed and only floats once it is already moving.

Frequently Asked Questions

How does this simulator decide the levitation gap each frame?

In EDS mode it solves quasi-statically: a 30-step bisection search finds the gap between 4 mm and 60 mm at which the speed- and gap-dependent lift force edsLift(v, gap) exactly balances the train's weight, then the displayed gap eases toward that target. In EMS mode there is no lookup — a real spring-mass differential equation is integrated every frame, with gap acceleration driven by the lift/weight imbalance plus a PD-style controller term proportional to gain×gap-error minus gain²×gap-velocity.

Why does EDS lift depend on both speed and gap in this model?

The code models EDS lift as F0·v²/(v²+v0²)·exp(−(gap−8)/22), where v0 = 100 km/h is a characteristic scale. The first factor is zero at rest and saturates toward 1 as speed rises, reflecting how induced eddy currents (and their repulsive force) only appear once the magnets sweep past the guideway fast enough. The exponential factor makes lift fall off smoothly as the gap widens, since induced-current coupling weakens with distance.

How is magnetic drag calculated for EDS?

The simulator uses F_drag = F_lift·(v0/v), so drag is largest at low speed (near lift-off) relative to lift, and shrinks as a fraction of lift once the train is going fast. This reproduces the real-world EDS behaviour where the lift/drag ratio keeps improving with speed, which is why EDS trains are more efficient at high cruising speed than near lift-off.

Why can the EMS mode become unstable?

EMS attraction grows as 1/gap² in the code (emsLift scales with (10/gap)²), so it is an inherently unstable equilibrium — the closer the gap, the stronger the pull, which pulls it closer still. The simulator counteracts this with a PD-style feedback term (gain×error − gain²×velocity damping) inside the gap's equation of motion. At low gain the gap sags because the restoring term is too weak; at high gain the destabilising gain² term dominates and the gap oscillates or clamps against its 1 mm/40 mm limits — exactly what the "Unstable gain" preset demonstrates.

What does the levitation power readout represent?

For EDS the code reports power as drag force × speed, i.e. the kinetic energy continuously lost to induced-current (eddy-current) drag while cruising — EDS itself needs no separate holding power since the repulsion is a free by-product of motion. For EMS the code instead reports current²×30 + 18 kW, modelling resistive (I²R) heating in the electromagnet coils that must run continuously — even at a standstill — to hold the train up against gravity.