IPM control method based on neural network, storage medium and equipment
Through the IPM control method based on neural network, the stator current vector angle is updated in real time, which solves the problem of the lack of timely adjustment of the existing technology, resulting in reduced motor operation efficiency, and achieves efficient and accurate control and energy-saving effects of the motor.
Patent Information
- Application Number
- CN202510175528.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-23
AI Technical Summary
The existing IPM motor control method cannot be adjusted in time when faced with real-time changes in the stator current vector angle caused by factors such as motor product variability, aging, temperature changes and magnetic saturation, resulting in a decrease in motor operation efficiency.
Using the IPM control method based on neural network, a neural network including input layer, hidden layer and output layer is constructed, and the power function excitation function and linear identity activation function are used to update the stator current vector angle in real time to achieve efficient and accurate adjustment of motor operation.
This method can continuously iteratively update during the motor operation, approach the ideal control state, improve the accuracy and efficiency of motor control, reduce power waste, and achieve energy saving and the efficiency of AC-direct axis current utilization with low current and high torque.
Smart Images

Figure CN120034064A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to IPM control, in particular to an IPM control method, storage medium and device based on neural network. Background Art
[0002] Permanent magnet synchronous motor (PMSM) is a motor widely used in home appliances, industrial equipment, automobiles and other fields. It has the characteristics of permanent magnet structure and no magnetic resistance torque. The internal permanent magnet (IPM) synchronous motor is a type of PMSM, which is suitable for operation in a wide speed range. In the past, the control of IPM motors was mainly based on the control method of physical parameters. Especially for vehicle propulsion systems, IPM drives can meet the constant torque operation at basic speed.
[0003] In order to reduce power loss during constant torque operation, maximum torque-to-current ratio control (MTPA) is usually adopted. This method calculates the mapping of d-axis and q-axis currents and uses maximum torque / current control to compensate for the d-axis current. The d-axis and q-axis currents are decomposed by controlling the stator current and the stator current vector angle output by the motor's speed controller. However, due to the influence of factors such as the variability, aging, temperature change, and magnetic saturation of motor products, the stator current vector angle will change in real time, resulting in changes in the actual required d-axis and q-axis currents. However, the existing MTPA control method requires time to adapt to changes in control parameters during the control process, and cannot adjust the stator current vector angle in time to adjust the current and then adjust the operation of the motor. This will fail to effectively control the motor operation and reduce the motor efficiency. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a neural network-based IPM control method, storage medium and device that can efficiently and accurately adjust the stator current vector angle according to current parameters collected in real time.
[0005] Technical solution: The IPM control method based on a neural network described in the present invention comprises the following steps:
[0006] S1. Construct a neural network. The neural network includes an input layer, a hidden layer, and an output layer. The input layer includes multiple actual stator current i p (t) and the stator current vector angle θ i (t) matching neurons; the neuron activation function of the hidden layer corresponding to each input layer neuron adopts a set of power functions with increasing order; the output layer contains only one neuron; both the input layer and the output layer use linear identity activation function;
[0007] S2, the current time t 0 and the time i between the previously set time p (t) and the current time t 0to the previously set time θ i (t) Input the neural network to get the stator current vector angle θ at the current moment i (t 0 );
[0008] S3, control the stator current at the current moment according to the output of the motor speed controller and θ i (t 0 ) decomposes to obtain the control current of the motor d-axis and q-axis and Will and The input motor control system controls the IPM operation, and the speed controller outputs a new control stator current based on the feedback from the motor control system.
[0009] S4, t 0 The value of is increased by one, and then returns to step S2 until the IPM stops running.
[0010] Based on the above technical solution, by inputting the stator current at the current moment and before and the stator current vector angle before the current moment into the constructed neural network, the neural network outputs the stator current vector angle at the current moment, that is, the neural network continuously updates the stator current vector angle at the current moment according to the actual stator current collected in the past and the stator current vector angle output by the neural network. This update does not require the collection of parameter changes other than the stator current of the motor. The parameter change is equivalent to a state change of a black box for the neural network of the present invention. The neural network does not need to clearly identify these parameter changes, but the output result will take them into account; the existing MTPA will calculate and update the stator current vector angle based on the magnetic flux, inductance and stator current, but it is assumed that the magnetic flux and inductance are unchanged and only the stator current is changing. However, during the actual operation of the motor, the magnetic flux and inductance also change. Therefore, the stator current vector angle obtained by the MTPA deviates from the ideal stator current vector angle calculated by considering the actual various parameter changes, resulting in its control effect on the motor deviating from the ideal state, causing power loss, and the stator current vector angle output by the control method of the present application will continuously iterate during the operation of the motor to approach the ideal stator current vector angle.
[0011] The stator current vector angle at the current moment output by the neural network is used to perform vector decomposition on the control stator current output by the speed controller to obtain the adjusted d-axis and q-axis control currents to control the motor operation. The speed controller outputs a new control stator current at the next moment according to the feedback of the motor control system. Because the stator current vector angle output by the neural network of the present invention is closer to the ideal value, the control of the motor is more accurate. Similarly, the feedback of the motor control system to the speed controller is also more accurate, and a control stator current closer to the ideal stator current can be obtained. Moreover, the neural network and the speed controller are continuously iterated and updated during the operation of the motor, and will continuously approach the ideal control state. Therefore, the control method of the present invention does not need to collect and identify a large number of parameter changes, but can take these changes into account, and the control is closer to the ideal control state calculated according to the actual parameter changes, thereby improving the accuracy of the control. Through accurate control of the motor, when the motor starts and the speed changes, the control system can achieve a faster current response speed and reduce the current ripple, thereby reducing the integral of the current ripple over time, thereby achieving energy saving, and at the same time achieving the improvement of the utilization efficiency of the AC and DC axis currents with low current and high torque.
[0012] In addition, thanks to the neural network of the present invention, which includes one input layer, one hidden layer and one output layer, the neuron excitation function of the hidden layer corresponding to each input layer neuron adopts a set of power functions with increasing order; the output layer only contains one neuron; both the input layer and the output layer use linear identity activation functions; therefore, the neural network is not affected by the weights and initial values of the neural network, does not require offline training, and can be put into use directly. During the control process, online rapid learning can be achieved to achieve better prediction results, making it more convenient to use and more applicable.
[0013] Preferably, the calculation formula of the loss function J of the neural network in step S1 is:
[0014]
[0015] in, is the controlled stator current output by the motor speed controller at time t, i p (t) is the actual stator current actually collected at time t.
[0016] The square of the error between the controlled stator current and the actual stator current is used as the loss function, that is, the learning signal is the best learning signal after repeated verification, which can effectively predict the stator current vector angle.
[0017] The computer-readable storage medium storing one or more programs described in the present invention includes one or more programs including instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.
[0018] The device described in the present invention includes one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.
[0019] Beneficial effects: Compared with the prior art, the present invention has the following significant effects: by using the neural network as the forward control, the stator current vector angle at the current moment can be quickly updated in real time according to the previous actual stator current, so as to adjust the control of the motor, thereby keeping the motor running efficiently and ensuring the accuracy of the motor control. In addition, the neural network does not need to collect and identify a large number of parameter changes other than the motor stator current, which greatly improves the motor control efficiency. Through accurate and efficient control of the motor, the waste of electricity caused by ineffective control is avoided, which is more energy-saving. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a structural schematic block diagram of the control system of the present invention;
[0021] Figure 2 It is a structural usage diagram of the neural network of the present invention;
[0022] Figure 3 is the space vector decomposition diagram of the control stator current;
[0023] Figure 4 It is the time expansion diagram of the recursive network between the neural network and the motor system;
[0024] Figure 5 It is a flowchart of real-time learning of neural network;
[0025] Figure 6 The invention control (NN), maximum torque control (MTPA) and i d =0, the simulation curves of the speed, torque, current and power loss response of the motor during the startup phase;
[0026] Figure 7 The invention control (NN), maximum torque control (MTPA) and i d =0, the simulation response curves of speed, torque, current and power loss during the motor operation stage under the three control modes. DETAILED DESCRIPTION
[0027] As shown in the figure, the IPM control method based on neural network of the present invention comprises the following steps:
[0028] S1. Constructing a neural network:
[0029] According to the theorem, if the function f(x) has any derivative at x=0, then it can be expanded into a Maclaurin series in (-R, R) at x=0:
[0030]
[0031] The relationship between time t and the input u and output y of the motor control system is:
[0032]
[0033] For any time t in the interval, any point in the interval has:
[0034]
[0035] The above formula shows that within a certain range of accuracy, each point on the curve corresponding to the function composed of input and output quantities can be described by the Taylor series of the inverse functions of the input and output functions.
[0036] All points in the time interval need to satisfy formula (3), that is:
[0037]
[0038] Where N a is the number of terms in the Taylor expansion of the input function a(u); N b is the number of terms in the Taylor expansion of the output function b(y), N a and N b are all given constants; N m is the control interval set for the system, which is also a given constant; R is N m The sum of the Taylor series residual terms of the input and output functions on the interval.
[0039] In order to calculate the value of the input quantity u of the motor control system at time t, it is given by equation (4):
[0040]
[0041] The neural network of the present invention is constructed based on the relationship between time and the input and output of the motor control system in formula (5). Specifically, u(t) in formula (5) is the stator current vector angle θ i (t), y(t) is the actual stator current i p (t), assuming the current time is t 0 , then [t 0 -Nm+1,t 0 -1] all θ in the time period i (t) and [t 0 -Nm+1,t 0] All i in the time period p (t) is used as the input of the neural network. The activation function of the hidden layer converts the input parameters into their corresponding power functions, which corresponds to the power function in the Taylor expansion. The activation function of the output layer uses a linear function to weight all neurons in the hidden layer. The weight of each neuron in the hidden layer is equivalent to the coefficient before the power function in the Taylor expansion.
[0042] Let's take a specific example to better illustrate this. For example, the input parameter of the first neuron in the input layer is θ i (t 0 -1), then its hidden layer is set neurons (the neurons in the hidden layer mentioned in this paragraph refer only to these neurons, because the neurons in the hidden layer corresponding to different neurons in the input layer are independent and do not interfere with each other). It is N in formula (5) a , that is, the stator current vector angle θ i (t) The number of terms in the Taylor expansion, for the stator current vector angle θ at all times i (t) The number of terms in its Taylor expansion is fixed and is a constant set based on experience (if the actual stator current i is a parameter p (t) is the same, but it is related to θ i (t) does not have to have the same number of terms in the Taylor expansion); after the hidden layer activation function is transformed, the hidden layer corresponds to θ i (t 0 -1) is h[θ i (t 0 -1)]=[θ i (t 0 -1)] j , [θ i (t 0 -1)] j is the content of the jth neuron in the hidden layer, which Each neuron has an independent weight, which is equivalent to the coefficient before the power function in the Taylor expansion in equation (5), such as [θ i (t 0 -1)] 2 The weight is equivalent to the Taylor expansion That is, the neural network constructed by the present invention is used to solve u(t) in equation (5). The corresponding application scenario of the present invention is to use the constructed neural network to solve θ i (t 0 ), the entire solution only requires the input of the stator current ip(t) and the stator current vector θi(t), and there is no need to collect and identify a large number of other parameter changes during the operation of the motor for prediction.
[0043] Based on the above construction foundation, the neural network constructed in the present invention specifically includes an input layer, a hidden layer and an output layer. The input layer has 2Nm-1 neurons, of which N m -1 neuron and the stator current vector angle θ i (t) matches, there are N m neurons and the actual stator current i p (t) matches; the hidden layer sets multiple independent neurons for each neuron of the input layer, and the neuron excitation function of the hidden layer corresponding to each neuron of the input layer adopts a set of power functions with increasing order; the output layer contains only one neuron; both the input layer and the output layer use linear identity activation function.
[0044] The activation function of the neuron in the jth hidden layer corresponding to each neuron in the input layer of the neural network is h(x)=x j , j = 0, 1, 2...Nx, where x is the input parameter corresponding to the neuron in the input layer, and Nx is the set constant corresponding to the input parameter (that is, the number of terms in the Taylor expansion given by the corresponding parameter).
[0045] The calculation formula of the neural network loss function J is
[0046]
[0047] in, is the controlled stator current output by the motor speed controller at time t, i p (t) is the actual stator current collected at time t.
[0048] In order to minimize the loss function, we calculate the gradient backwards layer by layer starting from the output layer and update the weights layer by layer, that is, dynamically adjust through the gradient descent method. The weight theory update formula is as follows
[0049]
[0050] Where W(t) is the weight set of all neurons in the hidden layer at time t, and η is the learning rate;
[0051] Formula (7) can be further written as follows:
[0052]
[0053] This invention That is to ignore This change value only needs to modify the value of the learning rate to meet the control requirements, so the actual weight update formula of the neural network of the present invention is:
[0054]
[0055] In order to achieve one-step determination of weights, the thresholds of all neurons in the neural network constructed by the present invention are set to 0.
[0056] S2, the current time t 0 and the time set before, that is, [t 0 -Nm+1,t 0 ]The actual stator current i of the motor during the time period p (t), and the current time t 0 to the previously set time, that is, [t 0 -Nm+1,t 0 -1] stator current vector angle θ in the time period i (t) Input the neural network to get the stator current vector angle θ at the current moment i (t 0 );
[0057] S3, control the stator current at the current moment according to the output of the motor speed controller and θ i (t 0 ) decomposes to obtain the control current of the motor d-axis and q-axis and Will and The input motor control system controls the IPM operation, and the speed controller outputs the next moment's control stator current based on the feedback from the motor control system. The motor control system controls the other parts of the IPM operation based on MTPA, but MTPA calculates the stator current vector angle according to the following formula
[0058]
[0059] Among them, θ i * is the optimal vector angle of stator current calculated by MTPA, ψ f is the flux linkage of the permanent magnet, L d and L q are the stator inductance components of the d-axis and q-axis respectively, i p * To control the stator current, MTPA only uses the i output by the speed controller. p * And the known motor parameters are calculated to update θ i * , the default motor parameters ψ f , L d and L qHowever, during the actual operation of the motor, these parameters will change due to factors such as the motor's own heating. Therefore, the θ obtained by MTPA i * It is not possible to make adjustments based on this change. i * to i p * The d-axis and q-axis control currents obtained by vector decomposition are no longer the optimal d-axis and q-axis current combinations, resulting in increased power loss of the motor.
[0060] S4, t 0 The value of is increased by one, and then returns to step S2 until the IPM stops running.
[0061] The stator current vector angle θ output by the neural network is continuously updated through steps S2-S4. i (t) and the speed controller output control stator current Realize real-time adjustment and control of IPM.
[0062] like Figure 6 As shown, Figure 6 Figures (a), (b), (c) and (d) show the relationship between the motor speed, torque, current and power loss and time during the motor startup phase under the three control methods. The four figures simulate the target response phase between 0 and 0.5 seconds, which is the process from the start of the motor to the set speed. The disturbance adjustment phase is simulated between 0.5 and 1 second, which is the process from the motor speed changing after the load is connected to the load and then readjusting to the set speed. Figure 6 (a)~ Figure 6 (c) It can be seen that the control method proposed by the present invention has similar control results to the other two control methods, and both can ultimately achieve the control target of the motor speed. From Figure 6 (d), it can be seen that the control method of the present invention is superior to the traditional MTPA. d = 0 control method, the final power loss is smaller, so from Figure 6 It can be seen from the four figures that the control method of the present invention can effectively control the motor when the motor is connected to the load, and the control effect is close to that of MTPA and better than that of i d =0 control method.
[0063] like Figure 7 As shown, Figure 7 (a), 7(b), 7(c) and 7(d) respectively show the relationship between the motor speed, torque, current and power loss and time during the motor operation phase under the three control methods. Figure 6The disturbance adjustment stage, after 1s, is the stage of adjustment and change of various parameters caused by the change of motor parameters during operation after the motor is connected to the load and the speed is stable; Figure 7 (a) and 7 (b) show that the control method of the present invention is better than MTPA. d = 0 control method can adjust the motor speed and torque back to the target value more quickly when the motor parameters change, and the response speed is faster; Figure 7 (c) It can be seen that the control method of the present invention can adjust the current to a lower value than the other two control methods after the motor parameters change. Specifically, the optimal current value i of the disturbance torque when the parameters fluctuate during the simulation is calculated. p is 32.4A, then the i of MTPA control method is p is 102% of the standard, the control method of the present invention is i p 100% of the standard, traditional d = 0 control method i p The value is 132% of the standard; combined Figure 7 (d) It can be seen that the control method of the present invention controls the current to be lower when the parameters change, so the final power loss is also the lowest.
[0064] So combined Figure 6 and 7 It can be seen that during the startup and operation stages of the motor, the control method of the present invention can effectively control the motor to reach the set target operating state, and its power loss is also the lowest during the operation stage. The actual startup stage of the motor is extremely short, and it can be considered that the motor is always in the operation stage. Therefore, the control method of the present invention can achieve effective control and lower power loss compared to the existing control method.
[0065] The computer-readable storage medium storing one or more programs described in the present invention includes one or more programs including instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.
[0066] The device described in the present invention includes one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.
Claims
1. A neural network-based IPM control method, characterized in that: The following steps are involved: S1. Construct a neural network. The neural network includes an input layer, a hidden layer, and an output layer. The input layer includes multiple actual stator current i p (t) and the stator current vector angle θ i (t) matching neurons; the neuron activation function of the hidden layer corresponding to each input layer neuron adopts a set of power functions with increasing order; the output layer contains only one neuron; both the input layer and the output layer use linear identity activation function; S2, the i between the current time t0 and the previously set time p (t) and θ between the current time t0 and the previously set time i (t) Input the neural network to get the stator current vector angle θ at the current moment i (t0); S3, control the stator current at the current moment according to the output of the motor speed controller and θ i (t0) is decomposed to obtain the control current of the motor d-axis and q-axis and Will and The input motor control system controls the IPM operation, and the speed controller outputs a new control stator current based on the feedback from the motor control system. S4. Increase the value of t0 by one, and then return to step S2 until the IPM stops running.
2. The IPM control method based on neural network according to claim 1, characterized in that: The neuron activation function of the jth hidden layer corresponding to each neuron in the input layer of the neural network in step S1 is h(x)=x j ,j=0,1,2...N x , where x is the input parameter corresponding to the neuron in the input layer, N x Set the constant corresponding to this input parameter.
3. The IPM control method based on neural network according to claim 2, characterized in that: The N x The number of terms to be set in the Taylor expansion of the inverse function corresponding to the parameter x when it is expanded at zero into a Maclaurin series in (-R,R).
4. The IPM control method based on neural network according to claim 1, characterized in that: The calculation formula of the loss function J of the neural network in step S1 is: in, is the controlled stator current output by the motor speed controller at time t, i p (t) is the actual stator current collected at time t.
5. The IPM control method based on neural network according to claim 1, characterized in that: The weights of neurons in the hidden layer in step S1 are dynamically adjusted by the gradient descent method, and the weight update formula is: Among them, W(t) is the weight set of all neurons in the hidden layer at time t, and η is the learning rate.
6. The IPM control method based on neural network according to claim 1, characterized in that: In step S1, the thresholds of all neurons are all set to 0.
7. The IPM control method based on neural network according to claim 1, characterized in that: The actual stator current i input into the neural network in step S2 p (t) and the stator current vector angle θ i The starting time of (x) is t0-N m +1 moment, N m is a given constant.
8. The IPM control method based on neural network according to claim 6, characterized in that: In step S1, the neural network input layer has 2N m -1 neuron, of which there are N m -1 neuron and the stator current vector angle θ i (t) matches, there are N m neurons and the actual stator current i p (t) matches.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1 to 8.
10. A device, characterized in that: The invention comprises one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods according to claims 1 to 8.