Development of Magnetic Levitation System
Rajalakshmy.PSubha Hency [email protected]@karunya.edu [email protected]
+919843015750 +919487846907+919626971947Assistant Professor, Department of Instrumentation Engineering,
Karunya Institute of Technology and Sciences
To levitate any object using magnetism is considered to be the benchmark for testing any control algorithm. This is mainly because of the inherent non-linearity of such systems. Therefore achieving stability in case of such a system is highly challenging. Applications of these systems range from high speed rail transportation to various industrial applications like magnetically levitated wind turbines. After making a background study on the previously implemented levitation systems a modification using a microcontroller based system is proposed. In order to levitate an object of desired mass and at a desired distance an electromagnet with ample magnetizing force is designed. A driver board is used to drive current to the electromagnet based on the closed-loop feedback signal from a Hall Effect sensor through a microcontroller so as to levitate the object at a desired distance. The system is further stabilized using a lead compensator. Also a PID control algorithm is implemented as an alternate method for achieving levitation.
Keywords: Magnetic levitation, Hall Effect Sensor, PID Controller
Magnetic Levitation is a technology that has been experimented with intensely over the past two decades. Magnetism has been a part of the earth since the beginning. It is due to the magnetism of the earth that the world spins and phenomena like gravity exist. The creation of magnetic forces is the basis of all magnetic levitation. The basic principle in dealing with the concept of magnetic levitation is known as Faraday’s Law. This law states that if there is a change in the magnetic field on a coil of wire, this is seen as a change in voltage across the coil. Also there is a current induced as a result of that change in voltage. For the purposes of magnetic levitation the ability to change the strength of a magnetic field by just changing the current is powerful. If there is a need for more of a force, then sending more current through a coil of wires will produce more of a greater magnetic force. The applications are
Equipments such as frictionless magnetic bearings.
Magnetically levitated vehicles.
Levitation of models in a wind tunnel
Magnetic Levitation System has gained considerable interests due to its great practical importance in different engineering fields. It can satisfy requirements of many courses, such as Automatic Control Principle, Modern Control Theory, Control System, etc. The objective of the project is to develop an electromagnetic levitation system and to analyze the system carefully.
A broad literature review on the proposed system has been presented in this section. A comparator based analog electromagnetic levitation system and the circuit employed that uses a potentiometer to vary set point has been discussed. 1. The development of nonlinear dynamic model for Magnetic Levitation System and proposed linear and nonlinear state space controllers are discussed.2. An investigation of the issue of real time simulations using MATLAB as a tool is dealt.3. A fuzzy logic controller design for the stabilization of magnetic levitation system (Maglev ‘s).Additionally, the investigation on Linear Quadratic Regulator Controller (LQRC) also mentioned here. This paper presents the difference between the performance of fuzzy logic control (FLC) and LQRC for the same linear model of magnetic levitation system.4
A ferromagnetic object is suspended in the magnetic field of an electromagnet. A feedback control circuit is included to ensure a stable position of the levitating object. A control unit adjusts the current in the electromagnet. The position is tracked by a sensor; usually a photo sensor or a Hall Effect sensor. According to the signal of the sensor the electromagnet is driven up or down. If the ferromagnetic object is above the desired position, the controller reduces the current in the electromagnet and the magnetic force as well. If the object is below the desired position, the current in the electromagnet increases. The block diagram of the proposed electromagnetic levitation system is given in figure 1.
Fig.1. Block Diagram of Magnetic Levitation System
The function of each block is as given below.
mbed – LPC1768 (Cortex-M3): The comparator IC (LM358) was replaced by mbed microcontroller. This microcontroller is an ARM processor, a comprehensive set of peripherals and a USB programming and communication interface provided in a small and practical DIP package. The mbed is an easy-touse rapid prototyping tool built on industry standard technology.
Electromagnet: A new electromagnet with a higher ampere-turns value was designed for the system. This in turn allowed the possibility of changing the weight of the object and even the levitation distance
L298 driver circuit: The MOSFET based driver circuit (BS170) was replaced by a motor driver H-bridge board L298. The current output from the existing driver circuit was very low and with the introduction of the new electromagnet it was necessary to drive a higher current to it.
The system however employs a Hall Effect sensor to sense the object position and give a corresponding voltage depending on the position of the object from the electromagnet.
Design of Electromagnet Coil
The main consideration in the design of an electromagnet is its lifting power. Cast steel was selected for this design because it has a narrow loop area which gives it a high permeability and fairly good coercivity, hence making it suitable for core of electromagnet. The core of the electromagnet is specified, the core area (shape), diameter, and the required length of the winding are then selected by estimating or calculating amount of current expected to pass through when lifting the required load. The coils for electromagnets are usually circular in shape and rectangular in cross-section. The various terms connected with circular coils are explained below:
Fig.2. Electromagnet Coil
The MH 481, a linear Hall-effect sensor, is composed of hall sensor, linear amplifier and emitter-follower output stage. The integrated circuitry features low noise output, which makes it unnecessary to use external filtering. It also includes thin film resistors to provide increased temperature stability and accuracy. These linear Hall sensors have an operating Temperature range of –40 degree C to +100 degree C, appropriate for commercial, consumer, and industrial environments. The high sensitivity of Hall Effect sensor accurately tracks extremely small changes in magnetic flux density. The linear sourcing output voltage is set by the supply voltage and varies in proportion to the strength of the magnetic field. Typical operation current is 6.0mA and operating voltage range is 3.0 volts to 6.5 volts.
The MH 481 is rated for operation between the ambient temperatures –40°C and 100°C for the E temperature range. The package style available provides magnetically optimized solutions for most applications. Package UA is a threelead ultra mini SIP for through-hole mounting. Pb Free is qualified by third party lab. Some of the applications of the Hall effect sensor are current sensing, motor control, position sensing, magnetic code reading, ferrous metal detector etc. Table 1 contains the values observed while testing the hall effect sensor MH 481 for linearity.
Table 1: Ball position Vs Output Voltage
L298 Dual full bridge driver :
The L298 is an integrated monolithic circuit. It is a high voltage, high current dual full-bridge driver designed to accept standard TTL logic levels and drive inductive loads such as relays, solenoids, DC and stepping motors. Two enable inputs are provided to enable or disable the device independently of the input signals. The emitters of the lower transistors of each bridge are connected together and the corresponding external terminal can be used for the connection of an external sensing resistor. An additional supply input is provided so that the logic works at a lower voltage.
Fig.3. Pin Diagram of L298 Bridge Driver
Pulse-width modulation (PWM), or pulse-duration modulation (PDM), is a commonly used technique for controlling the power supplied to inertial electrical devices, made practical by modern electronic power switches. The average value of voltage (and current) fed to the load is controlled by the driver circuit according to the signal received by the motor enable pin which in turn switches supply between load on and off at a fast pace. The longer the switch is ON compared to the OFF period, the higher is the power supplied to the load. 18 The PWM switching frequency has to be much faster than what would affect the load, which is to say the device that uses the power. Typically switching has to be done several times a minute, from few kilohertz (kHz) to tens of kHz for a motor drive and well into the tens or hundreds of kHz. The term duty cycle describes the proportion of ‘on’ time to the regular interval or ‘period’ of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, 100% being fully on.
Lead Compensator: The output of the levitation circuit is unstable and the levitating object starts oscillating up and down and eventually falls or sticks to the bolt. While researching through methods to compensate for these oscillations a paper published by Adam Kumpf from MIT contained a clever solution for the problem. This circuit was used as a base to come up with a suitable compensation circuit to stabilize this system. Described below are the details of the methods employed in the paper to design the lead compensator. An adder was incorporated into the feedback path so that the system could be driven with an input and it can be characterized by its output. To do this, an inverting adder was built using ¼ of an LM348 OPAMP in which one of the inputs was the voltage from the Hall Effect sensor and the other was the voltage input used for testing. The system was then driven with a small amplitude sinusoidal signal and the gain and phase shift at the output were recorded. Refer paper number ‘8’ The gain and shift plots in the paper show the problem clearly. Since the phase of the output at crossover was observed to be slightly more negative than -180 degrees, the system was considered not stable. While the phase margin at the crossover frequency may only be negative by a couple degrees, it could slowly push the system out of control due to sinusoidal amplitudes that are exponentially increasing in nature.
The Compensator: Since one of the main reasons for the system being unstable was the slight negative phase margin, lead compensation was implemented to push the phase margin to the positive side and increase the crossover frequency. To implement the lead compensator, a 10k resistor was connected in parallel with a 10uF capacitor which then led to a 1k resistor to ground.
The main drawback is the attenuation factor of . To negate this effect, a noninverting amplifier with a gain of 11 was added to the output of the lead network. Another section of the LM348 OPAMP was used along with two more resistors to achieve the desired gain. The compensator circuit is shown in fig.4.
Fig.4. Lead Compensator Design using Op-amp
PID Controller Design
A proportional-integral-derivative controller (PID controller) is a generic control loop feedback mechanism (controller) widely used in industrial control systems. A PID controller calculates an “error” value as the difference between a measured process variable and a desired set point. The controller attempts to minimize the error by adjusting the process control inputs. The PID controller calculation (algorithm) involves three separate constant parameters, and is accordingly sometimes called three-term control: the proportional, the integral and derivative values, denoted P, I, and D. Heuristically, these values can be interpreted in terms of time: P depends on the present error, I on the accumulation of past errors, and D is a prediction of future errors, based on current rate of change. The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve, a damper, or the power supplied to a heating element. In the absence of knowledge of the underlying process, a PID controller has historically been considered to be the best controller. By tuning the three parameters in the PID controller algorithm, the controller can provide control action designed for specific process requirements. The response of the controller can be described in terms of the responsiveness of the controller to an error, the degree to which the controller overshoots the set point and the degree of system oscillation. Note that the use of the PID algorithm for control does not guarantee optimal control of the system or system stability.
Results and Discussion
According to the calculations made, a new electromagnet was designed with better magnetic characteristics like increased magneto motive force and magnetic flux density Also, the wire gauge value was changed to 28 SWG for the new coil so as to allow more current carrying capacity up to 0.5 A. Therefore by increasing the number of turns to 2800, its now possible to levitate an object of mass range 20-30g at a distance range of 1-2 cm. The table 2 below show the comparison of parameters of the two electromagnets and the variation in current for different voltage values.
Table 2 Electromagnet Comparison
The designed electromagnet levitation system is able to levitate an object for a period of 2 hours and maintain the stability throughout using the ON-OFF control algorithm. The PID controller however can sustain levitation for a period of just a few seconds (10-20 s).
Fig.4. Experimental Set up
An electromagnet with sufficient magnetizing force to levitate an object of up to 30 grams at a distance of about 1.5 cm was successfully designed. The driver circuit provides the required current to the electromagnet by the action of the pulse width modulation enable signal to the current driver based on the microcontroller output. The system proved to be unstable at the beginning and levitation of the object over a long duration of time was not possible. Therefore to stabilize the system a lead compensator was designed, implemented and the system was made stable for a longer period of time. The PID controller for automatically obtaining stabilized levitation is also implemented for different combinations of object mass and levitation distance. In the future the PID algorithm can be improved further by tuning the control parameters to sustain levitation for a longer duration.
Andri Rahmadhani, Dian Purnama, Pipit Fitriani, Puguh Andik P, Septi Cahya Widianti – The Effect of Duty Cycle on Distance of Levitated Object in a Simple Microcontroller Based Magnetic Levitator, Department of Physics, Bandung Institute of Technology, Jl. Ganesha 10, 40132, Indonesia
Farhat Rashid, Athar Hanif, Abdul Rehman Yasin and Raheel Kamran Magnetic Levitation System: A Low Cost Experimental Setup for Undergraduate Control Systems Laboratory , Department of Electrical Engineering, The University of Lahore, Lahore, Pakistan
Ferrarez, Mauricio Gonçalves – Magnetic Levitation Control System Of A Steel Ball Based In A Microcontroller ,IF Fluminense – Campus Campos Centro; Campos dos Goytacazes – RJ
Guy Marsden – Magnetic Levitation Kit, ART TEC, Woolwich
Ishtiaq Ahmad, Muhammad Akram Javaid – Nonlinear Model & Controller Design for Magnetic Levitation System, University of Engineering & Technology, Taxila, Pakistan-2011
Engr. Lubna Moin, Dr. Vali Uddin – Design and Simulation of Model Based System Using Real Time Windows, University of Science and Technology, Karachi, Pakistan-2011
Mária Hypiusová and Jakub Osuský – Pid Controller Design For Magnetic Levitation Model , Institute of Control and Industrial Informatics, Faculty of Electrical Engineering and Information Technology, Slovak University of Technology Ilkovi?ova 3, 812 19 Bratislava, Slovak Republic
Prof. J.Roberge , Dr. Kent Lundberg – Magnetic Levitation System, Adam KumpfTania Tariq Salim ,Vedat Mehmet Karsli – Control of Single Axis Magnetic Levitation System Using Fuzzy Logic Control, University of Gaziantep, Gaziantep,Turkey-2013