hslogic_magnetic control system

The magnetic control system is one of the important platforms for learning and researching control theory. The study of magnetic systems can be attributed to the study of nonlinear systems and unstable systems. Such complex control objects are difficult to accurately describe with mathematical formulas, and it is difficult to achieve good control results using classical control methods.

This paper uses S-function to establish a nonlinear dynamic model of magnetic levitation in MATLAB environment. Introduce the development status of magnetic attraction technology at home and abroad and its application prospects, the background of this thesis and the purpose and significance of the research. Then the physical analysis of the magnetic control system and the establishment of its mathematical model are introduced, and the linear and nonlinear models of the system are analyzed in detail from electromagnetics. The study of PID control and fuzzy control of the magnetic attraction system first analyzes the traditional PID controller. Aiming at the limitation of the PID controller to the nonlinear magnetic attraction system control, the fuzzy control method is used and compared through experiments.

At the beginning of the 20th century, the founders of levitation theory were the first to create the free levitation of objects in space in the laboratory, which has long been regarded as a mysterious phenomenon in human history. However, the actual realization of electromagnetic absorption and the application of this technology are in recent decades. The levitation produced by purely using permanent magnets or superconductors is "passive magnetic levitation" (or "passive magnetic levitation"), while the levitation produced by electric or electromagnetic means is "active magnetic levitation" (or "active magnetic levitation"). Early research on levitation support focused on "Passive Magnetic Suspension". With the rapid development of modern science and technology, the research on electromagnetic levitation technology has begun to move to the "Active Magnetic Suspension" stage.

Especially in the 1980s, the discovery of superconductivity was first applied to magnetic levitation. The combination of superconducting technology and magnetic levitation technology, the emergence of new materials, new processes, new devices, and the development of modern control technology have made electromagnetic levitation technology mature, and entered a new stage of practical application from the theoretical research stage-magnetic levitation support technology and magnetic levitation There are two major application areas of train technology. Magnetic suspension bearing is a new type of high-performance bearing that uses magnetic force to suspend the rotor in space without mechanical friction. Due to the advantages of no contact, no friction, low vibration, no need for lubrication, and long working life, it significantly improves the vibration characteristics of rotating machinery and can be used to replace traditional high-speed rolling bearings and sliding bearings.

With the use of magnetic bearings, the spindle speed of high-speed processing equipment can be greatly increased (as low as tens of thousands of revolutions per minute, ultra-high speeds can even reach hundreds of thousands of revolutions per minute), which not only meets the needs of mechanical high-speed and efficient processing industries, but also Use the sensor of the magnetic bearing itself to monitor the processing status. It is precisely because of the unique properties of electromagnetic bearings that the research of electromagnetic bearings has attracted more and more attention in the world.

From the late 1980s to the early 1990s, the results of a study conducted by NASA on the "feasibility of applying magnetic bearings to aero engines" showed that the weight of the engine can be reduced by simply eliminating the original rolling bearing sealing and lubrication system. %, the efficiency is increased by 5%, and the carrying capacity is increased by 2 to 4 times; the magnetic bearing requires less than 100W of power. This shows the advantages of magnetic bearings. However, it should be pointed out that, compared with active magnetic bearings, passive magnetic suspension systems have the advantages of simple structure, reliability and low cost, but they cannot produce damping, that is, they lack additional means like mechanical damping or active bearings. Therefore, the stability domain of this system is very small, and small changes in external disturbances will also make it unstable. Similarly, the active magnetic levitation system, due to the use of active feedback control, its stiffness and damping can be flexibly adjusted online. However, its control system is complicated in structure, difficult, continuous energy consumption, large iron loss, and low efficiency, which are problems that cannot be ignored in active magnetic levitation systems. Under the condition that powerful control can be realized at relatively low cost, people have begun to study hybrid magnetic levitation systems, combining "active" and "passive", complementing each other's strengths, and giving full play to the performance advantages of magnetic levitation technology. Therefore, it is very meaningful to study the hybrid magnetic levitation system.

The idea of ​​using magnetic force to make objects in a non-contact floating state has a long history, but it is not easy to realize. As early as 1842, Eamshow proved that permanent magnet alone cannot keep an electromagnet in a free and stable floating state in all six degrees of freedom. To make the ferromagnet realize stable magnetic levitation, the magnetic field force must be adjusted continuously according to the levitation state of the object. In 1937, German scientist Kenper proposed this idea and applied for the first magnetic levitation technology patent, which constituted the leading idea for subsequent research on magnetic levitation trains and magnetic bearings. In 1939, Braunbeck conducted a rigorous theoretical proof of magnetic levitation. Subsequent studies have proved that if the minimum first-order degree of freedom is constrained by external machinery, a strong magnetic object can be magnetically suspended in a stable equilibrium state. So far, the magnetic levitation theory has been developed relatively well.

1.2 Magnetic levitation control method and development trend

In many practical applications of magnetic levitation, the levitation air gap of the magnetic levitation system is required to have a larger working range. However, due to the non-linear characteristics between the magnetic levitation force-current-air gap, the system model is unstable in open loop. At least output feedback is required for closed-loop control to achieve stable suspension. In order to design a levitation controller with good performance, the stability control of the magnetic levitation system has been extensively and deeply studied. In traditional industrial control, mature PID control regulators are mostly used, in which the proportional link can speed up the system's response speed, the integral link can eliminate the static error and adjust the system stiffness; the differential link can adjust the damping characteristics of the system and improve the dynamic quality of the system.

The PID regulator has simple structure, convenient adjustment and mature application. However, in high-precision magnetic levitation technology, the complexity of working conditions and the nonlinearity of the magnetic field make it difficult for traditional PID controllers to meet engineering needs. The stable control of the maglev model usually involves Taylor expansion of the nonlinear maglev model near the equilibrium point. After ignoring the high-order terms, the first-order linearized model is obtained. This linearization model has been widely used in magnetic levitation control, and its practical value has been verified in engineering, but the control strategy designed using this linearization method also has its limitations. Since the linearization model is obtained near the equilibrium point, when the equilibrium point of the system changes, the dynamic characteristics of the system will change significantly, and the control strategy will deteriorate rapidly, affecting system stability. At this time, the linear control law often cannot meet the requirements of system stability. Therefore, more advanced control methods are required. In recent years, with the improvement of the industrial level, many advanced control methods have emerged in the field of automation.

Intelligent control Intelligent control method refers to the control method based on online learning and identification, such as fuzzy control, neural network control, etc. The characteristic of this type of method is that the controlled system can be treated as a "black box" without any related priors. Knowledge, the controller can learn the system characteristics according to the output response and implement online adjustment of the control parameters as needed. The advantage of this kind of method is that it can overcome the influence of magnetic suspension nonlinearity and external interference on the system. However, the intelligent control system has its own complexity, is still in the experimental research stage, and has not been used in mature engineering.

System identification System identification is the theory and method of constructing a mathematical model of the system using the information observed by the system. It involves a wide range of theoretical foundations. For univariate linear systems, there have been a series of successful theories and identification methods, and the research in multivariable systems is not yet mature. However, there is no obvious advantage over the traditional control method in a single variable system.

With the advancement of control methods and the improvement of system requirements, control methods should be developed to improve system stability, reliability and economy while meeting the needs. The research on advanced control methods in magnetic levitation systems has undoubtedly become the field of magnetic levitation. A hot spot. Magnetic levitation system is a typical nonlinear system, and its nonlinear characteristics cannot be ignored. However, most of the current maglev controllers are linear control laws designed based on the linearized model of the nonlinear maglev system at a certain equilibrium point. When the balance point of the system changes, the dynamic characteristics of the system will change significantly. At this time, the linear control law often cannot meet the requirements of system stability. Therefore, it is necessary to design the control law based on the nonlinear model of the magnetic levitation system. Passivity is a special case based on dissipative properties. It is an advanced nonlinear control method. It describes the input and output of the system from the perspective of energy. It can connect some mathematical tools with physical phenomena and is suitable for many control problems. In terms of control applications such as electromechanical systems and robots, as well as control methods such as adaptive control and nonlinear H∞ control, passivity has been proven to be an effective method.

3.1 The basic structure of the magnetic system

The magnetic control system is mainly composed of iron core, coil, sensor, controller, power amplifier and its control target rigid body. The system structure is shown in Figure 3-1.

Figure 3-1 Basic structure of magnetic control system

3.1 The basic structure of the magnetic system

The magnetic control system is mainly composed of iron core, coil, sensor, controller, power amplifier and its control target rigid body. The system structure is shown in Figure 3-1.

Figure 3-1 Basic structure of magnetic control system

Among them: u(t)-the output of the controller; e(t)-the input of the controller, which is the difference between the given value and the output value of the controlled object, called the deviation signal; Kp-the proportional coefficient of the controller; Ti- The integral time constant of the controller; the derivative time constant of the Td controller.

In PID control, the proportional term is used to correct the deviation, the integral term is used to eliminate the steady-state error of the system, and the differential term is used to reduce the overshoot of the coefficient and increase the stability of the system. The performance of the PID controller depends on the three coefficients of Kp, Ti and Td. How to select these three coefficients is the core of PID control.

    The basic structure of the PID controller is as follows:

Figure 3-2 Block diagram of PID control system

The functions of each calibration link of the PID controller are as follows:

·The proportional link immediately reflects the deviation signal e(t) of the control system proportionally. Once the deviation occurs, the controller immediately produces a control effect to reduce the deviation.

·The integral link is mainly used to eliminate the static error and improve the error-free degree of the system. The strength of the integral action depends on the time constant Ti. The larger the Ti, the weaker the integral action, and vice versa.

The differential link can reflect the change trend (rate of change) of the deviation signal, and can introduce an effective early correction signal into the system before the deviation signal becomes too large, thereby speeding up the system's action speed and reducing the adjustment time.

The ideal PID control effect is not ideal. The main reason is that the ideal differential action changes too fast for strong disturbances with fast amplitude changes, while the actual mechanism in industry has a relatively slow action speed and cannot respond to the differential control action in time; In addition, the ideal differential control is very sensitive to the noise interference in the deviation signal. Even if the amplitude of the interference is small, as long as the frequency is high, after the ideal differentiation, a larger noise output can be generated, which ultimately affects the control accuracy. It will increase the wear of the actuator. At present, PID control is widely used in industry, but its control effect is not ideal for controlled objects with nonlinear, large time delay, strong coupling and other characteristics, although it is determined by optimal PID, nonlinear PID and adaptive PID control is an improved form of PID control, but fundamentally speaking, the optimization of PID parameters is a compromise between the three control functions of proportional, integral, and derivative, and a compromise between interference suppression adjustment and target value tracking setting. The tuning parameters are not optimal, that is, the PID controller needs to use different PID parameters for different objects, and the adjustment is inconvenient, the anti-interference ability is poor, and the overshoot is large. Fuzzy control is a kind of language control, which does not depend on the mathematical model of the controlled object. The design algorithm is simple and easy to implement. It can be directly summarized and optimized from the operator's experience. It has strong adaptability, strong anti-interference ability and robustness. Good sex. But fuzzy control also has its shortcomings, because its control function can only be processed by gears, which is a non-linear control with low control accuracy and static errors. Therefore, combining the two methods, synthesizing their advantages and overcoming each other's shortcomings, there is a composite controller, which is a fuzzy PID controller.

PID control algorithm has good control effect and adaptability to most processes, and it is still widely used in the control process, but manual adjustment of PID parameters requires skilled skills. In addition, even if the PID parameters are well adjusted, use the same set of fixed PID parameters to adapt to the whole process of the system. When the control object parameters change, the performance of the system will inevitably be affected. Therefore, the online automatic adjustment of PID parameters is very important. Fuzzy control theory can effectively and conveniently realize human control strategies and experience, and it can achieve better control without the mathematical model of the controlled object. It combines fuzzy control and PID control to maximize strengths and avoid weaknesses, and it has both fuzzy control. It has the advantages of flexibility and adaptability, but also has the characteristics of high PID control accuracy. And make the PID controller adapt to the change of the controlled object, and obtain good control performance. This is also a problem to be studied in fuzzy PID self-tuning theory.

In 1988, Swedish scholar Astrom first proposed the concept of Auto-tuning at the American Control Conference. He believes that the self-tuning controller can be regarded as the automation of the tuning experience of an experienced instrument engineer. The self-tuning controller should include methods for extracting process dynamic characteristics from experiments and have certain reasoning capabilities. To put it simply, PID parameter auto-tuning means that the controller can automatically tune the initial value of the PID parameter. After the initial value is set, it will automatically switch to the normal working state, and the system will automatically start when the system performance changes and exceeds a certain range. PID parameter tuning process re-tune PID parameters to achieve better control effect. There are many ways to realize PID parameter online self-tuning, such as self-tuning based on fuzzy and neural network technology, self-tuning based on expert system and self-tuning based on nonlinear control. Among them, the self-tuning method based on fuzzy and neural network control technology is now one of the hot issues studied by the majority of control workers.

Fuzzy adaptive PID control system can detect and analyze uncertain conditions, parameters, delays and interferences during the control process, and use fuzzy inference methods to realize online self-tuning of PID parameters kp, ki and kd. It not only maintains the characteristics of simple principle, convenient use and strong robustness of the conventional PID control system, but also has the characteristics of greater flexibility, adaptability and accuracy.

Figure 3-3 Fuzzy adaptive PID control system structure diagram

4.1 MATLAB modeling of linear state equation of magnetic attraction system

 

The MATLA code is as follows:

function y=MagLev(m,g,R,L,k,h0);

i0=h0*sqrt(m*g/k);

A=[0 1 0;2*k*i0^2/(m*h0^3) 0 -2*k*i0/(m*h0^2);0 0 -R/L];

B=[0;0;1/L];

C=[1 0 0];

D=0;

y=ss(A,B,C,D)

Enter pole ( MagLev ) in the command window of MATLAB ;

   31.3369

  -31.3369

 -125.0000

With the parameters kp and k1, one pole of the PI controller is at the origin, and a zero is at the position of -k1/kp. Compared with the other zeros of the system, if the PI controller zeros are very close to the poles, then when the PI controller and the PD controller are connected in series to form a PID controller, then his influence on the closed-loop transient characteristics at this time is negligible. In the magnetic control system of this system, we take kp=1; k1=1. The matlab code is as follows:

y=MagLev;

yy=pole(y);

PD=tf(-1*[1 20],[1 50]);

rlocus(PD*MagLev);

PI = tf ([1 1], [1 0]);

[y,t]=impulse(feedback(150*PI*PD*MagLev,1));

figure(2);

plot(t,y)

sgrid;

The simulation results are as follows:

Figure 4-3 Impulse response curve of magnetic attraction system

Introducing S-function into SIMULINK can effectively solve some complex problems. In a system containing state equations or piecewise equations, the block diagram model cannot be directly constructed. However, it is very simple to use S-functions to describe the state equations and piecewise equations. Therefore, calling S-functions through the S-function module solves these problems. Very effective means for complex problems. This method can be extended to fuzzy control or other similar intelligent control fields.

S-function is the core of SIMULINK operation. S-function has three manifestations: block diagram form; M file form; MEX file (C or FORTRAN subroutine). The block diagram is intuitive, easy to construct, faster in running speed, flexible in writing M files, wide adaptable, slow in running, and fastest in MEX files. Therefore, which method should be used depends on the specific situation. When solving more complex problems, it is often necessary to cross-use different methods.

The S-function formed by the M file can be applied to various functions and language functions in MATLAB. As long as the system model under study can be described by MATLAB, the corresponding S-function can be constructed, so as to rely on the S in SIMULINK. -The function module realizes the communication and connection between MATLAB and SIMULINK, so it can give full play to the advantages of MATLAB programming flexibility and SIMULINK simple and intuitive.

The boot statement of S-function is: function[sys,x0,str,ts]=sFunname(t,x,u,flag)

Among them, sys is the output of each function, x0 is the initial state variable of the system, str is the explanatory variable, and ts is the sampling period variable; t, x and u are the time, state and input signal respectively, and flag is the flag bit. When the value is in the simulation, the system will automatically pass it to the S-function. sFunname is the name of the defined S-function.

In order to make our simulation results closer to the actual system, we consider building a nonlinear model of the hybrid magnetic levitation ball system during the simulation process, but the model with nonlinear factors is not easy to build directly in Simulink, so here we use the previously introduced S -Functional programming to construct a non-linear module of hybrid magnetic levitation ball, this module mainly realizes the force-current-displacement characteristics of electromagnet.

The MALAB code of the S function is as follows:

function [sys,x0]=MagModel(t,x,u,flag)

m=0.1;

g=9.82;

R=5;

L=0.04;

k=0.01;

h0 = 0.02;

i0=h0*sqrt(m*g/k);

switch flag

    case 1

        xdot   =zeros(3,1);

        xdot(1)=x(2);

        xdot(2)=m*g-k*x(3)^2/x(1)^2;

        xdot(3)=-R/L*x(3)+1/L*u(1);

        sys=xdot;

    case 3

        sys=x(1);

    case 0

        sys==[3 0 1 1 0 0];

        x0 = [h0 + 0.1 * h0; 0; i0];

    otherwise

        sys=[];

end

The M file code at the top level is:

y=MagLev;

yy=pole(y);

PD=tf(-1*[1 20],[1 50]);

rlocus(PD*MagLev);

PI = tf ([1 1], [1 0]);

[y,t]=impulse(feedback(150*PI*PD*MagLev,1));

figure(2);

plot(t,y)

sgrid;

 [num, den] = tfdata (150 * PD * PI, 'v' );

simulink;

Set up the following simulation model in SIMULINK.

 

 

 

Figure 4-4 Simulation model of nonlinear system

The simulation results are as follows:

 

Figure 4-5 Simulation effect of PID nonlinear magnetic attraction control system

 

 

 

Guess you like

Origin blog.csdn.net/ccsss22/article/details/108701374