Motor torque ripple suppression method and device, electronic equipment and storage medium
The optimal control parameters for motor torque pulsation suppression are dynamically determined through quantum genetic algorithms, which solves the problem of relying on manual experience in the prior art and achieves efficient torque pulsation suppression under complex operating conditions.
Patent Information
- Application Number
- CN202411874202.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art relies on manual experience when suppressing motor torque pulsation, making it difficult to effectively adjust control parameters under complex and variable motor conditions, resulting in poor suppression effect.
By obtaining the odd harmonic current in the three-phase current of the motor and inputting it into the quantum genetic algorithm, the optimal PID controller parameters are dynamically determined, and voltage compensation is performed based on these parameters to suppress torque pulsation.
The optimal control parameters can be determined under different motor operating conditions without manual experience, which significantly improves the reliability and effect of torque pulsation suppression.
Smart Images

Figure CN119834664A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor technology, and in particular to a method, device, electronic device and storage medium for suppressing motor torque pulsation. Background Art
[0002] At present, the torque pulsation is often suppressed by suppressing the harmonic components in the current. However, the above method relies on manual experience to adjust the control parameters. However, due to the complex and changeable working conditions of the motor, it is difficult to adjust the control parameters, which may lead to poor suppression of torque pulsation under certain working conditions. Summary of the invention
[0003] The embodiments of the present application provide a method, device, electronic device and storage medium for suppressing motor torque pulsation, which can dynamically determine the optimal control parameters according to the operating conditions of the motor without relying on human experience, and suppress torque pulsation based on the optimal control parameters, thereby improving the reliability of torque pulsation suppression.
[0004] In a first aspect, an embodiment of the present application provides a method for suppressing motor torque pulsation, the method comprising:
[0005] Obtaining odd harmonic currents in the three-phase current of the motor, wherein the odd harmonic currents include 5th harmonic currents and 7th harmonic currents;
[0006] Inputting the target odd harmonic current and the odd harmonic current into a quantum genetic algorithm to obtain optimal control parameters of a PID controller;
[0007] Inputting the target odd harmonic current and the odd harmonic current into a PID controller having the optimal control parameters to obtain a first voltage compensation amount;
[0008] determining a total voltage according to the first voltage compensation amount and a reference voltage;
[0009] The motor is driven to operate according to the total voltage.
[0010] In the implementation of this application, the odd harmonic current that has the greatest impact on the torque pulsation in the three-phase current of the motor is first obtained, and then the odd harmonic current and the target odd harmonic current are input into the quantum genetic algorithm. Since the odd harmonic current and the target odd harmonic current can reflect the current operating condition of the motor together, the control parameters output by the above quantum genetic algorithm can be considered to be the optimal control parameters suitable for the current operating condition of the motor. On this basis, the voltage compensation amount is determined based on the optimal control parameter, and the motor is driven to operate together with the reference voltage. It can be considered that the current harmonics under the current working condition can be better eliminated, thereby reliably suppressing the torque pulsation under the current working condition.
[0011] Optionally, the target odd harmonic current and the odd harmonic current are input into a quantum genetic algorithm to obtain optimal control parameters of a PID controller, including:
[0012] calculating a current error between the target odd harmonic current and the odd harmonic current;
[0013] Constructing a first objective function based on an integral time absolute error, wherein an error in the integral time absolute error is the current error;
[0014] The current error is input into the quantum genetic algorithm, and the control parameters are optimized for the purpose of minimizing the first objective function until the optimal control parameters are determined.
[0015] In an embodiment of the present application, since the current error between the odd harmonic current and the target odd harmonic current can reflect the current operating condition of the motor, the current error can be input into the quantum genetic algorithm, and the absolute error of the integral time can be constructed based on the current error. Then, the optimization is performed with the purpose of minimizing the absolute error of the integral time, so that the optimal control parameters can be found in a shorter time.
[0016] Optionally, before determining the total voltage according to the first voltage compensation amount and the reference voltage, the method further includes:
[0017] Inputting the target odd harmonic current and the odd harmonic current into a harmonic voltage stabilization equation to obtain a second voltage compensation amount;
[0018] Determining a total voltage according to the first voltage compensation amount and a reference voltage includes:
[0019] The total voltage is determined according to the first voltage compensation amount, the second voltage compensation amount, and the reference voltage.
[0020] In an embodiment of the present application, the target odd harmonic current and the odd harmonic current are input into the harmonic stability equation together to determine the second voltage compensation amount, and then the total voltage is determined together with the first voltage compensation amount and the reference voltage. In the above process, the second voltage compensation amount is equivalent to feedforward regulation, which can improve the response speed of suppressing torque pulsation to a certain extent.
[0021] Optionally, obtain the odd harmonic currents in the three-phase current of the motor, including:
[0022] Obtaining the current of the three-phase current of the motor under the odd-order dq axis, wherein the odd-order dq axis includes the 5th-order dq axis and the 7th-order dq axis;
[0023] Inputting the running state of the motor into a quantum genetic algorithm to obtain the optimal filtering parameters of the filter;
[0024] The current under the odd dq axis is input into the filter with the optimal filtering parameters for filtering to obtain the odd harmonic current.
[0025] In an embodiment of the present application, a quantum genetic algorithm is used to determine the optimal filtering parameters of the filter according to the current operating state of the motor, and then the optimal filtering parameters are used to filter the currents under the 5th dq axis and the 7th dq axis, so that the 5th harmonic current and the 7th harmonic current can be obtained more accurately, further improving the reliability of subsequent torque pulsation suppression.
[0026] Optionally, the operating state of the motor is input into a quantum genetic algorithm to obtain optimal filter parameters of the filter, including:
[0027] Determining a second objective function, wherein the second objective function is at least related to total harmonic distortion and filtering stability;
[0028] The running state of the motor is input into the quantum genetic algorithm, and the filtering parameters are optimized for the purpose of maximizing the second objective function until the optimal filtering parameters are determined.
[0029] In an embodiment of the present application, the current operating conditions of the motor are input into the quantum genetic algorithm, and an objective function is constructed based on total harmonic distortion and filtering stability. Then, optimization is performed with the purpose of maximizing the objective function, so that the optimal filtering parameters can be found more accurately.
[0030] Optionally, the harmonic distortion in the second objective function corresponds to a first weight, the filtering stability corresponds to a second weight, and the first weight is greater than the second weight.
[0031] In an embodiment of the present application, in the second objective function, the first weight corresponding to the harmonic distortion is set to be greater than the second weight corresponding to the filtering stability, that is, priority is given to the harmonic filtering effect, and secondly, priority is given to the harmonic filtering stability, which is more conducive to obtaining the required odd harmonic current.
[0032] Optionally, the second objective function is also related to filtering delay, the filtering delay corresponds to a third weight, and the third weight is smaller than the second weight.
[0033] In the embodiment of the present application, filtering delay can also be considered in the second objective function, and the weight corresponding to filtering delay is less than filtering stability, that is, the filtering effect is prioritized, followed by filtering stability, and finally filtering delay, which can also improve the filtering speed to a certain extent.
[0034] In a second aspect, an embodiment of the present application provides a device for suppressing motor torque pulsation, the device comprising:
[0035] A harmonic current acquisition unit, used for acquiring odd harmonic currents in the three-phase current of the motor, wherein the odd harmonic currents include 5th harmonic currents and 7th harmonic currents;
[0036] A control parameter acquisition unit, used for inputting the target odd harmonic current and the odd harmonic current into a quantum genetic algorithm to obtain an optimal control parameter of a PID controller;
[0037] a compensation voltage acquisition unit, configured to input the target odd harmonic current and the odd harmonic current into a PID controller having the optimal control parameters to obtain a first voltage compensation amount;
[0038] a total voltage acquisition unit, configured to determine a total voltage according to the first voltage compensation amount and a reference voltage;
[0039] A driving unit is used to drive the motor to operate according to the total voltage.
[0040] Optionally, the control parameter acquisition unit is specifically used to:
[0041] calculating a current error between the target odd harmonic current and the odd harmonic current;
[0042] Constructing a first objective function based on an integral time absolute error, wherein an error in the integral time absolute error is the current error;
[0043] The current error is input into the quantum genetic algorithm, and the control parameters are optimized for the purpose of minimizing the first objective function until the optimal control parameters are determined.
[0044] Optionally, the compensation voltage acquisition unit is further used for:
[0045] Inputting the target odd harmonic current and the odd harmonic current into a harmonic voltage stabilization equation to obtain a second voltage compensation amount;
[0046] The total voltage acquisition unit is specifically used for:
[0047] The total voltage is determined according to the first voltage compensation amount, the second voltage compensation amount, and the reference voltage.
[0048] Optionally, the harmonic current acquisition unit is specifically used for:
[0049] Obtaining the current of the three-phase current of the motor under the odd-order dq axis, wherein the odd-order dq axis includes the 5th-order dq axis and the 7th-order dq axis;
[0050] Inputting the running state of the motor into a quantum genetic algorithm to obtain the optimal filtering parameters of the filter;
[0051] The current under the odd dq axis is input into the filter with the optimal filtering parameters for filtering to obtain the odd harmonic current.
[0052] Optionally, the harmonic current acquisition unit is specifically used for:
[0053] Determining a second objective function, wherein the second objective function is related to total harmonic distortion and filter stability;
[0054] The running state of the motor is input into the quantum genetic algorithm, and the filtering parameters are optimized for the purpose of maximizing the second objective function until the optimal filtering parameters are determined.
[0055] Optionally, the harmonic distortion in the second objective function corresponds to a first weight, the filtering stability corresponds to a second weight, and the first weight is greater than the second weight.
[0056] Optionally, the second objective function is also related to filtering delay, the filtering delay corresponds to a third weight, and the third weight is smaller than the second weight.
[0057] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing a computer program and a processor for executing the computer program, wherein when the computer program is executed by the processor, the electronic device is triggered to execute the steps of the method described in any embodiment of the first aspect.
[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method described in any embodiment of the first aspect.
[0059] It should be understood that the second to fourth aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 A schematic flow chart of a method for suppressing motor torque pulsation provided in an embodiment of the present application;
[0062] Figure 2 A schematic flow chart of a method for obtaining odd harmonic current provided in an embodiment of the present application;
[0063] Figure 3 A flowchart of a method for obtaining an optimal bandwidth parameter and an optimal gain parameter provided in an embodiment of the present application;
[0064] Figure 4 A flow chart of a method for determining optimal control parameters of a PID controller provided in an embodiment of the present application;
[0065] Figure 5 A motor torque pulsation suppression device provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to better understand the technical solution of this specification, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0068] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0069] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0070] Permanent magnet synchronous motors (hereinafter referred to as motors) are widely used in aerospace, high-precision CNC machine tools, robots, electric vehicle drives and other fields due to their advantages such as high efficiency, high power density, large torque-to-inertia ratio, low noise and easy maintenance. However, due to the non-sinusoidal magnetic flux in the motor air gap, the back electromotive force harmonics caused by the uniformity of the windings and the dead zone in the motor control, harmonic components will appear in the motor current, which will generate torque pulsation during the operation of the motor. The existence of torque pulsation affects the low-speed performance of the motor in the speed control system and the high-precision positioning in the position control system, and will cause system vibration and noise, and in severe cases, it will threaten the safety of system operation. Therefore, measures need to be taken to minimize the torque pulsation of the motor.
[0071] At present, the torque pulsation is often suppressed by suppressing the harmonic components in the current. However, the above method relies on manual experience to adjust the control parameters. However, due to the complex and changeable working conditions of the motor, it is difficult to adjust the control parameters, which may lead to poor suppression of torque pulsation under certain working conditions.
[0072] In view of this, an embodiment of the present application provides a method for suppressing motor torque pulsation, in which a parameter reflecting the current operating state of the motor is used as an input of a quantum genetic algorithm, so that the optimal control parameter suitable for the current operating condition of the motor can be obtained. On this basis, the voltage compensation amount is determined based on the optimal control parameter, and the motor is driven to operate in conjunction with the reference voltage. It can be considered that the current harmonics under the current working condition can be better eliminated, thereby reliably suppressing the torque pulsation under the current working condition.
[0073] The technical solution protected by this application is described in detail below with reference to the accompanying drawings.
[0074] Step 10: Obtain odd harmonic currents in the three-phase currents of the motor.
[0075] In the embodiment of the present application, the odd harmonic currents mainly include the 5th harmonic current and the 7th harmonic current, and correspond to the actual value of the 5th harmonic current and the actual value of the 7th harmonic current. Of course, other odd harmonic currents that conform to 6k+1 or 6k-1 can also be included, and the present application does not impose any special restrictions on this.
[0076] The following is a detailed description of how to obtain odd harmonic currents.
[0077] See also Figure 2 , is a flow chart of a method for obtaining odd harmonic current provided in an embodiment of the present application. Step 10 can be implemented by executing sub-steps 101 to 103:
[0078] Step 101: Obtain the three-phase current of the motor in the odd-order dq axis, where the odd-order dq axis includes the 5th-order dq axis and the 7th-order dq axis.
[0079] In the embodiment of the present application, the three-phase output current i of the motor can be acquired in the current sampling period. a 、i b 、i c and the electrical angle θ e , using Clarke transformation, the current component i in the three-phase stationary coordinate system is a 、i b 、i c After conversion, the current component i in the two-phase stationary coordinate system is obtained α 、i β . In obtaining i α 、iβ Then, combined with the electrical angle θ e , perform 5 negative sequence coordinate transformations to obtain 5 currents in a synchronously rotating coordinate system; and perform 7 positive sequence coordinate transformations to obtain 7 currents in a synchronously rotating coordinate system.
[0080] Step 102: Input the running state of the motor into the quantum genetic algorithm to obtain the optimal filtering parameters of the filter.
[0081] In the embodiment of the present application, the running state of the motor includes the speed and load of the motor, and of course may also include other parameters, which are not particularly limited in the present application. The optimal filtering parameters of the filter include the optimal bandwidth parameter and the optimal gain parameter. The process of obtaining the optimal bandwidth parameter and the optimal gain parameter is described in detail below.
[0082] See also Figure 3 , which is a flow chart of a method for obtaining an optimal bandwidth parameter and an optimal gain parameter provided in an embodiment of the present application. Step 102 can be implemented by executing sub-steps 1021 to 1022:
[0083] Step 1021: Determine the second objective function.
[0084] In the embodiment of the present application, the second objective function is at least related to the total harmonic distortion and the filtering stability. Among them, in the second objective function, the total harmonic distortion corresponds to the first weight, the filtering stability corresponds to the second weight, and the first weight is greater than the second weight, that is, the harmonic filtering effect is given priority, and the harmonic filtering stability is secondly paid attention to, so as to be more conducive to obtaining the required odd harmonic current.
[0085] Furthermore, the second objective function is also related to the filtering delay, in which the filtering delay corresponds to the third weight, which is configured to be smaller than the second weight. That is, the filtering effect is prioritized, followed by filtering stability, and finally filtering delay, which can also improve the filtering speed to a certain extent.
[0086] Step 1022: Input the running state of the motor into the quantum genetic algorithm, and optimize the filter parameters with the purpose of maximizing the second objective function until the optimal filter parameters are determined.
[0087] In the embodiment of the present application, in the quantum genetic algorithm, each individual in the population represents a parameter combination of the filter, which is bandwidth and gain. These parameters directly affect the frequency response of the filter and determine the filter's ability to filter out different frequency components.
[0088] Representation of population:
[0089] Each individual is composed of several quantum bits (qubits) to represent the values of bandwidth and gain. The superposition state of qubits can represent multiple possible bandwidth and gain values, allowing the algorithm to explore multiple solution spaces simultaneously.
[0090] The difference between different population parameters:
[0091] Bandwidth parameter (Bandwidth) For different individuals in the population, the bandwidth value is usually adjusted dynamically according to the current speed and load of the motor. The bandwidth of each individual will select a different value according to the current motor operating status.
[0092] Gain parameter (Gain): The gain value affects the gain adjustment of the filter for a specific frequency component. The gain parameters of different individuals reflect the ability to suppress specific harmonic frequencies. Individuals with larger gains may be more conducive to suppressing high-amplitude harmonic components, while individuals with smaller gains may be suitable for other frequency components.
[0093] The second objective function is defined as:
[0094] The second objective function is used to evaluate the filtering effect of each individual (bandwidth and gain combination) under the current motor operating state.
[0095] Specifically, it is manifested as total harmonic distortion (THD), filter delay (Delay) and filter stability (stability). In general, the second objective function is shown in formula (1):
[0096] Fitness=α·(THD)-β·(Delay)+γ·(stability)(1)
[0097] Among them, Fitness represents the second objective function, α, β, and γ are weight coefficients used to balance the influence of different factors, where α>γ>β.
[0098] Optimization process:
[0099] 1. Initialization
[0100] Quantum bit initialization:
[0101] Each individual in the population is initialized to represent a different combination of bandwidth and gain. Each individual is initialized in a superposition state of qubits, representing multiple possible solutions.
[0102] 2. Quantum Operation and Genetic Operation
[0103] Quantum operation (quantum transformation): quantum bits are operated through quantum gates (such as Hadamard gates, CNOT gates, etc.), so that the bandwidth and gain parameters of each individual can be explored in a wider solution space. Quantum operations improve the diversity of solutions and global search capabilities.
[0104] Genetic operations (selection, crossover and mutation): select individuals with better fitness for reproduction according to the fitness function value. Generate new individuals through crossover operation, and add randomness through mutation operation to increase the diversity of the population.
[0105] Fitness evaluation: Evaluate the bandwidth and gain combination of each individual, calculate its second objective function value, and select and update according to the second objective function value.
[0106] 3. Termination conditions
[0107] Convergence judgment: If the value of the second objective function changes very little within several generations, or the error is lower than the set threshold, it means that the algorithm has converged and can be stopped.
[0108] Maximum number of generations: If the maximum number of iterations is reached, the algorithm can be terminated and the current optimal solution can be returned.
[0109] Threshold reached: When the value of the second objective function reaches the predetermined threshold, the algorithm terminates and it is considered that the optimal solution has been found.
[0110] Get the optimal bandwidth and optimal gain parameters.
[0111] Step 103: inputting the current under the odd-order dq axis into a filter with optimal filtering parameters for filtering to obtain odd-order harmonic current.
[0112] In an embodiment of the present application, a quantum genetic algorithm is used to determine the optimal filtering parameters of the filter according to the current operating state of the motor, and then the optimal filtering parameters are used to filter the currents under the 5th dq axis and the 7th dq axis, so that the 5th harmonic current and the 7th harmonic current can be obtained more accurately, further improving the reliability of subsequent torque pulsation suppression.
[0113] Step 20: Input the target odd harmonic current and the odd harmonic current into the quantum genetic algorithm to obtain the optimal control parameters of the PID controller.
[0114] In the embodiment of the present application, since the odd harmonic current and the target odd harmonic current can reflect the current operating condition of the motor together, the control parameters output by the above-mentioned quantum genetic algorithm can be considered to be the optimal control parameters suitable for the current operating condition of the motor. It should be understood that in order to suppress the motor torque pulsation, the target odd harmonic current includes the target 5th harmonic current and the target 7th harmonic current, and the target 5th harmonic current and the target 7th harmonic current are both 0.
[0115] The following is a detailed description of how to obtain the optimal control parameters of the PID controller.
[0116] See also Figure 4 , is a flow chart of a method for determining the optimal control parameters of a PID controller provided in an embodiment of the present application. Step 20 can be implemented by executing sub-steps 201 to 203:
[0117] Step 201: Calculate the current error between the target odd harmonic current and the odd harmonic current.
[0118] In the embodiment of the present application, the current error between the odd harmonic current and the target odd harmonic current can reflect the current operating condition of the motor.
[0119] Step 202: construct a first objective function based on the integral time absolute error, wherein the error in the integral time absolute error is the current error.
[0120] In the embodiment of the present application, the integrated time absolute error (ITAE) is used as a controller performance evaluation indicator and as the first objective function of the quantum genetic algorithm. ITAE can evaluate the rapidity and accuracy of the system, so that the optimal control parameters can be obtained in a shorter time later.
[0121] Step 203: input the current error into the quantum genetic algorithm, and optimize the control parameters with the purpose of minimizing the first objective function until the optimal control parameters are determined.
[0122] In the embodiment of the present application, in the quantum genetic algorithm, each individual in the population represents a parameter combination of a PID controller. Specifically, a PID controller has three parameters: proportional gain (K p ), integral gain (K i ), differential gain (K d ). In quantum genetic algorithms, these three parameters are represented as values of quantum bits (qubits).
[0123] Individual representation: The chromosome of each individual is a string composed of several quantum bits. In order to represent the three parameters of PID, the floating value of quantum bits is used to express the different precision and value range of each parameter. For example, Kp , K i , K d The value of is represented by the superposition state of the quantum bit, and the amplitude of the quantum bit represents the specific value of the PID parameter.
[0124] Population differences: The differences between different populations are mainly reflected in the encoding method of quantum bits, decoding rules, and the operation of quantum gates, which in turn affect the accuracy and range of PID parameters. Each quantum bit represents a possible solution for a PID parameter. The population of the quantum genetic algorithm is updated through quantum operations to explore the optimal PID value in the solution space.
[0125] In the process of tuning parameters using the improved quantum genetic algorithm, the integral time absolute error (ITAE) is used as the controller performance evaluation index and as the first objective function of the algorithm. ITAE can evaluate the rapidity and accuracy of the system. The first objective function is defined as shown in formula (2):
[0126]
[0127] Where J represents the first objective function, e(t) is the controller input error, that is, the 5th and 7th harmonic current error values, and t represents time. This formula is used to evaluate the controller. The better the performance, the smaller the ITAE value. Therefore, the goal of the algorithm optimization is to minimize ITAE.
[0128] The specific optimization process is as follows:
[0129] 1. Initialization:
[0130] Quantum bit initialization: Initialize the quantum bits to represent the three parameters of the PID controller (K p ,K i ,K d ). Each parameter corresponds to the state of a qubit, allowing exploration of multiple solutions.
[0131] 2. Quantum genetic manipulation
[0132] Quantum operation: The core of quantum genetic algorithm is quantum gate operation, such as Hadamard gate, CNOT gate, etc. These operations can be used to adjust the superposition state of quantum bits and make the "information exchange" between different individuals more efficient, thereby accelerating the search of the solution space.
[0133] Fitness evaluation: By simulating the dynamic response of the PID controller, the fitness of each individual (i.e. the size of the error) is calculated. For example, the closed-loop response of the control system is used to evaluate the error caused by the PID parameters.
[0134] Quantum selection and crossover: Select the parent generation according to the fitness value for quantum selection (select individuals with better fitness based on probability). Then generate a new generation of individuals through quantum crossover operation. The purpose of the crossover operation is to merge the "good features" of two better individuals to produce better offspring.
[0135] Quantum mutation: The mutation operation introduces randomness by adjusting the amplitude or phase of the quantum bit to ensure that the algorithm does not fall into the local optimal solution.
[0136] 3. Convergence and termination conditions
[0137] Convergence condition: The operation of the quantum genetic algorithm will determine whether the optimal solution is reached or whether a certain error threshold is met based on the change in the value of the first objective function. For example, when the error of the PID controller is lower than a preset tolerance range, it can be considered that the optimal solution has been found.
[0138] Termination conditions: Common termination conditions include:
[0139] Maximum algebra: When the algorithm reaches the maximum algebra, it stops and returns the current optimal solution.
[0140] Error convergence: Stop when the change of the second objective function is very small and the error basically stops changing.
[0141] Running time: After a certain period of time, the algorithm terminates and returns the best solution.
[0142] After the entire optimization process is completed, a set of optimal control parameters (K p, K i, K d ).
[0143] Step 30: Input the target odd harmonic current and the odd harmonic current into a PID controller with optimal control parameters to obtain a first voltage compensation amount.
[0144] In the embodiment of the present application, since the odd harmonic current and the target odd harmonic current can reflect the current operating condition of the motor, the control parameter output by the above quantum genetic algorithm can be considered as the optimal control parameter suitable for the current operating condition of the motor. On this basis, the corresponding first voltage compensation amount is determined based on the optimal control parameter.
[0145] For example, the target 5th harmonic current has the following electrical components in the dq axis: i d5 with i q5 , and i d5 with i q5 are all 0, and the actual current components of the 5th harmonic current in the dq axis are i d5* with i q5* , then we can use id5 with i d5* The current error between d5 Input to the PID controller with the first optimal control parameter to obtain the first voltage compensation value (U d5 '); Similarly, we can q5 with i q5* The current error between q5 Input to the PID controller with the second optimal control parameter to obtain the first voltage compensation amount (U q5 ').
[0146] For example, the target 7th harmonic current has the electric quantity components in the dq axis divided into i d7 with i q7 , and i d7 with i q7 are all 0, and the current components of the actual 7th harmonic current in the dq axis are i d7* with i q7* , then we can use i d7 with i d7* The current error between d7 Input to the PID controller with the third optimal control parameter to obtain the first voltage compensation value (U d7 '); Similarly, we can q7 with i q7* The current error between q7 Input to the PID controller with the fourth optimal control parameter to obtain the first voltage compensation amount (U q7 ').
[0147] It is worth noting that, in the above embodiment, in order to obtain the first voltage compensation amounts of the d-axis and the q-axis respectively, the output of the PID controller needs to be decoupled.
[0148] Step 40: Determine the total voltage according to the first voltage compensation amount and the reference voltage.
[0149] In the embodiment of the present application, the reference voltage can be considered as the voltage obtained after the three-phase current of the current motor is transformed through a series of original control strategies and original coordinates.
[0150] In some embodiments, before executing step 40, the target odd harmonic current and the odd harmonic current can also be input into the harmonic voltage regulation equation to obtain a second voltage compensation amount. On this basis, the total voltage in the dq axis is jointly determined according to the first voltage compensation amount, the second voltage compensation amount and the reference voltage. In the above process, the second voltage compensation amount is equivalent to feedforward regulation, which can improve the response speed of suppressing torque pulsation to a certain extent.
[0151] The following describes how to obtain the second voltage compensation amount.
[0152] For example, the target 5th harmonic current has the following electrical components in the dq axis: i d5 with i q5 , and i d5 with i q5 are all 0, and the actual current components of the 5th harmonic current in the dq axis are i d5* with i q5* , then we can use i d5 with i d5* The current error between d5 Input into the harmonic voltage regulation equation to obtain the second voltage compensation value of the d-axis (U d5 ”); Similarly, we can q5 with i q5* The current error between q5 Input into the harmonic voltage regulation equation to obtain the second voltage compensation value (U q5 ”).
[0153] For example, the target 7th harmonic current has the electric quantity components in the dq axis divided into i d7 with i q7 , and i d7 with i q7 are all 0, and the current components of the actual 7th harmonic current in the dq axis are i d7* with i q7* , then we can use i d7 with i d7* The current error between d7 Input into the harmonic voltage regulation equation to obtain the second voltage compensation value of the d-axis (U d7 ”); Similarly, we can q7 with i q7* The current error between q7 Input into the harmonic voltage regulation equation to obtain the second voltage compensation value (U q7 ”).
[0154] Step 50: Drive the motor to operate according to the total voltage.
[0155] In the embodiment of the present application, a PWM signal is generated according to total voltage modulation, and then the generated PWM signal is used to control the inverter to generate a three-phase current for the motor to drive the motor to work, thereby eliminating the torque pulsation of the motor.
[0156] See also Figure 5 , is a motor torque pulsation suppression device provided in an embodiment of the present application, the device comprising:
[0157] A harmonic current acquisition unit 601 is used to acquire odd harmonic currents in the three-phase current of the motor, wherein the odd harmonic currents include 5th harmonic currents and 7th harmonic currents;
[0158] A control parameter acquisition unit 602 is used to input the target odd harmonic current and the odd harmonic current into a quantum genetic algorithm to obtain the optimal control parameters of the PID controller;
[0159] A compensation voltage acquisition unit 603 is used to input the target odd harmonic current and the odd harmonic current into a PID controller with the optimal control parameters to obtain a first voltage compensation amount;
[0160] A total voltage acquisition unit 604, configured to determine a total voltage according to the first voltage compensation amount and a reference voltage;
[0161] The driving unit 605 is used to drive the motor to operate according to the total voltage.
[0162] Optionally, the control parameter acquisition unit 602 is specifically used to:
[0163] calculating a current error between the target odd harmonic current and the odd harmonic current;
[0164] Constructing a first objective function based on an integral time absolute error, wherein an error in the integral time absolute error is the current error;
[0165] The current error is input into the quantum genetic algorithm, and the control parameters are optimized for the purpose of minimizing the first objective function until the optimal control parameters are determined.
[0166] Optionally, the compensation voltage acquisition unit 603 is further used for:
[0167] Inputting the target odd harmonic current and the odd harmonic current into a harmonic voltage stabilization equation to obtain a second voltage compensation amount;
[0168] The total voltage acquisition unit 604 is specifically used for:
[0169] The total voltage is determined according to the first voltage compensation amount, the second voltage compensation amount, and the reference voltage.
[0170] Optionally, the harmonic current acquisition unit 601 is specifically used for:
[0171] Obtaining the current of the three-phase current of the motor under the odd-order dq axis, wherein the odd-order dq axis includes the 5th-order dq axis and the 7th-order dq axis;
[0172] Inputting the running state of the motor into a quantum genetic algorithm to obtain the optimal filtering parameters of the filter;
[0173] The current under the odd dq axis is input into the filter with the optimal filtering parameters for filtering to obtain the odd harmonic current.
[0174] Optionally, the harmonic current acquisition unit 601 is specifically used for:
[0175] Determining a second objective function, wherein the second objective function is related to total harmonic distortion and filter stability;
[0176] The running state of the motor is input into the quantum genetic algorithm, and the filtering parameters are optimized for the purpose of maximizing the second objective function until the optimal filtering parameters are determined.
[0177] Optionally, the harmonic distortion in the second objective function corresponds to a first weight, the filtering stability corresponds to a second weight, and the first weight is greater than the second weight.
[0178] Optionally, the second objective function is also related to filtering delay, the filtering delay corresponds to a third weight, and the third weight is smaller than the second weight.
[0179] See also Figure 6 , is an electronic device provided in an embodiment of the present application, the electronic device includes at least one processor 701, the processor 701 is used to execute a computer program stored in a memory, and implement the embodiment of the present application as provided in the following Figure 1-4 The flowchart diagram steps of the method for suppressing motor torque pulsation are shown.
[0180] Optionally, the processor 701 may specifically be a central processing unit, a specific ASIC, or one or more integrated circuits for controlling program execution.
[0181] Optionally, the electronic device may further include a memory 702 connected to the at least one processor 701, and the memory 702 may include a ROM, a RAM, and a disk memory. The memory 702 is used to store data required by the processor 701 when it is running, that is, it stores instructions that can be executed by the at least one processor 701. The at least one processor 701 executes the instructions stored in the memory 702 to execute the following steps: Figure 1-4 The method shown. Wherein, the number of the memory 702 is one or more. Wherein, the number of the memory 702 is one or more.
[0182] The present application also provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is run on a processor, the processor executes Figure 1-4 method.
[0183] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A method for suppressing motor torque pulsation, characterized in that: The method comprises: Obtaining odd harmonic currents in the three-phase current of the motor, wherein the odd harmonic currents include 5th harmonic currents and 7th harmonic currents; Inputting the target odd harmonic current and the odd harmonic current into a quantum genetic algorithm to obtain optimal control parameters of a PID controller; Inputting the target odd harmonic current and the odd harmonic current into a PID controller having the optimal control parameters to obtain a first voltage compensation amount; determining a total voltage according to the first voltage compensation amount and a reference voltage; The motor is driven to operate according to the total voltage.
2. The method according to claim 1, characterized in that: The target odd harmonic current and the odd harmonic current are input into the quantum genetic algorithm to obtain the optimal control parameters of the PID controller, including: calculating a current error between the target odd harmonic current and the odd harmonic current; Constructing a first objective function based on an integral time absolute error, wherein an error in the integral time absolute error is the current error; The current error is input into the quantum genetic algorithm, and the control parameters are optimized for the purpose of minimizing the first objective function until the optimal control parameters are determined.
3. The method according to claim 1, characterized in that Before determining the total voltage according to the first voltage compensation amount and the reference voltage, the method further includes: Inputting the target odd harmonic current and the odd harmonic current into a harmonic voltage stabilization equation to obtain a second voltage compensation amount; Determining a total voltage according to the first voltage compensation amount and a reference voltage includes: The total voltage is determined according to the first voltage compensation amount, the second voltage compensation amount, and the reference voltage.
4. The method according to any one of claims 1 to 3, obtaining odd harmonic currents in the three-phase current of the motor, comprising: Obtaining the current of the three-phase current of the motor under the odd-order dq axis, wherein the odd-order dq axis includes the 5th-order dq axis and the 7th-order dq axis; Inputting the running state of the motor into a quantum genetic algorithm to obtain the optimal filtering parameters of the filter; The current under the odd dq axis is input into the filter with the optimal filtering parameters for filtering to obtain the odd harmonic current.
5. The method according to claim 4, characterized in that The running state of the motor is input into the quantum genetic algorithm to obtain the optimal filtering parameters of the filter, including: Determining a second objective function, wherein the second objective function is related to total harmonic distortion and filter stability; The running state of the motor is input into the quantum genetic algorithm, and the filtering parameters are optimized for the purpose of maximizing the second objective function until the optimal filtering parameters are determined.
6. The method according to claim 5, characterized in that In the second objective function, the harmonic distortion corresponds to a first weight, the filtering stability corresponds to a second weight, and the first weight is greater than the second weight.
7. The method according to claim 6, characterized in that The second objective function is also related to a filtering delay, the filtering delay corresponds to a third weight, and the third weight is smaller than the second weight.
8. A device for suppressing motor torque pulsation, characterized in that: The device comprises: A harmonic current acquisition unit, used for acquiring odd harmonic currents in the three-phase current of the motor, wherein the odd harmonic currents include 5th harmonic currents and 7th harmonic currents; A control parameter acquisition unit, used for inputting the target odd harmonic current and the odd harmonic current into a quantum genetic algorithm to obtain an optimal control parameter of a PID controller; a compensation voltage acquisition unit, configured to input the target odd harmonic current and the odd harmonic current into a PID controller having the optimal control parameters to obtain a first voltage compensation amount; a total voltage acquisition unit, configured to determine a total voltage according to the first voltage compensation amount and a reference voltage; A driving unit is used to drive the motor to operate according to the total voltage.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to implement the torque pulsation suppression method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the torque pulsation suppression method according to any one of claims 1 to 7 is implemented.