Disclosure of Invention
The technical problem to be solved by the invention is to provide an L2 sliding mode control method of a permanent magnet synchronous motor aiming at the defects in the prior art, wherein the method has the advantages of simple steps, convenience in implementation, good position tracking effect, high response speed, strong anti-interference capability, good robustness, strong practicability, good use effect and convenience in popularization and use.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: an L2 sliding mode control method of a permanent magnet synchronous motor comprises the following steps:
step one, obtaining a feedback position: the position sensor periodically detects the position of the permanent magnet synchronous motor to obtain feedback positions at a plurality of moments and transmits the feedback positions to the processor;
step two, obtaining a position error: the processor calculates the difference between the feedback position and the given position to obtain a position error e; and calculating to obtain a derivative e' of the position error;
step three, obtaining given current of a q axis: the processor invokes the L2 synovial controller module based on the position error e and the derivative of the position error e', and based on the formula:
calculating q-axis given current
Wherein p is the pole pair number psi of the permanent magnet synchronous motor
fIs the flux linkage of the permanent magnet synchronous motor, J is the rotational inertia of the permanent magnet synchronous motor, B is the friction factor of the permanent magnet synchronous motor, gamma is the suppression degree of given interference and gamma is>0, s is a sliding mode function, and the expression is:
s=p1e+e′ (9)
wherein p is1Is a parameter of a sliding mode function and p1>0;
Step four, obtaining d-axis current and q-axis current: the A-phase current sensor detects the A-phase winding current of the stator of the permanent magnet synchronous motor and detects the A-phase winding current iaTransmitting to a processor; the B-phase current sensor detects the stator B-phase winding current of the permanent magnet synchronous motor and detects the detected B-phase winding current ibTransmitting to a processor; processor passes formula ic=-(ia+ib) Calculating to obtain the stator C-phase winding current i of the permanent magnet synchronous motorcThen the A phase winding current iaPhase B winding current ibAnd C phase winding current icPerforming Clarke transformation to obtain alpha-axis current i under a two-phase static coordinate systemαAnd beta axis current iβFor the alpha axis current iαAnd beta axis current iβCarrying out Park conversion to obtain d-axis current idAnd q-axis current iq;
Step five, obtaining the alpha axis voltage and the beta axis voltage: processor definition d-axis given current
D-axis current i
dWith d-axis set current
Comparing to obtain d-axis current difference and comparing q-axis current i
qWith q-axis set current
Comparing to obtain q-axis current difference, and respectively passing the d-axis current difference and the q-axis current difference through a current PI regulator to respectively output d-axis voltage u
dAnd q-axis voltage u
qFor d-axis voltage u
dAnd q-axis voltage u
qCarrying out Park inverse transformation to obtain alpha-axis voltage u
αAnd beta axis current u
β;
Step six, carrying out SVPWM control on the permanent magnet synchronous motor: and calling the SVPWM control module by the processor to perform SVPWM control on the permanent magnet synchronous motor so that the permanent magnet synchronous motor reaches a given position.
The L2 sliding mode control method of the permanent magnet synchronous motor adopts an L2 sliding mode control method in the formula (16) in the third step, and the specific process is as follows:
step 301, defining a torque equation of the permanent magnet synchronous motor as follows:
and the torque equation of the permanent magnet synchronous motor is expressed as follows:
wherein, TeIs the electromagnetic torque of the permanent magnet synchronous motor, theta is the feedback position, T is the time, TLIs the load torque;
step 302, defining a synovial membrane solution function H as:
wherein V' is the derivative of a positive definite and differentiable function V (x), and V (x) is ≧ 0; the value of V' satisfies:
d is interference amount, and Z is system evaluation signal;
step 303, defining that the feedback control law u satisfies the formula:
wherein the content of the first and second substances,
defining a first derivative of the position error for a given position
Defining the second derivative of the position error
Substituting equation (7) into equation (5) yields:
u=Je″+Be′+TL (8)
from equation (8) and equation (9):
according to the formula (3), let
Then V ═ s × Js'; combining equation (10) yields:
V′=-Bs2+Jp1e′s+Bp1es+us-TLs (11)
step 304, designing a control law u as follows:
wherein k is a constant greater than 0;
step 305, substituting the formula (12) into the formula (7) and combining the formula (4) to obtain:
in the L2 sliding-mode control method for the permanent magnet synchronous motor, in step 302, the value of Z is equal to the sliding-mode function s, and Z ═ s ═ p1e+e′。
In the L2 sliding mode control method of the permanent magnet synchronous motor, the obtaining process of the control law u in step 304 is as follows:
step 3041 represented by formula (13), formula (11), and Z ═ s ═ p1e + e' gives:
when equation (14) is satisfied:
then, the control law u is solved as follows:
the L2 sliding mode control method of the permanent magnet synchronous motor described above, p in step three1Is 25.
In the L2 sliding mode control method of the permanent magnet synchronous motor, in the third step, the value of γ is 0.0001.
According to the L2 sliding mode control method of the permanent magnet synchronous motor, the position sensor is an incremental encoder, and the processor is a DSP digital signal processor.
Compared with the prior art, the invention has the following advantages:
1. the method of the invention has simple steps and convenient realization.
2. The L2 sliding mode control method of the permanent magnet synchronous motor has the characteristics of good position tracking effect, high response speed and easiness in realization of controllers such as a DSP (digital signal processor).
3. The L2 sliding mode control method of the permanent magnet synchronous motor can achieve the purpose of inhibiting the load torque disturbance, has strong anti-interference capability and improves the robustness of the system.
4. The invention has strong practicability and good use effect and is convenient for popularization and use.
In conclusion, the method has the advantages of simple steps, convenience in implementation, good position tracking effect, high response speed, strong anti-interference capability, good robustness, strong practicability, good use effect and convenience in popularization and use.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Detailed Description
As shown in fig. 1, fig. 2 and fig. 4, the L2 sliding mode control method of the permanent magnet synchronous motor of the present invention includes the following steps:
step one, obtaining a feedback position: the position sensor 2 periodically detects the position of the permanent magnet synchronous motor to obtain feedback positions at a plurality of moments and transmits the feedback positions to the processor 1;
step two, obtaining a position error: the processor 1 calculates the difference between the feedback position and the given position to obtain a position error e; and calculating to obtain a derivative e' of the position error;
step three, obtaining given current of a q axis: processor 1 invokes the L2 synovial controller module based on the position error e and the derivative of the position error e', and based on the formula:
calculating q-axis given current
Wherein p is the pole pair number psi of the permanent magnet synchronous motor
fIs the flux linkage of the permanent magnet synchronous motor, J is the rotational inertia of the permanent magnet synchronous motor, B is the friction factor of the permanent magnet synchronous motor, gamma is the suppression degree of given interference and gamma is>0, s is a sliding mode function, and the expression is:
s=p1e+e′ (9)
wherein p is1Is a parameter of a sliding mode function and p1>0; only p1>0, the permanent magnet synchronous motor can be ensured to track the given rotating speed.
In this embodiment, formula (16) in step three is obtained by using an L2 slip film control method, which specifically comprises the following steps:
step 301, defining a torque equation of the permanent magnet synchronous motor as follows:
and the torque equation of the permanent magnet synchronous motor is expressed as follows:
wherein, TeIs the electromagnetic torque of the permanent magnet synchronous motor, theta is the feedback position, T is the time, TLIs the load torque;
step 302, defining a synovial membrane solution function H as:
wherein V' is the derivative of a positive definite and differentiable function V (x), and V (x) is ≧ 0; the value of V' satisfies:
d is interference amount, and Z is system evaluation signal;
in this embodiment, the value of Z in step 302 is equal to the sliding mode function s, and Z ═ s ═ p1e+e′。
Step 303, defining that the feedback control law u satisfies the formula:
wherein the content of the first and second substances,
defining a first derivative of the position error for a given position
Defining the second derivative of the position error
Substituting equation (7) into equation (5) yields:
u=Je″+Be′+TL (8)
from equation (8) and equation (9):
according to the formula (3), let
Then V ═ s × Js'; combining equation (10) yields:
V′=-Bs2+Jp1e′s+Bp1es+us-TLs (11)
step 304, designing a control law u as follows:
wherein k is a constant greater than 0;
in this embodiment, the obtaining process of the control law u in step 304 is as follows:
step 3041 represented by formula (13), formula (11), and Z ═ s ═ p1e + e' gives:
when equation (14) is satisfied:
then, the control law u is solved as follows:
step 305, substituting the formula (12) into the formula (7) and combining the formula (4) to obtain:
in this example, p is described in step three1Is 25.
In this embodiment, γ in step three is 0.0001. For any given positive number γ, when there is a positive definite and differentiable function V (x) ≧ 0 and satisfaction
When the gain F of the L2 is smaller than the given positive number gamma, the purpose of suppressing the interference is achieved.
Step four, obtaining d-axis current and q-axis current: the A-phase current sensor detects the stator A-phase winding current of the permanent magnet synchronous motor and detects the detected A-phase winding current iaTransmitted to the processor 1; the B-phase current sensor detects the stator B-phase winding current of the permanent magnet synchronous motor and detects the detected B-phase winding current ibTransmitted to the processor 1; the processor 1 passes the formula ic=-(ia+ib) Calculating to obtain the stator C-phase winding current i of the permanent magnet synchronous motorcThen, the A-phase winding current i is appliedaPhase B winding current ibAnd C phase winding current icPerforming Clarke transformation to obtain alpha-axis current i under a two-phase static coordinate systemαAnd beta axis current iβFor the alpha axis current iαAnd beta axis current iβCarrying out Park conversion to obtain d-axis current idAnd q-axis current iq;
Step five, obtaining the alpha axis voltage and the beta axis voltage:
processor 1 defines d-axis given current
D-axis current i
dWith d-axis set current
Compared withObtaining d-axis current difference value and converting q-axis current i
qWith q-axis set current
Comparing to obtain q-axis current difference, and respectively passing the d-axis current difference and the q-axis current difference through a current PI regulator to respectively output d-axis voltage u
dAnd q-axis voltage u
qFor d-axis voltage u
dAnd q-axis voltage u
qCarrying out Park inverse transformation to obtain alpha-axis voltage u
αAnd beta axis current u
β;
Step six, carrying out SVPWM control on the permanent magnet synchronous motor: and the processor 1 calls the SVPWM control module to perform SVPWM control on the permanent magnet synchronous motor so that the permanent magnet synchronous motor reaches a given position.
The purpose of restraining the load torque disturbance can be achieved through the method.
In this embodiment, the position sensor 2 is an incremental encoder, and the processor 1 is a DSP digital signal processor.
The method of the third step of the invention is derived according to the following principle:
consider the following system:
wherein d is interference amount, Z is system evaluation signal, and a sliding mode function is defined as the evaluation signal in the L2 sliding mode derivation process; x is a variable, x' is a derivative of the variable x, f (x) is a part of the system function, the part changes correspondingly with the change of the variable x, g (x) is another part of the system function, the part changes are related to a disturbance variable d besides the change of the variable x, h (x) is a sliding mode function;
the L2 slip form has the following three features of the slip form: determining the existence of sliding mode dynamic, possessing accessibility requirement and having stability. The sliding mode movement comprises approach movement and sliding mode movement, the approach movement is the approach movement when the system approaches to the switching surface from any initial state, in the approach process, the system is controlled by a control function, and the movement of the system can reach the switching surface no matter where the starting point is in the state space, namely, the accessibility condition is met.
To express the interference rejection capability of the system, the following indexes are defined:
wherein T is the integral action time, which indicates how long the action time is. It can be seen that the smaller F is, the higher anti-interference capability is obtained when the system is in operation, and the design of the L2 sliding mode controller is that in a closed-loop system, the higher anti-interference capability and stability are obtained when the system is interfered, so that F can be smaller than a given value. If, for any given positive number γ, there is a positive definite and differentiable function V (x) ≧ 0 and satisfied:
then, F < gamma is shown, and the robust condition is established, so that the purpose of suppressing interference is achieved.
The L2 sliding mode control design for the permanent magnet synchronous motor needs to satisfy the following two conditions:
(1) when T isLWhen the system is stable for any initial state, the system position error is close to zero.
(2) When T isLWhen not equal to 0, for any disturbing signal, the following conditions are satisfied:
where T >0 is a finite time and γ >0 is a given positive number.
In order to verify the effectiveness of the L2 sliding mode control method of the permanent magnet synchronous motor, Matlab is adopted to carry out the L2 sliding mode control method of the permanent magnet synchronous motorAnd (3) simulation, wherein basic parameters of the permanent magnet synchronous motor used in the simulation are as follows: j is 0.0008kg.m2,B=0.0001,p=4,ψf0.175 Wb. The given position signal is a square wave input signal. Fig. 3.1 and 3.2 show a position tracking comparison graph and a rotational speed comparison graph, respectively, in which the start load is 0n.m, and the load torque is suddenly applied to 4n.m at 4.72s (a time point after the start of the falling edge of the second square wave signal); fig. 3.3 and 3.4 show a position tracking comparison chart and a rotational speed comparison chart, respectively, when the start load torque is 2n.m and the load torque is suddenly applied to 4n.m at 4.72s (a time point after the start of the falling edge of the second square wave signal). By comparing with the simulation result of the conventional PID control method, the simulation result is shown in FIGS. 3.1-3.4.
As can be seen from fig. 3.1, both the L2 sliding mode control method and the PID control method can effectively track the given position when the permanent magnet synchronous motor is started in no-load mode. Compared with a PID control method, the time for the permanent magnet synchronous motor to reach a given position is shorter by adopting an L2 sliding mode control method. At 4.72s, the load torque is suddenly increased to 4N.m, as can be seen from comparison in FIG. 3.1, the tracking of the motor position is less affected by disturbance by using the L2 sliding mode control method, and the tracking to a given position can be realized in a short time. And after the same disturbance is applied, the position of the permanent magnet synchronous motor deviates from the given position due to insufficient anti-interference capability by adopting a common PID control method. Fig. 3.3 is a simulation result of the rotating speed response of the permanent magnet synchronous motor in the two control methods when the permanent magnet synchronous motor is started with a load, and a comparison analysis shows that the permanent magnet synchronous motor has a faster rise time and a smaller overshoot when the L2 sliding mode control method is adopted. The permanent magnet synchronous motor also shows strong anti-interference capability when disturbed. When the permanent magnet synchronous motor is started in a no-load mode and a loaded mode respectively, as shown in fig. 3.2 and fig. 3.4, the electromagnetic rotating speed of the permanent magnet synchronous motor is faster than the rotating speed response of the permanent magnet synchronous motor under the control of the ordinary PID (proportion integration differentiation) by adopting the L2 sliding mode control method, and the overshoot is small.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and all simple modifications, changes and equivalent structural changes made to the above embodiment according to the technical spirit of the present invention still fall within the protection scope of the technical solution of the present invention.