A parameter optimization method for motor load torque observer

By using the wolf pack algorithm to optimize the load torque observer parameters and perform feedback compensation in the permanent magnet synchronous motor drive control system of CNC machine tool, the load torque observation deviation and volatility problems are solved, and the stability of motor speed control is improved. Response speed.

CN115118189BActive Publication Date: 2024-12-20SHANXI TIANDI COAL MINING MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210738831.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2024-12-20
Estimated Expiration
2040-09-04

AI Technical Summary

Technical Problem

When the load torque changes frequently or the internal parameters of the control system change, the load torque observation deviation of the permanent magnet synchronous motor increases, affecting the performance indicators such as steady state, dynamic and speed regulation range of its speed control.

Method used

The wolf pack algorithm is used to optimize the load torque observer parameters, and the observation value of the load torque is feedforwardly compensated to the current regulator. By adjusting the feedback gain g, the load torque observation response speed is improved and the torque observation volatility is reduced.

Benefits of technology

It effectively reduces load torque observation errors, improves the speed and accuracy of motor speed control, and avoids the problems of large torque observation fluctuations or long convergence time caused by fixed feedback gain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115118189B_ABST
    Figure CN115118189B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for optimizing parameters of a motor load torque observer. The load torque observation adopts an algorithm for automatically adjusting the feedback gain according to the change of the load torque given value and the change of the load torque observation value. When the system speed changes, or the parameters change, the load is disturbed, resulting in the change of the load torque given value or / and the load torque observation value, the observation error of the load torque can be quickly reduced and the load torque observation value can be feedforward compensated to the current regulator, thereby improving the control accuracy of the permanent magnet synchronous motor. When the load torque observer parameters are optimized and adjusted using the wolf pack algorithm, the wolf pack algorithm can achieve different optimization effects by reasonably selecting the value of the siege step attenuation factor ξ to achieve the maximum degree of adaptation by targeting different optimization objects such as finding an accurate optimal solution and avoiding the local optimum near the optimal solution.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention patent application is a divisional application. The original application number is 202010918630.2. The application date is September 4, 2020. The name of the invention is permanent magnet synchronous motor drive control system for CNC machine tools. Technical Field

[0002] The present invention relates to the technical field of permanent magnet synchronous motors, and more specifically, to a method for optimizing parameters of a motor load torque observer. Background Art

[0003] Permanent magnet synchronous motors have the advantages of high efficiency, high torque, and good speed performance, and are widely used in manufacturing, electric vehicles, industrial production, etc. Permanent magnet synchronous motors meet the requirements of CNC machine tools for good motor drive speed, large starting torque, strong overload capacity, and wide speed regulation range. The control method based on load torque compensation can reduce the impact of load disturbances, but when the load torque changes frequently or the internal parameters of the control system are perturbed, the load torque observation deviation will increase, affecting the performance indicators of the permanent magnet synchronous motor speed control, such as steady-state, dynamic, and speed regulation range. Summary of the invention

[0004] The purpose of the present invention is to provide a CNC machine tool permanent magnet synchronous motor drive control system that feeds forward the observed load torque into the current regulator, improves the load torque observation response speed and reduces the torque observation volatility, and at the same time provides a motor load torque observer parameter optimization method. When the load torque observer parameters are optimized and adjusted using the wolf pack algorithm, an objective function Q is established to comprehensively evaluate the various performance indicators of the load torque observer. 2 for

[0005]

[0006] Among them, e 2 (t) is the instantaneous value of load torque observation error, t p is the tracking adjustment time of the motor load torque observed step response, t = 0 is the load mutation moment of the load torque observed step response; Q 21 γ p1 (1-sgn(e 2 (t)+T δ )) is the torque observation tracking overshoot penalty function, γ p1 is a sufficiently large positive number, T δ It is the torque observation tracking overshoot limit; Q 22 max(|e 2 (t)|) is the absolute value of the maximum torque observation steady-state error, γ p2 is the fitness balance emphasis coefficient, and γ p2 >0;Q 22γ p1 (1-sgn(e 2 (t)+T Δ )) is the torque observation steady-state error penalty function, T Δ is the load torque observed steady-state error limit; γ p3 ≥2.

[0007] The load torque observer is

[0008]

[0009] Where J is the moment of inertia, p is the number of motor pole pairs, ψ f is the permanent magnet flux linkage; is the estimated value of the rotor angular velocity, g is the feedback gain of the load torque observer and g<0; k g is the sliding mode gain of the load torque observer and k g ≤-|e 2 / J|, is the load torque observation error, T L is the load torque, is the observed value of load torque. q is the q-axis current in the rotating dq-axis coordinate system. 2 (t) is the load torque observation error e 2 The instantaneous value of .

[0010] The load torque observer is based on the load torque given value Changes in load torque and observed values The feedback gain g is adjusted by:

[0011] Step I: Calculation

[0012] Step II: Judgment Is it greater than the torque change comparison threshold ε? When it is greater than the torque change comparison threshold ε, the feedback gain g is equal to g min ;when When the torque change comparison threshold ε is less than or equal to, the feedback gain g is equal to g max ;

[0013] Step III: The load torque observer calculates the load torque T according to the feedback gain g. L Observe and obtain the load torque observation value The PI speed controller performs control calculation to obtain

[0014] Among them, ε>0; g max is the high value of feedback gain, gmin is the low value of feedback gain, and g min <g max <0.

[0015] The parameter vector to be optimized for the load torque observer is θ 2 =[G max , G min ,ε,α], the search space dimension N of the wolf pack algorithm is equal to 4. max With G max The relationship is g min With G min The relationship is k g The relationship with α is

[0016]

[0017] Wherein, α≥1; further, the value of α is selected within the range of 1 to 5.

[0018] In the wolf pack algorithm, wolves attack their prey according to the formula

[0019]

[0020] Wherein, n is the current iteration number; i = 1, 2, ..., M-1, M is the number of wolves in the wolf pack; j = 1, 2, ..., N, N is the number of parameters of the load torque observer to be optimized, that is, the search space dimension of the wolf pack algorithm; represents the current position of the i-th wolf; p b =[p b1 p b2 … p bN ] represents the current position of the leader; δ is a pre-set threshold, and the value range of δ is [0.1 0.4]; p jmax and p jmin are the maximum and minimum values ​​of the j-th dimension parameter value interval respectively; stepc is the siege step length. The siege step length stepc is calculated according to the formula

[0021]

[0022] Calculate; where n max is the maximum number of iterations set; stepc max 、stepc min are the maximum siege step length and the minimum siege step length respectively; ξ is the siege step length attenuation factor, 2≤ξ≤10.

[0023] The wolf pack algorithm for optimizing the load torque observer parameters is:

[0024] Step 201, initialize the wolf pack; the initial position of each wolf in the wolf pack is Where M is the number of wolves in the wolf pack;

[0025] Step 202, hunting competition; calculate the fitness value of each wolf in the wolf pack, the smaller the fitness value, the better the position of the wolf; select the wolf with the best position as the alpha wolf, and the other alpha wolf with the best position as the alpha wolf. 1 A wolf is a campaign wolf; R 1 The wolves start hunting and searching to compete and replace the leader.

[0026] Step 203, calling for a charge; the alpha wolf and other wolves other than the candidate wolf start a charge search behavior and charge towards the alpha wolf; the fitness value of the new position of the ith wolf is calculated, and when the new position searched by the ith wolf is better than its current position, its position is changed, otherwise it remains unchanged; if the new position searched by the ith wolf is better than the alpha wolf's position, the ith wolf is converted to the alpha wolf and calls for a charge again;

[0027] Step 204, besiege the prey; under the call of the alpha wolf, the other wolves besiege the prey; calculate the fitness value of the new position of the i-th wolf, and when the new position searched by the i-th wolf during the siege is better than the current position, the position of the wolf is changed, otherwise it remains unchanged; if the new position searched by the i-th wolf during the siege is better than the position of the alpha wolf, the i-th wolf is converted into the alpha wolf;

[0028] Step 205, judging the termination condition; if the number of loop iterations is reached, the optimization process is terminated, and the position parameter of the leader wolf is the optimal parameter of the optimized vector; otherwise, n=n+1 is set, and the process goes to step 206;

[0029] Step 206, competition update; randomly generate R 2 A wolf replaces the wolf pack R 2 Match the wolf with the worst fitness value and go to step 202.

[0030] In the motor load torque observer parameter optimization method, the PI speed controller outputs a load torque given value. and torque current given component i′ q for

[0031]

[0032] Among them, K p is the proportional coefficient of the PI speed controller, T i is the integral time constant of the PI speed controller; the motor's rotor angular velocity error e = ω * -ω,ω * is the given rotor angular velocity, ω is the rotor angular velocity, and e(t) is the instantaneous value of the rotor angular velocity error.

[0033] The motor load torque observer parameter optimization method converts the observed value of the load torque Converted into torque current compensation component i″ q Feedforward compensation to the input of the q-axis current PI controller; q-axis torque current setpoint for

[0034]

[0035] The motor load torque observer parameter optimization method is implemented by a permanent magnet synchronous motor drive control system including a PI speed controller, a load torque observer, a q-axis current controller, a d-axis current controller, a Clarke transformation module, a position and speed detection module, a Park transformation module, a Park inverse transformation module, an SVPWM module and a three-phase inverter.

[0036] The beneficial effect of the present invention is that the load torque observation value is feed-forward compensated to the given value of the current regulator, and the relevant influence caused by the load disturbance or the change of the system parameters can be offset without a large adjustment of the given current part of the PI speed controller output, and the jitter of the system is effectively weakened. The load torque observation adopts an algorithm that automatically adjusts the feedback gain according to the change of the load torque given value and the change of the load torque observation value, avoiding the problem that the load torque observer selects a fixed small feedback gain to cause large torque observation fluctuations and selects a fixed large feedback gain to cause a long convergence time. When the control parameters, model parameters, etc. of the system change or the load is disturbed, resulting in a change in the load torque given value or / and a change in the load torque observation value, the observation error of the load torque can be quickly reduced, and the observation effect and the rapidity and accuracy of the motor speed control are improved. The feedback gain g is automatically adjusted when the load torque set value changes. When the load torque observation value has not changed significantly, but the load torque set value changes due to changes in the rotor angular velocity set value and / or the actual value of the rotor angular velocity, or when the load torque set value changes due to changes in system model parameters, which will cause the load torque observation value to fluctuate significantly, the feedback gain g can be adjusted in advance. When the load torque observation value actually produces an observation error, the response speed of the observer is accelerated, the observation error of the load torque observation value is quickly reduced, and the speed and accuracy of the motor speed control are further improved. The parameters of the load torque observer are optimized and adjusted using the wolf pack algorithm. The wolf pack algorithm can adjust the relative attenuation speed of the early and late siege step by adjusting the size of the siege step attenuation factor ξ; when the value of ξ is large, the proportion of the late small step precise search process increases, which is more conducive to finding the precise optimal solution; when the value of ξ is small, the diversity of the late search is enhanced, which is more conducive to avoiding the local optimum near the optimal solution; for different optimization objects such as finding the precise optimal solution and avoiding the local optimum near the optimal solution, the value of the siege step attenuation factor ξ can be reasonably selected to adapt to the greatest extent to achieve different optimization effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a block diagram of an embodiment of a permanent magnet synchronous motor drive control system for a CNC machine tool;

[0038] Figure 2 This is a flow chart of Embodiment 1 of the feedback gain automatic adjustment method;

[0039] Figure 3 This is a flow chart of Embodiment 2 of the feedback gain automatic adjustment method;

[0040] Figure 4 Effect diagram of adjusting the relative decay rate of siege step length for siege step length decay factor ξ;

[0041] Figure 5 is the given rotor angular velocity signal and load torque signal. DETAILED DESCRIPTION

[0042] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0043] Figure 1 The present invention is a block diagram of an embodiment of a permanent magnet synchronous motor drive control system for a CNC machine tool. Figure 1 In the Clarke transformation module, the three-phase current i of the permanent magnet synchronous motor (PMSM) is input a 、i b and i c , output the current i in the two-phase stationary α-β axis coordinate system α 、i β ; The position sensor in the position and speed detection module detects the rotor position θ of the permanent magnet synchronous motor and converts it into the rotor angular velocity ω output; the Park conversion module inputs the current i α 、i β and the rotor position θ, the output current i in the rotating dq axis coordinate system d 、i q ;PI speed controller input rotor given angular velocity ω * and rotor angular velocity ω, output load torque given value T L * and torque current given component i′ q ; Load torque observer inputs load torque given value T L * , rotor angular velocity ω and current i q , output torque current compensation component i″ q ; Torque current given component i′ q and torque current compensation component i″ q After adding, it is used as the q-axis torque current given value i * q ; q-axis current PI controller input q-axis torque current given value i * q and current i d , output control voltage U in q-axis coordinate system q ; d-axis current PI controller input q-axis torque current given value i * d and current i d , output control voltage U in d-axis coordinate system d , d-axis torque current given value i * d =0; the control voltage U in the dq axis coordinate system is input to the Park inverse transformation module d , U q, output the control voltage U in the α-β axis coordinate system α , U β SVPWM module (i.e. space vector pulse width modulation module) input control voltage U α , U β , output pulse signal to the three-phase inverter, the three-phase inverter converts the DC voltage U dc Convert to three-phase AC power supply U a , U b , U c , thereby driving the permanent magnet synchronous motor to operate.

[0044] Ignoring the influence of core eddy current and hysteresis loss, the i d =0, the PMSM rotor magnetic field oriented control is established, and the mathematical model of PMSM in the dq axis rotating coordinate system is established. The voltage equation is:

[0045]

[0046] For the use of i d =0 control mode of salient pole PMSM vector control system, the electromagnetic torque equation is:

[0047]

[0048] The PMSM motion equation is:

[0049]

[0050] In formula (1), (2), and (3), u d 、u q are the voltages of the dq axes respectively; i d 、i q are the currents of d and q axes respectively; L d , L q are the inductance of d and q axes respectively; T e is the electromagnetic torque; T L is the load torque; R is the stator resistance; p is the number of motor poles; ω e is the rotor electrical angular velocity, i.e. angular frequency; ω is the rotor angular velocity, i.e. the motor rotor mechanical angular velocity; ψ f is the permanent magnet flux; J is the moment of inertia; B is the friction coefficient; t is time.

[0051] From the mathematical model of permanent magnet synchronous motor (1), (2), (3) in dq coordinates, it can be seen that i d =0 control strategy, the motor torque output can be controlled by formula (2), and the motor operation can be controlled by combining the speed and current double closed loop. Let the motor rotor angular velocity error e = ω * -ω,ω *is the given rotor angular velocity of the motor. The PI speed controller regulates and controls the rotor angular velocity error e and outputs the given torque current component i′ q , direct torque control is performed on the permanent magnet synchronous motor. Formula (4) is the transfer function of the PI speed controller.

[0052]

[0053] In formula (4), K p is the proportional coefficient of the PI speed controller, T i is the integral time constant of the PI speed controller. The load torque given value T output by the PI speed controller for direct torque control L * and torque current given component i′ q for:

[0054]

[0055] The load torque given value T L * is sent to the load torque observer, and e(t) is the instantaneous value of the rotor angular velocity error.

[0056] The parameters of the speed loop controller can be manually adjusted according to the conventional method of PID parameter adjustment; based on experience, the proportional coefficient K p The adjustment range is greater than 0 and less than 10I N , I N is the rated current of the permanent magnet synchronous motor; the integral time constant T i The adjustment range is 0.001~0.5s.

[0057] According to the PMSM electromagnetic torque and motion equation, for a constant step load, it can be considered as a constant value within the change cycle, that is, Taking the rotor angular velocity and load torque as state variables, the PMSM state equation is:

[0058]

[0059] Based on equation (6), with load torque and rotor angular velocity as observation objects, load torque observer embodiment 1 is established as:

[0060]

[0061] In formula (7), is the observed value of the load torque, is the estimated value of the rotor angular velocity, g is the feedback gain of the load torque observer, k gis the sliding mode gain of the load torque observer embodiment 1, and the load torque observer embodiment 1 is a sliding mode observer. Compared with the load torque, the motor friction accounts for a small proportion, so let B = 0, ignoring the influence of friction, then the load torque observer embodiment 1 of formula (7) becomes:

[0062]

[0063] According to (6) and (8) when B=0, the error equation of the load torque observer embodiment 1 is obtained as follows:

[0064]

[0065] In formula (9), is the rotor angular velocity estimation error, is the load torque observation error, and the observer sliding surface is defined as According to the sliding mode reachability condition, the stability condition of the observer system in equation (8) is k g ≤-|e 2 / J|, and g<0.

[0066] Based on equation (6), with the load torque and the motor rotor angular velocity as the observation objects, a load torque observer embodiment 2 can also be established as follows:

[0067]

[0068] Compared with the load torque, the motor friction accounts for a small proportion. Let B = 0 and ignore the influence of friction. Then the load torque observer embodiment 2 of formula (10) becomes:

[0069]

[0070] In formula (10) and (11), is the observed value of the load torque, is the estimated value of the rotor angular velocity, g is the feedback gain of the load torque observer, k W is the proportional gain of the load torque observer embodiment 2, and the load torque observer embodiment 2 is a state observer. According to equation (6) and equation (11) when B=0, the error equation of the load torque observer embodiment 2 is obtained as follows:

[0071]

[0072] In formula (12), is the rotor angular velocity estimation error, is the load torque observation error. The state observer of equation (11) is an autonomous linear system. W<0, and g<0, the observer is asymptotically stable. Formula (7) of the load torque observer embodiment 1 and formula (10) of the load torque observer embodiment 2 both take into account the friction factor of the motor. The addition of small friction damping will have an adverse effect on the rapidity of the system response, but can increase the stability based on formula (8) and formula (11), respectively.

[0073] When the load torque observer embodiment 1 of equations (7) and (8) is selected, the sliding mode gain k g The setting method is to follow

[0074]

[0075] In formula (13), α≥1; generally, the value of α is selected in the range of 1 to 5, for example, α is selected to be equal to 1.5. Load torque observer embodiment 1 In the process of observing the load torque, k g The absolute value of |e is too small. 2 When | is large, the observer cannot enter the sliding mode state; g The absolute value of is large enough to ensure that the observer enters the sliding mode state, but the steady-state observation fluctuation of the load torque becomes larger; k g The value of changes with the load torque observation error, which can simultaneously increase the stability of the observer and reduce the steady-state observation fluctuation of the load torque.

[0076] When the observer embodiment 2 of equations (10) and (11) is selected, the proportional gain k W The setting method is to follow

[0077]

[0078] In formula (14), T N is the rated torque of the motor, β>0; generally, the β value is selected in the range of 1 to 20, for example, β=10. When β is selected to increase, the steady-state fluctuation of the load torque observation becomes larger, but the torque observation tracking overshoot becomes smaller; when β is selected to decrease, the steady-state fluctuation of the load torque observation becomes smaller, but the torque observation tracking overshoot becomes larger.

[0079] In the observers shown in equations (7), (8) or equations (10), (11), the value of the feedback gain g has a great influence on the load torque observation result. The larger the feedback gain g, the smaller the observed torque fluctuation, but the slower the observed torque identification speed; the smaller the feedback gain g, the faster the observed torque speed, but the greater the observed torque fluctuation. In consideration of this problem, in the traditional load torque observer, the observation speed and fluctuation of the load torque are comprehensively considered, and the feedback gain g is taken as a compromise value, but this will abandon the advantages of small fluctuation when the feedback gain is large and fast observation speed when the feedback gain is small.

[0080] When the motor uses a PI controller for speed control, the influence of parameter changes and external load disturbances on the system is mainly suppressed by increasing the proportional coefficient in the controller, but too large a proportional coefficient will cause the system stability to decrease. In order to solve the contradiction between the rapid response and anti-interference of the PI speed controller and the stability, the observer is used to observe the load disturbance changes in real time, and the load torque observation value is feedforward compensated to the current regulator. Under the premise of reducing the proportional coefficient of the PI controller, the anti-interference performance of the system can be not reduced. In order to make full use of the advantages of the feedback gain g at high and low values, according to the load torque observation value and the load torque given value change at two adjacent moments, when the load torque given value changes little and the load torque observation value changes little, a larger feedback gain g is given to make the observation result less volatile and more stable; when the load torque given value changes greatly or the load torque observation value changes greatly, a smaller feedback gain g is given to speed up the observation speed. Finally, by adjusting the feedback gain g, a comprehensive result of fast observation speed, small fluctuation and stronger stability is obtained.

[0081] Figure 2 The flow chart of the feedback gain automatic adjustment method embodiment 1 is used in the load torque observer embodiment 1 or the load torque observer embodiment 2. Figure 1 In the permanent magnet synchronous motor drive control system embodiment, the feedback gain is automatically adjusted. Figure 2 In, ε 1 is the given torque change comparison threshold, ε 2 is the comparison threshold for observing torque changes, ΔT L * is the difference between the two most recent load torque given values, is the difference between the two most recent load torque observations. In a periodic control process of a permanent magnet synchronous motor drive control system, Figure 2 The feedback gain g shown in (a) is adjusted before the load torque observation and the output calculation of the PI speed controller, which is:

[0082] Step 1. Calculation

[0083] Step 2: Judgement Is it greater than the given torque change comparison threshold ε1? Greater than the given torque change comparison threshold ε 1 When the feedback gain g is equal to g min And go to step 4; when Less than or equal to the given torque change comparison threshold ε 1 When , go to step 3;

[0084] Step 3: Judgement Is it greater than the observed torque change comparison threshold ε 2 ;when Greater than the observed torque change comparison threshold ε 2 When the feedback gain g is equal to g min And go to step 4; when Less than or equal to the observed torque change comparison threshold ε 2 When the feedback gain g is equal to g max And go to step 4;

[0085] Step 4: The load torque observer calculates the load torque T according to the feedback gain g. L Observe and obtain the load torque observation value The PI speed controller performs control calculation to obtain the load torque given value At this time for for Until the next feedback gain g adjustment, the becomes becomes

[0086] In the process of periodic control of motor speed, Figure 2 The feedback gain g shown in (b) is adjusted later than the load torque observation and the output calculation of the PI speed controller. The feedback gain g adjustment method changes the above step 4 to step 1, steps 1-3 to steps 2-4, and the entry into step 4 in each step is changed to exit, and

[0087] When |ΔT L * |Greater than ε 1 When the load torque is set to T L * Due to the changes in system model parameters, rotor angular velocity set values, and actual rotor angular velocity values, the load torque observation value is in a state of large change. The load torque observation value either has a large fluctuation or will have a large fluctuation. The feedback gain g is selected to be equal to g min Rapid identification and observation of load torque; when |ΔT L * |Less than or equal to ε 1 ,and Greater than ε 2 When the load torque observation value fluctuates greatly, the feedback gain g is selected to be equal to g min Rapid identification and observation of load torque; when |ΔT L * |Less than or equal to ε1 ,and Less than or equal to ε 2 When the load torque given value changes little and the state load torque observed value fluctuates little, the feedback gain g is selected to be equal to g max Perform torque identification and observation. Figure 2 In, ε 1 >0,ε 2 >0,ε 1 , ε 2 The specific value of is related to the sampling control period (cycle time) of the PI speed controller, the permanent magnet synchronous motor and its load conditions. 1 , ε 2 The value is greater than 0 and generally less than 5% of the rated torque. 1 , ε 2 They can take the same value or different values. For example, if the rated torque is 22N·m, ε 1 =ε 2 =0.2N·m, or take ε 1 =0.2N·m,ε 2 =0.25N·m. The value of feedback gain g satisfies g min <g max <0, generally, g min ≥-5000. g min The value should be selected so that when the load torque changes suddenly, the torque observation tracking overshoot of the load torque observer output observation value is within the torque observation tracking overshoot limit; g max The value should be the change of the last two load torque observation values ​​when the load torque remains unchanged and the load torque observer and PI speed controller are both in steady state. Less than ε 2 ; For example, select the feedback gain g max =-0.5, g min =-10. Select g min , g max , ε 1 , ε 2 The specific method of calculating the value is, first, when the load torque is constant and the load torque observer and the PI speed controller are both in steady state, let the feedback gain g start from a larger value. For example, let the feedback gain g gradually decrease from -0.01, the steady-state error of the load torque observation will gradually increase. When the steady-state error of the load torque observation reaches the steady-state error limit of the load torque observation, the feedback gain g value at this time is determined to be g max , keep the load torque unchanged and set the feedback gain g equal to g max , while continuously performing F 1 Second-rate The value is measured and F 1 Second-rate Maximum F during measurement 2 indivual The average value of the measured values ​​is used as the comparison threshold ε of the observed torque change 2 , given torque change comparison threshold ε 1 The observed torque change is compared with the threshold ε 2 Then, when the load torque observer and the PI speed controller are both in a steady state, the load torque is suddenly changed. Under the premise that the torque observation tracking overshoot of the load torque observer output observation value is within the torque observation tracking overshoot limit, the tracking adjustment time of the load torque observer output observation value is as short as possible to adjust and determine g. min value.

[0088] Figure 3 The flow chart of the feedback gain automatic adjustment method embodiment 2 is shown in the load torque observer embodiment 1 or the load torque observer embodiment 2. Figure 1 In the permanent magnet synchronous motor drive control system embodiment, the feedback gain is automatically adjusted. Figure 3 In the figure, ε is the torque change comparison threshold, ΔT L * is the difference between the two most recent load torque given values, is the difference between the two most recent load torque observations. In a periodic control process of a permanent magnet synchronous motor drive control system, Figure 3 The feedback gain g shown in (a) is adjusted before the load torque observation and the output calculation of the PI speed controller, which is:

[0089] Step I: Calculation

[0090] Step II: Judgment Is it greater than the torque change comparison threshold ε? When it is greater than the torque change comparison threshold ε, the feedback gain g is equal to g min ;when When the torque change comparison threshold ε is less than or equal to, the feedback gain g is equal to g max ;

[0091] Step III: The load torque observer calculates the load torque T according to the feedback gain g. L Observe and obtain the load torque observation value The PI speed controller performs control calculation to obtain At this time for for Until the next feedback gain g adjustment, the becomes becomes

[0092] In the process of periodic control of motor speed, Figure 3 The feedback gain g shown in (b) is adjusted later than the load torque observation and the output calculation of the PI speed controller. At this time,

[0093] Step S1: The load torque observer calculates the load torque T according to the feedback gain g. L Observe and obtain the load torque observation value The PI speed controller performs control calculation to obtain At this time for for Until the next feedback gain g adjustment, the becomes becomes

[0094] Step S2: Calculation

[0095] Step S3: Determination Is it greater than the torque change comparison threshold ε? When it is greater than the torque change comparison threshold ε, the feedback gain g is equal to g min ;when When the torque change comparison threshold ε is less than or equal to, the feedback gain g is equal to g max .

[0096] When the sum of the changes in the load torque given value and the load torque observed value for the last two times When it is greater than ε, it indicates that the load torque observation value fluctuates greatly, or the load torque given value changes greatly due to changes in system model parameters, rotor angular velocity given value, and rotor angular velocity actual value, which will cause the load torque observation value to fluctuate greatly. The feedback gain g is selected to be equal to g min Rapid identification and observation of load torque; when When it is less than or equal to ε, it indicates that the load torque set value changes little and the state load torque observation value fluctuates little, and the feedback gain g is selected to be equal to g max Perform load torque identification and observation. Figure 3 In the torque change comparison threshold ε>0, the specific value of ε is related to the sampling control period (cycle time) of the PI speed controller, the permanent magnet synchronous motor and its load conditions. ε is greater than 0 and generally less than 5% of the rated torque. For example, if the rated torque is 22N·m, ε=0.2N·m or ε=0.3N·m can be taken. The value of the feedback gain g satisfies gmin <g max <0, generally, g min ≥-5000. g min The value should be selected so that when the load torque changes suddenly, the torque observation tracking overshoot of the load torque observer output observation value is within the torque observation tracking overshoot limit; g max The value should be the sum of the changes in the last two load torque given values ​​and the changes in the load torque observation value when the load torque remains unchanged and the load torque observer and PI speed controller are both in a steady state. Less than ε; for example, the feedback gain g is selected max =-0.5, g min =-10. Select g min and g max The specific method of calculating the value is, first, when the load torque is constant and the load torque observer and the PI speed controller are both in steady state, let the feedback gain g start from a larger value. For example, let the feedback gain g gradually decrease from -0.01, the steady-state error of the load torque observation will gradually increase. When the steady-state error of the load torque observation reaches the steady-state error limit of the load torque observation, the feedback gain g value at this time is determined to be g max , keep the load torque unchanged and set the feedback gain g equal to g max , while continuously performing F 1 times |ΔT L * |Value and The value is measured and F 1 Maximum F in the measurement 2 indivual The average value of the sum is taken as the torque change comparison threshold ε; then, when the load torque observer and the PI speed controller are both in a steady state, the load torque is mutated. Under the premise of ensuring that the torque observation tracking overshoot of the load torque observer output observation value is within the torque observation tracking overshoot limit, the tracking adjustment time of the load torque observer output observation value is as short as possible to adjust and determine g min Value. max is the high value of feedback gain, g min is the low value of feedback gain.

[0097] When designing the PI speed controller and load torque observer of the permanent magnet synchronous motor drive control system embodiment, the particle swarm algorithm, wolf pack algorithm, genetic algorithm and other optimization algorithms can also be used to adjust the parameters. The specific method of using the wolf pack algorithm to adjust the parameters of the PI speed controller and the parameters in the load torque observer embodiment 1 or the load torque observer embodiment 2 is:

[0098] When adjusting the parameters of the PI speed controller, establish the objective function Q to comprehensively evaluate the performance indicators of the PI speed controller.1 for

[0099]

[0100] In formula (15), Q 11 The integral term in is the IAE criterion (integral error criterion) of the motor rotor angular velocity step response, t m is the transition time of the motor rotor angular velocity step response, t=0 is the starting time of the motor step response; Q 11 γ m1 (1-sgn(e(t)+ω δ )) is the angular velocity overshoot penalty function, where γ m1 Take a sufficiently large ( 5 times or more of the reasonable value), ω δ is the rotor angular velocity overshoot limit (i.e. the maximum rotor angular velocity overshoot allowed by the system); when the overshoot of the motor rotor angular velocity step response does not exceed the rotor angular velocity overshoot limit ω δ When , the overshoot penalty function term is equal to 0, otherwise it is equal to γ m1 ;Q 12 is the steady-state error penalty function, ω Δ is the rotor angular velocity steady-state error limit; when the steady-state error of the motor rotor angular velocity step response does not exceed the rotor angular velocity steady-state error limit ω Δ When , the steady-state error penalty function term is equal to 0, otherwise it is equal to γ m1 ;Q 1 is the objective function value, that is, the fitness value of the wolf pack algorithm for optimizing the parameters of the PI speed controller; the smaller the fitness value of the individual wolf, the better the corresponding position. m1 When taking values, first estimate For example, if the rated speed of the motor is 1500r / min (corresponding to the rated rotor angular velocity of 157rad / s) and the starting time is about 0.2s, then The reasonable value of γ is no more than 40. m1 Take 5 times or more of 40, for example, take γ m1 =200. m2 Generally, the value is greater than or equal to 2, and its value determines the time interval for measuring the steady-state error of the rotor angular velocity. For example, γ m2 When the value is equal to 6, then at 5 times the transition time t m The steady-state error of the rotor angular velocity is measured in the interval. If other index factors need to be considered in the PI speed controller parameter optimization, for example, whether the transition process time is short enough, whether the steady-state error is small enough, etc., other objective functions other than equation (15) can be established.

[0101] When setting the load torque observer parameters, establish the objective function Q to comprehensively evaluate the performance indicators of the load torque observer. 2 for

[0102]

[0103] In formula (16), Q 21 The integral term in is the IAE criterion for observing the step response of the motor load torque. is the load torque observation error, e 2 (t) is the instantaneous value of load torque observation error, t p is the tracking adjustment time of the motor load torque observed step response, t = 0 is the load mutation moment of the load torque observed step response; Q 21 γ p1 (1-sgn(e 2 (t)+T δ )) is the torque observation tracking overshoot penalty function, where γ p1 Take a large enough A positive number (5 times or more of the reasonable value), T δ is the torque observation tracking overshoot limit. When the torque observation tracking overshoot does not exceed the torque observation tracking overshoot limit T δ When the torque observation tracking overshoot penalty function term is equal to 0, otherwise it is equal to γ p1 .Q 22 In the first term, max(|e 2 (t)|) is the absolute value of the maximum torque observation steady-state error, γ p2 is the fitness balance emphasis coefficient, and γ p2 >0;Q 22 γ p1 (1-sgn(e 2 (t)+T Δ )) is the torque observation steady-state error penalty function, T Δ is the load torque observation steady-state error limit; when the torque observation steady-state error does not exceed the load torque observation steady-state error limit T Δ When the torque observation steady-state error penalty function term is equal to 0, otherwise it is equal to γ p1 .Q 2 is the objective function value, that is, the fitness value of the load torque observer parameters adjusted by the wolf pack algorithm; the smaller the fitness value of the individual wolf, the better the corresponding position. p1 When taking values, first estimate The reasonable value (upper limit) of the motor; for example, if the rated torque of the motor is 22N·m, the maximum torque observation tracking adjustment time t pWhen it is around 0.1s, the integral term of the IAE criterion in formula (16) does not exceed 2; the fitness balance emphasis coefficient γ p2 There are two functions of , one is to balance the IAE criterion integral term and the absolute value term of the maximum torque observation steady-state error. For example, assuming the load torque observation steady-state error limit T Δ is 1N·m, then γ p2 When the value is 2, the IAE criterion integral term and the absolute value term of the maximum torque observation steady-state error are relatively balanced, or in other words, the objective function value Q of the two is 2 The effect is quite significant. The reasonable value of γ is no more than 4. p1 Take a constant equal to 20 or greater than 20. Reduce γ p2 value, then the objective function value Q 2 The weight of the integral term of the IAE criterion becomes larger, which is more inclined to the rapidity of torque observation; increasing γ p2 value, then the objective function value Q 2 The weight of the absolute value of the maximum torque observation steady-state error becomes larger, which is more inclined to the steady-state performance of torque observation. p3 Generally, the value is greater than or equal to 2, and its value determines the time interval for measuring the steady-state error of load torque observation. For example, γ p3 When the value is equal to 6, the tracking adjustment time (i.e. transition process time) t p The load torque observation steady-state error is measured in the interval.

[0104] The specific steps of the wolf pack algorithm to optimize the PI speed controller parameters or the load torque observer parameters are:

[0105] Step 201, initialize the wolf pack. Assume that the initial position of each wolf in the wolf pack is Where M is the number of wolves in the wolf pack, which is generally selected between 20 and 150, and the initial position is required to obey random distribution. For different optimization objects, there are:

[0106] (1) To optimize the parameters of the PI speed controller, the parameter vector to be optimized is θ = [K p , T i ], at this time, the search space dimension N of the wolf pack algorithm is equal to 2. In the final optimization result, the position value of the head wolf is the optimal parameter of the PI speed controller.

[0107] (2) For the load torque observer embodiment 1, when the feedback gain is automatically adjusted using the feedback gain automatic adjustment method embodiment 1, the parameter vector to be optimized is θ 1 =[G max , G min , ε 1 , ε 2, α], at this time the search space dimension N of the wolf pack algorithm is equal to 5.

[0108] (3) For the load torque observer embodiment 1, when the feedback gain automatic adjustment method embodiment 2 is used to automatically adjust the feedback gain, the parameter vector to be optimized is θ 2 =[G max , G min , ε, α], at this time the search space dimension N of the wolf pack algorithm is equal to 4.

[0109] (4) For the load torque observer embodiment 2, when the feedback gain automatic adjustment method embodiment 1 is used to automatically adjust the feedback gain, the parameter vector to be optimized is θ 3 =[G max , G min , ε 1 , ε 2 , β], at this time the search space dimension N of the wolf pack algorithm is equal to 5.

[0110] (5) For the load torque observer embodiment 2, when the feedback gain is automatically adjusted using the feedback gain automatic adjustment method embodiment 2, the parameter vector to be optimized is θ 4 =[G max , G min , ε, β], at this time the search space dimension N of the wolf pack algorithm is equal to 4.

[0111] In the above parameter vectors to be optimized, θ=[K p , T i ] is in the range of [m imin m imax ], the range interval can be given based on existing knowledge or experience, for example, parameter K p The value interval [m 1min m 1max ] is [0 10I N ], parameter T i The value interval [m 2min m 2max ] is [0.001 0.5].

[0112] Among the above load torque observer parameter vectors to be optimized, after optimizing the final alpha position (optimal position), g max , g min According to Calculated; sliding mode gain k g According to the parameter α, it is calculated according to formula (13); the proportional gain k W It is calculated according to the parameter β according to formula (14).

[0113] In the above load torque observer parameter vectors to be optimized, the initial position of the i-th wolf is expressed as The position value interval is [p imin p imax ], corresponding to the parameter to be optimized. The range of the parameter to be optimized can be given based on existing knowledge or experience. For example, parameter G max The value range of parameter G is [-4 4]; min The value range of parameter ε is [-4 4]; 1 and parameter ε 2 , or the value interval of parameter ε is [0 0.05T N ], T N is the rated torque of the motor; the value interval of parameter α is [1 5], or the value interval of parameter β is [1 20].

[0114] Step 202, hunting competition. Calculate the fitness value of each wolf in the wolf pack. The smaller the fitness value, the better the position of the wolf. Select the wolf with the best position as the alpha wolf, and the other alpha wolf with the best position as the alpha wolf. 1 The wolf is a campaign wolf. 1 The wolves start hunting and searching according to formula (17) to compete and replace the alpha wolf. Specifically:

[0115] Step 2021, the election wolf randomly selects h 1 directions, searching for parameters in each direction according to formula (17), then moving forward one step and then back; calculating the fitness value of the candidate wolf after moving forward; selecting the minimum fitness value in all directions, if the minimum fitness value is less than the fitness value of the original position of the candidate wolf, then replacing the original position of the candidate wolf with the position where the minimum fitness value is located; when the fitness value of the candidate wolf is less than the fitness value of the leader wolf, it is regarded as the leader wolf and withdraws from the hunting competition, otherwise, proceeding to step 222;

[0116] Step 2022, each candidate wolf repeats h 2 Sub-step 2021;

[0117] Step 2023, all R 1 After the wolf completes step 2022, it will exit the hunting competition.

[0118]

[0119] In formula (17), i = 1, 2, ..., R 1 ; j = 1, 2, ..., N; rand (-1, 1) is a random number uniformly distributed in [-1 1]; l = 1, 2, ..., h 1; stepa is the hunting step length, the recommended value range of stepa is [0.1 0.9]; p i =[p i1 p i2 … p iN ] is the position of the i-th candidate wolf. 1 It is recommended to take a fixed value or a random value in the interval [0.1M 0.25M]; the number of directions h 1 It is recommended to take the value in the interval [3 8] and repeat the number of times h 2 It is recommended to take a value in the range [3 10].

[0120] Step 203, call for a charge. Call for a charge; the alpha wolf and the other wolves other than the candidate wolves start a charge search behavior according to formula (18) and charge towards the alpha wolf. Calculate the fitness value of the new position of the ith wolf. When the new position searched by the ith wolf is better than its current position, change its position, otherwise keep it unchanged; if the new position searched by the ith wolf is better than the alpha wolf's position, the ith wolf is converted to the alpha wolf and re-initiates the call.

[0121] p′ ij =p ij +rand(-1,1)·stepb·(p bj -p ij ) (18)

[0122] In formula (18), i = 1, 2, ..., MR 1 -1;j=1,2,…,N;p′ i =[p′ i1 p′ i2 … p′ iN ] indicates the position of the i-th wolf’s search update; p i =[p i1 p i2 … p iN ] represents the current position of the i-th wolf; p b =[p b1 p b2 … p bN ] indicates the current position of the leader wolf; stepb is the running step length, and the recommended value range of stepb is [1.3 2.5].

[0123] Step 204, siege the prey. At the call of the alpha wolf, the other wolves siege the prey according to formula (19). Calculate the fitness value of the new position of the i-th wolf. When the new position searched by the i-th wolf during the siege is better than the current position, the position of the wolf is changed, otherwise it remains unchanged; if the new position searched by the i-th wolf during the siege is better than the alpha wolf's position, the i-th wolf is converted to the alpha wolf.

[0124]

[0125] In formula (19), i = 1, 2, ..., M-1; j = 1, 2, ..., N; represents the current position of the i-th wolf (i.e., the position after n iterations), is the new position searched by the i-th wolf; p b =[p b1 p b2 … p bN ] represents the current position of the leader; δ is a pre-set threshold, and the recommended value range of δ is [0.10.4]; p jmax and p jmin are the maximum and minimum values ​​of the j-th dimension parameter value interval respectively. stepc is the siege step length, which is calculated according to formula (20).

[0126]

[0127] In formula (20), n is the current number of iterations, n max is the maximum number of iterations set; stepc max 、stepc min are the maximum siege step length and the minimum siege step length respectively, and ξ is the siege step length attenuation factor. min The value range of stepc is [0.3 1.3]. max The value is stepc min 5 to 100 times. n increases from 1 to n max When stepc increases exponentially from stepc max Decay to stepc min , adjusting the size of the siege step length attenuation factor ξ can adjust the relative attenuation speed of the siege step length in the early and late stages; the larger the value of ξ, the faster the attenuation speed of stepc in the early stage relative to the late stage, and the later stage tends to be equal to stepc for a long time. min The smaller the value of ξ, the slower the decay speed of stepc in the early stage relative to the later stage, and the later stage still decays and approaches stepc. min ; The value range of ξ is [2 10]. Figure 4 The effect diagram of adjusting the relative decay speed of the siege step length stepc for the siege step length decay factor ξ; Figure 4 In the figure, the horizontal axis is the number of iterations n, n max =1000; the vertical axis is the siege step length stepc, stepc max Equal to 10, stepc minis equal to 1; Curve ① is the attenuation curve of stepc when ξ is equal to 4, and Curve ② is the attenuation curve of stepc when ξ is equal to 8. In formula (20), e is the natural exponent, that is, the base of the natural logarithm.

[0128] When the value of ξ is large, the proportion of the process of small-step precise search in the later stage increases, which is more conducive to finding the precise optimal solution; when the value of ξ is small, the diversity of the later stage of the search is enhanced, which is more conducive to avoiding the local optimum near the optimal solution; for different optimization objects such as finding the precise optimal solution and avoiding the local optimum near the optimal solution, the value of the siege step attenuation factor ξ can be reasonably selected to adapt to the greatest extent to achieve different optimization effects.

[0129] Step 205, judging the termination condition. If the number of loop iterations reaches or the fitness value of the leader is less than a certain threshold, the optimization process is terminated and the leader position parameter is the optimal parameter of the optimized parameter vector. Otherwise, set n=n+1 and go to step 206.

[0130] Step 206: Competition update. According to the principle of survival of the fittest, R is randomly generated. 2 Piwolf replaces the original R 2 The wolf with the worst matching fitness is eliminated, the wolf pack is updated through competition, and the process goes to step 202. 2 It is recommended to take a fixed value or a random value in the interval [0.05M 0.15M].

[0131] In the above steps, when the new positions of individual wolves are randomly generated or when the individual wolves search for new positions, the variables of each dimension of the new position of each wolf cannot exceed the corresponding value range of the variables. Among the load torque observer parameters to be optimized, g max , g min There is a constraint g between min <g max , corresponding to the constraint G min >G max When a new position of an individual wolf is randomly generated, or when an individual wolf searches for a new position, first, the individual wolf p i The parameter p in i1 (i.e. G max ) According to the value interval [p 1min p 1max ] Randomly generate positions or update positions, and then individual wolves p i The parameter p i2 (i.e. G min ) According to the value interval [p i1 p 2max ] Randomly generate positions or update positions so that individual wolves i Satisfy the constraint G min >G max, that is, satisfying the constraint g min <g max .

[0132] In step 205, the termination condition adopts the maximum number of iterations limit method, and the maximum number of iterations n max It is recommended to take a fixed value in the interval [20 500]. When optimizing the PI speed controller parameters and setting the condition that the head wolf fitness value is less than a certain threshold, for example, if the rated speed of the motor is 1500r / min (corresponding to the rated rotor angular velocity of 157rad / s), and the start-up time is required to be within 0.2s, the threshold of the termination condition can be set to 15. When optimizing the load torque observer parameters and setting the termination condition that the head wolf fitness value is less than a certain threshold, it is necessary to refer to the motor rated torque and the expected torque observation tracking adjustment time t p , Torque observation tracking overshoot limit T δ , load torque observation steady-state jitter limit T Δ , fitness balance emphasis coefficient γ p2 etc. to determine the threshold value; assuming the rated torque of the motor is 22N·m, T δ 2N·m, T Δ is 1N·m, γ p2 = 1.5, the desired torque observation tracking adjustment time t p If it is less than 0.04s, the threshold of the termination condition can be set at 1.8.

[0133] When optimizing the PI speed controller parameters and calculating the fitness value of the wolf position in each step of the wolf pack algorithm, it is required to convert the individual wolf position into the corresponding PI speed controller parameters, control the motor start (or start in the simulation system), and obtain the motor rotor angular velocity step response e(t) required in formula (15). Based on e(t), the transition process time t is determined. m , calculate the fitness value Q of the individual wolf 1 .

[0134] When optimizing the load torque observer parameters and calculating the adaptive value of the wolf position in each step of the wolf pack algorithm, the PI speed controller parameters have been adjusted and the load torque compensation control is implemented. It is required to convert the individual wolf positions into the corresponding load torque observer parameters in turn, and when the motor given speed remains unchanged and the PI speed controller is in a steady state, the load torque is suddenly changed to control the motor operation (or run in the motor simulation system) to obtain the motor load torque observation step response e required in formula (16) 2 (t), according to e 2 (t) Determine the transition process time t p , calculate the fitness value Q 2 .

[0135] Since the initial position of individual wolves is required to obey random distribution, and the spatial search method of the wolf pack algorithm is linear, the feedback gain high value g is directly max and feedback gain low value g min When searching and optimizing in the interval [-5000 0], the absolute value of the feedback gain with a low value has a great influence on the working state of the observer. For example, in the interval [-10 0], the probability of random entry or search entry is small, and it is difficult to optimize the feedback gain with a high value g. max and feedback gain low value g min The optimal position of the feedback gain g is not directly adjusted during the optimization process. max and feedback gain low value g min Instead of searching and optimizing, it is optimized in a similar way to gain. The parameter interval [-10 0] is expanded in the search interval, making it easier to obtain a high value of feedback gain g. max and feedback gain low value g min The optimal position; at this time, the feedback gain is high value g max and feedback gain low value g min The parameter range is [-10000 -0.0001]; the feedback gain high value g max Under normal circumstances, the interval [-0.0001 0] will not be selected, otherwise it will cause the observer to respond too slowly; in addition, the upper limit of the interval is -0.0001, which also avoids high feedback gain values ​​g max The observer cannot work properly if the value is 0.

[0136] In the periodic control process of the permanent magnet synchronous motor speed in the drive control system, the load torque given value T calculated at the kth moment (or the kth step) is L * T L * (k), load torque observation value Recorded as The k-1 moment is the moment of the periodic control process before the k moment, and the load torque given value T L * T L * (k-1), load torque observation value Recorded as The k-2 moment is the moment of the periodic control process before the k-1 moment, and the load torque given value T L * T L * (k-2), load torque observation value Recorded as The steps of permanent magnet synchronous motor speed control in the permanent magnet synchronous motor drive control system of CNC machine tools include:

[0137] Step 1: Detect the rotor position θ, rotor angular velocity ω and three-phase current i of the permanent magnet synchronous motor a 、i b and i c ;

[0138] Step 2: Based on the three-phase current i a 、i b and i c Clark transformation is performed on the permanent magnet synchronous motor to obtain the current i in the α-β axis coordinate system: α 、Current i β , according to the current i α 、Current i β Perform Park transformation on the rotor position θ to obtain the current i in the dq axis coordinate system d 、Current i q ;

[0139] Step 3: Feedback gain g is based on the load torque given value T L * and load torque observation to adjust for changes in

[0140] Step 4: Load torque observer is based on rotor angular velocity ω and current i q Observe the load torque and obtain the load torque observation value and torque current compensation component i″ q ;

[0141] Step 5: PI speed controller is based on the input rotor given angular velocity ω * And the rotor angular velocity ω is used for control calculation to obtain the load torque given value and torque current given component i′ q ;

[0142] Step 6: Given component i' based on torque current q and torque current compensation component i″ q Calculate the q-axis torque current given value i q * ; The d-axis current controller is based on the d-axis torque current given value i d * and the current i in the d-axis coordinate system d The difference between them is used for PI control operation to obtain the control voltage U in the d-axis coordinate system d ; The q-axis current controller is based on the q-axis torque current given value i q *and the current i in the q-axis coordinate system q The difference between them is used for PI control operation to obtain the control voltage U in the q-axis coordinate system q ; Based on the control voltage U in the dq axis coordinate system d , U q Perform Park inverse transformation to obtain the control voltage U in the α-β axis coordinate system α , U β ; d-axis torque current given value i d * is equal to 0;

[0143] Step 7: Set the control voltage U in the α-β axis coordinate system α , U β As the input of the SVPWM module, the SVPWM module controls the three-phase inverter to generate a three-phase AC power supply U a , U b , U c , thereby driving the permanent magnet synchronous motor to operate.

[0144] In the above steps, the order of step 3 and steps 4 and 5 can be interchanged, that is, steps 4 and 5 can be performed first, and then step 3. Figure 2 (a) and Figure 3 (a) in the above steps 3, 4, and 5 are followed in order to first automatically adjust the feedback gain, and then perform load torque observation and speed control. ΔT L * =T L * (k-1)-T L * (k-2). Figure 2 (b) and Figure 3 In (b), load torque observation and speed control are performed first, and then feedback gain is automatically adjusted. ΔT L * =T L * (k)-T L * (k-1); In the above steps, steps four and five are performed first, and then step three is performed.

[0145] Observe the load torque observation value Then, the observed value of the load torque Converted into torque current compensation component i″ q Feedforward compensation to the input of the q-axis current PI controller, the torque current given component i′ output by the PI speed controller q The q-axis torque current given value i of the q-axis current PI controller is* q for:

[0146]

[0147] In formula (21), k q =1 / (1.5pψ f ) is the torque observation compensation coefficient. Comparing equation (5) with equation (21), it can be obtained that when the load is disturbed or the system parameters change, the load torque compensation is not added in equation (5), and a larger K needs to be selected. p The value is used to provide a sufficiently large given current change to offset the impact of load disturbance or system parameter changes, so as to ensure that the motor speed can be quickly constant; while formula (21) feeds forward the load torque observation value to the current regulator, without the need for a large K p When the load is disturbed or the system parameters are changed, a sufficiently large given current change can be provided to offset the related impact of the load disturbance or the change of system parameters, thereby reducing the output pressure of the PI speed controller.

[0148] When the feedback gain value is fixed, the smaller the feedback gain g, the larger the oscillation amplitude of the load torque observation and the stronger the volatility; the larger the feedback gain g, the smaller the oscillation amplitude of the load torque observation and the higher the observation accuracy. The automatic gain adjustment algorithm solves the problem of large torque observation fluctuation caused by small feedback gain in the load torque observer and the problem of long convergence time of large feedback gain. The convergence time and fluctuation amplitude indicators are better than the compromise gain algorithm. It can quickly track the change value of the load torque and quickly reduce the observation error caused by the given change or parameter change. It has a small oscillation amplitude and high observation accuracy, achieving a good observation effect.

[0149] When the given speed is changed under the rated load torque, although the actual load torque does not change, it can be seen from the load torque observer constructed by equations (7), (8) or (10), (11) that when the rotor angular velocity ω changes, even if the load torque does not change, the observed torque observation value will change, resulting in observation error. When the given speed is changed under the rated load torque, the control and adjustment process of the permanent magnet synchronous motor control system is that the PI speed controller first changes the output torque current given value i according to the given speed. * q Changes occur (i.e., the load torque given value T L * Change), thereby making the electromagnetic torque T of the permanent magnet synchronous motor e The feedback gain g is only based on the change of the load torque observation value. Automatic adjustment is performed. At this time, only when the rotor angular velocity ω changes, the load torque observation value After the change occurs, the feedback gain g is adjusted; the feedback gain g is also adjusted according to the change ΔT of the load torque given value. L * and the change in the observed value of load torque Automatic adjustment is performed. When the given speed changes, the load torque given value T L * Change, load torque observation value If the load torque has not changed, adjust the feedback gain g in advance. When an observation error actually occurs, the observer response speed can be accelerated to eliminate (reduce) the load torque observation value as quickly as possible. The observation error is reduced, thereby improving the rapidity and accuracy of motor speed control. Similarly, when the system model parameters change, the load torque given value T L * Prior to load torque observation When the load torque is changed, the feedback gain g is also based on the change in the load torque given value ΔT L * and the change in the observed value of load torque Automatic adjustment can be performed to adjust the feedback gain g in advance, speed up the observer response speed, and eliminate (reduce) the load torque observation value as soon as possible The observation error can be reduced and the speed control of the motor can be further improved. Of course, if the load is disturbed and the observation value is When changes occur, When a major change occurs, Figure 2 , Figure 3 It can be seen that the feedback gain g can also be automatically adjusted to eliminate (reduce) the load torque observation value as quickly as possible. The observation error makes the load torque observation value Keep up with the load torque T as soon as possible L changes.

[0150] Furthermore, in the embodiment of the permanent magnet synchronous motor drive control system, after the parameters of the PI speed controller and the load torque observer are adjusted manually or by optimization, the parameters of the PI speed controller can be manually fine-tuned while realizing load torque compensation control, or the parameters of the PI speed controller can be re-optimized using the wolf pack algorithm according to steps 201-206.

[0151] In each of the above, select g min , g maxIn the specific methods of determining the value and comparison threshold, the parameters in the PI speed controller have been set and are implemented under the condition of load torque compensation control; when the parameter value is determined by manual method, it is recommended that F 1 is an integer greater than or equal to 20, F 2 Greater than or equal to 5 and less than or equal to 0.5F 1 An integer.

[0152] The parameters of the PI speed controller and the load torque observer can also be optimized uniformly using optimization algorithms such as particle swarm algorithm, wolf pack algorithm, genetic algorithm, etc. Taking the particle swarm algorithm for unified optimization as an example, at this time, the system motor is given a rotor angular velocity ω * The step signal is Figure 5 As shown in (a) of Figure 5 (b) Change the load torque T L Given the rotor angular velocity ω * The signal is a step signal, and the rotor angular speed is given by Not greater than the rated angular velocity of the motor, and not less than 80% of the rated angular velocity of the motor. Figure 5 In (b), when the motor starts (given rotor angular velocity step signal t = 0), the load torque T L T is the high value of load torque Lmax ; When the motor enters the stable rotor angular velocity state (t>t z ), the load torque T L From high value T Lmax Mutation reduced to low value T Lmin ; The load torque is maintained at a low value T Lmin Run time After that, from the low value T Lmin Mutation increases to high values ​​of T Lmax ; Among them, the load torque high value T Lmax Not greater than the rated load torque T of the motor N , load torque low value T Lmin Not less than the motor rated load torque T N 10%, load torque high value T Lmax With low load torque T Lmin The difference between them is not less than the rated load torque T of the motor N 50%; 2~5t zA step signal is used as the given rotor angular velocity signal of the motor. The load torque mutation is controlled when the motor rotor angular velocity is in steady-state operation. The parameters of the PI speed controller and the load torque observer are optimized simultaneously by constructing the comprehensive performance index of the motor startup phase and the steady-state operation phase. The influence of the load torque observer's performance is unified to the rotor angular velocity performance index, which simplifies the parameter optimization process and can also improve the rotor angular velocity performance index to the greatest extent.

[0153] Considering that the main function of the load torque observer is to improve the anti-load interference ability of the PI speed controller, an objective function Q is established to comprehensively evaluate the performance indicators of the PI speed controller and the load torque observer. 3 for

[0154]

[0155] In formula (22), Q 31 The integral term in is the IAE criterion for the startup phase of the motor rotor angular velocity step response, t z is the transition time of the motor rotor angular velocity step response, t=0 is the starting time of the motor step response; Q 31 The second term γ z1 (1-sgn(e(t)+ω δ )) is the rotor angular velocity overshoot penalty function, where γ z1 Take a sufficiently large ( 5 times or more of the reasonable value), ω δ is the rotor angular velocity overshoot limit (i.e. the maximum rotor angular velocity overshoot allowed by the system); when the overshoot of the motor rotor angular velocity step response does not exceed the rotor angular velocity overshoot limit ω δ When , the overshoot penalty function term is equal to 0, otherwise it is equal to γ z1 ;Q 32 The integral term in is the IAE criterion of the steady-state working stage of the motor rotor angular velocity, which comprehensively considers the steady-state error and the anti-interference performance of the problem; Q 32 The second term γ z1 (1-sgn(e(t)+ω Δ )) is the steady-state error penalty function, ω Δ is the rotor angular velocity steady-state error limit; when the steady-state error of the motor rotor angular velocity step response does not exceed the rotor angular velocity steady-state error limit ω Δ When , the steady-state error penalty function term is equal to 0, otherwise it is equal to γ z1 ;Q 3 is the objective function value, that is, the fitness value of the particle swarm algorithm for parameter optimization of the PI speed controller and the load torque observer; the smaller the fitness value of the particle, the better the corresponding position.z2 The value is generally greater than or equal to 6, and its value determines the time interval for measuring the steady-state error of the rotor angular velocity. For example, γ z2 When the value is equal to 10, then at 9 times the transition time t z The steady-state error of the rotor angular velocity is measured in the interval; t is equal to γ z2 t z The time should be later than Figure 5 Medium load torque from low value T Lmin Mutation increases to high values ​​of T Lmax moment. γ z is the fitness balance adjustment coefficient, which is a constant greater than 0 and is used to balance the starting performance and steady-state performance (including steady-state error and anti-interference ability) of the motor; reduce γ z value, then the objective function value Q 3 The weight of the startup performance item becomes larger, and the system performance is more inclined to the rapidity of motor startup; increasing γ z value, then the objective function value Q 3 The weight of the steady-state performance item becomes larger, and the system performance is more inclined to the steady-state performance and anti-interference ability of speed control. z1 When taking values, first estimate For example, if the rated speed of the motor is 1500r / min (corresponding to the rated rotor angular velocity of 157rad / s) and the starting time is about 0.2s, then The value of the item does not exceed 40; let γ z2 The value is equal to 10, γ z is equal to 2, and the rotor angular velocity steady-state error limit ω Δ Equal to 2rad / s, at this time The reasonable value of γ is no more than 60. z1 It can be equal to 300 or a constant greater than 300. If other index factors need to be considered in the optimization of PI speed controller parameters, for example, whether the transition process time is short enough, whether the steady-state error is small enough, etc., other objective functions other than formula (22) can be established.

[0156] The specific steps of using the particle swarm algorithm to optimize the parameters of the PI speed controller and the load torque observer in the embodiment of the permanent magnet synchronous motor drive control system are:

[0157] Step 301, initialize the particle swarm. Assume that the initial position of each particle in the particle swarm is Where M is the number of individuals, which is generally selected between 20 and 150, and the initial position is required to obey random distribution. For different optimization objects, there are:

[0158] (1) For the load torque observer embodiment 1 in the permanent magnet synchronous motor drive control system embodiment, when the feedback gain automatic adjustment method embodiment 1 is used to automatically adjust the feedback gain, the parameter vector to be optimized is μ 1 =[K p , T i , G max , G min , ε 1 , ε 2 , α], at this time, the search space dimension N of the particle swarm algorithm is equal to 7. After optimizing the optimal position of the particle, g max , g min according to Sliding mode gain k g According to the parameter α, they are calculated according to formula (13). The initial position of the i-th particle is expressed as Corresponding to the parameter vector μ to be optimized 1 ; The position value interval is [z imin z imax ], the range interval can be given based on existing knowledge or experience, for example, parameter K p The value interval [z 1min z 1max ] is [0 10I N ], parameter T i The value interval [z 2min z 2max ] is [0.001 0.5], parameter G max The value interval [z 3min z 3max ] is [-4 4]; parameter G min The value interval [z 4min z 4max ] is [-4 4]; parameter ε 1 The value interval [z 5min z 5max ] and parameter ε 2 The value interval [z 6min z 6max ] are [0 0.05T N ], T N is the rated torque of the motor; the value range of parameter θ is [z 7min z 7max ] is [1 5].

[0159] (2) For the load torque observer embodiment 1 in the permanent magnet synchronous motor drive control system embodiment, when the feedback gain is automatically adjusted using the feedback gain automatic adjustment method embodiment 2, the parameter vector to be optimized is μ 2 =[K p, T i , G max , G min ,ε,α], at this time, the search space dimension N of the particle swarm algorithm is equal to 6. After optimizing the optimal position of the particle, g max , g min according to Sliding mode gain k g According to the parameter θ, the initial position of the i-th particle is expressed as Corresponding to the parameter vector μ to be optimized 2 ; The position value interval is [z imin z imax ], the range interval can be given based on existing knowledge or experience, for example, the vector μ 2 The first four parameter value intervals and vector μ 1 The first four parameters are the same, and the value range of parameter ε is [z 5min z 5max ] is [00.05T N ], T N is the rated torque of the motor; the value range of parameter α is [z 6min z 6max ] is [1 5].

[0160] (3) For the load torque observer embodiment 2 in the permanent magnet synchronous motor drive control system embodiment, when the feedback gain automatic adjustment method embodiment 1 is used to automatically adjust the feedback gain, the parameter vector to be optimized is μ 3 =[K p , T i , G max , G min , ε 1 , ε 2 , β], at this time, the search space dimension N of the particle swarm algorithm is equal to 7. After optimizing the optimal position of the particle, g max , g min according to Proportional gain k W According to the parameter β, they are calculated according to formula (14). The initial position of the i-th particle is expressed as Corresponding to the parameter vector μ to be optimized 3 ; The position value interval is [z imin z imax ], the range interval can be given based on existing knowledge or experience, for example, the vector μ 3 The first six parameter value intervals and vector μ 1 The first six parameters are the same, and the value range of parameter β is [z 7min z 7max ] is [1 20].

[0161] (4) For the load torque observer embodiment 2 in the permanent magnet synchronous motor drive control system embodiment, when the feedback gain is automatically adjusted using the feedback gain automatic adjustment method embodiment 2, the parameter vector to be optimized is μ 4 =[K p , T i , G max , G min , ε, β], at this time, the search space dimension N of the particle swarm algorithm is equal to 6. After optimizing the optimal position of the particle, g max , g min according to Proportional gain k W According to the parameter β, they are calculated according to formula (14). The initial position of the i-th particle is expressed as Corresponding to the parameter vector μ to be optimized 4 ; The position value interval is [z imin z imax ], the range interval can be given based on existing knowledge or experience, for example, the vector μ 4 The first five parameter value intervals and vector μ 2 The first five parameters are the same; the value range of parameter β is [z 6min z 6max ] is [1 20].

[0162] Step 302: Set the initial position z of each particle (0) As the initial optimal value z of each particle b (0) , calculate the fitness function value of each particle (i.e., particle fitness value) according to formula (22) and save it as the optimal particle fitness value of each particle; compare the fitness values ​​of each particle to obtain the optimal solution z of the initial particle swarm g (0) And the optimal fitness value of the particle swarm is saved. Assume that the initial velocity of the particle is Also obeying the random distribution, the initial velocity of the i-th particle is expressed as The speed change extreme value of the parameter [u imin u imax ] is generally set to 5% to 20% of the parameter value range; for example, parameter G max The value interval [z 3min z 3max ] is [-4 4], the interval range is 8, then the third dimension variable of each particle (parameter G max )'s speed change extreme value [u 3min u 3max ]According to 5%, the value is [-0.4 0.4], and according to 20%, the value is [-1.6 1.6].

[0163] Step 303, according to formula

[0164]

[0165] Update the speed and position of each particle; the speed change of each dimensional variable cannot exceed the corresponding speed change extreme value of each dimensional variable, and the updated position of each dimensional variable cannot exceed the corresponding value interval of each dimensional variable. In formula (23), n is the current number of iterations, u n and z n is the velocity vector and position of the particle; c 0 is the inertia weight, which ranges from 0 to 1.4. Adjusting its value can change the search range and search speed. Furthermore, c is adaptively reduced as the number of iterations increases. 0 The value is conducive to achieving a balance between search ability and convergence speed; c 1 、c 2 is the learning factor, which takes values ​​between 1 and 2, and is recommended to be equal to 2; is a random number ranging from 0 to 1; is the optimal solution (optimal position) found by the particle itself so far, It represents the optimal solution (optimal position) of the particle swarm of the entire population so far.

[0166] Step 304, calculate the particle fitness value of each particle according to formula (22).

[0167] Step 305, And the corresponding optimal particle fitness value is updated. And the corresponding particle swarm optimal fitness value is updated.

[0168] Step 306, determine whether the loop termination condition is met, if yes, end the particle swarm algorithm, and the final particle swarm optimal solution is the optimal parameter of the optimized parameter vector, that is, the optimal parameters of the PI speed controller and the load torque observer; otherwise, return to step 303.

[0169] The loop termination condition is generally to reach the maximum iteration step limit or the particle swarm optimal fitness value is less than a certain threshold. When the particle swarm algorithm is used to adjust the parameters of the PI speed controller and the load torque observer, the maximum iteration step limit is used as the loop termination condition, and the maximum iteration step is usually selected between 100 and 2000. When setting the threshold termination condition of the particle swarm optimal fitness value at the same time, the threshold termination condition needs to comprehensively consider the starting performance and anti-interference performance of the motor speed control. For example, if the rated speed of the motor is 1500r / min (corresponding to the rated rotor angular velocity of 157rad / s), the starting time is required to be within 0.2s, and the anti-interference performance and starting performance are basically balanced, then the threshold of the termination condition can be set to 30.

[0170] When calculating the particle fitness value of each particle according to formula (22), it is required to convert each particle position into the corresponding PI speed controller parameters and load torque observer parameters in turn to control the motor operation (or operation in the simulation system). * is a step signal, load torque T L When the rotor angular velocity changes suddenly in a steady state, the speed response e(t) of the motor is obtained, and the transition process time t is determined based on e(t). z At the same time, the fitness value Q of the particle is calculated based on e(t) 3 .

[0171] Among the parameters to be optimized, g max , g min There is a constraint g between min <g max , corresponding to the constraint G min >G max In the above steps, when randomly generating particle positions or updating particle positions, first, particle z i The parameter z in i3 (i.e. G max ) According to the value interval [z 3min z 3max ] Randomly generate positions or update positions, then particle z i The parameter z i4 (i.e. G min ) According to the value interval [z i3 z 4max ] Randomly generate positions or update positions so that particles z i Satisfy the constraint G min >G max , that is, satisfying the constraint g min <g max .

[0172] In the above embodiments, the rotor angular velocity steady-state error refers to the difference between the instantaneous value and the steady-state value of the motor rotor angular velocity in steady state, and the rotor angular velocity steady-state error limit is the maximum absolute value of the rotor angular velocity steady-state error allowed by the system; the rotor angular velocity steady-state error limit is usually the same as the maximum value of the rotor angular velocity steady-state error allowed by the system. The torque observation tracking overshoot limit is usually 1% to 10% of the rated torque of the motor. Specifically, the torque observation tracking overshoot limit is 2% of the rated torque, or 5% of the rated torque, or 10% of the rated torque, and so on. Tracking and adjustment time refers to the load torque suddenly changing from one constant value to another constant value. The torque observation transition process is from the moment when the sudden change starts to the moment when the load torque observer outputs the observed value and stably enters the load torque observation steady-state error limit range. The tracking and adjustment time refers to the transition process time; the load torque observation steady-state error refers to the error between the instantaneous value of the observed torque and the load torque when the load torque is unchanged and the load torque observer is in a steady state. This error includes the observation error caused by the sliding mode observer jitter (or the state observer steady-state fluctuation) and the observation error caused by interference reasons other than load fluctuation; the load torque observation steady-state error limit is the maximum absolute value of the load torque observation steady-state error allowed by the load torque observer; the load torque observation steady-state error limit is usually the same as the maximum load torque observation steady-state error allowed by the system; the load torque observation steady-state error limit is usually 1% to 5% of the rated torque of the motor. Specifically, the load torque observation steady-state error limit is 1% of the rated torque, or 2% of the rated torque, or 5% of the rated torque, and so on. Torque observation tracking overshoot refers to the load torque suddenly changes from one fixed value to another fixed value, and the observed value output by the load torque observer exceeds the maximum deviation value of the load torque after the sudden change. When the steady-state error of the load torque observation is within the vicinity of the steady-state error limit of the load torque observation, for example, within the range of 95% to 105%, or within the range of 98% to 102%, it is considered that the steady-state error of the load torque observation increases to the steady-state error limit of the load torque observation.

[0173] In the present invention, the CNC machine tool permanent magnet synchronous motor drive control system is a permanent magnet synchronous motor speed control system. The permanent magnet synchronous motor speed control system and the permanent magnet synchronous motor speed control method including the motor load torque observer parameter optimization method provided by the present invention can be used for CNC machine tool permanent magnet synchronous motor drive control as well as other permanent magnet synchronous motor application occasions.

[0174] In addition to the technical features described in the specification, other technologies involved in the present invention are conventional technologies mastered by those skilled in the art. For example, the q-axis current controller and the d-axis current controller use PI controllers for control and controller parameter selection, the PI speed controller control parameter selection, the position and speed detection module uses a rotary transformer or a photoelectric encoder to detect the rotation angle and rotation speed of the permanent magnet synchronous motor rotor, and the Clarke transformation module, Park transformation module, Park inverse transformation module and SVPWM module, three-phase inverter transformation method and application method, etc., are all conventional technologies mastered by those skilled in the art.

Claims

1. A method for optimizing parameters of a motor load torque observer, wherein the load torque observer parameters are optimized and adjusted using a wolf pack algorithm, characterized in that: The objective function Q2 for comprehensively evaluating the performance indicators of the load torque observer is established as follows: Where, e2(t) is the instantaneous value of load torque observation error, t p is the tracking adjustment time of the motor load torque observed step response, t = 0 is the load mutation moment of the load torque observed step response; Q 21 γ p1 (1-sgn(e2(t)+T δ )) is the torque observation tracking overshoot penalty function, γ p1 is a sufficiently large positive number, T δ It is the torque observation tracking overshoot limit; Q 22 where max(|e2(t)|) is the absolute value of the maximum torque observation steady-state error, γ p2 is the fitness balance emphasis coefficient, and γ p2 >0;Q 22 γ p1 (1-sgn(e2(t)+T Δ )) is the torque observation steady-state error penalty function, T Δ is the load torque observed steady-state error limit; γ p3 ≥2; The load torque observer is Where J is the moment of inertia, p is the number of motor pole pairs, ψ f is the permanent magnet flux linkage; is the estimated value of the rotor angular velocity, g is the feedback gain of the load torque observer and g<0; k g is the sliding mode gain of the load torque observer and k g ≤-|e2 / J|, is the load torque observation error, T L is the load torque, is the observed value of load torque; The load torque observer is based on the load torque given value Changes in load torque and observed values The feedback gain g is adjusted by: Step I: Calculation Step II: Judgment Is it greater than the torque change comparison threshold ε? When it is greater than the torque change comparison threshold ε, the feedback gain g is equal to g min ;when When the torque change comparison threshold ε is less than or equal to, the feedback gain g is equal to g max ; Step III: The load torque observer calculates the load torque T according to the feedback gain g. L Observe and obtain the load torque observation value The PI speed controller performs control calculation to obtain Among them, ε>0; g max is the high value of feedback gain, g min is the low value of feedback gain, and g min <g max <0; The parameter vector to be optimized for the load torque observer is θ2 = [G max , G min ,ε,α], the search space dimension N of the wolf pack algorithm is equal to 4; g max With G max The relationship is g min With G min The relationship is k g The relationship with α is Among them, α≥1.

2. The motor load torque observer parameter optimization method according to claim 1, characterized in that: In the wolf pack algorithm, wolves attack their prey according to the formula Where n is the current iteration number; i = 1, 2, ..., M-1, M is the number of wolves in the wolf pack; j = 1, 2, ..., N, N is the search space dimension of the wolf pack algorithm; represents the current position of the i-th wolf; p b =[p b1 p b2 …p bN ] represents the current position of the leader; δ is a pre-set threshold, and the value range of δ is [0.1 0.4]; p jmax and p jmin are the maximum and minimum values ​​of the j-th dimension parameter value interval respectively; stepc is the siege step length; the siege step length stepc is calculated according to the formula Calculate; where n max is the maximum number of iterations set; stepc max 、stepc min are the maximum siege step length and the minimum siege step length respectively; ξ is the siege step length attenuation factor, 2≤ξ≤10.

3. The motor load torque observer parameter optimization method according to claim 2, characterized in that: The wolf pack algorithm for optimizing the load torque observer parameters is: Step 201, initialize the wolf pack; the initial position of each wolf in the wolf pack is Step 202, hunting competition; calculate the fitness value of each wolf in the wolf pack, the smaller the fitness value, the better the position of the wolf; select the wolf with the best position as the alpha wolf, and select R1 wolves with the best position other than the alpha wolf as candidates; the R1 candidates start hunting search behavior to compete and replace the alpha wolf; Step 203, calling for a charge; the wolves other than the alpha wolf and the candidate wolf start a charge search behavior and charge towards the alpha wolf; Calculate the fitness value of the new position of the i-th wolf. When the new position searched by the i-th wolf is better than its current position, change its position, otherwise keep it unchanged. If the new position searched by the i-th wolf is better than the position of the alpha wolf, the i-th wolf will be converted into the alpha wolf and will start the summoning attack again; Step 204, besieging the prey; under the call of the leader wolf, the other wolves besiege the prey; Calculate the fitness value of the new position of the i-th wolf. If the new position searched by the i-th wolf during the siege is better than the current position, change the position of the wolf, otherwise keep it unchanged. If the new position searched by the i-th wolf is better than the position of the leader wolf, the i-th wolf will be converted to the leader wolf; Step 205, termination condition determination; If the number of loop iterations reaches , the optimization process is terminated, and the position parameter of the leader wolf is the optimal parameter of the optimized vector; otherwise, n=n+1 is set, and the process goes to step 206; Step 206, competition update; randomly generate R2 wolves to replace the wolf with the worst R2 fitness value in the wolf pack, and go to step 202.

4. The motor load torque observer parameter optimization method according to any one of claims 1 to 3, characterized in that: PI speed controller outputs load torque given value and torque current given component i′ q for Among them, K p is the proportional coefficient of the PI speed controller, T i is the integral time constant of the PI speed controller; the motor's rotor angular velocity error e = ω * -ω,ω * is the given rotor angular velocity, ω is the rotor angular velocity, and e(t) is the instantaneous value of the rotor angular velocity error.

5. The motor load torque observer parameter optimization method according to claim 4, characterized in that: The observed value of the load torque Converted into torque current compensation component i″ q Feedforward compensation to the input of the q-axis current PI controller; q-axis torque current setpoint for:

6. The motor load torque observer parameter optimization method according to claim 5, characterized in that: Detect the rotor position θ and three-phase current i of the permanent magnet synchronous motor a 、i b and i c ; According to the three-phase current i a 、i b and i c Clark transformation is performed on the permanent magnet synchronous motor to obtain the current i in the α-β axis coordinate system: α 、Current i β , according to the current i α 、Current i β Perform Park transformation on the rotor position θ to obtain the current i in the dq axis coordinate system d 、Current i q .