Inter-Ing 5 INTERDISCIPLINARITY IN ENGINEERING SCIENTIFIC CONFERENCE WITH INTERNATIONAL PARTICIPATION, TG. MUREŞ ROMÂNIA, 1-11 NOVEMBER 5. DESIGN OF A SIMPLE DIGITAL CONTROLLER FOR A MAGNETIC LEVITATION SYSTEM DUKA ADRIAN-VASILE, GRIF HORATIU PETRU MAIOR UNIVERSITY TG. MURES Key words: magnetic levitation system, digital controller, feedback linearization Abstract: This paper investigates the design of a digital control system for a one degree of freedom magnetic levitation (Maglev) device for keeping a steel ball suspended in the air. By controlling the current of an electromagnet, at equilibrium, the generated electromagnetic force will counteract the weight of the steel ball. System linearization and phase lead compensation were used for this unstable, nonlinear control problem in order to design a continuous controller which was then digitized to obtain the discrete controller. The design of the system and some experimental results are presented 1. Introduction Magnetic levitation systems have many uses such as frictionless bearings, suspension of wind tunnel models, high speed passenger trains etc. These electromagnetic suspension systems can be divided into two types: (1) repulsion type which are naturally stable, and therefore easier to control, and () attraction type which are inherently unstable. This paper examines the implementation a of a digital control system for an attraction type magnetic levitation device with one degree of freedom. This system is characterized by a nonlinear dynamic that is open-loop unstable and, as a result, feedback control is required to stabilize it. Analogue devices are most often used for such applications due to the high bandwidth required to compensate for the inherent instabilities and non-linearities. However, if implemented carefully, a digital system can also yield adequate performance. The control objective is to keep a ferro-magnetic object (steel ball) suspended in midair by controlling the current through an electromagnet. The basic principle is to use the current to manipulate the electromagnetic force which can counteract the weight of the steel ball and keep it suspended in the air. By measuring the location of the object using a non-contact sensor, and adjusting the current in the electromagnet, based on this measurement, the levitated object can be maintained at a predetermined location.. Dynamical model of the plant The dynamic of the magnetic levitation system shown in Figure 1 is described by the following nonlinear equation. d x( m = mg + f ( x, e (1) dt where f e (x, is the electromagnetic force that counteracts the weight of the ball, x is the distance between the electromagnet and the steel ball, m is the mass of the ball and g is the gravitational constant The electromagnetic force produced by current i(, which acts on the steel ball, is found using the magnetic energy equation as follows: L( x) i ( W ( i, x, = () 387
W ( i, x, i ( dl( x) i( f e ( x, = = = C (3) x dx x( C is an electromagnetic constant and depends on the incremental inductivity caused by the steel ball (L ) and the levitation distance (X ). This constant was determined experimentally based on equation (6). L X C = (4) Fig. 1 Magnetic levitation system Since the position of the ball influences the electromagnet s inductivity, the changes being nonlinear and the equilibrium point between the electromagnetic force and the gravity is unstable, the linearization of the electromagnetic force is required as a solution for solving this problem. The linearization is done, using Taylor expansion, as follows: I CI CI f e ( x, = C( ) ( )( i I ) + ( )( x X ) +... 3 (5) X X X where I is the current of the electromagnetic coil when the ball is at X. These linearization values were determined experimentally based on equation (6). At equilibrium the electromagnetic force cancels the gravity. At this moment the acceleration is zero and equation (1) takes the following form: mg = C( X I ) Neglecting the higher order terms of the Taylor expansion (5) we get: 3 d x CI CI m = ( ) i+ ( ) x dt X X where: x = x X (8) i = i I Equation (7) represents the linear equation which describes the dynamic of the magnetic levitation system (plan. Based on this equation, using Laplace transform, we get the following transfer function which will be used in the controller design process. X ( s) k1 H ( s) = = I( s) ms k where k 1 and k are two constants depending on parameters C, I and X. (6) (7) (9) 388
The plant parameters are given in Tabel 1 Tabel 1 Plant parameters Parameter Value M.11 kg X.76 m I.41 m C 3.84 1-5 Nm /A k 1.4677 k 5.987 3. Design of the controller Figure shows the control structure applied to the magnetic levitation system. Fig. Control system: block diagram The parameters of the experimental system are: X - displacement of the ball from the equilibrium position; V x voltage supplied by the sensor, proportional to X ; V ref reference voltage needed to keep the ball at the desired position X = ; e control error; V supply voltage needed for I ; V - output control voltage; I electromagnet current. The sensor system consists of an infra-red LED and a phototransistor. They are placed facing each other across the gap where the steel ball is levitated in an electric eye configuration: infra-red light emitted by the diode is sensed by the phototransistor. However, there is a drawback to using this sensor due to the fact that it has a linear characteristic over a small range (aprox. mm). The sensor s transfer function is given next: K sensor = 3333[ V / m] (1) The transfer function for the current amplifier is given by equation (11) K amp =.1[ A/ V ] (11) Using equations (9), (1) and (11) the transfer function of the controlled process takes the following form: k1k ampksensor G( s) = KampKsensorH ( s) = (1) ms k Transfer function (1) shows that this system has a stable pole, while the other one is unstable. The control system needs to be designed to carry out the major function of stabilizing the working point of the levitation system. The simplest way to stabilize the system is to use a phase-lead controller to cancel the unstable pole. Using the root locus design method, the proposed transfer function for the phase-lead controller is shown in (13): s + a H R ( s) = kr (13) s + b After simulating the system the following parameters for the time-based phase-lead controller were chosen: k R = -1; a = 45, b = 45. 389
Based on this controller the digital controller was obtained using a zero order hold digitization with a sampling time T =.1s. The regression model of this digital control algorithm is given by: u( kt) = qu( kt T ) + q1e( kt) + qe( kt T ) (14) Where e(kt) and e(kt-t) are the digital samples of the time based control error e; u(kt) is the digital control output which is converted by a digital analogue converter and applied to the process, as shown in figure 3; q, q 1, q are the controller parameters and take the following values: q =.951; q 1 = -1, q = 11.94. Fig. 3 Digital control system: block diagram 4. Implementation and experimentation This section discusses the implementation of the magnetic levitation system and presents the experimental and simulation results for this control problem. The magnetic levitation control system consists of several important parts: - the electromagnet coil with an inductance L =.3699H and a resistance R = 14.1Ω; - the position sensor: an infra red LED and a phototransistor; - the current amplifier; - assorted operational amplifiers, resistors, capacitors, potentiometers for sensor calibration, summing, inverting, gain adjustment etc.; - power supplies: +15V and -15V for the operational amplifiers, electromagnet, sensor; - Advantech PCI-171 data acquisition board: 1-bit A/D conversion with up to 1 khz sampling rate, D/A conversion, digital input/output, analog input/output and counter/timer; - A software-based control algorithm implemented on a Personal Computer (PC). The digital controller is the heart of this application and its implementation is based on the principles presented in Section 3. Using this configuration the steel ball was suspended in the air as displayed in figure 1. By means of digital simulation, the unstable character of the plant is shown in the step response presented in figure 4. Fig. 4 - Step response Before the implementation of the controller simulation was used to test the control scheme. In the following figures we show the results of the digital simulation (figure 5) and the experimental results (figure 6). The plots of the electromagnet current and the position of the ball are presented next. For the experimental results a digital multi-meter was used to measure the electromagnet current at fixed intervals of time. The current was measured at the electromagnet coil and the suspended distance was 39
determined based on the control error converted by the analogue-digital converter. The basic goal of the simulation and of the experiment is to stabilize the system and to keep the steel ball suspended in the air under the electromagnet. Fig. 5 Simulation results: Ball position (air gap); Electromagnet current Fig. 6 Experimental results: Ball position (air gap); Electromagnet current 5. Conclusions This paper presents a simple method for controlling an electromagnetic levitation system using a digital controller implemented on a PC. The main goal of this control problem was to assure a stable working condition to keep the steel ball suspended in the air. Due to the particularities of the system (nonlinear, unstable, very fast varying dynamic response) and to the uncertainties of the model caused by the experimental identification of the plant parameters, the actual experimental response differs slightly from the simulation results. However, although it was quite complicated and challenging, the proposed goal was successfully achieved. Further studies would require a better choice for the position sensor. The infra-red LED / phototransistor position sensor, which was used for this application, is linear over a small distance and is highly influenced by the ambient light. Also, it is worth researching ways to design adaptive controllers which are capable of dealing with the changes in the plant parameters and the uncertainties of the model. The magnetic levitation system designed here can serve for academic instruction in the field of Control Engineering, due to the many problems it deals with like: system modeling and simulation, linearization, controller design, data acquisition etc., as well as a test bed for the design of various control algorithms. References [1] Barie, Walter and Chiasson, John Linear and nonlinear state-space controllers for magnetic levitation, International Journal of Systems Science, Vol. 7, No. 11, 1996, pp. 1153-1161 [] Craig, K.C. Mechatronics System Design at Rensselaer, Workshop on Mechatronics Education, Stanford University, July 1994 [3] Duka, Adrian-Vasile Studiul metodelor moderne de control automat pentru sistemul de levitaţie magnetică, proiect de diploma, Universitatea Petru Maior Tg. Mureş, 4 391
[4] Franklin, Gene F., Powel, J. David, Emami-Naeini, Abbas - Feedback Control of Dynamic Systems, 4th edition, Prentice Hall, [5] Germán, Zoltan - Circuite integrate analogice. Notiţe de curs, Editura universităţii Petru Maior Tg. Mureş, 1999 [6] Paschall II, Stephen C. - Design, Fabrication, and Control of a Single Actuator Magnetic Levitation System, Senior Honors Thesis, MEEN 485-517, Texas A&M University, August [7] PCI-171/171HG Multifunction DAS Card for PCI Bus. User's manual [8] Shiao, Ying-Shing - Design and Implementation of a Controller for a Magnetic Levitation System, Proc. Natl. Sci. Counc., 1 [9] Taghirad, H.D., Abrishamchian, M. and Ghabcheloo, R., Electromagnetic levitation system: An experimental approach, Proceedings of the 7th international Conference on Electrical Engineering, Power System Vol, pp 19-6, May 1998, Tehran [1] Xie, Yi - Mechatronics Examples For Teaching Modeling, Dynamics, and Control, Massachusetts Institute of Technology, May 3 [11] Zărnescu, Horaţiu Elemente de reglare automată, Editura universităţii Petru Maior Tg. Mureş, 1998 39