Custom Controller Embedded into COMSOL Multiphysics® Magnetic Levitation Model via external MATLAB® file

Adam Krzysztof Pilat1, K.Słowik1
1AGH University of Science and Technology, Department of Automatic Control and Robotics, Mickiewicza 30, 30-059 Krakow, Poland
Published in 2020

The right way to design dedicated controller for a particular device or process is to compute an adequate and representative model. In the case of Magnetic Levitation Systems, the mathematical modelling via ordinary differential equations is limited by the analytical functions representing the electromagnetic force generated by the electromagnet and acting with an object to be attracted. The Multiphysics approach to the modelling allows to extend the modelling with the geometry and material properties, as well physical phenomena playing important role in the device/process dynamics. The design of active magnetic levitation and embedded controllers [1, 2, 3], have shown, that some using Multiphysics model one can obtain new results and applications. In the Magnetic Levitation Laboratory of AGH there exist a number of active levitation systems (suspensions and bearings) for research purposes. One of them is Active Magnetic Suspension with cylindrical electromagnet. The dual electromagnet in opposite action active magnetic levitation system with ferromagnetic sphere was modelled using COMSOL Multiphysics® axi-symmetry mode. The COMSOL Multiphysics® AC/DC Module was used to perform modelling of electromagnetic field. The Moving Mesh mode was applied to obtain free motion of the levitating sphere. Additionally, the ODE interface was used to obtain solution of the ordinary differential equation of levitating sphere motion. For this research the bottom electromagnet was not used. Two forces were acting on the sphere: the gravity and the electromagnetic one. The electromagnetic force generated by the electromagnet was computed by the solution of magnetic field problem. Therefore, the value of electromagnetic force depend on the applied geometry, materials and coil configuration. In this research the electromagnet is steered by the controller computed externally: in the m-file. Thanks to the COMSOL Multiphysics® LiveLink™ for MATLAB®, it was possible to design and realize the controller in the m-code (see Fig. 1). The embedded controller was realized as a nonlinear one based on Fuzzy Logic approach using Mamdani type architecture. The output control surface is nonlinear (see Fig. 2). The synthesis of the controller was done using MATLAB® tools and exported to the appropriate files for external computations. Using the realized model and MATLAB® features it is possible to design any kind of linear and nonlinear controller. In every COMSOL Multiphysics® computational step, the controller equation was calculated using formulas embedded in m-file on the basis of actual state (sphere position and velocity) exported from COMSOL Multiphysics® model. In the postprocessing mode it is possible to analyze magnetic field distribution during control stage (see Fig. 3). The initial conditions for the sphere and coil current were set and the problem was solved in time domain using BDF method with strict time stepping set to 5ms in a range up to 2.5seconds. The levitating sphere displacement versus time for a few configurations of the nonlinear controller are presented in Fig. 4. As result we obtained a fully functional virtual prototype consisting of a nonlinear model and nonlinear controller. This valuable tool is open for any kind of control system architecture design and simulation research prior to real-time experiments.

Download