Disclosure of Invention
The invention aims to provide a reliability test equipment control method to solve the problems of poor stability, low speed and the like of a control system.
In order to solve the technical problems, the technical scheme of the invention is as follows: provided is a reliability test device control method including the steps of: step 1: establishing a position control model of a reliability test equipment servo system, which comprises establishing a voltage space vector diagram according to the switching state of an inverter; judging a sector where the voltage vector is located; calculating the action time of the voltage space vector; step 2: designing a fuzzy PID controller, comprising determining input and output variables and establishing a fuzzy rule; and step 3: the fuzzy PID is optimized by the particle swarm, and the quantization factor K of the fuzzy controller is calculated by the particle swarm
e、K
ecScale factor K
uOptimizing, namely optimizing according to errors and error change rates of different stages in actual response of a control system by taking an integral performance index as an optimization target, and comprising the following steps of: 1. determining a controller parameter K
e、K
ec、K
uIs initializedThe population of the system comprises an initial position of the population, an initial speed, iteration times, a learning factor and an inertia factor of the population; 2. according to
Evaluating the fitness of each particle; 3. for each particle, fit value is compared to the best position pbest it passes through
kComparing, if the best position is obtained, taking the best position as the current best position; 4. for each particle, its fitness value is compared to its globally-passed best position gbest
kComparing, if the position is better, taking the position as the best position of the whole; 5. according to v
k+1=ωv
k+c
1(p best
k-x
k)+c
2(gbest
k-x
k) And x
k+1=x
k+v
k+1Updating the speed and position of the particles; 6. if a good enough adaptation value is reached or the number of iterations is reached, continuing to execute the next step, otherwise, jumping back to 2; 7. get the best position gbest of the population
kTo determine the quantization factor K
e、K
ec、K
uThen, carrying out fuzzy PID control to obtain the output correspondence of the system, and returning to step 2 to continue execution; and 4, step 4: and carrying out simulation analysis on the reliability test equipment control system.
Further, in step 2, determining the input-output variables comprises: the fuzzy PID controller adopts a two-input three-output structure and uses error e and error change rate ecAs the input quantity of the fuzzy PID controller, the output quantity is the parameter K of the PID controllerp、Ki、KdError e and error rate of change ecAnd a control parameter KpKiKdThe fuzzy sets of (A) are all { NB, NM, NS, ZO, PS, PM, PB }, the corresponding language value sets are { big negative, middle negative, small negative, zero, small positive, middle positive, big positive }, and the input variables e and ecHas a ambiguity domain of [ -6, 6]Output variable Kp、Ki、KdHas a ambiguity domain of [ -3, 3 [)]And selecting a triangular membership function as the membership function of the system.
Further, in step 2, establishing the fuzzy rule comprises: when error occursWhen e is larger, take the larger KpSmaller KdAnd a smaller KiA value; when the error e is in a medium size, taking a smaller KpModerate size KiAnd Kd(ii) a When the error e is smaller, take the larger KpAnd KiWhen e iscTaking the larger K when smallerd(ii) a When e iscWhen larger, take smaller Kd。
According to the reliability test equipment control method provided by the invention, the response speed and the control precision of the control system are improved based on the control of the fuzzy PID of the genetic algorithm. The servo system outputs the difference value of the position given signal and the position detection signal through a position regulator as the given rotating speed; the difference value between the set rotating speed value and the detected rotating speed value is output through a rotating speed regulator and serves as the set current; the current loop acts as the innermost loop and can quickly track a current set. The current is modulated by PWM pulse width to obtain control voltage, the rotating speed of the motor is controlled, and the motor drives the load to rotate after passing through the speed reducer, so that the purpose of position control is achieved. The position loop and the current loop are controlled by PI, the speed loop is controlled by fuzzy PID position based on genetic algorithm, and the rapidity and the stability of the control system are improved.
Detailed Description
The reliability testing device control method proposed by the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. Advantages and features of the present invention will become apparent from the following description and from the claims. It is to be noted that the drawings are in a very simplified form and are all used in a non-precise ratio for the purpose of facilitating and distinctly aiding in the description of the embodiments of the invention.
The core idea of the invention is that the reliability test equipment control method provided by the invention improves the response speed and control precision of a control system based on the control of the fuzzy PID of the genetic algorithm. The servo system outputs the difference value of the position given signal and the position detection signal through a position regulator as the given rotating speed; the difference value between the set rotating speed value and the detected rotating speed value is output through a rotating speed regulator and serves as the set current; the current loop acts as the innermost loop and can quickly track a current set. The current is modulated by PWM pulse width to obtain control voltage, the rotating speed of the motor is controlled, and the motor drives the load to rotate after passing through the speed reducer, so that the purpose of position control is achieved. The position loop and the current loop are controlled by PI, the speed loop is controlled by fuzzy PID position based on genetic algorithm, and the rapidity and the stability of the control system are improved.
The technical scheme of the invention provides a reliability test equipment control method, and fig. 1 is a flow chart illustrating the steps of the reliability test equipment control method provided by the embodiment of the invention. Referring to fig. 1, the reliability test apparatus controlling method includes the steps of:
s11: establishing a position control model of a reliability test equipment servo system, which comprises establishing a voltage space vector diagram according to the switching state of an inverter; judging a sector where the voltage vector is located; calculating the action time of the voltage space vector;
s12: designing a fuzzy PID controller, comprising determining input and output variables and establishing a fuzzy rule;
s13: the fuzzy PID is optimized by the particle swarm, and the quantization factor K of the fuzzy controller is calculated by the particle swarme、 KecScale factor KuOptimizing, namely optimizing according to errors and error change rates of different stages in actual response of a control system by taking an integral performance index as an optimization target, and comprising the following steps of:
1. determining a controller parameter Ke、Kec、KuInitializing the population of the system, including the initial position of the population, the initial speed of the population, the iteration times, the learning factor and the inertia factor;
2. according to
Evaluating the fitness of each particle;
3. for each particle, fit value is compared to the best position pbest it passes throughkComparing, if the best position is obtained, taking the best position as the current best position;
4. for each particle, its fitness value is compared to its globally-passed best position gbestkComparing, if the position is better, taking the position as the best position of the whole;
5. according to vk+1=ωvk+c1(pbestk-xk)+c2(gbestk-xk) And xk+1=xk+vk+1Updating the speed and position of the particles;
6. if a good enough adaptation value is reached or the number of iterations is reached, continuing to execute the next step, otherwise, jumping back to 2;
7. get the best position gbest of the populationkTo determine the quantization factor Ke、Kec、KuThen, fuzzy PID control is carried out to obtain the output of the systemIf the response is out, returning to step 2 to continue the execution;
s14: and carrying out simulation analysis on the reliability test equipment control system.
In S11, a position control model of the reliability test equipment servo system is established;
equation of motion for permanent magnet synchronous motor
In the formula, T
eIs an electromagnetic torque; t is
LIs the load torque; b is a viscous friction coefficient; omega
mIs the mechanical angular velocity; j is the total moment of inertia of the rotor and load.
Voltage equation of permanent magnet synchronous motor under d and q coordinates
In the formula: u shape
d、U
qIs d, q-axis voltage; i.e. i
d、i
qIs d, q-axis current; omega
rIs the electrical angular velocity of the motor rotor.
The flux linkage equation of the permanent magnet synchronous motor under d and q coordinates is as follows:
in the formula: i is
d、I
qFor equivalent inductances of the three-phase stator windings on d, q, Ψ
fThe flux of the permanent magnet fundamental flux linkage magnetic field passing through the stator winding;
an electromagnetic torque equation of the permanent magnet synchronous motor under d and q coordinates is as follows:
in the formula, PnIs the number of pole pairs of the motor
When adopting idThe vector control mode of 0 is that the state equation is as follows:
through Laplace transformation, a PMSM transfer function can be obtained as follows:
i
qand u
dThe transfer function of (c):
T
eand i
qThe transfer function of (c):
ω
mand T
eThe transfer function of (c):
fig. 2 is a schematic diagram of a mathematical model for obtaining PMSM according to a transfer function according to an embodiment of the present invention.
Mathematical formula of mechanical transmission
In step 2, determining the input-output variables comprises: the fuzzy PID controller adopts a two-input three-output structure and uses error e and error change rate ecAs the input quantity of the fuzzy PID controller, the output quantity is the parameter K of the PID controllerp、Ki、KdError e and error rate of change ecAnd a control parameter KpKiKdThe fuzzy sets of (A) are all { NB, NM, NS, ZO, PS, PM, PB }, the corresponding language value sets are { big negative, middle negative, small negative, zero, small positive, middle positive, big positive }, and the input variables e and ecHas a ambiguity domain of [ -6, 6]Output variable Kp、Ki、KdHas a ambiguity domain of [ -3, 3 [)]And selecting a triangular membership function as the membership function of the system.
Establishing fuzzy rule that when the error e is large, in order to make the system have good quick tracking performance, no matter how the variation trend of the error is, a large K is selectedpAnd a smaller KdAt the same time isAvoid the system response from generating larger overshoot, limit the integral action and take smaller KiThe value is obtained.
When the error e is of medium magnitude, K is the order of a small overshoot in the system responsepShould be made smaller, and K is the response speed of the systemiAnd KdThe size is moderate. Wherein KdThe value of (a) has a large influence on the system response.
When the error e is smaller, K is used for ensuring that the system has better steady-state performancepAnd KiShould be larger, and considering the anti-interference performance of the system to avoid the oscillation of the system near the set value, when ecSmaller, KdCan be larger; when e iscWhen greater, KdIt should be taken to be smaller.
KpFuzzy rule table
KiFuzzy rule table
KDFuzzy rule table
S13: particle swarm optimization fuzzy PID
(1) Design of particle swarm optimization parameters
The particle swarm algorithm is an algorithm for simulating the behavior of birds to find food. Each problem that needs to be optimized is one bird of the search space, called a "particle". All the particles have an adaptive value determined by an optimization function, each particle also has a speed to determine the flight direction and distance of the particles, and the particles search in a solution space following the current optimal particle.
Quantization factor K of fuzzy controller by particle swarm optimizatione、KecScale factor KuAnd optimizing, namely optimizing according to errors and error change rates of different stages in actual response of the control system by taking an integral performance Index (ITAE) as an optimization target.
(2) Determining the fitness function
The ITAE index is an index with better practicability and selectivity, can comprehensively evaluate the dynamic and static performances of a control system, and is widely applied to engineering problems. The ITAE index can ensure the quick response, overshoot, regulation time, steady-state error and the like of the system. ITAE is a performance indicator of time multiplied by the integral of the absolute value of the error, i.e.:
(3) basic flow for optimizing particle swarm optimization
1) Determining a controller parameter Ke、Kec、KuInitializing the population of the system, including the initial position and the initial speed of the population, the iteration times, the learning factor and the inertia factor;
2) according to
Evaluating the fitness of each particle;
3) for each particle, fit value is compared to the best position pbest it passes throughkComparing, if the best position is obtained, taking the best position as the current best position;
4) for each particle, its fitness value is compared to its globally-passed best position gbestkComparing, if the position is better, taking the position as the best position of the whole;
5) according to vk+1=ωvk+c1(pbestk-xk)+c2(gbestk-xk) And xk+1=xk+vk+1Updating the speed and position of the particles;
6) if an end condition is reached (typically a good enough adaptation value or the number of iterations is reached) then proceed to the next step, otherwise jump back to 2);
7) get the best position gbest of the populationkTo determine the quantization factor Ke、KecScale factor KuThen, fuzzy PID control is carried out to obtain the output response of the system, and the operation returns to 2) to continue execution.
Fig. 3a is a waveform diagram of an actual position output of a PI control simulation model of a reliability testing device control system according to an embodiment of the present invention; fig. 3b is a diagram of an output displacement waveform of a PI control simulation model of a reliability testing device control system according to an embodiment of the present invention; fig. 4a is a waveform diagram of an actual position output of a speed loop fuzzy PI control simulation model of a reliability testing device control system according to an embodiment of the present invention; FIG. 4b is a graph of the output displacement waveform of the speed loop fuzzy PI control simulation model of the reliability testing equipment control system according to the embodiment of the present invention; fig. 5a is a waveform diagram of an output of an actual position of a speed loop particle swarm fuzzy PI control simulation model of a reliability testing device control system according to an embodiment of the present invention; fig. 5b is a graph of displacement waveform output by the speed loop particle swarm fuzzy PI control simulation model of the reliability testing equipment control system according to the embodiment of the present invention. Referring to fig. 3 a-5 b, the response speed is faster and more accurate by adopting the particle swarm fuzzy PI control than the fuzzy PI control and the PI control. Wherein fig. 3a, fig. 4a, fig. 5a are the comparison of the actual position and the given position, it can be seen that the actual position of the particle swarm fuzzy PI control is more accurate than the fuzzy PI control and the PI control, and the response time is also faster than the fuzzy PI control and the PI control as can be seen from fig. 3b, fig. 4b, fig. 5 b. Therefore, the working efficiency of the reliability testing equipment and the accuracy of results can be improved by adopting the particle swarm fuzzy PI control.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.