Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a control method for the direct thrust of a permanent magnet linear synchronous motor, and aims to solve the technical problem of unstable control system caused by the fact that the control method of the permanent magnet linear synchronous motor is easily affected by parameter time variation and the like.
The technical scheme of the invention is as follows:
a direct thrust control method of a permanent magnet linear synchronous motor comprises the following steps,
S101, measuring three-phase current ia、ib、ic and three-phase voltage ua、ub、uc of a permanent magnet linear synchronous motor, and performing Clark transformation to obtain equivalent current iα、iβ and equivalent voltage uα、uβ under an alpha-beta coordinate system;
S102, calculating thrust fe, flux linkage psis and flux linkage angle thetas of the permanent magnet linear synchronous motor by using equivalent current iα、iβ and equivalent voltage uα、uβ under an alpha-beta coordinate system;
S103, constructing ADHDP a speed controller, wherein a thrust reference value fe* output by the ADHDP speed controller is differed from the calculated thrust fe to obtain a thrust difference delta fe, and a given flux linkage amplitude psis* is differed from a flux linkage psis calculated in the step S102 to obtain delta psis;
S104, inputting the signals obtained by the thrust difference delta fe and the flux linkage difference delta phis in the step S103 through the thrust and flux linkage hysteresis regulator and the signals output by the flux linkage angle thetas through the sector selection unit into the voltage vector switch selection unit, and further selecting the states of all the switches of the inverter, so that the inverter generates three-phase alternating voltage to enable the motor to operate.
Further, the construction method of ADHDP speed controller in step S103 is as follows:
Two BP neural networks, namely an execution network and an evaluation network, are constructed, and a ADHDP speed controller is constructed by using the execution network and the evaluation network.
Further, both the execution network and the evaluation network in ADHDP speed controllers contain two hidden layers.
Further, the hidden layers of the execution network and the evaluation network use bipolar sigmoidal functions, and the output layer uses linear functions purelin.
Further, the structure of the execution network is 3-12-12-1.
Further, the structure of the evaluation network was 4-10-10-1.
Further, the speed error e (k) and the variable e (k-1) at two times before the speed error e (k-2) are taken as the input of the execution network, and the thrust reference value fe* is taken as the output of the execution network.
Further, the speed error e (k) and the variables e (k-1), e (k-2) at two times before the speed error and the thrust reference value fe* for executing the network output are used as the input of the evaluation network, and the estimated value of the performance index function of the system is usedIs output.
Further, the speed error e (k) is obtained by obtaining the motor rotation speed v using a magnetic scale and making a difference from the desired speed vref to obtain the speed error e (k).
Further, the learning rate la,c (k) of the evaluation network and the execution network are each an adaptive learning rate, as shown in the following formula,
Where α, β are learning rate gains, the initial value of la,c (k) is 0.1, and Ea,c (k) is an objective function of the execution network and the evaluation network.
Compared with the prior art, the invention has the following advantages:
1. Compared with the traditional PI controller with low convergence speed and low error precision, the direct thrust control method of the permanent magnet linear synchronous motor is a data driving control method, optimizes to a certain extent and improves the control precision of the permanent magnet linear synchronous motor.
2. According to the direct thrust control method for the permanent magnet linear synchronous motor, the evaluation network and the execution network respectively adopt the BP neural network, two hidden layers are designed to improve the approximation precision, the adaptive learning rate is used, the convergence speed of the neural network is improved, and the BP neural network is prevented from being in local optimum.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
The invention provides a direct thrust control method of a permanent magnet linear synchronous motor, which is shown in fig. 1 to 6, and specifically comprises the following steps.
A direct thrust control method of a permanent magnet linear synchronous motor specifically comprises the following steps,
Step 1, measuring three-phase current ia、ib、ic and three-phase voltage ua、ub、uc of a permanent magnet linear synchronous motor, and performing Clark transformation to obtain equivalent current iα、iβ and equivalent voltage uα、uβ under an alpha-beta coordinate system;
Step 2, calculating the thrust fe and the flux linkage psis of the permanent magnet linear synchronous motor by using the equivalent current iα、iβ and the equivalent voltage uα、uβ under the alpha-beta coordinate system in the step 1, and then performing inverse trigonometric tangent calculation by using the flux linkage component psiα、ψβ under the alpha-beta coordinate system to obtain the flux linkage angle thetas, wherein the specific expression is that,
Wherein pn is the pole pair number of the motor, and τ is the pole pitch of the motor;
And 3, constructing two BP neural networks, namely an execution network and an evaluation network to form ADHDP speed controllers, wherein a control algorithm of the ADHDP speed controller consists of an evaluation network updating control strategy and an execution network adjusting speed error based on the idea of reinforcement learning, a thrust reference value fe* output by the ADHDP speed controller is differed from the calculated thrust fe to obtain a thrust difference delta fe, and meanwhile, a given flux linkage amplitude phis* is differed from the flux linkage phis calculated in the step 2 to obtain a flux linkage difference delta phis.
And 4, inputting a signal obtained by the thrust difference delta fe and the flux linkage difference delta phis in the step 3 through the thrust and flux linkage hysteresis regulator and a signal output by the flux linkage angle through the sector selection unit into the voltage vector switch selection unit together, and further selecting the states of all switches of the inverter, wherein the inverter generates three-phase alternating voltage to enable the motor to stably operate.
The specific construction process of constructing ADHDP the speed controller in the above step 3 is as follows:
The method comprises the steps of obtaining the rotating speed v of a motor by using a magnetic grating ruler, carrying out difference between the rotating speed v and the expected speed vref to obtain a speed error e (k), selecting values e (k-1) and e (k-2) of the two previous moments of the speed error, taking e (k), e (k-1) and e (k-2) as state variables of a ADHDP speed controller, and taking a thrust reference value fe* output by the ADHDP speed controller as a control quantity.
Wherein the execution network and the evaluation network in the ADHDP speed controller both contain two hidden layers. A specific description of the evaluation network and the execution network is as follows.
The structure of the evaluation network is 4-10-10-1, a speed error, variables of two moments before the speed error and a thrust reference value fe* output by a speed controller are selected as inputs of the evaluation network, and an estimated value of a performance index function of the system is usedFor output, the hidden layer of the evaluation network uses a bipolar sigmoidal function, and the output layer uses a linear function purelin.
The input vector defining the evaluation network is:
xc(k)=[e(k),e(k-1),e(k-2),fe*(k)]
The process of evaluating the forward calculation of the network is as follows:
Where i, j represent the number of rows and columns of each matrix, j' represents the number of columns of each neural network input vector, and ch1j(k),ch2j(k),ch3j(k),ch4j (k) is an element in ch1(k),ch2(k),ch3(k),ch4 (k), respectively. ch1j(k),ch2j(k),ch3j(k),ch4j (k) is the input/output of the j-th node of the two hidden layers respectively. Wc1ij(k),Wc2ij(k),Wc3i (k) is an element in Wc1(k),Wc2(k),Wc3 (k), respectively. Wc1ij(k),Wc2ij(k),Wc3i (k) is the weight from the input layer to the hidden layer, the weight between the two hidden layers, and the weight from the hidden layer to the output layer.
Defining utility functions of the system as:
U(k)=e(k)Ae(k)T+fe*(k)Bfe*(k)T
Wherein A and B are positive diagonal matrices.
The objective function Ec (k) defining the evaluation network is:
Where ec (k) is the error function of the evaluation network, where γ is the discount factor.
In the middle ofAnd (3) withAre respectively realized by two evaluation networks, the inputs of the two evaluation networks are respectively,
xc(t)=[e(k),e(k-1),e(k-2),fe*(k)],xc(t)=[e(k-1),e(k-2),e(k-3),fe*(k-1)], The two evaluation networks are identical in structure except for the input.
The weight updating process of the evaluation network is shown as follows
The weight change amount from the hidden layer to the output layer is defined as follows:
The updated weight matrix is:
Wc3(k+1)=Wc3(k)+ΔWc3(k)
defining the weight change from hidden layer to hidden layer as:
The updated weight matrix is:
Wc2(k+1)=Wc2(k)+ΔWc2(k)
The weight change amount from the input layer to the hidden layer is defined as follows:
The updated weight matrix is:
Wc1(k+1)=Wc1(k)+ΔWc1(k)
Where lc (k) is the learning rate of the evaluation network and Wc3(k+1),Wc2(k+1),Wc1 (k+1) is the updated weight matrix.
The structure of the execution network is 3-12-12-1, the speed error and the variables at the two moments before the speed error are selected as the input of the execution network, the thrust reference value fe* output by the speed controller is taken as the output, the hidden layer of the execution network adopts a bipolar sigmoidal function, and the output layer adopts a linear function purelin.
Defining the input vector of the execution network as:
xa(t)=[e(k),e(k-1),e(k-2)]
the following is a calculation procedure to perform the forward direction of the network:
where ah1j(k),ah2j(k),ah3j(k),ah4j (k) are the elements within ah1(k),ah2(k),ah3(k),ah4 (k), respectively. ah1j(k),ah2j(k),ah3j(k),ah4j (k) are the input and output of the j-th node of the two hidden layers, respectively. Wa1ij(k),Wa2ij(k),Wa3i (k) is an element in Wa1(k),Wa2(k),Wa3 (k), respectively. Wa1ij(k),Wa2ij(k),Wa3i (k) is the weight from the input layer to the hidden layer, the weight from the hidden layer to the hidden layer and the weight from the hidden layer to the output layer, and the weight is updated by gradient descent method and minimizedPerforming weight updating of the network for the target implementation, i.e. performing an objective function of the network
The weight update procedure of the network is performed as follows,
The weight change amount from the hidden layer to the output layer is defined as follows:
The updated weight matrix is:
Wa3(k+1)=Wa3(k)+ΔWa3(k)
Defining the weight change quantity between two hidden layers as follows:
The updated weight matrix is:
Wa2(k+1)=Wa2(k)+ΔWa2(k)
The weight change amount from the input layer to the hidden layer is defined as follows:
The updated weight matrix is:
Wa1(k+1)=Wa1(k)+ΔWa1(k)
Where la (k) is the learning rate of the evaluation network and Wa3(k+1),Wa2(k+1),Wa1 (k+1) is the updated weight matrix.
Wherein in the updating of the weightThe method comprises the following steps:
In both the evaluation network and the execution network, the learning rate la,c (k) is an adaptive learning rate, as shown in the following formula:
Where α, β is the learning rate gain, the initial value of la,c (k) is 0.1, and Ea,c (k) is the objective function of the executive network and the evaluation network.
As shown in fig. 6, the direct thrust control method of the permanent magnet linear synchronous motor according to the present invention is a data driving control method, and only includes input and output of a control system in the control process, when there is a parameter change due to operation in the system or when a load disturbance is suddenly added, the control method ADHDP of the present invention can be used to feed back an accurate speed value and output an accurate thrust value, and the present invention has the characteristics of good robustness and no overshoot, so that the permanent magnet linear synchronous motor can stably operate.