Home

Magnetic Levitation System 2EM

image

Contents

1. 10 10 Time s Time s AMP JA Ad 101000 TWA d TNA 10 Time s Time s 25 MLS2EM User s Manual 1 c EE 1 1 1 aera p 1 1 1 1 EE 1 1 ee Bee eee 1 1 Ez 1 1 1 1 1 1 1 DER TRETEN NEUEN URS NUI PENE AN al 1 1 1 1 1 1 1 1 1 Bs pe IN E 1 1 E 1 E 1 1 EE ml 99 e ZWA 1 1 D 1 1 1 i 1 eiecit cel erede edd 1 1 1 1 1 1 1 1 1 i 1 fos oe ip lt Hee eal 1 1 1 4 1 1 f 1 NUM 1 1 ee 1 1 1 1 1 1 1 1 1 1 v v v o N 1uo1m ZINA 10 10 Time s Time s Fig 46 LQ simulation the desired position is a constant 36 MLS2EM User s Manual 2 4 Levitation simulation experiments can be repeated as real time experiments In this way one can verify accuracy of modelling If we double click levitation button in MLS2EM Main window the following window opens see Fig 47
2. 0 1 L 0 1 L 0 1 2 3 4 5 0 1 2 3 4 5 Time s Time s Fig 49 PD real time experiment The desired position as a constant 24 2 PD EMI EM2 pulse excitation Double click the LQ button The real time LQ controller opens see Fig 50 The results of the real time experiment are shown in Fig 51 15 2 _ _ 1_ 2 umm 7 DesPos m Pulse Generator Magnetic Levitation System 2 But Current A DX Bull Control MagLev2EM Controls and States But Control Fig 50 PD control and pulse excitation real time experiment MLS2EM User s Manual 38 0 1 1 i 1 PEE HE CO 1 i 1 1 1 1 1 1 i 1 ee etis 2 oem em e sen etiem ete 1 5 1 a 1 1 1 ES 1 scs ce i 1 i 1 t 1 b 1 e eio ror e e Eel 1 t 1 1 1 1 m p n o queurooe dsrp Time s Time s Md 102900 ves 1 1 1 see Ime Nt eue tace ce t jer see e Te NITE venere ed TY TINA Time s Time
3. Fig 21 The sphere motion The sphere motion is visible We can locate the cursor at the point slightly before a position jump occurs takes place see the red line in the picture We can move the cursor in two ways by writing down a value into the edition window or by drugging the slider In this way the acquired data are prepared to be analyzed in the next step After setting the cursor position consequently click the Analyze button The following message see Fig 22 appears This information means that the sphere located 15 82 mm from the electromagnet begins to move toward it when the PWM control over crosses the 0 49485 duty cycle value MagLev Minimal control analysis Position m 0 0158200 Current 0 4948500 EM Fig 22 Message of the experiment results MLS2EMUsers Manual 2 1 4 Actuator dynamic mode In this subsection we examine dynamic features of the actuator i e the electromagnet It means that the moving sphere generates an electromotive force EMF EMF diminishes the current in the electromagnet coil Click the Actuator static mode button and the window shown in Fig 23 opens MLS2EM_ActDynSteps Fig 23 Identification window of a dynamic current voltage characteristics A user should perform three experiments without the sphere Without ball with the sphere located on the bottom electromagnet Ball on EM and with the sphere fixed to the rigid screw Ball fixed
4. 1 1 1 1 1 1 1 H 1 PIRA us NEVER 133 1 1 1 288 jose 1 1 1 x 1 1 1 2 1 1 jS 9 E e e a v rom Time s Time s Fig 53 PD operating in differential mode real time experiment The desired position as a constant 41 MLS2EM User s Manual 3 Description of the Magnetic Levitation class properties The MagLev2EM is a MATLAB class which gives the access to all the features of the RT DAC4 PCI board supported with the logic for the MLS2EM model The RT DACA PCI board is an interface between the control software executed by a PC computer and the power interface electronic of the modular servo model The logic on the board contains the following blocks PWM generation block generates the Pulse Width Modulation output signal for the appropriate channel Simultaneously the direction signal and the brake signal are generated to control the power interface modules The PWM prescaler determines the frequency of the PWM wave power interface thermal status the thermal status can be used to disable the operation of the overheated actuator unit e interface to the on board analog to digital converter The A D converter is applied to measure the position of the ball light sensor and to measure the coil current of the actuator
5. We begin from the Build model for data acquisition button The window of the real time task shown in Fig 24 opens We have to set the control gain If we are going to modify the control magnitude then we set the default gain to 1 and the subsequent duty cycles to 0 25 0 5 0 75 and 1 Click the Data acquisition button and save data under a given file name Curent But Current A Subsystem Control signal Bull Control o A MagLev2EM Magnetic Levitation Controls and States System 2EM Fig 24 Real time model built to examine EMF influence on the coil current Click the Data analysis button It calls the m s2em find dyn m file The following window opens see Fig 25 The parameters optimization procedure starts The optimization routine is based on the mis2em current m mdl model When mls2em find curr dyn m runs the optimization function fminsearch is executed Fminsearch uses mls2em current m file The k and f parameters are iteratively changed during the optimization procedure The current curve is fitted four times This is due to the control signal form 0 7 F F F i MM pov oe AN ij pee 9 a n 3 1 A TC NEN ENT 1 1 1 1 x
6. Example set mls2em PWM 0 5 0 21 3 4 PWMPrescaler Purpose Determine the frequency of the PWM wave Synopsis Prescaler mls2em PWMPrescaler set mls2em PWMPrescaler NewPrescaler Description The prescaler value can vary from 0 to 16 The 0 value generates the maximal PWM frequency The value 16 generates the minimal frequency The frequency of the generated PWM wave is given by the formula PWM requency 40M Hz 4095 Prescaler 1 See PWM 3 5 Stop Purpose Sets the control signal to zero Synopsis set ml Stop Description This property can be called only by the set method It sets the zero control of the electromagnet and is equivalent to the set ml PWM 0 call See PWM 3 6 Voltage Purpose Read two voltage values Synopsis Volt get mls2em Voltage MLS2EM User s Manual 44 Description Returns the voltage of three analog inputs Usually the analog inputs are applied to measure the ball position and both coil currents 3 7 ThermStatus Purpose Read thermal status flag of the power amplifier Synopsis ThermSt get mls2em ThermStatus Description Returns the thermal flags of the power amplifier When the temperature of a power amplifier is too high the flag is set to 1 3 8 Time Purpose Return time information Synopsis T get mls2em Description The MagLev2EM object contains the time counter When a Mag
7. g 4 EM1 Control 4 But Current T 2 Bull Control Magnetic Levitation Controls and States System 2EM 2 Control MagLev2EM Fig 27 RTWT MagLev device driver window Notice that the scope block writes data to the MLS2EMExpData variable defined as a structure with time The structure consists of the following signals Position m Velocity m s EMI Current A and EM2 Current A EMI Control PWM duty 0 1 and EM2 Control PWM duty 0 1 The interior of the Magnetic Levitation System 2EM block it means the interior of the driver block is shown in Fig 28 In fact there are two drivers MLS2EM AnalogInputs and MLS2EM_PWM There are also two characteristics the ball position m vs the position sensor voltage V and the coil current vs the current sensor voltage V The second one should be individually identified for the appropriate electromagnet The driver uses functions which communicates directly with logic stored at the RT DACA PCI board When one wants to build his own application he can copy this driver to a new model MLS2EMUsers Manual 09 MLS2EM_DevDriv Magnetic Levitation System 2EM 322 ees 2115964 8 Position m Analog Inputs Velocity m s PWM Prescaler 1 aj PWM Brak 0 012 1 ng 1 Current scalling Current Filter 1 Current A M to A EM2 Current scalling Current Filtert EM2 Curr
8. 1 1 1 1 1 1 1 1 1 1 mp wp SSS 1 1 1 SSS 1 1 264556 Sar EE 1 1 1 SSS 1 1 1 1 4 1 1 1 SST ERR eo E i m E 1 1 99 2 e 103000 TWA T T T 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 cene sens eene cs cene e 14 1 1 Pa 1 1 1 1 1 1 1 i 1 doe deus aere 1 1 1 iog 1 1 1 1 1 l 1 ce Bee pe oe ed 1 1 1 1 1 1 1 mJ 1 1 TECTUM VIOT 1 1 1 1 ES Yl 1 1 1 om d 1 1 X poA 1 v v o Time s Time s T T 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 e mM 1 1 Ex 1 1 St 1 1 EE e ERR 1 1 1 bp fee ie ee SS 1 1 1 1 EE 1 1 SS p p ee EE 1 1 1 1 1 1 52 2 e e AMP JA Md 103000 TWA T 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 eee ean en ea T a coc on nea 1 1 D 1 i 1 1 1 1 1 1 1 1 1 1 1 i 1 Ese eee e th ees en e ae eee
9. 41 the f x diagram is shown 0 035 0 014 0 016 0 018 0 02 0 012 1 0 Position m 0 004 0 006 0 008 0 0 002 Fig 41 Function f x 30 MLS2EM User s Manual Linear continuous model MLS2EM is a highly nonlinear model It can be approximated in an equilibrium point by a linear model The linear model can be described by four linear differential equations of the first order in the form 0 1 0 0 0 0 054 B 0 0 0 b a 0 0 b The elements of the A matrix are expressed by the nonlinear model parameters in the following way 2 no 2 _ Fone EE 5 m emP2 m __50 222 Femei p Fus F emP2 Xa 7990 a 2 4 Femp2 2 4 emP2 05 ku TCj X39 Mee fip as ay ku FC X4 fipa x Xy 1 053 f 1 a34 gt f x17 Xo b kd Xio b Kf Xio The C vector elements correspond to an applied controller For example The PD controller shown in the next subsection requires C in the form c 1 0 o 0 Active suspension One of electromagnets of MLS2EM be analyzed as the single degree of freedom mass spring damper system with controllable stiffness and damping Using the non contact actuator both parameters are controlled by the formulated cont
10. MLS2EM_Exp Fig 47 Experimental controllers Now we can choose the controller we are interested in We start from the PD control 241 PD applied to EM1 Double click the PID button The real time PID controller opens see Fig 48 The results of the real time experiment are shown in Fig 49 leita ies ee a Pah ow umm 7 But Current A Bull Control Seren ER EM2 Control MagLev2EM Magnetic Levitation Controls and States System 2EM Fig 48 PID real time experiment T T T 0 1 T 0445 pees peceepescepecee o 3 4 LL uu 5445 1 1 1 1 5 1 1 1 1 1 1 1 1 decens PC a unas CUNG El Y 1 1 1 1 8 0 peces o c S jpeg cei 1 E i i i i 5 EOE a RT NE 1 1 1 1 1 1 1 1 i 1 1 1 1 1 1 1 1 0 0 1 0 1 2 3 4 5 0 1 2 3 4 5 Time s Time s 2 5 T 1 PETI lt a d E b L 4 2 06 4 5 1 1 1 1 1 1 een ed MM aan pae 8 AAA 1 1 1 1 1 1 1 1 aaa 1 1 1 1
11. where x 0 0 016 2 38 x e liu 2 38 yy 1 The parameters of the above equations are given in the table below Parameters Values Units m 0 0571 big ball kg g 9 81 m s functions of x and x N 1 7521 10 Es 5 8231 10 m fo function of x 1 6 fa 1 4142 107 m s 4 5626 107 m C 0 0243 A k 2 5165 A distance between electromagnets minus ball diameter m this parameter is modified by the user Lon 0 03884 A Ws 0 00498 The electromagnetic force vs position diagram is shown in Fig 38 and the electro magnetic force vs coil current diagram is shown respectively in Fig 39 MLS2EM User s Manual 28 T T T T 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ee 5956 pou Lom eee oo N 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 EE ovo ee S pm DN 1 1 1 1 1 1 1 EO 1 1 1 1 1 1 1 1 2 c MG C EO M ME E o 1 IN 1 1 1 1 1 1 1 IN 1 1 1 1 1 1 1 1 DN 1 1 1 1 1 1 1 1 1 1 1 1 1 8 qum ed Fee Se ees reet N Ld 1 1 1 NGI 1 1 1 1 1 1 1 1 es 1 1 1 1 1 1 jt Sy 1 1 1 280905 2904
12. 1 TE MEE MEME ME e 1 1 1 1 n Ede 1 1 1 1 1 E EET 1 1 1 1 1 1 1 1 T 0 1 1 1 0 0 002 0 004 0 006 0 008 0 01 0 012 0 014 0 016 0 018 0 02 Position m Fig 38 Electromagnetic force vs position The gravity force of the big ball dashed horizontal line is crossing the curve at the 0 009 m distance from the electromagnet 3 5 Electromagnetic force N E 0 5 Coil current A Fig 39 Electromagnetic force vs coil current The gravity force of the big ball dashed horizontal line is crossing the curve at the 0 9345 A coil current The electromagnetic force depends on two variables the ball distance from the electromagnet and the current in the electromagnetic coil This is clearly presented in Fig 38 and Fig 39 We can show these dependencies in three dimensional space see Fig 40 The ball is stabilized at Nes col 9 10 0 9 345 10 0 It means that the MLS2EMUsers Manual 29 0 ball velocity remains equal to zero The ball is levitating kept at the 9 mm distance from the bottom of the upper electromagnet The 0 9345 A current flowing through the magnetic coil is the appropriate value to balance the gravity force of the ball wo ye N 8210 Position m Coil current A Fig 40 Electromagnetic force vs coil current and distance from the electromagnet In Fig
13. 4 Loob b 8 0 0 1 1 0 2 4 6 8 10 0 2 4 6 8 10 Time s Time s 2 5 T 1 T 2 ence 3 dong ette 1 1 1 1 1 o Tice 256 3 ees 5 0 4 1 1 Mene pues NE REL MEN go PE MELDE LEE NORMA o DE ee a oe 0 2 4 6 8 10 0 2 4 6 8 10 Time s Time s Fig 43 PID simulation the desired position is a constant 2 3 3 PD Differential mode If you click the PD differential mode button the following windows opens see Fig 44 MLS2EM_PDdiff_m eee Magnetic Levitation Animation Position m IL Velocity m s Buti Current But Current A DesPos m EM 1 Control MagLev model Control and States Magnetic Levitation model 152 Fig 44 PD differential mode simulation MLS2EM User s Manual 34 PDdiff_m PD MLS2EM Saturation1 u 2 E Fig 45 Interior of the PD differential controller The interior of the PD controller working in the differential mode is shown in Fig 45 0 1
14. 4 In fact we deal with third order dynamical system The third integrator related to the coil current is visible in Fig 35 OpenLoop Magnetic Levitation model Current model TERES Fig 35 Interior of the Current model block The Simulink model is also equipped with the animation block When a simulation starts the following window opens see Fig 36 The animation screen is updated in every sample time All state variables the ball position and velocity and also the coil currents are animated MLS2EM User s Manual agnetic Levitation Animation MLS2EM De J findow x 0 007 x A 0 754 x m s 0 004 x 0 350 2 4 Fig 36 MLS2EM animation 26 Mathematical model The schematic diagram of the MLS2EM system is shown in Fig 37 Two electromagnetic forces and gravity force act on the ferromagnetic sphere located between electromagnets The lower electromagnet can be used for external force excitation or as additional force to the gravity force X1 Fig 37 MLS2EM diagram The Simulink model is consistent with the following nonlinear mathematical model X 9 Fom E os 1 X3 f Qu 1 ku C x x4 x where F x F 2 2 em z Ping X4 x 2L emP2 emP2 emP2 F emP2 _ fp f x exp for both actuators iP2
15. 8 0 01 0 012 0 014 0 016 0 018 Distance m Fig 9 The sensor characteristics approximated by the fifth order polynomial MLS2EMUsers Manual 21 2 Actuator static mode In this subsection we examine static features of the actuator i e the electromagnet Notice that the sphere is not present Click the Actuator static mode button and the window shown in Fig 10 opens HLS2EM_ActStatSteps Fig 10 Identification window of a static current voltage characteristics Now we can perform button by button the operations depicted in Fig 10 We begin from the Build model for data acquisition button The window of the real time task shown in Fig 11 opens and the RTW build command is executed the executable code is created 7 MLS2EM_ActStat_rt Je M EM Current A Control signal dim Bull Control LUTTE MagLev2EM Magnetic Levitation Controls and States System 2EM Fig 11 Real time model built to examine the current in the electromagnetic coil Click the Set control gain button It results in activation of the model window and the following message is displayed see Fig 12 Fig 12 Message Set the Control Gain In Fig 11 one can notice the Control signal block In fact the control signal increases linearly We can modify the slope of this signal changing the Control Gain value Click the Data acquisition button Within 10 seconds dat
16. All the parameters and measured variables from the RT DAC4 PCI board are accessible by appropriate properties of the MagLev2EM class In the MATLAB environment the object of the MagLev2EM class is created by the command object name MagLev2EM for example mls2em maglev2em The get method is called to read a value of the property of the object property value get object name property The set method is called to set new value of the given property set object name property_name new property value The display method is applied to display the property values when the object name is entered in the MATLAB command window This section describes all the properties of the MagLev2EM class The description consists of the following fields Purpose Provides short description of the property Shows the format of the method calls Description Describes what the property does and the restrictions subjected to the property Describes arguments of the set method Refers to other related properties Provides examples how the property can be used MLS2EMUsers Manual 0 0000000000000 gg 3 1 BaseAddress Purpose Read the base address of the RT DAC4 PCI board Synopsis BaseAddress get mls2em BaseAddress Description The base address of RT DAC4 PCI board is determined by computer Each CML2EM object has to know the base address of the board When a CML2EM object is created the base address is detected
17. Lev2EM object is created the time counter is set to zero Each reference to the Time property updates its value The value is equal to the number of milliseconds which elapsed since the object was created 3 9 Quick reference table BaseAddress Dom Read the base address of the RT DACA PCI board Read the version of the logic design for the RT DACA PCI board PWM R S Read set the parameters of the PWM waves PWMPrescaler R S Read set the frequency of the PWM waves Stop Set the control signals to zero Voltage OR O Read the input voltages ThermStatus Read thermal flags of power amplifiers Time OR O Read time information R read only property S allowed only set operation R S property may be read and set bottom MLS2EMUsers Manual gg
18. Magnetic Levitation System 2EM MLS2EM User s Manual Printed by InTeCo Ltd phone fax 48 12 430 49 61 e mail inteco kki krakow pl Table of contents PIN PRODUCE HERD Po PED 3 1 1 LABORATORY SETSUP in deb pete tet iet 3 1 2 HARDWARE AND SOFTWARE REQUIREMENTS eee ee enenenener nn 4 1 3 FEATURES OF MYISS rne vr tab ERIS 5 1 4 TYPICAL TEACHING APPLICATIONS cccccccscecececececececececececececeeesesecececeeecesecseseeeseees 5 1 5 SOPIWAREINSTALLATION teen ness 5 2 ML MAIN WINDOW 6 2 1 5 e besa ists Lees o a Per Oe 7 2 1 1 SOnsOF eno ERED DEC Pet PELBEDDE s A 7 2 1 2 Actuator static mode esee eene nennen nnn 11 2 1 3 Minimal control ettet t at reca pres 14 2 1 4 Actuator dynamig ROUGE uuu ae eer deni cie shes 17 2 2 MAGLEV DEVICE 8 2 40000 4 nennen ene nnnn nenne 19 2 3 SIMULATION MODEL amp 23 2 3 1 Open LOOP EIC P MR 23 2 3 2 BD tete 33 2 3 3 red 34 2 4 LEEVITATION eo D E 37 2 4 1 PD applied to Ny mea LAT 37 2 4 2 PD EMT EM2 pulse exclatiQRA ee ese eee 38 2 4 3 PD differential
19. a are acquired and stored in the workspace Click the Data analysis button The collected values of the coil current are displayed in Fig 13 Fig 13 Current in electromagnetic coil The characteristics is linear except a small interval at the beginning We can locate the cursor at the point where a new line slope starts see the red line in the picture We can move the cursor in two ways by writing down a value into the edition window or by drugging the slider In this way the current characteristics is prepared to be analyzed in the next step The line is divided into two intervals the first from the beginning of measurements to the cursor and the second from the cursor to the end of measurements After setting the cursor position consequently click the Analyze button The following message see Fig 14 appears We obtain the dead zone values corresponding to the control and current The constants a and b of the linear part are the parameters of the line equation aub Fig 14 Coefficients of actuator characteristics These parameters namely u y 0 00498 0 03884 2 5165 and 0 0243 are going to be used in the simulation model in section 2 3 1 see the differential equations parameters To obtain a family of static characteristics for linear controls with different slopes we repeat the following experiment We apply a PWM voltage
20. ation number 15 Measure Mesaured value V 3 0972 Fig 5 Characteristics of the sphere position sensor Manually make one full rotation of the screw Repeat three last steps so many times as none change in the voltage vs position characteristics is observed Push the Export Data button the data are written to the disc see Fig 6 Data are stored in the MLS2EM Sensor mat file as the SensorData structure with the following signals Distance mm Distance m and Sensor V In the Simulink real time models the above characteristics is used as a Look Up Table model The block named Position scaling is located inside the device driver block of MLS2EM see Fig 7 Notice that the characteristics shows meters vs Volts In Fig 6 MLS2EMUsers Manual ge there were shown Volts vs meters It is obvious that we require the inverse characteristics because we need to define the output as the position in meters Notice that the characteristics can be different due to manufacturing process and light conditions Sensor signal V 0 5 0 0 002 0 004 0 006 0 008 0 01 0 012 0 014 0 016 0 018 Distance m Fig 6 The sensor characteristics after being measured and exported to the disc osition scaling V to m Fig 7 The Simulink Look Up Table model representing the position sensor characteristics If we click this block the window shown in Fig 8 opens Any time you like to modify the sensor characteristics you can int
21. automatically The detection procedure detects the base address of the first RT DAC4 PCI board plugged into the PCI slots Example Create the MagLev2EM object mls2em MagLev2EM Display their properties by typing the command mls2em Type InTeCo ML2EM object BaseAddress 54272 D400 Hex Bitstream ver x901 Input voltage 0 8451 0 0244 0 0243 V PWM 0 0 PWM Prescaler 0 01 Thermal status 0 0 Time 0 00 sec Read the base address BA get mls2em BaseAddress 3 2 BitstreamVersion Purpose Read the version of the logic stored in the RT DAC4 PCI board Synopsis Version get mls2em BitstreamVersion Description The property determines the version of the logic design of the RT DAC4 PCI board The magnetic levitation models may vary and the detection of the logic design version makes it possible to check if the logic design is compatible with the physical model 3 3 PWM Purpose Set the duty cycle of the PWM wave Synopsis PWM get mls2em PWM set mls2em PWM NewPWM MLS2EMUsers Manual gg Description The property determines the duty cycle and direction of the PWM wave The PWM wave is used to control the electromagnet so in fact this property is responsible for the electromagnet control signal The NewPWM variable is a two element vector in the range from 0 to 1 The value of 1 means the maximum control 0 0 means zero control See PWMPrescaler
22. control TOO t 39 3 DESCRIPTION OF THE MAGNETIC LEVITATION CLASS PROPERTIES42 3 1 56 55 ears 43 32 BITSTREAM VERSION nee ne bre RI UIS 43 3 3 PWM at tu E et PELIS 43 3 4 oett utilises tet en s estt e s 44 3 5 STOPC Se Co TE 44 3 6 VOLTAGE acides eie eue DI m INIHI 44 3 7 THERMSTATUS eco iiiter e nee ir ies 45 3 8 T 45 3 9 QUICK REFERENCE 0 eene nennen I E R a a 45 Introduction The Magnetic Levitation System with 2 Electromagnets MLS2EM is a complete after assembling and software installation control laboratory system ready to experiments The is an ideal tool for demonstration of magnetic levitation phenomena This is a classic control problem used in many practical applications such as transportation magnetic levitated trains using both analogue and digital solutions to maintain a metallic ball in an electromagnetic field MLS2EM consists of two electromagnets the suspended hollow steel sphere the sphere position sensors computer interface board and drivers a signal conditioning unit connecting cables real time control toolbox and a laboratory manual This is a single degree of freedom system for teaching of
23. control systems signal analysis real time control applications such as MATLAB MLS is a nonlinear open loop unstable and time varying dynamical system The basic principle of MLS operation is to apply the voltage to an upper electromagnet to keep a ferromagnetic object levitated The object position is determined through a sensor Additionally the coil current is measured to explore identification and multi loop or nonlinear control strategies To levitate the sphere a real time controller is required The equilibrium stage of two forces the gravitational and electromagnetic has to be maintained by this controller to keep the sphere in a desired distance from the magnet When two electromagnets are used the lower one can be used for external excitation or as contraction unit This feature extends the MLS application and is useful in robust controllers design The position of the sphere may be adjusted using the set point control and the stability may be varied using the gain control Two different diameter spheres are provided The band width of lead compensation may be changed and the stability and response time investigated User defined controllers may be tested 1 1 Laboratory set up A schematic diagram of the laboratory set up is shown in Fig 1 Electromagnet 1 Electromagnet 2 supply Fig 1 MLS2EM laboratory set up One obtains the mechanical unit with power supply and interface to a PC and the dedicated RTDACA PCI I O board c
24. cteristics For a fixed PWM frequency and a variable duty cycle the coil amperage is measured The measured data are given below in the table PWM duty cycle amperage A voltage V 0 0 0 374811 0 1 0 25 0 262899 0 2 0 51 0 510896 0 3 0 77 0 752465 0 4 1 02 0 993620 0 5 1 28 1 229133 0 6 1 52 1 459294 0 7 1 74 1 651424 0 8 1 99 1 875539 0 9 2 21 2 076814 1 2 43 2 269865 The current A vs voltage V characteristics is shown in Fig 30 2 5 T m a E ssi 4 5 e 4 en 0 0 5 1 1 5 2 2 5 Measured signal V Fig 30 Current vs voltage characteristics approximated by the red curve The characteristic can be approximated by a polynomial of the second order 0 aU a where I current U voltage from the A D converter dy identified parameters of the polynomial a 0 0168 1 0451 ay 0 0317 MLS2EM User s Manual 22 2 3 Simulation Model amp Controllers Click the Simulation Model amp Controllers button in the Magnetic Levitation Main window The following window opens see Fig 31 Fig 31 Simulation Model amp Controllers window 2 3 1 Open Loop Simulink model Next you can click the first Open Loop button The following window opens see Fig 32 Notice that the
25. ent A M to A EM1 Control Control PWM duty PWM Duty Saturation EM EM2 Control EM2 Control PWM duty PWM Duty Saturation 2 Fig 28 Interior of the driver block Do not introduce any changes inside the original driver They can be gt introduced only inside its copy Make a copy of the installation CD The Simulink Look Up Table model named Position scaling see Fig 7 representing the position sensor characteristics has been already described Now let us present the second Simulink Look Up Table model named Current scaling see Fig 29 Current scalling V to A Fig 29 The Simulink Look Up Table model representing the current sensor characteristics To build the above characteristics it is necessary to measure the current of the electromagnet coil The algorithm in the computer is the source of the desired value of the control in the form of the voltage PWM signal This PWM is the input voltage signal transferred to the LMD18200 chip of the power interface Due to a high frequency of the MLS2EMUsers Manual 20 0 PWM signal the measured current values correspond to the average current value in the coil This characteristics has been built by the manufacturer It is not recommended to repeat measurements by a user because to do so one must unsolder the input wires of the electromagnet On the basis of the data given in the table below one can generate his own chara
26. gainst the gravity force Notice that in this experiment the sphere is not levitating It is kept nearby the electromagnet in the operating range MLS2EMUsers Manual ge Click the Minimal control button and the window shown in Fig 18 opens ITE T Fig 18 Window to identify the minimal control vs distance between the sphere and electromagnet Now we proceed button by button the operations depicted in Fig 18 similarly to the procedure described in the previous subsection We begin from the Build model for data acquisition button The window of the real time task shown in Fig 19 opens i MLS2EM rt Control signal Current A Bull Control EM2 Control MagLev2EM Magnetic Levitation Controls and States System 2EM Fig 19 Real time model built to examine the minimal electromagnetic force Click the Set control gain button It results in activation of the model window and the following message is displayed see Fig 20 Fig 20 Message set the Control Gain It means that we can set a duty cycle of the control PWM signal The sphere is located on the support and the experiment starts Click the Data acquisition button A forced motion of the ball toward the electromagnet begins Click the Data analysis button The collected values of the ball position are displayed in Fig 21 MagLev MagLev Minimal control analysis
27. gn Intelligent Adaptive Control Frequency analysis Nonlinear control Hardware in the Loop Real Time control Closed Loop PID Control 1 5 Software installation Insert the installation CD and proceed step by step following displayed commands 2 ML Main Window The user has a rapid access to all basic functions of the MLS System from the MLS2EM Control Window In the Matlab Command Window type MLS2EM Main and then the Magnetic Levitation Main window opens see Fig 2 MLS2EM_Main Y LH Fig 2 The Magnetic Levitation Main window In the MLS2EM Main window one can find testing tools drivers models and demo applications You can see a number of pushbuttons ready to use The MLS2EM Main window shown in Fig 2 contains four groups of the menu items Tools identification RTWT Device Driver MagLev device drivers e Simulation model and controllers e Real time experiments levitation Section 2 is divided into four subsections Under each button in the MLS2EM Main window one can find the respective portion of software corresponding to the problem announced by the button name These problems are described below in four consecutive subsections MLS2EMUsers Manual 2 1 Identification If we click the identification button the following window see Fig 3 opens There are the default values of all parameters defined by the manufacturer Nevertheless a user is equipped with a number of identif
28. ication tools He can perform the identification procedures to verify and if necessary modify static and dynamic characteristics of MLS2EM MLS2EM_Identification Fig 3 The identification window Four identification steps have been preprogrammed They are described below 2 1 1 Sensor In this subsection the position sensor characteristics is identified If you click the Sensor button the following window opens see Fig 4 MagLev Mei x MagLev Sensor characteristics identification Measure Mesaured value V Distance mm Sensor output V Fig 4 Sensor signal in V vs the sphere distance from the electromagnet in mm The following procedure is required to identify the characteristics 1 2 7 Screw in screw bolt into bottom electromagnet Screw in the black sphere and lock it by the nut Notice that the sphere is fixed to the bottom electromagnet and frame recpectively Turn round the screw so the sphere is in touch with the bottom of the top electromagnet Make sure that the power is on Start the measuring and registration procedure It consists of the following steps Push the Measure button the voltage from the position sensor is stored and displayed as Measured value V One can correct this value by measuring it again Push the Add button the measured value is added to the list A rotation number value is automatically enlarged by one see Fig 5 MagLey Rot
29. is described in the Assembling manual It consists of Two electromagnets e Ferromagnetic objects e Position sensor e Current sensors e Power interface RTDACA PCI measurement and control I O board Pentium or AMD based personal computer Software For development of the project and automatic building of the real time program is required The following software has to be properly installed on the PC MS Windows 2000 or Windows XP MATLAB Simulink Signal Processing Toolbox and Control Toolbox from MathWorks Inc to develop the project Real Time Workshop to generate the code Real Time Windows Target toolbox MLS2EM User s Manual 4 The MagLev toolbox which includes specialised drivers for MLS2EM These drivers are responsible for communication between MATLAB and the RT DACA PCI measuring and control board MS Visual to compile the generated code if MATLAB version 6 5 is used 1 3 Features of MLS 1 4 Aluminium construction Two ferromagnetic objects spheres with different weight Photo detector to sense the object position Coil current sensors A highly nonlinear system ideal for illustrating complex control algorithms None friction effects are present in the system The set up is fully integrated with MATLAB Simulink and operates in real time in MS Windows 2000 XP The software includes complete dynamic models Typical teaching applications System Identification SISO MISO BIBO controllers desi
30. ng the appropriate value of damping ratio we can control the damping mode In most cases the critically damped mode can be used because it is the most stable mode characterized by the asymptotic stability and time constant Note that and f presented in the linearized system strongly depend on the selected steady state point Using the digital form of the PD controller the derivative component can be calculated as difference quotient The sampling frequency affects proportionally the derivative gain of the controller 2 3 2 PD If you click the PD EMI button the following windows open see Fig 42 The interior of the Magnetic Levitation model MLS2EM block is shown in Fig 34 MLS2EM_PD_m Magnetic Levitation Animation E Velocity DesPos m B Current A Bvt Current A EM 1 Control MagLev model monum Control and States Magnetic Levitation model MLS2EM Fig 42 PD simulation The parameters given bellow are used in the PD controller K Kp u0 55 5 0 3611 The simulated stabilization results are shown below 0 1 1 1 0 015 queden queni E NE a 1 A cene oo NE ee 2 0 i i i i E i o ZEN o Wu t 8 i 0005
31. od bacc sedet i 5 ZUM NE 0g ecefeeceedeeeeqjeseesepeeceqpeemeeereeequeenequee cer 1 ha NM T oc measured current e d modeled current 0 I I I 0 0 02 0 04 0 06 0 08 0 1 0 12 0 14 0 16 0 18 Time s Fig 25 Current curve the fitting result of the optimization procedure Finally the information about the mean values is displayed see Fig 26 The advanced user can use the functions code to perform a detailed analysis lt MagLey 150 Actuator dynamic analysis Mean ki value 2 4525018 Mean fi value 0 0258934 sey Fig 26 Optimization results Using the EM Selector block select the electromagnet to be controlled and repeat the whole procedure for both electromagnets MLS2EMUsers Manual 2 2 MagLev device drivers The driver is a software go between for the real time MATLAB environment and the RT DAC4 PCI acquisition board The control and measurements are driven Click the RTWT Device Drivers button in the Magnetic Levitation Main window The following window opens see Fig 27 MLS2EM_DevDriv ERO V m 3 4 L i ob ES
32. onfigured in the Xilinx technology The software operates in real time under MS Windows 2000 XP using MATLAB Simulink and RTW and RTWT toolboxes Control experiments are programmed and executed in real time in the MATLAB Simulink environment Thus it is strongly recommended to a user to be familiar with the RTW and RTWT toolboxes One has to know how to use the attached models and how to create his own models The control software for the MLS2EM is included in the MLS2EM toolbox This toolbox uses the RTWT and RTW toolboxes from MATLAB MLS2EM Toolbox is a collection of M functions MDL models and C code DLL files that extends the MATLAB environment in order to solve MLS modelling design and control problems The integrated software supports all phases of a control system development on line process identification control system modelling design and simulation real time implementation of control algorithms MLS2EM Toolbox is intended to provide a user with a variety of software tools enabling on line information flow between the process and the MATLAB environment real time control experiments using demo algorithms development simulation and application of user defined control algorithms MLS2EM Toolbox is distributed on a CD ROM It contains software and the MLS2EM User s Manual The Installation Manual is distributed in a printed form 1 2 Hardware and software requirements Hardware Hardware installation
33. roduce new data related to the voltage measured by the sensor The voltage corresponds to the distance of the sphere set by a user while the identification procedure is performed The sensor characteristics is loaded from the MLS2EM_sensor mat file which has been created during the identification procedure If the curve of the Position scaling block is not visible please load the file with data The sensor characteristics can be approximated by a polynomial of a given order For example we can use a fifth order polynomial MLS2EMUsers Manual ge p x Ps 25097073504 5907 1245050011 25 18773635 92 79330 24 150 21 5 015 m Look Up T able Perform 1 D linear interpolation of input values using the specified table Extrapolation is performed outside the table boundaries Parameters Vector of input values SensorD ata Sensor_ end 1 1 Vector of output values SensorD ata Distance m end 1 1 Cancel Apply Fig 8 Look Up Table to be fulfilled with vectors of input and output values The approximated polynomial the red line is shown in Fig 9 The polynomial approximation will be not used in this manual due to the fact that the entire model is built in Simulink Therefore we recommend to model the characteristics as a Look Up Table block see Fig 7 and Fig 8 5 5 Sensor signal V 0 0 002 0 004 0 006 0 00
34. rol strategy Lets assume that the nonlinear model of MLS2EM is simplified to the upper electromagnet only and is linearized at the selected steady state point that the coil current is fixed and actuator dynamics can be neglected In this case the obtained model of the magnetic levitation system is controlled directly by the coil current and is simplified to the linear second order system Let s assume that the second order open loop system is described by the following formula where and 5 correspond to and respectively under above assumptions Fem u t K x t px t P The closed loop system has two poles which can be located on the imaginary axis representing the marginally stable system but generally they are located in the left half plane to obtain desired performance Choosing appropriate values of poles we can obtain the required dynamic behavior of the closed loop system The obtained second order closed loop system is characterized by programmable stiffness and damping settings X a BK x BK x The controller parameters K and be designed to satisfy requirements of the closed loop performance determined by the damp free natural frequency o and the damping ratio K ta Kp 260 B Choosing the appropriate value of we can control the speed of the system response to the external disturbance Highest natural angular frequency gives faster system response Setti
35. s ZINA 2 5 TWA Time s Time s Fig 51 PD stabilization and external pulse type excitation real time experiment The desired position as a constant 2 4 8 PD differential control mode Double click the LQ tracking button The real time LQ tracking controller opens see Fig 52 The results of the real time experiment are shown in Fig 53 39 MLS2EM User s Manual I MLS2EM_PDdif Position m Position m Velocity m s Butt Current A But Current A DesPos m Bull Control Buc Control MagLev2EM Magnetic Levitation Controls and States System 2EM Fig 52 PD differential control real time experiment MLS2EM User s Manual 40 Pe spe pe ve 1 1 1 1 1 1 o n T srur Aroopea 1 1 1 1 1 1 1 1 1 1 M apf spere petal 1 E 1 1 1 1 0 EE S M PENES ER 1 1 d 3 1 1 1 1 3 IM TR d S Mr zog 1 1 2 1 1 1 1 1 Xd SE n e quouroov dsrp Time s Time s 2 5 1 1 1 1 1
36. scope block writes data to the MLS2EMSimData variable defined as a structure with time The structure consists of the following signals Position m Velocity m s Currents A Controls PWM duty 0 11 MLS2EM_OpenLoop_m x qe e wpo wma 1848 V F m 1 Magnetic Levitation Animation Postion 1 Velocity m s Butt Current A But Current A Control and States Magnetic Levitation model MLS2EM Fig 32 Open loop simulation If you click the Magnetic Levitation model block the following mask opens see Fig 33 E Function Block Parameters Magnetic Levitation model MLS2EM 0 003 0 0 3 0 0 0571 1 7521e 2 5 8231e 3 1 4142e 4 4 5626 3 Fig 33 Mask of the Magnetic Levitation model MLS2EM In Fig 32 enter into the File option and choose Look under mask The interior of the Magnetic Levitation model MLS2EM block shown in Fig 34 opens Please note that we assume that the actuator and electromagnetic force characteristics are the same for both units MLS2EM User s Manual 24 MLS2EM_OpenLoop_m Magnetic Levitation model MLS2EM Position m 2 Velocity m s Current 1 Control Control PWMDuty PWM Duty EM2 Fem Current model Current A 1 2 Control Control PWMDuty1 PWM Duty Fig 34 Interior of the MLS2EM model Notice two integrator blocks in Fig 3
37. signal in the time interval from 0 to 10 s PWM duty cycles for the subsequent ten experiments are varying linearly in the ranges 0 0 1 0 0 2 0 1 0 see Fig 16 1 0 9 0 7 Control PWM duty w oO s Time s Fig 15 Family of the input PWM characteristics Consequently we obtain diagrams of the currents corresponding to ten experiment see Fig 16 Each characteristics is approximated by a polynomial of the first order Finally the entire current vs PWM duty cycle relation is depicted black points in Fig 17 The red line represents the linear approximation of measurements We obtain the following numerical values of linear characteristics 2 60798876298869 b 0 01077522109792 The constant c is obtained for 0 The family of linear characteristics is used to obtain the coefficients k vs control u Time s Fig 16 Family of the output current characteristics Current A i i i 0 5 i i i 0 0 1 0 2 03 04 05 06 07 08 0 9 1 Control PWM duty Fig 17 Current vs PWM duty cycle Using the EM Selector block select the electromagnet to be controlled and repeat the whole procedure for both electromagnets 2 1 3 Minimal control In this subsection we examine the minimal control to cause a forced motion of the sphere from the bottom electromagnet toward the upper electromagnet a

Download Pdf Manuals

image

Related Search

Related Contents

シャデり ア取扱説明書  Manual Interface Celular ITC4000  English manual  ITX-i290D    Intellinet 300N  

Copyright © All rights reserved.
Failed to retrieve file