Fuzzy Logic Control of a Magnetic Suspension System Using xPC Target
By Stephen Friederichs
Project Advisors: Dr. Anakwa and Dr. In Soo Ahn


The purpose of this project is to create a fuzzy logic control system to stabilize a magnetic suspension system. The magnetic suspension system consists of a magnetic ball and an electromagnet. A photosensor is used to monitor the position of the ball.

Fig.1 - Magnetic Suspension System Diagram

The fuzzy logic controller is implemented using Simulink's fuzzy logic toolbox. The fuzzy logic controller model is compiled into C code on a host machine and placed on an xPC via ethernet. The xPC is fitted with A/D converters to digitze the error voltage, and D/A converter to reverse the process for the correction voltage.

Fig. 2 - xPC Diagram

The xPC is placed in the control system as shown in the control diagram below.

Fig. 3 - Control Block Diagram

Once the system is stabilized, the fuzzy controller will be optimized to produce zero steady state error, minimize rise and settling time.

The current fuzzy logic controller membership functions and rules can be seen here, along with the response of the system.