top of page
實驗裝置_f1.png

Magnetic Levitation

Group project in the System Dynamics class in Fall, 2020.

Our goal was to make a magnetic levitation device that could hold a steel ball mid-air.

實驗裝置_1.png

At first, we designed a device as shown on the right. A coil was the main component in this system, providing upward supporting force for the magnet. At the bottom, A Hall effect sensor was used to infer the position of the magnet for control purposes. The LEDs and optical sensors were set to provide additional information about the exact location of the magnet. 

實驗裝置_2.png

The build

However, things did not go as planned. We noticed that the coil did not produce enough force to levitate the steel ball, and therefore we added a magnet onto the ball.

maglev_pic-1_edited.jpg

Control

To model the system, we opted to linearize the force from the magnet with respect to current and distance.

ki_graph.png
kh_graph.png

The exact slopes of the above curves can be determined by experiments. First, the relationship between force and distance is investigated with the setup below.

lin_ex_en_3x.png
maglev_pic-4.jpg
maglev_pic-5.jpg

Modelling the system

The system can be divided into two parts: the electromagnet (coil) and the ball in the magnetic field. 

block.jpg

(modelling using MATLAB)

RLu.png
F_balance_en_3x.png

Without control, the system is unstable.

sys_withoutControl.jpg

PID Control

The initial thought was to utilize PID control. However, the traditional transfer function view cannot achieve the optimal dynamics, because the time constant for the mechanical system is much larger than that of the electromagnetic system.

PID_overshoot.jpg
bode.jpg

Bode plot (original system)

BODE_after.jpg

Bode plot (with PID control)

State-Space Representation 

State-space representation could avoid this problem, and the system can be modeled as below:

order3_ss.png
StateFeedback.jpg

The system is both observable and controllable, and therefore state-feedback control can be employed. 

State-feedback Control

State feedback control would always yield a steady-state error. 

order3_ss_-1.png
order3_ss_-10.png

Adding a integrator to the system

The integrator could help get rid of the steady-state error, and there is no overshoot as with PID control. 

StateFeedback_integrator.jpg

By tweaking the eigenvalue of the system, the response could be improved, as shown below.

order4_ss_-10.png

λ = -100

order4_ss_-100.png

λ = -1

order4_ss_-1.png
maglev_pic.jpg
maglev_pic-3.jpg

Experiment Setup

2.png

With the hardware and circuit layout on the right, we managed to set up a testing unit for our theory.

Simulink model

ssi_arduino_circuit.png

Arduino MEGA board was used to carry out the control. A SIMULINK model was presented below for the digital control of the system. 

simulink.jpg
bottom of page