One of the project objectives for SKIL is to create a simulation of the experiment being run. We were supposed to use LabVIEW, but LabVIEW gives me indigestion, so I used MIT/GNU Scheme instead. The simulation is supposed to model the feedback loop which is formed by the levitation apparatus and the electronics controlling it. Essentially the simulation takes as input a “control function” and outputs the expected behavior of the levitation.

So I threw together some scheme code to simulate the motion of a magnetic object in a changing magnetic field, which is determined by the current of the simulated electromagnet, which is in turn controlled by the changing voltage applied. That applied voltage is the output from the “control function”. The input to the control function is the elevation of the object.

Below is shown the first screenshot I have of simulation output. On the left is the numerical output of the various parameters (unlabeled) and on the right is the elevation vs. time plot of the object. The control function that was used was quite naive: it set the voltage to minimum or maximum when the object was “too high” or “too low” respectively. You can see that the naive control function does not stabilize vibrations properly, so the oscillations get out of control:

showing the effect of a poor control function

I eventually added gnuplot output for fancier graphs and devised a better control function. A screenshot of a testing this better control function is shown here:

The simulation depicted above only handles one dimension of motion, but there are 3 in the real levitator. So, I put together a theoretical model of the levitator in 2 dimensions (the third dimension is symmetrical and so it is not shown). The result was the following “potential curves”. These curves are analogous to terrain that an object is rolling over. The object will tend to move along the valleys and settle in the pits (lower energy regions).

a potential energy curve which takes into account gravity, preeminent magnetism, and the stabilizing effect of the control function

a potential energy curve for two electromangets spaced a few inches apart, in which one can see two

Lastly, Kevin put together an analysis of Barry’s “anti-gravity relay” circuit:

More details of the simulation and analysis can be found in the project writeup.

### Like this:

Like Loading...

*Related*

## Leave a Reply