A search control method with learning rate decay
Patent Information
- Application Number
- CN202511136425.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-08-14
AI Technical Summary
但是目前在线MTPA算法中,不论是注入还是在线搜索都存在稳态振荡这一缺点
[0020]本发明采用上述技术方案,具有以下有益效果:本发明采用极值搜索算法来实现电机的最大转矩电流比控制,利用变步长的思想通过梯度搜索来实现MTPA的快速搜索;通过对学习率的衰减实现对搜索步长的平滑过渡,既保证梯度搜索算法收敛速度快,鲁棒性强的优点,同时不产生稳态振荡,提高稳态性能,相较于已有的虚拟注入以及实际注入的在线MTPA算法,学习率衰减的介入可以有效避免转矩输出的稳态振荡。本发明所提MTPA搜索控制方法具有快速的收敛性和较高的控制精确度,而且算法实现简单,便于实际工程应用。
Smart Images

Figure CN121239084B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to permanent magnet synchronous motor control technology, and in particular discloses a permanent magnet synchronous motor MTPA search control method with learning decay rate, belonging to the technical field of power generation, power transformation or power distribution. Background Technology
[0002] With the development of magnet, power electronics, and control technologies, permanent magnet synchronous motors (PMSMs) are widely used in electric vehicles and other fields due to their high efficiency and high power density. PMSMs are divided into surface-mounted (SPMSM) and interior permanent magnet synchronous motors (IPMSSMs). IPMSMs have reliable mechanical strength and utilize salient pole characteristics to generate reluctance torque, making them suitable for high-torque, wide-range speed control systems. Maximum Torque Per Ampere (MTPA) control, as an easily implemented motor efficiency optimization strategy, has attracted attention. Utilizing the salient pole characteristics of IPMSMs, it maximizes the electromagnetic torque generated per unit armature current, reducing motor copper losses. Compared to the dependence on and sensitivity to motor parameters of traditional methods, MTPA control using extreme value search algorithms is less dependent on motor parameters, has a fast convergence speed, and high accuracy. However, current online MTPA algorithms, whether injection or online search, suffer from steady-state oscillations. Therefore, how to reasonably apply the extreme value search algorithm to achieve rapid convergence to the motor MTPA operating point without generating steady-state oscillations has become the key to solving online MTPA control. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of the aforementioned background technology by providing an online search control method for a permanent magnet synchronous motor (MTPA) with learning rate decay. In the extreme value search convergence phase, a gradient search algorithm is used to quickly converge to the vicinity of the extreme point. In the steady state phase, a variable learning rate algorithm is used to eliminate steady-state oscillations, ensuring steady-state performance. This achieves the invention's objective of rapidly searching for the MTPA operating point online while avoiding steady-state oscillations in the output torque.
[0004] To achieve the above-mentioned objectives, the present invention employs the following technical solution:
[0005] An MTPA search control method with learning rate decay includes:
[0006] Step 1: Obtain the current amplitude command of the permanent magnet synchronous motor to be controlled;
[0007] Step 2: Establish a mathematical model for MTPA control with the goal of outputting the maximum electromagnetic torque of the permanent magnet synchronous motor under constant current command.
[0008] Step 3: If the current amplitude command obtained in Step 1 is different from the previous current amplitude command, proceed to Step 4; if the current amplitude command obtained in Step 1 is the same as the previous current amplitude command, proceed to Step 5. Step 4: Set the initial current values for the d-axis and q-axis based on the acquired current amplitude and motor-related parameters. Set the learning rate and decay rate based on the current amplitude command, and then proceed to step 6.
[0009] Step 5: If the cutoff condition is met, then the d-axis and q-axis current commands from the last MTPA search are determined to be d-axis and q-axis current commands; if the cutoff condition is not met, then the motor corresponding to the current amplitude command obtained in Step 1 is... , The shaft current command is input into the MTPA control mathematical model to search for the MTPA operating point. During the search process, the electromagnetic torque is considered in relation to... Gradient adjustment of axis current command and learning rate for numerical decay The adjustment step size of the shaft current command, when the electromagnetic torque is about When the gradient of the d-axis current command is converted to positive or negative, the learning rate is decayed once to determine the d-axis and q-axis current commands.
[0010] Step 6: Output the initial values of the d-axis and q-axis currents, or the determined d-axis and q-axis current commands.
[0011] As a further optimization of the MTPA search control method with learning rate decay, in step 2, with the goal of maximizing the output electromagnetic torque of the permanent magnet synchronous motor under constant current command, the mathematical model for MTPA control is established as follows: , ,in, For the electromagnetic torque of the motor, This represents the number of pole pairs of the motor. and They are motors , Shaft inductance value, For permanent magnet flux linkage in motors, and They are motors , shaft current, This is a current amplitude command.
[0012] As a further optimization of the MTPA search control method with learning rate decay, in step 4, the initial values of the d-axis and q-axis currents are set according to the obtained current amplitude and motor-related parameters. Specifically, the initial values of the d-axis and q-axis currents are set based on the established mathematical model of MTPA control and Taylor expansion. ,in, , For motor , Initial value of shaft current command, , , , which are the parameters obtained by Taylor expansion related to the nominal parameters of the motor.
[0013] As a further optimization scheme of the MTPA search control method with learning rate decay, in step 4, the learning rate and its decay rate are set according to the current amplitude command, specifically: The search step size accuracy of the shaft current command is set based on the premise that it is less than 0.02 times the current amplitude. Learning rate with minimum search step size limit for axis current command With decay rate ,in,
[0014] The expression for the axis current command search step size accuracy being less than 0.02 times the current amplitude is: , The minimum search step size for the shaft current command is limited to one percent of the current amplitude, based on the expression. Set learning rate With learning rate decay rate , For learning rate No. Secondary decay value, Number of learning rate decays The upper limit.
[0015] As a further optimization of the MTPA search control method with learning rate decay, in step 5, the cutoff condition is that the number of learning rate decays reaches the upper limit.
[0016] As a further optimization of the MTPA search control method with learning rate decay, in step 5, when the electromagnetic torque is related to... When the gradient of the shaft current command is converted to positive or negative, it follows the rules. The learning rate is decayed once. , The learning rate is respectively , No. The value after attenuation.
[0017] As a further optimization of the MTPA search control method with learning rate decay, in step 5, when the electromagnetic torque is related to... When converting the gradient of the d-axis current command to positive or negative, the learning rate is decayed once to determine the d-axis and q-axis current commands, specifically: based on... Determine the first Step Shaft current command Then, combined with the set current amplitude command, determine the first... Step Shaft current command .
[0018] An electronic device includes a memory and a processor, wherein the memory stores a computer program that runs on the processor, and the processor executes the steps of the MTPA search control method described above when running the computer program.
[0019] A computer-readable storage medium having a computer program stored thereon, wherein the computer program executes the steps of the MTPA search control method described above when it is run.
[0020] The present invention, employing the above-mentioned technical solution, has the following beneficial effects: The present invention uses an extreme value search algorithm to achieve maximum torque-to-current ratio (MTPA) control of the motor, and utilizes the concept of variable step size to achieve rapid MTPA search through gradient search; by decaying the learning rate, a smooth transition of the search step size is achieved, ensuring both the advantages of fast convergence and strong robustness of the gradient search algorithm, while avoiding steady-state oscillations and improving steady-state performance. Compared with existing online MTPA algorithms using virtual injection and actual injection, the intervention of learning rate decay can effectively avoid steady-state oscillations in torque output. The MTPA search control method proposed in this invention has fast convergence and high control accuracy, and the algorithm is simple to implement, facilitating practical engineering applications. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram showing the convex function trend of MTPA torque as a function of q-axis current under constant current amplitude command.
[0023] Figure 2 This is a flowchart of the MTPA search control method with learning rate decay proposed in this invention.
[0024] Figure 3 This is a block diagram of motor control provided in one embodiment of the present invention.
[0025] Figure 4 The image shows a simulation waveform of the current and output torque during the current amplitude command 220A search process provided in one embodiment of the present invention.
[0026] Figure 5 The image shows a simulation waveform of the current and output torque during the search process of the current amplitude command 344A provided in one embodiment of the present invention. Detailed Implementation
[0027] The technical solutions of the present invention will now be clearly and completely described with reference to the accompanying drawings of the embodiments of the present invention. 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 protection scope of the present invention.
[0028] This invention provides an online search algorithm for permanent magnet synchronous motors (MTPA) with learning rate decay. This algorithm features fast convergence and high control accuracy, and its implementation is simple, making it suitable for practical engineering applications. Figure 1 As shown, under a constant current amplitude command, the torque varies with... The change of shaft current is a single convex optimal function, and the extreme value search algorithm is applicable here. Based on this working condition, the goal is to control the permanent magnet synchronous motor to output the maximum electromagnetic torque under constant current command, and a mathematical model for the MTPA control of the permanent magnet synchronous motor to be controlled is established.
[0029] (1) (2)
[0030] In equations (1) and (2), For the electromagnetic torque of the motor, Represents the number of pole pairs of the motor. and They are motors , Shaft inductance value, For permanent magnet flux linkage in motors, and They are motors , Shaft current, as shown in equation (2) and The expression is given by the motor's nominal parameter output current amplitude command. The current command point of the corresponding MTPA under the given conditions.
[0031] This model describes the relationship between the electromagnetic torque of the motor and various parameters, providing a theoretical basis for subsequent control and search.
[0032] Based on the established mathematical model of MTPA control and Taylor expansion, the initial value of the motor current command is set. To avoid complex calculations involving radicals, the initial value of the motor current command is selected... , Set according to formula (3):
[0033] (3)
[0034] In equation (3), , , , which are the parameters obtained by Taylor expansion related to the nominal parameters of the motor.
[0035] During the search process, a learning rate is set for the gradient search algorithm, and the search step size of the online extremum search method is optimized using the gradient search algorithm. Specifically:
[0036] When the search distance is far from the MTPA operating point, a larger step size is used to improve the search speed; when the search distance is close to the MTPA operating point, a smaller search step size is used to achieve a fast search for the MTPA operating point.
[0037] The gradient search algorithm is implemented using formula (4).
[0038] (4)
[0039] In equation (4), Represents electromagnetic torque Regarding the first step Shaft current command The gradient, which reflects the electromagnetic torque at the current... rate of change The learning rate, as set, determines the basic size of the search step in each iteration. With gradient The product of these can be used to obtain the step size that needs to be adjusted in the current state, and then it is accumulated into the current state. Up, thus obtaining the first Step Shaft current command. This refers to the motor output torque. The calculation is as follows:
[0040] Under steady-state conditions, the voltage equation of the motor can be expressed as:
[0041] (5)
[0042] In equation (5), and The outputs to the inverter are respectively shaft and Shaft control voltage, For the stator resistance of the motor, and The measured three-phase current of the motor is obtained after coordinate transformation. shaft current, The actual measured electric angular velocity of the motor. and They are respectively shaft and Axial magnetic flux linkage.
[0043] Substituting the flux linkage expression shown in equation (5) into the electromagnetic torque calculation formula shown in equation (1), a new torque expression can be obtained: (6)
[0044] In the estimation of the output torque of the permanent magnet synchronous motor in equation (6), the calculation of the electromagnetic torque is only related to the stator resistance of the motor. Related. For embedded permanent magnet synchronous motors, their stator resistance... The value is extremely small. In practical applications, the stator resistance... The change in has a negligible impact on the electromagnetic torque calculation result. Therefore, using equation (6) to calculate the electromagnetic torque of the motor has high accuracy, which enables the motor control system to adjust the control parameters more precisely and improve the motor's operating efficiency and performance.
[0045] To eliminate steady-state oscillations that occur after the search reaches the MTPA operating point of the permanent magnet synchronous motor and further improve the MTPA search accuracy, a learning rate decay algorithm is used to control the search step size of the MTPA operating point, and the number of learning rate decays is set as the cutoff condition for the search process. Specifically:
[0046] Learning rate The update follows formula (7),
[0047] (7),
[0048] In equation (7), Indicates the first The learning rate at which the next learning rate decay occurs. Then it means the first The learning rate is updated after the learning rate decay occurs; The learning rate decay rate is a preset value, and its range is reasonably determined based on factors such as the specific characteristics of the permanent magnet synchronous motor, operating conditions, and control requirements. This rate is used to precisely control the magnitude of each learning rate decay. This represents the number of times the learning rate decays, and its initial value is 0.
[0049] In the specific search process, the learning rate decay operation is triggered by real-time monitoring of the gradient of torque changing with current. Whenever a positive-to-negative transition is detected in the gradient of torque changing with current, it indicates that the search path has crossed the operating point of MTPA. At this time, the learning rate is immediately decayed, that is, a new learning rate is calculated according to formula (7), and the number of learning rate decays is also counted. The value is incremented by 1. To ensure the search process ends within a reasonable range, this algorithm also sets an upper limit on the number of learning rate decays as a cutoff condition. When the cutoff condition is reached, the learning rate is set to 0, signifying that the search process stops. At this point, the system considers that the MTPA operating point has been accurately found, and the steady-state oscillation problem that may occur due to continuous searching can be effectively avoided, thereby improving the steady-state performance and search accuracy of the system.
[0050] Set a reasonable upper limit for the number of learning rate decays according to actual needs. Multiple decays can bring more accurate MTPA torque output, but will bring a certain search time. The upper limit value here can be selected according to the set learning rate and current amplitude control accuracy. Usually, the learning rate and decay rate are selected according to the needs and in conjunction with the cutoff conditions.
[0051] for , Regarding the selection of the cutoff condition, the present invention proposes the following references: based on the above, when the cutoff condition is attenuated... At this time, the search algorithm needs to achieve a current search step size accuracy of 1 / 2 the current amplitude. The following conditions must be met:
[0052] (8)
[0053] For ease of analysis, and assuming the current amplitude is constant, the current is normalized, resulting in the following relationship:
[0054] (9)
[0055]
[0056] here For the first The current angle is determined by the sine and cosine function values, which in turn correspond to the per-unit current. To avoid singularities in the algorithm, the current search step size is limited to a minimum of one-hundredth of the current amplitude. Based on the torque calculation formula (1), we can derive the gradient calculation formula as follows:
[0057] (10)
[0058] After standardization, formula (10) can be expressed as:
[0059] (11)
[0060] To achieve the required accuracy of the current search step size, and based on equation (11) and the limitation of the minimum current step size, we have:
[0061] (12)
[0062]
[0063] Simplifying the formula above, we get:
[0064] (13)
[0065] Here, scaling has already been used when solving the relationship between gradient and decay rate, thus amplifying the gradient. The decay rate and learning rate are set after the cutoff condition is determined, and can be directly referred to in the following formula:
[0066] (14)
[0067] The learning rate is set based on the reference of equation (14) and the cutoff condition for the number of decays. With decay rate The values here are all normalized references. This refers to the number of times the learning rate decays. When the pre-set cutoff condition is reached, the learning rate is set to 0, which means that the search process stops. At this point, the system believes that the MTPA operating point has been accurately found, and can effectively avoid the steady-state oscillation problem that may be caused by continuous search, thereby improving the steady-state performance and search accuracy of the system.
[0068] like Figure 2 As shown, the online search algorithm for permanent magnet synchronous motor (MTPA) with learning rate decay proposed in this invention includes S1 to S6.
[0069] S1, Obtain the current amplitude command of the permanent magnet synchronous motor to be controlled;
[0070] S2, with the goal of the permanent magnet synchronous motor to be controlled outputting the maximum electromagnetic torque under constant current command, establish the mathematical model of MTPA control shown in formula (1) and formula (2);
[0071] S3: If the current amplitude command obtained is different from the previous current amplitude command, proceed to S4; S1: If the current amplitude command obtained is the same as the previous current amplitude command, proceed to S5.
[0072] S4, When the current amplitude command changes, set the initial current values for the d-axis and q-axis according to formula (3) based on the obtained current amplitude and relevant motor parameters. Set the learning rate according to formulas (8) to (14). With decay rate Set the motor , Shaft current command and And record the current current amplitude command Simultaneously switch to S6;
[0073] S5, if the MTPA search cutoff condition is met, then set the learning rate to zero and use the d-axis and q-axis current commands from the previous MTPA search as... , Shaft current command and Proceed to S6; if the MTPA search cutoff condition is not met, further searching is required, and the motor corresponding to the set current amplitude command will be selected. , Shaft current command as the first step , Substituting the shaft current command into the mathematical model of MTPA control, the electronic torque and electromagnetic torque are calculated with respect to the first... step Gradient of shaft current command ,exist When the sign remains unchanged, the learning rate remains constant, following the idea of the gradient descent algorithm to determine the next step. Shaft current command, see formula (4), in When the sign changes, the learning rate is decayed according to formula (7), and then the next step is given according to the idea of gradient descent algorithm. Shaft current command determines the motor , Shaft current command and Then switch to S6, the MTPA search cutoff condition is the number of decays. The upper limit has been reached;
[0074] S6 outputs the dq axis current command.
[0075] Figure 3 The following is a motor control block diagram provided in one embodiment of the present invention; based on the above MTPA search control method, the following simulation based on MATLAB / Simulink is given, which yields the following results. Figure 4 , Figure 5 The result.
[0076] Figure 4 The current amplitude command is 220A, with the control objective of achieving MTPA operation. With the cutoff condition set to 5, the initial learning rate is set to a current amplitude command of 40% and 20%, and the decay rate is set to 0.25%. Under these current amplitude and search conditions, it iterated four times.
[0077] Figure 5 The current amplitude command is 344A, with the output MTPA operating state as the control target. When the cutoff condition is set to 5, the initial learning rate is set to a current amplitude command of 40% and 20%, and the decay rate is set to 0.25%. Under this current amplitude and search condition, it iterated a total of thirteen times.
[0078] As can be seen from the motor current waveform, the online search algorithm for permanent magnet synchronous motor (MTPA) with learning rate decay designed in this invention utilizes the concept of a variable learning rate to achieve maximum torque output and MTPA operating conditions through gradient search of electromagnetic torque, thus realizing optimal control. This improved algorithm avoids the influence of motor parameters and has fast convergence and high control accuracy.
[0079] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment. Any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art are included within the scope of protection of the present invention.
Claims
1. An MTPA search control method with learning rate decay, characterized in that, include: Step 1: Obtain the current amplitude command of the permanent magnet synchronous motor to be controlled; Step 2: Establish a mathematical model for MTPA control with the goal of outputting the maximum electromagnetic torque of the permanent magnet synchronous motor under constant current command. Step 3: If the current amplitude command obtained in Step 1 is different from the previous current amplitude command, proceed to Step 4; if the current amplitude command obtained in Step 1 is the same as the previous current amplitude command, proceed to Step 5. Step 4: Set the initial current values for the d-axis and q-axis based on the acquired current amplitude and motor-related parameters. Set the learning rate and decay rate based on the current amplitude command, and then proceed to step 6. Step 5: If the cutoff condition is met, then the d-axis and q-axis current commands from the last MTPA search are determined to be d-axis and q-axis current commands; if the cutoff condition is not met, then the motor corresponding to the current amplitude command obtained in Step 1 is... , The shaft current command is input into the MTPA control mathematical model to search for the MTPA operating point. During the search process, the electromagnetic torque is considered in relation to... Gradient adjustment of axis current command and learning rate for numerical decay The adjustment step size of the shaft current command, when the electromagnetic torque is about When the gradient of the d-axis current command is converted to positive or negative, the learning rate is decayed once to determine the d-axis and q-axis current commands. Step 6: Output the initial values of the d-axis and q-axis currents, or the determined d-axis and q-axis current commands.
2. The MTPA search control method with learning rate decay according to claim 1, characterized in that, In step 2, with the goal of the permanent magnet synchronous motor to be controlled outputting the maximum electromagnetic torque under a constant current command, the mathematical model for MTPA control is established as follows: , ,in, For the electromagnetic torque of the motor, This represents the number of pole pairs of the motor. and They are motors , Shaft inductance value, For permanent magnet flux linkage in motors, and They are motors , shaft current, This is a current amplitude command.
3. The MTPA search control method with learning rate decay according to claim 2, characterized in that, In step 4, the initial values of the d-axis and q-axis currents are set according to the obtained current amplitude and relevant motor parameters. Specifically, the initial values of the d-axis and q-axis currents are set based on the established mathematical model of MTPA control and Taylor expansion. ,in, , For motor , Initial value of shaft current command, , , , which are the parameters obtained by Taylor expansion related to the nominal parameters of the motor.
4. The MTPA search control method with learning rate decay according to claim 3, characterized in that, In step 4, the learning rate and its decay rate are set according to the current amplitude command, specifically: The search step size accuracy of the shaft current command is set based on the premise that it is less than 0.02 times the current amplitude. Learning rate with minimum search step size limit for axis current command With decay rate ,in, The The expression for the axis current command search step size accuracy being less than 0.02 times the current amplitude is: The The minimum search step size for the shaft current command is limited to one percent of the current amplitude, based on the expression. Set learning rate With learning rate decay rate , For learning rate No. Secondary decay value, Number of learning rate decays The upper limit.
5. The MTPA search control method with learning rate decay according to claim 4, characterized in that, In step 5, the cutoff condition is that the number of learning rate decays reaches the upper limit.
6. The MTPA search control method with learning rate decay according to claim 5, characterized in that, In step 5, when the electromagnetic torque is about When the gradient of the shaft current command is converted to positive or negative, it follows the rules. The learning rate is decayed once. , The learning rate is respectively , No. The value after attenuation.
7. The MTPA search control method with learning rate decay according to claim 6, characterized in that, In step 5, when the electromagnetic torque is about When converting the gradient of the d-axis current command to positive or negative, the learning rate is decayed once to determine the d-axis and q-axis current commands, specifically: based on... Determine the first Step Shaft current command Then, combined with the set current amplitude command, determine the first Step Shaft current command .
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that runs on the processor, characterized in that, When the processor runs a computer program, it executes the steps of the MTPA search control method according to claim 1.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program executes the steps of the MTPA search control method according to claim 1 when it runs.
Citation Information
Patent Citations
Maximum torque current ratio control method of asymmetric built-in permanent magnet motor
CN116191970A
Permanent magnet synchronous motor MTPA control method and device based on extremum search algorithm
CN118842365A