top of page
cheat_pages1-2-4-1_800dpi.png

MagLev Control System

Writer: Maysarah Sukkar
Maysarah Sukkar
Sep 26
3 min read

ME E4058 Mechatronics & Embedded Microcomputer Control, Columbia University

Team of 5 · Analog electronics · Feedback control


The Problem

Magnetic levitation is a classic unstable plant. The force between the electromagnet and the magnet increases as the gap closes, so any displacement feeds on itself: drift up and the pull increases, drift down and it weakens. Open loop, the system has a pole in the right half-plane, and the magnet either snaps to the coil or drops.

Our goal was to close that loop entirely in analog, with no microcontroller and no sampling, just op-amps, passives, and a power stage.


System Architecture

A Hall effect sensor measures the field, which serves as a proxy for gap distance. That signal runs through an op-amp signal chain that conditions it and applies compensation, and the result drives a MOSFET that sets coil current. The whole thing runs in continuous time, so there's no loop rate to worry about. The limits are the op-amp bandwidth and the coil's electrical time constant.


Characterizing the Building Blocks

Before integrating anything, we characterized each stage on its own. For every circuit we derived the transfer function, checked it in MATLAB with tf, bode, and step, built it, and measured magnitude and phase on the scope against prediction.


Passive Filters and Compensators

The first-order RC low-pass had a 0.1 ms time constant and a corner at 10⁴ rad/s. Measured gain tracked the model closely.

The passive lag network puts a pole at 909 rad/s and a zero at 10⁴ rad/s. Peak phase lag lands at the geometric mean of the two, around 3,000 rad/s, at about −56°, which matched our sweep. The passive lead network mirrors it, with a zero at 1,000 rad/s and a pole at 11,000 rad/s, giving positive phase between the two. The lead was clearly visible on the scope.


Active Circuits

The active work was built on the LF356. We started with a unity-gain buffer, whose roughly 10¹² Ω input impedance keeps the sensor from being loaded, and an inverting amplifier at a gain of −10, which we checked against the datasheet's gain-bandwidth limits.

From there we added a level shifter and trimming circuit for pot-adjustable offset and gain, used to map the sensor output into a usable range. The integrator (1000/s) and differentiator (−10⁻³s) cross unity gain at 1,000 rad/s; they're effectively the I and D terms of a PID. We also built an active first-order low-pass, a Sallen-Key second-order low-pass for a steeper −40 dB/decade roll-off from a single op-amp, and an active lead-lag stage.


Closing the Loop

The controller signal path is sensor, buffer, level shift and trim, lead compensator, low-pass filter, then the MOSFET driving the coil.

Compensation

Proportional feedback alone won't stabilize this plant, because there isn't enough phase margin at crossover and the loop rings until it loses the magnet. The lead compensator adds phase in the crossover region, which works out to adding derivative action and damping. That's what turns an oscillating loop into a stable one.


Noise

The tradeoff with lead is the high-frequency gain boost, which amplifies sensor noise right along with the signal. The low-pass stage after the compensator rolls that off above the band where the phase lead is doing useful work.


Tuning

We tuned empirically. We started with the gain high enough to reliably pull the magnet in, then backed it down on a potentiometer until the magnet stopped latching to the coil and settled into a stable hover. The system was demoed live to the instructor.


Takeaway

Doing compensation in analog removes a layer of abstraction. The lead network is an RC pair you can swap out, and its effect shows up directly as phase on the scope. Having built each piece by hand gave me a much more concrete feel for what a discretized PID loop is actually approximating.


Skills

This project covered control theory (transfer functions, Bode analysis, phase margin, lead/lag design, stabilizing an open-loop unstable plant) and analog design (op-amp topologies, active filters, buffering and level shifting). It also involved MATLAB modeling and extensive bench time with the scope and function generator, reconciling measured and predicted responses against component tolerances, parasitics, and saturation.

 
 
 

Comments


bottom of page