Direct torque control method of permanent magnet synchronous motor based on gradient optimization algorithm
Patent Information
- Application Number
- CN202310588541.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-05-24
AI Technical Summary
[0007]本发明的目的在于提供基于梯度优化算法的PID永磁同步电机直接转矩控制方法,以解决上述背景技术中提出的现有技术中系统存在抗干扰性差或只能依靠工程经验获得,控制精度降低,缺乏系统性,控制效果不理想等问题
[0071] 1. This invention takes a permanent magnet synchronous motor as the research object. It obtains speed information through a speed sensor (Hall effect) and optimizes the PID parameters by combining a gradient optimization algorithm. This avoids the shortcomings of PID parameter selection without a basis and improves control performance. Specifically, the controller can reach steady-state speed faster and has a smaller overshoot. At the same time, it can effectively realize speed control of the permanent magnet synchronous motor.
Smart Images

Figure CN116743024B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of motor control technology, specifically relating to a PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithms. Background Technology
[0002] Permanent magnet synchronous motors are widely used in the field of motor drives due to their advantages such as simple structure, high torque-to-current ratio, and high power density.
[0003] Traditional dual-loop vector control has advantages such as wide speed range, fast response, and good acceleration performance. However, it has disadvantages such as high dependence on motor parameters, requiring relatively complex coordinate transformations, and strong internal parameter coupling. In contrast, direct torque control eliminates the complex coordinate transformations, resulting in a simpler overall control structure, lower dependence on motor parameters, and the elimination of the PWM control stage.
[0004] The most widely used existing control method is traditional PID control, which is abbreviated as PID control. Proportional, derivative and integral control enables the system to reach the target quickly, but it will cause the system to oscillate. Derivative is used to suppress the speed at which the error decreases, and integral is used to eliminate steady-state error.
[0005] Direct torque control (DTC) of a permanent magnet synchronous motor using PID control offers highly precise control, a simple structure, and good stability. It also eliminates the need for an accurate mathematical model of the permanent magnet synchronous motor, reducing system errors and achieving stability through high-speed and efficient operation. However, PID parameters are primarily obtained through engineering experience, resulting in lower control accuracy, a lack of systematic approach, and less than ideal control performance.
[0006] This invention provides a method for optimizing the direct torque control of a PID permanent magnet synchronous motor based on an improved gradient optimization algorithm, thereby obtaining reliable PID parameters and overcoming the shortcomings of existing technologies. Summary of the Invention
[0007] The purpose of this invention is to provide a PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithms, in order to solve the problems in the prior art mentioned above, such as poor anti-interference ability or reliance on engineering experience, reduced control accuracy, lack of systematicity, and unsatisfactory control effect.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] The PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm includes the following steps:
[0010] S1. Construct a PID control model for the speed of a permanent magnet synchronous motor in Simulink;
[0011] S2. Optimize and tune the parameters of the PID control model using an improved gradient optimization algorithm;
[0012] S3. Input the optimized PID parameters into the PID control model to test the permanent magnet synchronous motor.
[0013] Preferably, in step S2, an improved gradient optimization algorithm (GBO) is used to optimize the speed loop PID parameters. Optimization is performed, and the optimization includes the following steps:
[0014] S201, Initialization process; in gradient optimization algorithms, control parameters are used. The balance between exploration and exploitation is achieved through probability; the population size and number of iterations are related to the problem complexity. In GBO, a vector can be described as a set of N vectors in a d-dimensional space. The initial vector for the gradient optimization algorithm... It is randomly generated in a d-dimensional search space;
[0015]
[0016] in, and Decision variables The boundary, yes Random numbers in the data;
[0017] S202, Gradient Optimization Rule (GSR); The gradient optimization rule is used to explore and avoid local optima. To adapt to the trend of local search direction movement, it increases the local search direction movement and improves the convergence accuracy of the algorithm.
[0018] The gradient search rule GSR and the motion direction DM are mathematically described as follows:
[0019]
[0020]
[0021] in: ;
[0022] ;
[0023] ;
[0024] It is an n-dimensional vector between [0,1]. These are distinct integers randomly selected from [1, N]. It is by and The step size is determined jointly;
[0025] In the formula: It is a normally distributed random number; It is a decimal number in the range [0, 0.1]. These are the worst and best solutions obtained during the optimization process; It is the position of the current iteration vector; It is a random parameter that balances the overall exploration and the local mining; These are random parameters that cause vectors to have different step sizes;
[0026]
[0027]
[0028]
[0029] ;
[0030] in It is a sine function. It is a quantity that changes with the number of iterations. and These are equal to 0.2 and 1.2 respectively, and rand is a normally distributed random number between [0,1]. These are the current iteration count and the maximum iteration count;
[0031] It is the position of the current iteration vector;
[0032]
[0033]
[0034]
[0035] The iteration order is as follows:
[0036] Will and current location Substitute Solve for GSR;
[0037] Substitute the solved GSR into Solution ;
[0038] Then Attached , Solve ;
[0039] Then Substitute Revised ;
[0040] Finally Substitute return get ;
[0041] Similarly,
[0042] Will and current location Substitute Solve for GSR;
[0043] Substitute the solved GSR into Solution ;
[0044] Similarly, the revised version was obtained. ,in ,Will and Substitution get ;
[0045] Finally by , Calculate .
[0046] The position of the (m+1)th iteration of the gradient optimization algorithm is:
[0047]
[0048] in , It consists of two random numbers in the range [0,1].
[0049] Preferably, the optimization further includes the following steps:
[0050] S203, Local Escape Operator: The local escape operator is introduced to improve the efficiency of gradient optimization algorithms in solving complex problems. This operator can significantly change the solution. Location; the local escape operator uses multiple solutions to generate a new solution with superior performance. .
[0051] Preferably, the local escape operator in S203 is as follows:
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059] in, A random number in the range [-1, 1] Random numbers that are distributed according to a standard normal distribution. It is a probability value. , , Given three random integers;
[0060] , It is a random number between [0,1]. It is a random number between [0,1].
[0061] Preferably, the random parameters for balancing global exploration and local mining in S2 are improved by introducing weighting factors and disordered graphs to enhance the population's exploration capabilities in the early stages and its development capabilities in the later stages.
[0062] right The improvements are as follows:
[0063]
[0064] in It is a sine function, and w is an introduced weighting factor;
[0065] ,
[0066] in These are the optimal and worst objective function values, respectively. It represents the number of chaos generated by the chaotic mapping.
[0067] Preferably, the permanent magnet synchronous motor speed PID control model is constructed in S1, as follows:
[0068] The Simulink model of the direct torque mode of the permanent magnet synchronous motor is adopted as the PID control model for the speed of the permanent magnet synchronous motor.
[0069] The actual motor speed is detected by a sensor, and the error between the actual speed and the target speed is input into the speed loop PID to obtain the theoretically required torque value. The torque error and flux linkage error are used as inputs to SMC-DTC(d) and SMC-DTC(q) to obtain the required Ud and Uq. The obtained Ud, Uq and angle information are then processed by inverse Park transform and SVPWM to obtain the switching time on the motor drive bridge. The turn-on and turn-off time signals of the MOSFETs on the motor drive bridge are input to the drive bridge to achieve control.
[0070] Compared with the prior art, the beneficial effects of the present invention are:
[0071] 1. This invention takes a permanent magnet synchronous motor as the research object. It obtains speed information through a speed sensor (Hall effect) and optimizes the PID parameters by combining a gradient optimization algorithm. This avoids the shortcomings of PID parameter selection without a basis and improves control performance. Specifically, the controller can reach steady-state speed faster and has a smaller overshoot. At the same time, it can effectively realize speed control of the permanent magnet synchronous motor.
[0072] 2. This invention optimizes the gradient optimization algorithm by introducing weighting factors and a chaotic graph. The adaptive weights aim to effectively approximate the optimal solution and avoid getting trapped in local optima at different search stages. The chaotic behavior aims to replace the randomness of metaheuristic algorithms, improving the convergence speed and accuracy. It enhances the population's exploration ability in the early stages and its development ability in the later stages. Attached Figure Description
[0073] Figure 1 This is a schematic diagram of the Simulink model for direct torque control of the permanent magnet synchronous motor in this invention;
[0074] Figure 2 This is a flowchart of the gradient optimization algorithm in this invention;
[0075] Figure 3 This is a torque comparison chart between the improved gradient optimization algorithm and the unimproved gradient optimization algorithm in this invention;
[0076] Figure 4 This is a comparison chart of the speed dynamic response of the improved gradient optimization algorithm and the unimproved gradient optimization algorithm in this invention. Detailed Implementation
[0077] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0078] Example 1:
[0079] The PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm includes the following steps:
[0080] S1. Construct a PID control model for the speed of a permanent magnet synchronous motor;
[0081] Figure 1 This is a schematic diagram of a Simulink model of a permanent magnet synchronous motor in direct torque mode, including components such as an inverter, SVPWM, flux linkage estimation, torque estimation, rotor position estimation, switching meters, and regulators. It is used to process errors in the speed signal of the permanent magnet synchronous motor.
[0082] See Figure 1 The actual motor speed is detected by a sensor, and the error between the actual speed and the target speed is input into the speed loop PID to obtain the theoretically required torque value. The torque error and flux linkage error are used as inputs to SMC-DTC(d) and SMC-DTC(q) to obtain the required Ud and Uq. The obtained Ud, Uq and angle information are processed by inverse Park transform and SVPWM to obtain the switching time on the motor drive bridge. The turn-on and turn-off time signals of the MOSFETs on the motor drive bridge are input to the drive bridge to achieve control.
[0083] S2. Optimize the PID parameters in the Simulink model based on the improved Gradient Optimization (GBO) algorithm; the PID parameters are the velocity loop PID parameters. The three parameters are vector positions in the algorithm, and optimization is performed by iterating through them together to return the three parameters.
[0084] See Figure 2 Specific optimizations include: initialization, searching based on gradient search rules (GSR), and development and searching based on improved LEO.
[0085] In this embodiment, the initialization process is as follows:
[0086] Initialization process. In the GBO algorithm, control parameters are used. The balance between exploration and exploitation is achieved through probability; the population size and number of iterations are related to the problem complexity. In GBO, a vector can be used to describe N vectors in d-dimensional space. The initial vector of GBO... They are usually randomly generated in a d-dimensional search space.
[0087]
[0088] in, and Decision variables The boundary, yes Random numbers in the array.
[0089] In this embodiment, the specific process of searching based on the gradient search rule (GSR) is as follows:
[0090] Gradient Optimization Rule (GSR). The main function of GSR is to explore and avoid local optima, and to adapt to the trend of local search direction movement, it adds Local Search Direction Movement (DM), thereby improving the convergence accuracy of the algorithm.
[0091] The gradient search rule (GSR) and direction of motion (DM) are mathematically described as follows:
[0092]
[0093]
[0094] in ;
[0095] ;
[0096] ;
[0097] It is an n-dimensional vector between [0,1]. These are distinct integers randomly selected from [1, N]. It is by and The step size is determined jointly.
[0098] In the formula:
[0099] —Random numbers from a normal distribution;
[0100] —A decimal number within the range [0, 0.1];
[0101] —The worst and best solutions obtained during the optimization process;
[0102] —The position of the current iteration vector;
[0103] —Random parameters that balance exploration (global) and mining (local);
[0104] — Random parameters that cause vectors to have different step sizes;
[0105] ,
[0106] in It is a sine function, and w is an introduced weighting factor;
[0107] ,
[0108] in These are the optimal and worst objective function values, respectively. It is the number of chaos generated by the chaotic mapping;
[0109]
[0110]
[0111] in It is a sine function. It is a quantity that changes with the number of iterations. and These are equal to 0.2 and 1.2 respectively, and rand is a normally distributed random number between [0,1]. These are the current iteration count and the maximum iteration count;
[0112] It is the position of the current iteration vector;
[0113]
[0114]
[0115]
[0116] The iteration order is as follows:
[0117] Will and current location Substitute Solve for GSR;
[0118] Substitute the solved GSR into Solution ;
[0119] Then Attached , Solve ;
[0120] Then Substitute Revised ;
[0121] Finally Substitute return get ;
[0122] Similarly,
[0123] Will and current location Substitute Solve for GSR;
[0124] Substitute the solved GSR into Solution ;
[0125] Similarly, the revised version was obtained. ,in ,Will and Substitution get ;
[0126] Finally by , Calculate .
[0127] The position of the (m+1)th iteration of the GBO algorithm is:
[0128]
[0129] in , It consists of two random numbers in the range [0,1].
[0130] In this embodiment, the specific process of development and search based on the improved LEO is as follows:
[0131] Local Escape Operator (LEO). LEO is introduced to improve the efficiency of the GBO algorithm in solving complex problems. This operator can significantly change the solution... The LEO operator uses multiple solutions to generate a new, high-performance solution. .
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139] in, is a random number within [-1,1], is a random number following standard normal distribution, is a probability value, , , are three random integers, , is a random number within [0,1], is a random number within [0,1].
[0140] In step S2, based on the improved Gradient-Based Optimizer (GBO), the population size is initialized first, the fitness function of each individual is calculated and evaluated, the optimal and worst solutions are set, and when the number of iterations is less than the maximum number of iterations, specify and parameters, randomly select 4 numbers within the range of [1,N], calculate the random parameters balancing exploration and exploitation, calculate the values of GSR and DM, and calculate the following according to GSR and DM: , , , and update to obtain a new position , if the random number rand<Pr, the new position is evaluated through LEO, finally update the best and worst results of this position, and perform cyclic iteration until the number of iterations reaches the maximum number of iterations, then return the best and worst results.
[0141] S3: Substitute the optimized and tuned PID parameters into a PID control model for testing;
[0142] Substitute the optimized and tuned PID parameters into the Simulink model and the motor for verification.
[0143] Refer to Figure 3 and 4 , Figure 3 and 4 are control comparison diagrams of permanent magnet synchronous motors after PID parameter optimization performed by the improved gradient-based optimizer and the unimproved gradient-based optimizer, Figure 3 in Figure 4 , the dashed line represents the optimization result obtained by the original gradient-based optimizer, and the solid line represents the optimization result obtained by the improved gradient-based optimizer. It can be seen that the direct torque control method for PID-controlled permanent magnet synchronous motors optimized based on the improved gradient-based optimizer in the present invention improves control accuracy.
[0144] Unspecified matters in the present invention are common general knowledge in the art.
[0145] The above description is only for the purpose of helping to understand the method and core essence of the present invention, but the scope of protection of the present invention is not limited thereto. For those skilled in the art, any equivalent substitutions or modifications made to the technical solution and inventive concept disclosed in the present invention within the scope of the technology disclosed in the present invention should be covered within the scope of protection of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm, characterized in that, Includes the following steps: S1. Construct a PID control model for the speed of a permanent magnet synchronous motor; S2. Optimize and tune the parameters of the PID control model using an improved gradient optimization algorithm; The improved gradient optimization algorithm used in S2 is applied to the speed loop PID parameters. Optimization is performed, and the optimization includes the following steps: S201. Initialization process; in gradient optimization algorithms, the initial vector... It is randomly generated in a d-dimensional search space; S202, Gradient Optimization Rules; Gradient optimization rules are used to explore and avoid local optima, increasing the movement of local search directions; Gradient search rule and direction of motion The mathematical description is as follows: in: ; ; ; It is an n-dimensional vector between [0,1]. These are distinct integers randomly selected from [1, N]. It is by and The step size is determined jointly; In the formula: It is a normally distributed random number; It is a decimal number in the range [0, 0.1]. These are the worst and best solutions obtained during the optimization process; It is the position of the current iteration vector; It is a random parameter that balances the overall exploration and the local mining; These are random parameters that cause vectors to have different step sizes; ; in It is a sine function. It is a quantity that changes with the number of iterations. and They are equal to 0.2 and 1.2 respectively. It is a random number that is normally distributed between [0,1]. These are the current iteration count and the maximum iteration count; It is the position of the current iteration vector; Then the gradient optimization algorithm's first... The position of the next iteration is: in , It consists of two random numbers in the range [0,1]. The random parameters for balancing global exploration and local mining are improved by introducing weighting factors and disorder maps to enhance the population's exploration ability in the early stages and its exploitation ability in the later stages. right The improvements are as follows: in It is a sine function. It is the introduced weighting factor; in These are the optimal and worst objective function values, respectively. It is the number of chaos generated by the chaotic mapping; S3. Input the optimized PID parameters into the PID control model to test the permanent magnet synchronous motor.
2. The PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm according to claim 1, characterized in that: In S202 This represents the position of the current iteration vector, where the iteration order is as follows: Will and current location Substitute Solve for GSR; Substitute the solved GSR into Solution ; Then Attached , Solve ; Then Substitute Revised ; Finally Substitute return get ; Similarly, Will and current location Substitute Solve for GSR; Substitute the solved GSR into Solution ; Similarly, the revised version was obtained. ,in ,Will and Substitution get ; Finally by , Calculate .
3. The PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm according to claim 2, characterized in that: Optimization also includes the following steps: S203, Local Escape Operator: The local escape operator is introduced to improve the efficiency of gradient optimization algorithms in solving complex problems. This operator can significantly change the solution. Location; the local escape operator uses multiple solutions to generate a new solution with superior performance. .
4. The PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm according to claim 3, characterized in that: The local escape operator in S203 is as follows: in, A random number in the range [-1, 1] Random numbers that are distributed according to a standard normal distribution. It is a probability value. , , Given three random integers; , It is a random number between [0,1]. It is a random number between [0,1].
5. The PID direct torque control method for permanent magnet synchronous motors based on gradient optimization algorithm according to any one of claims 1-4, characterized in that: The PID control model for the speed of the permanent magnet synchronous motor is constructed in S1, as follows: The Simulink model of the direct torque mode of the permanent magnet synchronous motor is adopted as the PID control model for the speed of the permanent magnet synchronous motor. The actual speed of the motor is detected by a sensor, and the error between the actual speed and the target speed is input into the speed loop PID to obtain the theoretical torque value. Using torque error and flux linkage error as inputs to SMC-DTC(d) and SMC-DTC(q), the required Ud and Uq are obtained; The obtained Ud, Uq and angle information are processed by inverse Park transformation and SVPWM calculation to obtain the switching time on the motor drive bridge. The turn-on and turn-off time signals of the MOSFETs on the motor drive bridge are input to the drive bridge to achieve control.
Citation Information
Patent Citations
Method for self-turning parameters of rotary speed controller of permanent magnet synchronous motor based on chaos molecule kinetic theory algorithm
CN106685290A
Permanent magnet synchronous motor speed regulation control method based on compound control
CN116054664A