Permanent magnet synchronous motor rotor zero position identification method and torque control method
By combining measurement, large model feature extraction and genetic algorithm optimization methods, the accurate identification and torque control of the rotor zero position of the permanent magnet synchronous motor is achieved, which solves the problems of low detection accuracy and difficulty in dealing with complex dynamic changes in the prior art, and improves the operating efficiency and stability of the motor.
Patent Information
- Application Number
- CN202510083913.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-27
AI Technical Summary
The existing rotor zero-position detection method of permanent magnet synchronous motor has problems such as limited scope of application and low detection accuracy, making it difficult to deal with the complex dynamic changes encountered by the motor in actual operation, making it difficult to accurately control the torque of the motor.
A method combining measurement, large-model feature extraction and genetic algorithm optimization is adopted to construct a rotor zero-position recognition data set, extract hierarchical features through large-model models, and optimize the rotor zero-position using genetic algorithms to achieve accurate identification and torque control of the motor rotor zero-position.
It improves the accuracy and reliability of the zero position identification of the motor rotor, can better handle complex dynamic changes, achieve accurate control of the motor torque, and improves the operating efficiency and stability of the motor.
Smart Images

Figure CN120049769A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control, and specifically provides a method for identifying the rotor zero position and a torque control method for a permanent magnet synchronous motor. Background Art
[0002] In a permanent magnet synchronous motor, accurately identifying the position of the rotor is crucial for achieving precise torque and speed control. This is because the performance of the motor depends on the precise control of the stator current (divided into d-axis current and q-axis current) to generate appropriate excitation magnetic fields and torque magnetic fields, which interact with the rotor magnetic field to determine the speed, torque, and efficiency of the motor. The rotor zero position refers to a fixed reference point of the rotor magnetic field orientation. If there is a large error in this reference point, it will directly affect the control effect and operating efficiency of the motor, and further lead to problems such as difficult starting, increased vibration, or reduced efficiency. Therefore, in order to ensure that the motor can operate efficiently according to the design requirements, it is necessary to detect the zero position deviation of the motor after assembly.
[0003] According to whether the rotor rotates during the detection process, the existing rotor zero position detection methods can be divided into two categories: one is the rotor stationary detection method, which does not require moving the rotor and is suitable for situations where the motor is already installed or space is limited. Common methods include the inductance parameter matrix method, the series of equal-amplitude reverse voltage pulse method, the six-group equal-width voltage pulse method, the rotating high-frequency signal injection method, the pulsating high-frequency signal injection method, etc.; the other is the rotor rotating detection method, which obtains more accurate position information by slightly rotating the rotor and is suitable for preliminary calibration in a laboratory environment. More typical methods include the rotor initial pre-positioning method and the low-frequency rotating voltage injection method, etc. For example, the method for detecting the rotor position of a permanent magnet motor by injecting a low-noise low-frequency pulsating signal proposed in the patent with the publication number CN113726246A. However, no matter which method is used, there are technical problems of limited application scope and low detection accuracy; especially during the actual operation of the motor, the rotor position is affected by various non-convex or discontinuous factors such as noise, and traditional rotor zero position detection methods are difficult to handle complex dynamic changes.
[0004] In summary, the present invention provides a method for identifying the rotor zero position of a permanent magnet synchronous motor, and further proposes a torque control method on this basis to achieve precise control of the motor. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for identifying the rotor zero position and a torque control method for a permanent magnet synchronous motor, so as to solve the challenges faced by the existing rotor zero position detection methods in the above-mentioned background art, namely, limited application scope, low detection accuracy, and difficulty in handling complex dynamic changes during the actual operation of the motor, which in turn leads to difficulty in precisely controlling the torque of the motor and thus having a negative impact on the motor operation.
[0006] The present invention is implemented by the following technical solutions:
[0007] A method for identifying the zero position of a permanent magnet synchronous motor rotor includes the following steps:
[0008] Step 1: Construct a rotor zero position recognition data set and obtain an initial rotor zero position recognition value based on this;
[0009] Step 2: According to the rotor zero position recognition data set, use a large model to extract hierarchical features to obtain a rotor zero position prediction value;
[0010] Step 3: Based on the initial rotor zero position recognition value and the rotor zero position prediction value, use a genetic algorithm to solve for the optimized rotor zero position.
[0011] Furthermore, in Step 1: Under no-load conditions, start the motor from multiple different initial angles. After starting, measure and record relevant parameters to construct a rotor zero position recognition data set; the relevant parameters include the stator phase angle, output torque value and its direction, motor voltage, motor current, motor speed, and ambient temperature parameters.
[0012] Furthermore, Step 1 includes the following sub-steps:
[0013] Step 1-1: Use an electric drive test bench to make the motor operate in a stalled state;
[0014] Step 1-2: Apply an excitation current id = 0 to the motor and set the torque current iq = iq_Ref, where iq_Ref is a preset torque current given value;
[0015] Step 1-3: Make a first assignment to the step size Step of the stator phase angle increase;
[0016] Step 1-4: Start the motor, control the stator phase angle to start from 0 degrees, and gradually increase to 180 degrees according to the set step size Step, and record the relevant parameters corresponding to each stator phase angle;
[0017] Step 1-5: Analyze and calibrate the initial rotor zero position recognition value according to the recorded relevant parameters, especially the output torque value and its direction corresponding to each stator phase angle.
[0018] Furthermore, Step 2 includes the following sub-steps:
[0019] Step 2-1: Decompose the multi-dimensional time series data into multiple column vectors X i , each column vector X i represents a set of time series data, and then each column vector X i is equally divided into M sub-sequences X ic ; among them, the multi-dimensional time series data includes motor current, motor voltage, motor speed, output torque value, and rotor zero position initial identification value;
[0020] Step 2-2: For each subsequence X i c Extract local data features and convert them into semantic prompt information Wi that can be understood by the large language model; among them, the local data features include data trends and mathematical descriptions;
[0021] Step 2-3: Add text instructions to the data trend and mathematical description respectively to integrate them into two semantic instructions, and then input the two semantic instructions into the large language model for pre-training;
[0022] Step 2-4: Extract the useful data part from the output of the large language model and delete the irrelevant text instructions; then reverse convert the useful data part back to the original data format and perform linearization processing, and finally output the rotor zero position prediction value.
[0023] Furthermore, the said step 3 includes the following sub-steps:
[0024] Step 3-1: Use the rotor zero position initial identification value as the candidate value for initializing the population of the genetic algorithm, and use the rotor zero position prediction value as an individual of the genetic algorithm and put it into the initialized population;
[0025] Step 3-2: Define the fluctuation between the output torque and the target torque as the objective function, and through the iterative search of the genetic algorithm, gradually optimize the identification result of the rotor zero position to solve the optimized rotor zero position.
[0026] Furthermore, in the said step 2-2: Use the attention mechanism in the Transformer model to capture the correlation between data, and the specific formula is as follows:
[0027]
[0028] In the formula, Q is the query vector, representing the vector to find the correlation; K is the keyword vector; V is the value vector, representing the vector containing data information, which is the information content concerned by the matching result of Q and K; d k represents the vector dimension of Q and K.
[0029] A permanent magnet synchronous motor torque control method, applying the permanent magnet synchronous motor rotor zero position identification method described above, includes the following steps:
[0030] Step 4: Under the condition of the preset calibration temperature T0, calibrate the relationship between the q-axis current and the output torque when the motor is in different d-axis currents in the running state, and then use the linear interpolation method to obtain the current MAP table;
[0031] Step 5: Initialize the position loop controller based on the optimized rotor zero position obtained in Step 3, and perform corresponding control on the motor through the speed loop controller and the current loop controller.
[0032] Further, in the above Step 5: The position loop controller receives an externally set position command to adjust the position of the motor, and converts it into a speed command to be transmitted to the speed loop controller, which adjusts the speed of the motor; according to the required torque and the current speed of the motor, query the current MAP table to determine the appropriate current command, and the current loop controller adjusts the current in the motor winding according to the current command.
[0033] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0034] A rotor zero position identification method for a permanent magnet synchronous motor is provided, which combines measurement, large model feature extraction, and genetic algorithm optimization; through measurement, rich motor operation parameters can be obtained as a basis, providing strong data support for identification; using a large model can extract deep features from complex data sets, which helps to more accurately identify the rotor zero position; the genetic algorithm, as a global search method, shows stronger resistance to noise and other interference factors, ensuring the reliability of the identification result. On this basis, torque control is performed according to the obtained optimized rotor zero position, which can achieve precise control of the motor, and thus improve the operation efficiency and stability of the motor. Description of the Drawings
[0035] Figure 1 It is a schematic flowchart of the rotor zero position identification method and torque control method for the permanent magnet synchronous motor according to the embodiment of the present invention. Detailed Embodiments
[0036] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings.
[0037] Embodiment 1
[0038] This embodiment provides a rotor zero position identification method and a torque control method for a permanent magnet synchronous motor. Please refer to Figure 1 , which includes the following steps:
[0039] Step 1: Construct a rotor zero position identification data set, and obtain an initial rotor zero position identification value based on this.
[0040] Step 2: According to the rotor zero position identification data set, use a large model to extract hierarchical features to obtain a rotor zero position prediction value.
[0041] Step 3: Based on the initial rotor zero position identification value and the rotor zero position prediction value, use the genetic algorithm to solve and obtain an optimized rotor zero position.
[0042] Step 4: Under the condition of the preset calibration temperature T0, calibrate the relationship between the q-axis current and the output torque when the motor is in different d-axis currents in the running state, and then use the linear interpolation method to obtain the current MAP table.
[0043] Step 5: Based on the optimized rotor zero position obtained in Step 3, initialize the position loop controller, and perform corresponding control on the motor through the speed loop controller and the current loop controller.
[0044] Where:
[0045] In Step 1, under the no-load state, the motor is started from multiple different initial angles, and after starting, relevant parameters are measured and recorded to construct a rotor zero position identification data set; the relevant parameters include the stator phase angle, the output torque value and its direction, the motor voltage, the motor current, the motor speed, and the ambient temperature parameter. Specifically, it includes the following sub-steps:
[0046] Step 1-1: Use the electric drive test bench to make the motor work in the blocked-rotor state.
[0047] Step 1-2: Apply an excitation current id = 0 to the motor, and set the torque current iq = iq_Ref, where iq_Ref is a preset torque current given value.
[0048] Step 1-3: Make the first assignment to the step size Step of the increased stator phase angle.
[0049] Step 1-4: Start the motor, control the stator phase angle to gradually increase from 0 degrees to 180 degrees according to the set step size Step, and record the relevant parameters corresponding to each stator phase angle.
[0050] Step 1-5: Analyze and calibrate the initial identification value of the rotor zero position according to the recorded relevant parameters, especially the output torque value and its direction corresponding to each stator phase angle.
[0051] Step 2 specifically includes the following sub-steps:
[0052] Step 2-1: Decompose the multi-dimensional time series data into multiple column vectors X i , each column vector X i represents a set of time series data, and then each column vector X i is equally divided into M sub-sequences Among them, the multi-dimensional time series data includes the motor current, the motor voltage, the motor speed, the output torque value, and the initial identification value of the rotor zero position.
[0053] Step 2-2: For each sub-sequence Extract local data features and convert them into semantic prompt information Wi that can be understood by a large language model (LLM); among them, the local data features include data trends and mathematical descriptions. The data trend is used to reflect the overall pattern of data changes over time, and the mathematical description includes statistical features such as maximum value, minimum value, and average value.
[0054] In this step, the attention mechanism in the Transformer model is used to capture the correlation between data, and the specific formula is as follows:
[0055]
[0056] In the formula, Q is the query vector, representing the vector for which the correlation is to be found; K is the keyword vector; V is the value vector, representing the vector containing data information, which is the information content concerned by the matching result of Q and K; d k represents the vector dimension of Q and K.
[0057] Step 2-3: Add text instructions to the data trend and mathematical description respectively to integrate them into two semantic instructions, and then input the two semantic instructions into a large language model (such as the frozen LLAMA-7B) for pre-training;
[0058] Step 2-4: Extract the useful data part from the output of the large language model and delete the irrelevant text instructions; then, since the data is encoded and distributed non-linearly, the useful data part needs to be reversely converted back to the original data format and linearized to restore its original features; finally, the rotor zero position prediction value is output.
[0059] Step 3 specifically includes the following sub-steps:
[0060] Step 3-1: Use the initial rotor zero position recognition value as the candidate value for initializing the population of the genetic algorithm, and use the rotor zero position prediction value as an individual of the genetic algorithm and put it into the initial population;
[0061] Step 3-2: Define the fluctuation between the output torque and the target torque as the objective function, and through the iterative search of the genetic algorithm, gradually optimize the identification result of the rotor zero position to solve the optimized rotor zero position.
[0062] Among them, assuming that the set of initial rotor zero position recognition values obtained in Step 1 is {Z 1 , Z 2 ,......Z n}, and the rotor zero position prediction value obtained in Step 2 is Z m , then the initial population P = {Z 1 , Z 2 ,......Z n , Z m}, with the output torque τ out and the target torque τ tar The fluctuation between them is used as the objective function, which can be expressed as, where Z represents a candidate value corresponding to the initial rotor zero position identification value, and represents the output torque at this initial rotor zero position identification value.
[0063] The evolution of individuals is completed under the action of genetic operators. The main genetic operators are selection, crossover, and mutation; roulette wheel selection strategy is adopted for selection. Each time, a certain number of individuals are randomly selected, and the one with the highest fitness is selected as the parent; uniform crossover strategy is adopted for crossover, and two parental chromosomes are crossed with a certain probability to form a new generation of offspring chromosomes; bit flip strategy is adopted for mutation, and a certain gene of the chromosome is randomly bit-flipped (i.e., 1 becomes 0 and 0 becomes 1) according to the mutation probability. When performing iterative search, the combination of the smallest data difference between the output torque τ out and the target torque τ tar is used as the iteration termination condition.
[0064] The output torque τ out is obtained according to the measurement; the target torque τ tar is a theoretically calculated value, which is calculated according to the rotor zero position angle value and the torque formula. Specifically:
[0065] First, according to the rotor zero position angle θ, the three-phase current can be converted into the direct-axis current I d and the quadrature-axis current I q , that is, I d =I a cos(θ)+I b cos(θ - 120)+I c cos(θ + 120), I q =-I a cos(θ)-I b cos(θ - 120)-I c cos(θ + 120), where I a , I b , I c are the three-phase currents;
[0066] Subsequently, substitute the direct-axis current I d and the quadrature-axis current I q into the magnetic flux formula Φ = Φ f +L d I d +L q I q to calculate the magnetic flux Φ, where Φ f is the magnetic flux generated by the permanent magnet, L d and L qThey are the direct-axis inductance and the quadrature-axis inductance respectively;
[0067] Finally, substitute the magnetic flux Φ, the motor current and the torque constant K t , into the torque formula T = K t ·I·Φ, then the target torque τ at a specific rotor zero position angle can be calculated. tar .
[0068] In step 5, initialize the position loop controller based on the optimized rotor zero position to ensure that its parameter settings accurately reflect the latest identification results; the position loop controller receives the externally set position command to adjust the position of the motor, calculates the current position error, and then converts the position error into a speed command and transmits it to the speed loop controller. The speed loop controller adjusts the speed of the motor; according to the required torque and the current speed of the motor, query the current MAP table to determine the appropriate current command, and the current loop controller adjusts the current in the motor winding according to the current command, thereby controlling the torque generated by the motor.
[0069] Through the above steps, the accurate identification of the rotor zero position of the motor can be completed, and the torque of the motor can be controlled based on this rotor zero position. This rotor zero position identification method combines measurement, large model feature extraction, and genetic algorithm optimization; rich motor operation parameters can be obtained through measurement as the basis, providing solid data support for identification; using a large model can extract deep features from complex data sets, which helps to more accurately identify the rotor zero position; the genetic algorithm, as a global search method, shows stronger resistance to noise and other interference factors, ensuring the reliability of the identification results. On this basis, torque control based on the obtained optimized rotor zero position can achieve precise control of the motor, and thus improve the operation efficiency and stability of the motor.
[0070] It should be specifically noted that the parts not described in detail or expanded in the above solution are all prior arts, not the improvements made by the present invention to the prior art, nor within the protection scope of the technical solution of the present invention. Therefore, they will not be elaborated herein.
[0071] Of course, the above content is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of the embodiments of the present invention. The present invention is not limited to the above examples either. Equivalent changes and improvements made by those of ordinary skill in the art within the essence of the present invention should all fall within the scope covered by the patent of the present invention.
Claims
1. A method for identifying the zero position of a permanent magnet synchronous motor rotor, characterized in that: The steps include: Step 1: Construct a rotor zero position identification data set, and based on it, obtain the rotor zero position initial identification value; Step 2: Based on the rotor zero position recognition data set, the large model is used to extract hierarchical features to obtain the rotor zero position prediction value; Step 3: Based on the initial identification value of the rotor zero position and the predicted value of the rotor zero position, the optimized rotor zero position is obtained by using a genetic algorithm.
2. The method for identifying zero position of a permanent magnet synchronous motor rotor according to claim 1, characterized in that: In step 1: in a no-load state, the motor is started from multiple different initial angles, and relevant parameters are measured and recorded after starting to construct a rotor zero position identification data set; the relevant parameters include stator phase angle, output torque value and its direction, motor voltage, motor current, motor speed and ambient temperature parameters.
3. The method for identifying zero position of a permanent magnet synchronous motor rotor according to claim 2, characterized in that: The step 1 includes the following sub-steps: Step 1-1: Use the electric drive test bench to make the motor work in a stalled state; Step 1-2: Set the excitation current id=0 to the motor, and set the torque current iq=iq_Ref, where iq_Ref is a preset torque current given value; Step 1-3: Assign the first value to the step length Step of the stator phase angle increase; Step 1-4: Start the motor, control the stator phase angle from 0 degrees, and gradually increase it to 180 degrees according to the set step length Step, and record the relevant parameters corresponding to each stator phase angle; Step 1-5: Analyze and calibrate the rotor zero position initial identification value based on the recorded relevant parameters, especially the output torque value and its direction corresponding to each stator phase angle.
4. The method for identifying zero position of a permanent magnet synchronous motor rotor according to claim 2, characterized in that: The step 2 includes the following sub-steps: Step 2-1: Decompose the multi-dimensional time series data into multiple column vectors X i , each column vector X i Represents a set of time series data, and then each column vector X i Divide into M subsequences of equal length Among them, the multi-dimensional time series data includes motor current, motor voltage, motor speed, output torque value and rotor zero position initial identification value; Step 2-2: For each subsequence Extract local data features and convert them into semantic cue word information Wi that can be understood by the large language model; the local data features include data trends and mathematical descriptions; Step 2-3: Add text instructions to the data trend and mathematical description respectively to integrate them into two semantic instructions, and then input the two semantic instructions into the large language model for pre-training; Step 2-4: Extract the useful data part from the output of the large language model and delete irrelevant text instructions; then reverse convert the useful data part back to the original data format and perform linearization processing, and finally output the rotor zero position prediction value.
5. The method for identifying zero position of a permanent magnet synchronous motor rotor according to claim 2, characterized in that: The step 3 includes the following sub-steps: Step 3-1: The rotor zero position initial recognition value is used as a candidate value for the genetic algorithm initialization population, and the rotor zero position prediction value is used as an individual of the genetic algorithm and is placed in the initialization population; Step 3-2: Define the fluctuation between the output torque and the target torque as the objective function, and gradually optimize the identification results of the rotor zero position through iterative search of the genetic algorithm to obtain the optimized rotor zero position.
6. The method for identifying zero position of a permanent magnet synchronous motor rotor according to claim 4, characterized in that: In step 2-2, the attention mechanism in the Transformer model is used to capture the correlation between data. The specific formula is as follows: In the formula, Q is the query vector, which represents the vector to be searched for relevance; K is the keyword vector; V is the value vector, which represents the vector containing data information, which is the information content of the matching results of Q and K; d k Represents the vector dimensions of Q and K.
7. A permanent magnet synchronous motor torque control method, using the permanent magnet synchronous motor rotor zero position identification method according to any one of claims 1 to 6, characterized in that: The steps include: Step 4: Under the preset calibration temperature T0, calibrate the relationship between the q-axis current and the output torque when the motor is in different d-axis currents in the running state, and then use the linear interpolation method to obtain the current MAP table; Step 5: Based on the optimized rotor zero position obtained in step 3, the position loop controller is initialized, and the motor is controlled accordingly through the speed loop controller and the current loop controller.
8. The permanent magnet synchronous motor torque control method according to claim 7, characterized in that: In step 5: the position loop controller receives an externally set position command to adjust the position of the motor, and converts it into a speed command to pass it to the speed loop controller, and the speed loop controller adjusts the speed of the motor; according to the required torque and the current speed of the motor, the current MAP table is queried to determine the appropriate current command, and the current loop controller adjusts the current in the motor winding according to the current command.
Citation Information
Patent Citations
Method for detecting position of low-noise low-frequency pulsating signal injected into rotor of permanent magnet motor
CN113726246A