Permanent magnet synchronous motor rotor position calculation method based on neural network

Through a neural network-based method, the rotor position of the permanent magnet synchronous motor is calculated using the stator voltage and current, which solves the problem of poor results in the low speed and zero speed stages in the existing technology, and realizes accurate calculations and high-quality calculations within the full speed range Great.

CN119401868APending Publication Date: 2025-02-07JIANGSU YUNYI ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411539183.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing sensorless control technology is not effective in low speed and zero speed stages, and depends on motor parameters, which is easily affected after high temperature or long-term operation, reducing system stability.

Method used

Using a neural network-based method, by constructing a neural network model, the mapping relationship between the stator voltage, current and rotor position is self-learned and adaptively calculated, independent of the motor parameters.

Benefits of technology

It realizes accurate calculation of rotor position within the full speed range, reduces system volume and cost, is suitable for silent needs, has high robustness and fast response capabilities, and the estimated error is stable within the range of -0.05-0.05rad.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119401868A_ABST
    Figure CN119401868A_ABST
Patent Text Reader

Abstract

The invention discloses a permanent magnet synchronous motor rotor position calculation method based on a neural network, belongs to the technical field of motor control, is suitable for rotor position calculation under different rotating speeds and different load working conditions, is high in calculation accuracy, can quickly respond when the motor load or rotating speed changes suddenly, and is high in reliability. The rotor position estimation error is gradually reduced after the motor stably operates and is finally stabilized in a range of-0.05 to 0.05 rad, relatively high robustness is achieved, an algorithm adopted by neural network training has a faster convergence characteristic, network training can be completed only through 50 times of iteration, the development period can be effectively shortened, and meanwhile, the development efficiency is improved. The method is suitable for a full-speed range and does not depend on motor parameters, the mapping relation among the stator current, the stator voltage and the rotor position under the two-phase static coordinate system is found out according to algorithm self-training and self-learning, the system assembling space does not need to be additionally increased, and therefore the size and cost of the system are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor control, and in particular to a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network. Background Art

[0002] Permanent magnet synchronous motor (PMSM) is widely used in fuel vehicles and new energy vehicles due to its simple structure and high operating efficiency. The control of PMSM requires precise rotor position. The traditional method is to use mechanical sensors. However, the installation of sensors not only increases the mechanical space and system cost, but also causes damage to the sensors under some high temperature and humid working conditions, thus affecting the stability of the entire system. Based on this, sensorless control technology has been proposed and widely used by industry and academia.

[0003] Sensorless control technology is mainly divided into two categories. The first category is the signal injection method, which is suitable for low-speed and zero-speed stages, but its algorithm is relatively complex, and there will be physical noise in the startup stage. It is not applicable in some occasions that require silence. The second category is the observer method, such as the sliding film observer and the flux observer. The former estimates the rotor position of the motor by observing the back electromotive force of the motor, but because the back electromotive force is proportional to the motor speed, in the low-speed and zero-speed stages, the back electromotive force is small and difficult to observe. Therefore, this method is only applicable to medium and high-speed stages. The flux observer method estimates the motor rotor position by observing the stator flux. Although it can be applied in the full speed range, it depends on the motor parameters. When the motor runs for a long time or at high temperature, the resistance and inductance of the motor may change, thereby affecting the observed state and ultimately reducing the stability of the system. For this reason, a permanent magnet synchronous motor rotor position calculation method based on neural network is proposed. Summary of the invention

[0004] The purpose of the present invention is to provide a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network, comprising the following steps:

[0006] S1, determining the input and output of the neural network model, and determining the motor speed reference range and load torque variation range;

[0007] S2, collecting the data set required by the network according to the speed setting reference range and the load torque variation range;

[0008] S3, building a neural network model and normalizing the collected data set;

[0009] S4, after S3 is run, the normalized data set is input into the network model for training and learning;

[0010] S5. Embed the model trained by S4 into the motor operation control system to calculate the motor rotor position.

[0011] As a further preferred embodiment of the present technical solution: in S1, the input and output of the neural network model as well as the reference range of the motor speed and the range of load torque variation are determined by calculation, and the specific calculation formula is:

[0012] The voltage equation of the permanent magnet synchronous motor in the α-β stationary coordinate system is established:

[0013]

[0014] In formula (1), u α 、u β are the motor stator voltage, i α 、i β Both are motor stator currents, L d , L q are the stator inductance of the motor, ω e is the electrical angular velocity, θ e is the rotor position information, e ex The back EMF amplitude of the motor is expanded, and e ex It can be further expressed as:

[0015]

[0016] In formula (2), ψ f is the permanent magnet flux of the motor, so the rotor position angle is:

[0017]

[0018] In formula (3), θ e ′ is the motor compensation angle.

[0019] As a further preferred embodiment of the present technical solution: the input and output of the neural network model are the stator voltage u α 、u β , stator current i α 、i β and rotor position information θ e , that is, four input quantities and one output quantity. The reference range of motor speed is selected from zero speed to rated speed of the motor, and its load torque is under two working conditions: no load and full load.

[0020] As a further preferred embodiment of the present technical solution: in S2, by simulation, a fixed step length and a fixed period are adopted, and each interval is 100 r·min. -1 The data are collected from zero speed to the rated speed of the motor. The above operation ensures that the number of data collected in each group is the same, and each group is divided into two working conditions, with load and without load, for data set collection.

[0021] As a further preferred embodiment of the present technical solution: in S3, the topological structure of the neural network model is a three-layer feedforward neural network, and the number of neurons in the hidden layer is determined according to an empirical formula and test results, and the empirical formula is:

[0022]

[0023] In formula (4), m and n are the number of input layers and output layers respectively, and a is a constant between 0 and 10.

[0024] As a further preferred embodiment of the present technical solution: the activation function of the neurons in the hidden layer of the topological structure of the neural network model is a tansig function, and its expression is:

[0025]

[0026] The data set normalization process is performed through calculation, and the specific formula is:

[0027]

[0028] In formula (6), y max ,y min All of them are specified in the normalized range, x max 、x min are the maximum and minimum values ​​in the data stream, respectively.

[0029] As a further preferred embodiment of the present technical solution: in S4, the specific method of training the neural network model comprises the following steps:

[0030] A1. The normalized data set is divided into training set, test set and validation set in a ratio of 7:1.5:1.5;

[0031] A2. Determine the number of connection weight vectors and thresholds between neurons in each layer based on input and output;

[0032] A3. Calculate the output H of the hidden layer;

[0033] A4. The output of the hidden layer is the input of the output layer. The output of the output layer is calculated to be O.

[0034] A5. Calculate the network error based on the network output and target value, and use the mean square error function as the performance indicator function;

[0035] A6. According to the performance indicator function, iteratively update the weights and thresholds in each layer of neurons so that the difference between the output value and the target value is gradually reduced until convergence reaches equilibrium;

[0036] A7: Determine whether the value of the performance indicator function is within the set error value range, or whether the maximum number of iterations is reached. If any of the conditions is met, the network training is completed. If neither of the two conditions is met, the process returns to A3 for loop calculation.

[0037] As a further preferred embodiment of the present technical solution: in A3, the specific calculation formula is:

[0038]

[0039] In formula (7), f is the activation function of the neurons in the hidden layer;

[0040] In A4, the specific calculation formula is:

[0041]

[0042] In A5, the specific calculation formula is:

[0043]

[0044] In formula (9), n is the number of samples, y is k is the target value, Output value for the neural network.

[0045] As a further preferred embodiment of the present technical solution: in A6, the LM algorithm is used for iteration, and w is set k , b k Represents the vector composed of weight and threshold of the kth iteration, w k+1 , b k+1 Represent the vectors composed of weights and thresholds of the k+1th iteration, and w k , b k With w k+1 , b k+1 The expression relationship between them is:

[0046] w k+1 =w k +Δw

[0047] b k+1 =b k +Δb

[0048] Δw=-[JT (w)J(w)+μI] -1 J T (w)e(w)

[0049] Δb=-[J T (b)J(b)+μI] -1 J T (b)e(b)

[0050]

[0051]

[0052] In formula (10), Δw and Δb are weight and threshold increments, I is the unit matrix, μ is the learning rate, and J is the Jacobian matrix.

[0053] As a further preferred embodiment of the present technical solution: in S5, the trained neural network model replaces the mechanical sensor or other types of sensorless algorithms to calculate the motor rotor position information.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] 1. The present invention does not require additional system assembly space, thereby reducing the volume and cost of the system. The present invention is noiseless during the startup phase and is also applicable to some occasions that require silence, thereby effectively improving the overall applicability and practicality. At the same time, the present invention is applicable to the full speed range and does not depend on motor parameters. The mapping relationship between the stator current, voltage and rotor position in the two-phase stationary coordinate system is found out according to the algorithm self-training and self-learning;

[0056] 2. The present invention is suitable for calculating the rotor position under different speeds and different load conditions, and has high calculation accuracy. It can also respond quickly when the motor load or speed changes suddenly. After the motor runs stably, the rotor position estimation error gradually decreases and finally stabilizes in the range of -0.05-0.05rad. It has strong robustness. The algorithm used in the neural network training in the present invention has faster convergence characteristics. It only needs 50 iterations to complete the network training, which can effectively reduce the development cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 This is an operation flow chart of a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to the present invention;

[0058] Figure 2 A schematic diagram of the topological structure of a neural network model in a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to the present invention;

[0059] Figure 3 It is a schematic diagram of the number of iterations of neural network model training and the mean square error in a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network of the present invention;

[0060] Figure 4 The present invention is a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network. -1 Schematic diagram of the estimated and actual rotor position values;

[0061] Figure 5 The present invention is a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network. -1 Schematic diagram of the estimated and actual rotor position values;

[0062] Figure 6 The diagram is a schematic diagram of the error between a calculated value and an actual value of a rotor position in a permanent magnet synchronous motor rotor position calculation method based on a neural network according to the present invention. DETAILED DESCRIPTION

[0063] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0064] Example

[0065] See also Figure 1 and Figure 2 The present invention provides a technical solution: a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network, comprising the following steps:

[0066] S1, determining the input and output of the neural network model, and determining the motor speed reference range and load torque variation range;

[0067] S2, collecting the data set required by the network according to the speed setting reference range and the load torque variation range;

[0068] S3, building a neural network model and normalizing the collected data set;

[0069] S4, after S3 is run, the normalized data set is input into the network model for training and learning;

[0070] S5. Embed the model trained by S4 into the motor operation control system to calculate the motor rotor position.

[0071] In this embodiment, specifically: in S1, the input and output of the neural network model as well as the motor speed reference range and the load torque variation range are determined by calculation, and the specific calculation formula is:

[0072] The voltage equation of the permanent magnet synchronous motor in the α-β stationary coordinate system is established:

[0073]

[0074] In formula (1), u α 、u β are the motor stator voltage, i α 、i β Both are motor stator currents, L d , L q are the stator inductance of the motor, ω e is the electrical angular velocity, θ e is the rotor position information, e ex The back EMF amplitude of the motor is expanded, and e ex It can be further expressed as:

[0075]

[0076] In formula (2), ψ f is the permanent magnet flux of the motor, so the rotor position angle is:

[0077]

[0078] In formula (3), θ e ′ is the motor compensation angle.

[0079] In this embodiment, specifically: there is a mapping relationship between the motor rotor position and the stator voltage and current, and the rotor position angle calculation process requires accurate motor parameters, and the motor parameters will change under different working conditions and running time, thereby affecting the calculation of the motor rotor position. Therefore, through the self-learning characteristics of the neural network algorithm, the influence of motor parameter changes and nonlinear factors is effectively overcome, thereby achieving accurate estimation of the motor rotor position;

[0080] Among them, the input and output of the neural network model are the stator voltage u α 、u β , stator current i α 、i β and rotor position information θ e , that is, four input quantities and one output quantity. The reference range of motor speed is selected from zero speed to rated speed of the motor, and its load torque is under two working conditions: no load and full load.

[0081] In this embodiment, specifically: in S2, by simulation, a fixed step length and a fixed period are used, and each interval is 100 r·min -1The data are collected from zero speed to the rated speed of the motor. The above operation ensures that the number of data collected in each group is the same, and each group is divided into two working conditions, with load and without load, for data set collection.

[0082] In this embodiment, specifically: in S3, the topological structure of the neural network model is a three-layer feedforward neural network, and the number of neurons in the hidden layer is determined according to an empirical formula and test results, and the empirical formula is:

[0083]

[0084] In formula (4), m and n are the number of input layers and output layers respectively, and a is a constant between 0 and 10.

[0085] In this embodiment, specifically: Figure 2 As shown, the number of neurons in the input layer and the output layer is the input and output determined in S1.

[0086] In this embodiment, specifically: the activation function of the neurons in the hidden layer of the topological structure of the neural network model is the tansig function, and its expression is:

[0087]

[0088] The data set normalization process is performed through calculation, and the specific formula is:

[0089]

[0090] In formula (6), y max ,y min All of them are specified in the normalized range, x max 、x min are the maximum and minimum values ​​in the data stream, respectively.

[0091] In this embodiment, specifically: in S4, the specific method of training the neural network model includes the following steps:

[0092] A1. The normalized data set is divided into training set, test set and validation set in a ratio of 7:1.5:1.5;

[0093] A2. Determine the number of connection weight vectors and thresholds between neurons in each layer based on input and output;

[0094] A3. Calculate the output H of the hidden layer;

[0095] A4. The output of the hidden layer is the input of the output layer. The output of the output layer is calculated to be O.

[0096] A5. Calculate the network error based on the network output and target value, and use the mean square error function as the performance indicator function;

[0097] A6. According to the performance indicator function, iteratively update the weights and thresholds in each layer of neurons so that the difference between the output value and the target value is gradually reduced until convergence reaches equilibrium;

[0098] A7: Determine whether the value of the performance indicator function is within the set error value range, or whether the maximum number of iterations is reached. If any of the conditions is met, the network training is completed. If neither of the two conditions is met, the process returns to A3 for loop calculation.

[0099] In this embodiment, specifically: in A3, the specific calculation formula is:

[0100]

[0101] In formula (7), f is the activation function of the neurons in the hidden layer;

[0102] In A4, the specific calculation formula is:

[0103]

[0104] In A5, the specific calculation formula is:

[0105]

[0106] In formula (9), n is the number of samples, y is k is the target value, Output value for the neural network.

[0107] In this embodiment, specifically: in A6, the LM algorithm is used for iteration, assuming w k , b k Represents the vector composed of weight and threshold of the kth iteration, w k+1 , b k+1 Represent the vectors composed of weights and thresholds of the k+1th iteration, and w k , b k With w k+1 , b k+1 The expression relationship between them is:

[0108] w k+1 =w k +Δw

[0109] b k+1 =b k +Δb

[0110] Δw=-[J T(w)J(w)+μI] -1 J T (w)e(w)

[0111] Δb=-[J T (b)J(b)+μI] -1 J T (b)e(b)

[0112]

[0113]

[0114] In formula (10), Δw and Δb are weight and threshold increments, I is the unit matrix, μ is the learning rate, and J is the Jacobian matrix.

[0115] In this embodiment, specifically: in S5, the trained neural network model replaces the mechanical sensor or other types of sensorless algorithms to calculate the motor rotor position information.

[0116] Experimental example

[0117] See also Figure 3-Figure 6 According to a method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network in the embodiment, an experiment is conducted: a permanent magnet synchronous motor control system is built, the DC bus voltage is 311V, and the motor parameters are shown in Table 1:

[0118]

[0119] Table 1: Permanent magnet synchronous motor parameter table

[0120] The motor speed is set from 300r·min -1 Step to 2000r·min -1 , every 100r·min -1 The motor load in each speed interval is 0N·m or 10N·m. The above data is collected and trained independently according to the speed interval. After training, each speed interval is integrated with a small module. The speed is used as a switch to select the speed interval module. Each speed interval corresponds to two modes: load and no load.

[0121] The model structure of the neural network is 4-10-1. After training and calculation, the mean square error is 9.24×10 -5 The final estimated error is stable at -0.05-0.05rad, which meets the performance index requirements, indicating that the training has reached the convergence standard, and the algorithm used in neural network training converges quickly, and only 50 iterations are needed to gradually stabilize. Figure 3 As shown, the trained network can be packaged and run in the system instead of traditional mechanical sensors;

[0122] The results of running the neural network model in the motor control system are shown below:

[0123] like Figure 4-Figure 6 As shown in the figure, the estimated value of the rotor position coincides well with the actual value, and it shows good steady-state performance in the low speed, medium speed and high speed areas. When the speed changes in a step, due to the large transient change of the system, the difference between the data input to the network and the normal value is large, so the estimation error is large, but the duration is short. As the motor runs stably, the rotor position estimation error gradually decreases;

[0124] In summary, the permanent magnet synchronous motor rotor position calculation method based on neural network in the present invention can be effectively applied to rotor position estimation under different speeds and load conditions, and has high estimation accuracy and fast response.

[0125] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network, characterized in that: The following steps are involved: S1, determining the input and output of the neural network model, and determining the motor speed reference range and load torque variation range; S2, collecting the data set required by the network according to the speed setting reference range and the load torque variation range; S3, building a neural network model and normalizing the collected data set; S4, after S3 is run, the normalized data set is input into the network model for training and learning; S5. Embed the model trained by S4 into the motor operation control system to calculate the motor rotor position.

2. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 1, characterized in that: In S1, the input and output of the neural network model, the reference range of motor speed and the range of load torque variation are determined by calculation. The specific calculation formula is: The voltage equation of the permanent magnet synchronous motor in the α-β stationary coordinate system is established: In formula (1), u α 、u β are the motor stator voltage, i α 、i β Both are motor stator currents, L d , L q are the stator inductance of the motor, ω e is the electrical angular velocity, θ e is the rotor position information, e ex The back EMF amplitude of the motor is expanded, and e ex It can be further expressed as: In formula (2), ψ f is the permanent magnet flux of the motor, so the rotor position angle is: In formula (3), θ e ′ is the motor compensation angle.

3. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 1, characterized in that: In S2, through simulation, fixed step size and fixed period are adopted, and each interval is 100 r·min -1 As a group, collect data from zero speed to the rated speed of the motor.

4. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 1, characterized in that: In S3, the topological structure of the neural network model is a three-layer feedforward neural network. The number of neurons in the hidden layer is determined based on the empirical formula and test results. The empirical formula is: In formula (4), m and n are the number of input layers and output layers respectively, and a is a constant between 0 and 10.

5. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 4, characterized in that: The activation function of the neurons in the hidden layer of the topological structure of the neural network model is the tansig function, and its expression is: The data set normalization process is performed through calculation, and the specific formula is: In formula (6), y max ,y min All of them are specified in the normalized range, x max 、x min are the maximum and minimum values ​​in the data stream, respectively.

6. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 1, characterized in that: In S4, the specific method of training the neural network model includes the following steps: A1. The normalized data set is divided into training set, test set and validation set in a ratio of 7:1.5:1.5; A2. Determine the number of connection weight vectors and thresholds between neurons in each layer based on input and output; A3. Calculate the output H of the hidden layer; A4. The output of the hidden layer is the input of the output layer. The output of the output layer is calculated to be O. A5. Calculate the network error based on the network output and target value, and use the mean square error function as the performance indicator function; A6. According to the performance indicator function, iteratively update the weights and thresholds in each layer of neurons so that the difference between the output value and the target value is gradually reduced until convergence reaches equilibrium; A7: Determine whether the value of the performance indicator function is within the set error value range, or whether the maximum number of iterations is reached. If any of the conditions is met, the network training is completed. If neither of the two conditions is met, the process returns to A3 for loop calculation.

7. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 6, characterized in that: In A3, the specific calculation formula is: In formula (7), f is the activation function of the neurons in the hidden layer; In A4, the specific calculation formula is: In A5, the specific calculation formula is: In formula (9), n is the number of samples, y is k is the target value, Output value for the neural network.

8. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 6, characterized in that: In A6, the LM algorithm is used for iteration, and w is set k 、b k Represents the vector composed of weight and threshold of the kth iteration, w k+1 、b k+1 Represent the vectors composed of weights and thresholds of the k+1th iteration, and w k 、b k With w k+1 、b k+1 The expression relationship between them is: In k+1 =in k +Δw b k+1 =b k +Δb Δw=-[J T (w)J(w)+μI] -1 J T (w)e(w) Δb=-[J T (b)J(b)+μI] -1 J T (b)e(b) In formula (10), Δw and Δb are weight and threshold increments, I is the unit matrix, μ is the learning rate, and J is the Jacobian matrix.

9. The method for calculating the rotor position of a permanent magnet synchronous motor based on a neural network according to claim 1, characterized in that: In S5, the trained neural network model replaces mechanical sensors or other types of sensorless algorithms to calculate the motor rotor position information.