A method and system for motor control based on current compensation

CN122932533APending Publication Date: 2026-10-16CHONGQING JINKANG POWER NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611115071.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

在实际应用中,当电机控制器设置扭矩指令为零时,系统无法实现真正零扭矩状态,表现为电机相电流不为零且实际输出扭矩不为零

Benefits of technology

[0049] The present invention provides a current-compensated motor control method, comprising: acquiring motor parameters and control parameters in zero-torque control mode; determining the intermediate zero vector action time based on the control parameters, and determining the calculation method for the q-axis current deviation value based on the intermediate zero vector action time; calculating the q-axis current deviation value using the motor parameters and control parameters as input; compensating the sampled current value based on the q-axis current deviation value, and controlling the motor based on the compensated sampled current value. This invention identifies the current sampling filtering effect as the main cause of zero-torque control deviation. Therefore, by combining motor parameters and control parameters, the current change pattern caused by the filtering effect can be predicted, and the q-axis current deviation value can be accurately calculated, thereby reasonably compensating the sampled current value. This process does not require additional hardware support and can be completed solely by the real-time computing power of the motor controller, reducing system modification costs. Controlling the motor using the compensated current signal makes the actual output torque of the motor under zero-torque conditions closer to the theoretical zero value, improving the accuracy and reliability of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122932533A_ABST
    Figure CN122932533A_ABST
Patent Text Reader

Abstract

The application belongs to the field of motor control, and discloses a motor control method and system based on current compensation, which comprises the following steps: obtaining motor parameters and control parameters of a motor in a zero torque control mode; determining a calculation mode of a q-axis current deviation value according to an intermediate zero vector action time; taking the motor parameters and the control parameters as inputs, and calculating the q-axis current deviation value by using the calculation mode; compensating a sampling current value according to the q-axis current deviation value, and performing motor control according to the compensated sampling current value. The application identifies that the main reason for the zero torque control deviation is the current sampling filtering effect, so by combining the motor parameters and the control parameters, the current change rule caused by the filtering effect can be predicted, the q-axis current deviation value can be accurately calculated, the sampling current value can be reasonably compensated, the actual output torque of the motor under the zero torque working condition is closer to the theoretical zero value, and the precision and reliability of the control system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control, and more specifically, to a method and system for motor control based on current compensation. Background Technology

[0002] Zero torque control is a crucial operating condition in motor control, widely used in scenarios such as vehicle coasting, material conveyor belt idling, precision machining, robot joint freefall, and servo motor weightlessness simulation. In practical applications, when the motor controller is set to zero torque, the system cannot achieve a truly zero torque state; this manifests as non-zero motor phase current and non-zero actual output torque. This phenomenon affects the accuracy of vehicle drag resistance testing, overall vehicle energy consumption testing results, and the performance of precision machining equipment.

[0003] Therefore, how to improve the accuracy of zero-torque control of motors is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] To address one or more deficiencies in the existing technology, the present invention provides a method and system for motor control based on current compensation.

[0005] A method for motor control based on current compensation, comprising:

[0006] Obtain motor parameters and control parameters in zero-torque control mode;

[0007] The intermediate zero vector action time is determined based on the control parameters, and the calculation method for the q-axis current deviation value is determined based on the intermediate zero vector action time.

[0008] Using the motor parameters and the control parameters as inputs, the q-axis current deviation value is calculated using the calculation method described above;

[0009] The sampled current value is compensated based on the q-axis current deviation value, and the motor is controlled based on the compensated sampled current value.

[0010] Optionally, the control parameters include the three-phase duty cycle and the time constant of each filter;

[0011] The method for determining the intermediate zero vector action time based on the control parameters and for determining the q-axis current deviation value based on the intermediate zero vector action time includes:

[0012] The duration of action of the intermediate zero vector is determined based on the three-phase duty cycle.

[0013] The first time threshold is determined based on the time constant of each of the filters;

[0014] Determine whether the duration of action of the intermediate zero vector is less than the first time threshold;

[0015] If so, then the calculation method for the q-axis current deviation value is determined to be the first calculation method;

[0016] If not, then the calculation method for the q-axis current deviation value is determined to be the second calculation method.

[0017] Optionally, when the calculation method for the q-axis current deviation is the first calculation method, the step of calculating the q-axis current deviation using the motor parameters and the control parameters as inputs and the calculation method includes:

[0018] Based on the motor parameters, ripple current reconstruction and filtering effect calculation are performed to obtain the q-axis current deviation value.

[0019] Optionally, the control parameters may also include rotor position;

[0020] Based on the motor parameters, ripple current reconstruction is performed, including:

[0021] A seven-segment voltage vector sequence is determined based on the three-phase duty cycle, and the q-axis voltage corresponding to each segment of the voltage vector is determined based on the rotor position and the seven-segment voltage vector sequence.

[0022] Calculate the current slope corresponding to each voltage vector segment based on the q-axis voltage, and determine the q-axis current at the intersection of each voltage vector segment;

[0023] Using the q-axis current as the initial condition, the actual current at the intersection of each voltage vector segment is calculated iteratively.

[0024] Optionally, the filter may include a first-order low-pass filter;

[0025] The step of reconstructing the ripple current and calculating the filtering effect based on the motor parameters to obtain the q-axis current deviation value includes:

[0026] Based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment, the sampling current value of the first-order low-pass filter is calculated.

[0027] Using the sampled current value as the initial condition, iteratively update the sampled current value at the intersection point of each voltage vector segment;

[0028] The q-axis current deviation value is determined based on the sampled current value at the intersection point of each updated voltage vector segment.

[0029] Optionally, the filter may include a non-first-order low-pass filter;

[0030] The step of reconstructing the ripple current and calculating the filtering effect based on the motor parameters to obtain the q-axis current deviation value includes:

[0031] Based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment, the sampling current value of the non-first-order low-pass filter is calculated.

[0032] An augmented state variable is constructed based on the sampled current value, the actual current, and the current slope.

[0033] Determine the updated value of the augmented state variable, and determine the updated sampled current value based on the updated value of the augmented state variable;

[0034] Using the updated sampled current value as the initial condition, iteratively update the sampled current value at the intersection point of each voltage vector segment;

[0035] The q-axis current deviation value is determined based on the sampled current value at the intersection point of each updated voltage vector segment.

[0036] Optionally, when the calculation method for the q-axis current deviation value is the second calculation method, the step of calculating the q-axis current deviation value using the motor parameters and the control parameters as inputs and the calculation method includes:

[0037] Calculate the slope of the q-axis current change in the intermediate zero vector action interval based on the motor parameters;

[0038] Determine whether the filter contains a non-first-order low-pass filter;

[0039] If so, the non-first-order low-pass filter is determined as a series set of multiple first-order low-pass filters.

[0040] The q-axis current deviation is calculated based on the time constants of all first-order low-pass filters and the slope of the q-axis current change.

[0041] A motor control system based on current compensation includes:

[0042] The acquisition module is used to acquire motor parameters and control parameters of the motor in zero-torque control mode;

[0043] The determination module is used to determine the intermediate zero vector action time based on the control parameters, and to determine the calculation method of the q-axis current deviation value based on the intermediate zero vector action time.

[0044] The calculation module is used to calculate the q-axis current deviation value using the motor parameters and the control parameters as inputs and the calculation method.

[0045] The control module is used to compensate the sampled current value according to the q-axis current deviation value, and to control the motor according to the compensated sampled current value.

[0046] An electronic device, comprising:

[0047] A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the current-compensated motor control method as described in any of the preceding embodiments.

[0048] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the current-compensated motor control method as described in any of the preceding claims.

[0049] The present invention provides a current-compensated motor control method, comprising: acquiring motor parameters and control parameters in zero-torque control mode; determining the intermediate zero vector action time based on the control parameters, and determining the calculation method for the q-axis current deviation value based on the intermediate zero vector action time; calculating the q-axis current deviation value using the motor parameters and control parameters as input; compensating the sampled current value based on the q-axis current deviation value, and controlling the motor based on the compensated sampled current value. This invention identifies the current sampling filtering effect as the main cause of zero-torque control deviation. Therefore, by combining motor parameters and control parameters, the current change pattern caused by the filtering effect can be predicted, and the q-axis current deviation value can be accurately calculated, thereby reasonably compensating the sampled current value. This process does not require additional hardware support and can be completed solely by the real-time computing power of the motor controller, reducing system modification costs. Controlling the motor using the compensated current signal makes the actual output torque of the motor under zero-torque conditions closer to the theoretical zero value, improving the accuracy and reliability of the control system. Attached Figure Description

[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a schematic diagram of a motor control system based on current compensation provided in an embodiment of the present invention;

[0052] Figure 2 for Figure 1 A flowchart illustrating an actual manifestation of step S02 in a current-compensated motor control method.

[0053] Figure 3 A flowchart of ripple current reconstruction provided in an embodiment of the present invention;

[0054] Figure 4 A flowchart for calculating the filtering effect provided in an embodiment of the present invention;

[0055] Figure 5 A flowchart for another filtering effect calculation provided in an embodiment of the present invention;

[0056] Figure 6 for Figure 1 A flowchart illustrating an actual manifestation of step S03 in a current-compensated motor control method.

[0057] Figure 7 This is a schematic diagram of a motor control system based on current compensation provided in an embodiment of the present invention. Detailed Implementation

[0058] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0059] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0060] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0061] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0062] Zero torque control is a crucial operating condition in motor control, widely used in scenarios such as vehicle coasting, material conveyor belt idling, precision machining, robot joint freefall, and servo motor weightlessness simulation. In practical applications, when the motor controller is set to zero torque, the system cannot achieve a truly zero torque state; this manifests as non-zero motor phase current and non-zero actual output torque. This phenomenon affects the accuracy of vehicle drag resistance testing, overall vehicle energy consumption testing results, and the performance of precision machining equipment.

[0063] Therefore, the present invention provides a method and system for motor control based on current compensation to solve the above problems.

[0064] Please refer to Figure 1 The flowchart below shows a method for motor control based on current compensation provided in an embodiment of the present invention, which includes the following steps:

[0065] Step S01: Obtain the motor parameters and control parameters of the motor in zero torque control mode.

[0066] In this embodiment, the zero-torque control mode is the operating state where the motor controller sets the output torque to zero. In this mode, the motor does not generate additional torque, and its speed is determined solely by the external load. Motor parameters refer to inherent physical characteristics of the motor, such as the d-axis inductance, q-axis inductance, and permanent magnet flux linkage. Control parameters include system operating data such as motor speed, duty cycle in the PWM (Pulse-Width Modulation) waveform, voltage vector duration, and time constants of each filter. Obtaining the motor parameters and control parameters in the zero-torque control mode provides a data foundation for subsequent calculations of the q-axis current deviation.

[0067] In some embodiments, motor parameters can be obtained by directly testing the d-axis and q-axis inductances using precision measuring equipment, or by using finite element analysis software to simulate the internal magnetic field distribution of the motor to determine the permanent magnet flux linkage value. For control parameters, the real-time monitoring function of the motor controller can be utilized; for example, the motor speed can be obtained through an encoder, the phase current waveform can be acquired through a current sensor, and the voltage vector action time can be calculated in conjunction with the PWM control signal.

[0068] Step S02: Determine the intermediate zero vector action time based on the control parameters, and determine the calculation method for the q-axis current deviation value based on the intermediate zero vector action time.

[0069] In this embodiment, the intermediate zero vector action time refers to the time period during which the zero voltage vector at a specific position continuously acts in the seven-segment SVPWM (Space Vector Pulse Width Modulation) modulation sequence; seven-segment SVPWM modulation is a commonly used pulse width modulation technique in motor control, which divides a switching cycle into seven different stages and applies voltage vectors in a specific order; the q-axis current deviation value represents the difference between the actual measured q-axis current and the theoretical expected value in zero torque control mode.

[0070] This embodiment determines the q-axis current deviation based on the duration of the intermediate zero vector. This is because the current sampling system exhibits different signal response characteristics for different durations. When the intermediate zero vector duration is long, the current change is relatively gradual, and a simple integration method is sufficient to accurately calculate the deviation. However, when the intermediate zero vector duration is short, current fluctuations are significant, requiring ripple current reconstruction and filtering effect analysis to accurately derive the deviation. This approach of selecting different calculation methods based on the intermediate zero vector duration adapts to the current variation characteristics under various operating conditions, ensuring the accuracy of deviation calculation and thus achieving effective compensation control.

[0071] The specific implementation of step S02 can be referred to the embodiments shown in subsequent steps S11 to S15, which will not be repeated here.

[0072] Step S03: Using motor parameters and control parameters as input, calculate the q-axis current deviation value using a calculation method.

[0073] In this embodiment, after determining the calculation method for the q-axis current deviation, the system uses motor parameters and control parameters as inputs to calculate the q-axis current deviation using this method. This step ensures the accurate calculation of the q-axis current deviation, which is a key step in achieving zero-torque control accuracy and provides a data foundation for subsequent compensation of the sampled current value.

[0074] The specific implementation of step S03 can be referred to the embodiments shown in subsequent steps S21 to S23, S31 to S33, S41 to S45, and S51 to S54, which will not be repeated here.

[0075] Step S04: Compensate the sampled current value based on the q-axis current deviation value, and control the motor based on the compensated sampled current value.

[0076] In this embodiment, the system compensates for the sampled current value based on the q-axis current deviation and then controls the motor based on the compensated sampled current value. This process allows the system to reasonably compensate for the sampled current value without relying on additional hardware, and to execute motor control using the corrected sampled current value. This makes the actual output of the motor under zero torque conditions closer to the theoretical zero value, thereby improving the accuracy and reliability of the control system while reducing system modification costs.

[0077] In some embodiments, the system can process the q-axis current deviation value using a compensation algorithm (such as a PI compensator, observer, or Kalman filter) and then superimpose it onto the sampled current value to obtain a compensated sampled current value. Then, the compensated sampled current value is used as feedback input to the current loop PI controller, which, together with the d-axis current, generates a voltage command. This command is then modulated by SVPWM to drive the inverter, achieving precise vector control of the motor.

[0078] Based on the above technical solution, the current-compensated motor control method provided in this embodiment of the invention acquires the motor parameters and control parameters of the motor in zero-torque control mode; determines the intermediate zero vector action time based on the control parameters, and determines the calculation method for the q-axis current deviation value based on the intermediate zero vector action time; calculates the q-axis current deviation value using the motor parameters and control parameters as input; compensates the sampled current value based on the q-axis current deviation value, and performs motor control based on the compensated sampled current value. This invention identifies the main cause of zero-torque control deviation as the current sampling filtering effect. Therefore, by combining the motor parameters and control parameters, the current change pattern caused by the filtering effect can be predicted, and the q-axis current deviation value can be accurately calculated, thereby reasonably compensating the sampled current value. This process does not require additional hardware support and can be completed solely by the real-time computing power of the motor controller, reducing system modification costs. Using the compensated current signal for motor control makes the actual output torque of the motor under zero-torque conditions closer to the theoretical zero value, improving the accuracy and reliability of the control system.

[0079] Please refer to Figure 2 ,for Figure 1 A flowchart illustrating a practical manifestation of step S02 in a current-compensated motor control method.

[0080] In some embodiments, control parameters may include the three-phase duty cycle and the time constant of each filter.

[0081] Based on this, step S02 may include, for example: Figure 2 The steps shown are as follows:

[0082] Step S11: Determine the action time of the intermediate zero vector based on the three-phase duty cycle.

[0083] In this embodiment, the three-phase duty cycle represents the proportion of the conduction time of the three-phase bridge arm of the motor. The system uses the three-phase duty cycle to determine the duration of the zero vector within a specific time period, i.e. the duration of the intermediate zero vector, thereby providing a basis for determining the subsequent calculation method of the q-axis current deviation value.

[0084] For example, in a seven-segment SVPWM modulation, the intermediate zero vector corresponds to segment 4, and its duration can be calculated using T4 = Γs - (T1 + T2 + T3 + T5 + T6 + T7), where Γs is one complete cycle of the seven-segment SVPWM modulation. When the three-phase duty cycles are Duty_A, Duty_B, and Duty_C, the system calculates the duration of each phase voltage vector based on these parameters, and then derives the specific duration of the intermediate zero vector.

[0085] Step S12: Determine the first time threshold based on the time constant of each filter.

[0086] In this embodiment, the time constant of the filter represents the delay time when the current signal passes through the filtering stage, and each filter has its own time constant. The first time threshold is a critical time point used to distinguish the calculation method of the q-axis current deviation value. The system calculates the first time threshold using the time constant of each filter during the current sampling process, which is used to subsequently determine which calculation method should be used in the current working state.

[0087] For example, the first time threshold can be set to 5 times the maximum value of the time constants of all filters, i.e., 5τmax, where τmax is the maximum value among all filter time constants. This process does not require complex calculations; it simply involves comparing all filter time constants, taking the maximum value, and multiplying it by a fixed coefficient. The resulting first time threshold can reflect the response characteristics of the entire sampling system.

[0088] Step S13: Determine whether the action time of the intermediate zero vector is less than the first time threshold.

[0089] If yes, proceed to step S14; otherwise, proceed to step S15.

[0090] Step S14: Determine the calculation method for the q-axis current deviation as the first calculation method.

[0091] In this embodiment, the system selects a calculation method suitable for the current operating condition by comparing the intermediate zero vector's action time with a first time threshold. When the intermediate zero vector's action time is less than the first time threshold, it indicates that the intermediate zero vector's action time is short, and the current ripple effect is significant. A complex ripple current reconstruction and filtering effect calculation method is needed to accurately reflect the actual situation. In this case, the calculation method for the q-axis current deviation value is determined to be the first calculation method, namely the ripple current reconstruction and filtering effect calculation method.

[0092] Step S15: Determine the calculation method for the q-axis current deviation as the second calculation method.

[0093] In this embodiment, when the intermediate zero vector action time is greater than or equal to the first time threshold, it indicates that when the intermediate zero vector action time is long, the current change is relatively smooth. If a complex ripple current reconstruction method is used, additional errors may be introduced. At this time, the calculation method of the q-axis current deviation value can be determined as the second calculation method (for example, calculating the q-axis current deviation value by the current slope). This method is simple and accurate.

[0094] In some embodiments, when the q-axis current deviation value is calculated using the first calculation method, the calculation process for the q-axis current deviation value may include the following steps:

[0095] Based on the motor parameters, ripple current reconstruction and filtering effect calculation are performed to obtain the q-axis current deviation value.

[0096] In this embodiment, ripple current reconstruction is used to reconstruct the actual waveform of the current under PWM modulation, and the filtering effect calculation is used to determine the response characteristics of the current signal after passing through the filter. When the intermediate zero vector has a short duration, the current ripple has a significant impact on the measurement results, and simple slope calculation cannot accurately reflect the actual situation. By reconstructing the ripple current and calculating the filtering effect, the variation law of the current during the switching cycle and its variation characteristics after passing through the filter can be accurately simulated, making the calculated q-axis current deviation value closer to the true value.

[0097] Please refer to Figure 3 This is a flowchart of a ripple current reconstruction provided in an embodiment of the present invention.

[0098] In some embodiments, the control parameters may also include rotor position.

[0099] Based on this, the ripple current reconstruction process in the above embodiments may include, for example: Figure 3 The steps shown are as follows:

[0100] Step S21: Determine the seven-segment voltage vector sequence based on the three-phase duty cycle, and determine the q-axis voltage corresponding to each segment of the voltage vector based on the rotor position and the seven-segment voltage vector sequence.

[0101] In this embodiment, the seven-segment voltage vector sequence is the arrangement order of the seven basic voltage vectors in SVPWM modulation, the rotor position is the current angle information of the motor rotor, and the q-axis voltage is the component of the voltage vector in the q-axis direction in the rotating coordinate system. The system determines the seven-segment voltage vector sequence based on the three-phase duty cycle, and determines the q-axis voltage corresponding to each segment of the voltage vector based on the rotor position and the seven-segment voltage vector sequence, providing basic data for subsequent q-axis current calculation.

[0102] In some embodiments, the system can first calculate the rotor position at the center of each voltage vector segment according to formula (1):

[0103] (1)

[0104] in, The rotor position is the position corresponding to the center time of the voltage vector of segment x. This is the current rotor position. At the moment when the voltage vector of segment i is centered, The time at which the voltage vector of segment x is centered. This represents the motor speed.

[0105] Then, the system calculates the q-axis voltage corresponding to each voltage vector segment according to formula (2):

[0106] (2)

[0107] in, Let x be the q-axis voltage corresponding to the x-th voltage vector. The Parker transformation matrix is ​​used to convert voltages in a three-phase stationary coordinate system to voltages in a two-phase rotating coordinate system. This matrix varies with the rotor position. Change with change. The three-phase voltage values ​​of the x-th voltage vector segment can be obtained from the seven-segment voltage vector sequence.

[0108] Step S22: Calculate the current slope corresponding to each voltage vector segment based on the q-axis voltage, and determine the q-axis current at the intersection of each voltage vector segment.

[0109] In this embodiment, the system uses the q-axis voltage to calculate the current slope corresponding to each voltage vector segment and determines the current value at the connection point of adjacent voltage vector action intervals. Here, the q-axis current is the current component perpendicular to the d-axis in the motor control coordinate system, and the current slope represents the rate of current change with time. This process is a crucial step in current waveform reconstruction, providing fundamental data for subsequent filtering effect calculations.

[0110] In some embodiments, the system can calculate the current slope according to formula (3):

[0111] (3)

[0112] in, Let x be the current slope corresponding to the voltage vector of segment x. It is the q-axis inductance. It is a permanent magnet flux linkage.

[0113] Then, assuming the initial q-axis current is zero, the system calculates the q-axis current at the intersection of each voltage vector according to formula (4):

[0114] (4)

[0115] in, Let be the q-axis current at the intersection of the x-th voltage vector and the (x+1)-th voltage vector.

[0116] Step S23: Using the q-axis current as the initial condition, iteratively calculate the actual current at the intersection of each voltage vector segment.

[0117] In this embodiment, the system uses the q-axis current obtained from the previous calculation as a starting point, and corrects the current values ​​at the intersection points of each voltage vector by repeated calculations to make them closer to the actual operating state, so as to solve the problem of current calculation deviation caused by the initial assumption error and ensure that the calculation results conform to the actual working characteristics of the motor.

[0118] In some embodiments, the system can iteratively calculate the actual current at the intersection of each voltage vector segment according to formula (5):

[0119] (5)

[0120] in, Let x be the actual current at the intersection of the x-th voltage vector and the (x+1)-th voltage vector. This is the q-axis current at the end of the 7th voltage vector segment.

[0121] Since the directly calculated q-axis current often does not meet the periodicity condition of the steady-state signal (i.e., the seventh segment current is inconsistent with the first segment current), this inconsistency can be eliminated by using the seventh segment current as the initial condition for iteration, making the calculation results more consistent with the actual operating conditions. In zero-torque control mode, accurate current waveforms are crucial for calculating the q-axis current deviation, and iterative calculation can effectively correct errors caused by initial assumptions, improving the accuracy of current calculation. This helps to make the subsequent current compensation process more accurate, thereby improving the overall performance of motor control.

[0122] Please refer to Figure 4 This is a flowchart of a filtering effect calculation provided in an embodiment of the present invention.

[0123] In some embodiments, the filter may include a first-order low-pass filter.

[0124] Based on this, the process of calculating the filtering effect in the above embodiments may include, for example: Figure 4 The steps shown are as follows:

[0125] Step S31: Calculate the sampling current value of the first-order low-pass filter based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment.

[0126] In this embodiment, the first-order low-pass filter is a simple signal smoothing circuit, and the sampled current value is the measurement result output by the filter. Calculating the sampled current value of the first-order low-pass filter based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment means that the system uses the actual value and rate of change of the current at the voltage vector connection point, combined with the filter characteristics, to calculate the current measurement value after filtering. This process simulates the changing characteristics of the actual current signal passing through the filtering stage, providing accurate input for subsequent deviation calculation.

[0127] In some embodiments, the system can iteratively calculate the sampled current value at the intersection of each voltage vector segment according to formula (6):

[0128] (6)

[0129] in, This represents the sampled current value at the intersection of the (x+1)th and (x+2)th voltage vector segments. This represents the sampled current value at the intersection of the x-th voltage vector and the (x+1)-th voltage vector. Let τ be the time attenuation coefficient of the first-order low-pass filter, and τ be the time constant of the first-order low-pass filter. Let be the actual current at the intersection of the x-th voltage vector and the (x+1)-th voltage vector.

[0130] Because current sampling in a motor control system involves filtering, directly using the actual current will result in a discrepancy between the measured value and the actual sampling result. By considering the characteristics of the filter, the actual sampling process can be accurately simulated, making the calculated sampled current value closer to the true measured value.

[0131] Step S32: Using the sampled current value as the initial condition, iteratively update the sampled current value at the intersection of each voltage vector segment.

[0132] In this embodiment, the sampled current value at the intersection of each voltage vector segment is the actual measured value at the connection point of different voltage vector action intervals after the current signal has passed through the filtering stage. The system uses the sampled current value calculated in the previous step as an initial condition, and through repeated calculations, gradually brings the sampled current value at the intersection of each voltage vector segment closer to a stable value. This process solves the problem that a single calculation cannot meet the steady-state periodicity condition, making the sampled current value more consistent with the actual operating state.

[0133] In some embodiments, the system can use the seventh segment sampling current value calculated in the previous step as the initial condition to recalculate the sampling current values ​​of all segments. After multiple iterations, the results gradually stabilize and meet the preset convergence conditions. At this time, the sampling current value at the intersection of the voltage vectors of each segment is determined according to the iteration results.

[0134] Since the sampled current value obtained from a single calculation typically does not meet the steady-state periodicity condition of the motor control system (i.e., the current values ​​in the first and seventh segments are inconsistent), this inconsistency can be eliminated by using the sampled current value of the seventh segment as the initial condition for iteration. This makes the calculation results more consistent with the actual operating state. This helps to make the subsequent current compensation process more accurate, thereby improving the overall performance of the motor control and avoiding unexpected torque output caused by measurement errors.

[0135] Step S33: Determine the q-axis current deviation value based on the sampled current value at the intersection point of each updated voltage vector segment.

[0136] In this embodiment, after updating the sampled current values ​​at the intersection points of each voltage vector segment, the system uses the updated sampled current values ​​to calculate the difference between the current sampled values ​​and the theoretical values, i.e., the q-axis current deviation value, through a specific calculation method.

[0137] In some embodiments, the system can iteratively calculate the q-axis current deviation value according to formula (7):

[0138] (7)

[0139] in, This represents the q-axis current deviation value. This refers to the sampled current value at the intersection of the updated third and fourth voltage vector segments. This refers to the sampled current value at the intersection of the updated fourth and fifth voltage vector segments.

[0140] The current change during the intermediate zero vector action period best reflects the hysteresis error characteristics introduced by the filter. Therefore, in this embodiment, the sampled current values ​​at the intersection of two adjacent voltage vector segments are averaged to effectively eliminate the influence of random fluctuations at a single sampling point, while retaining the main systematic error components.

[0141] Please refer to Figure 5 This is a flowchart of another filtering effect calculation provided in an embodiment of the present invention.

[0142] In some embodiments, the filter may include a non-first-order low-pass filter.

[0143] Based on this, the process of calculating the filtering effect in the above embodiments may include, for example: Figure 5 The steps shown are as follows:

[0144] Step S41: Calculate the sampling current value of the non-first-order low-pass filter based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment.

[0145] The specific implementation process of this step is the same as that of step S31, the only difference being that the target is changed from a first-order low-pass filter to a non-first-order low-pass filter, which will not be described in detail here.

[0146] Step S42: Construct augmented state variables based on the sampled current value, the actual current, and the current slope.

[0147] In this embodiment, the augmented state variables are an ordered set of sampled current values, actual current, and current slope, represented in vector form, to comprehensively describe the dynamic characteristics of the current during the switching cycle. This representation facilitates subsequent calculation and analysis of the characteristics of non-first-order low-pass filters, provides fundamental data support for current waveform reconstruction, and makes the entire calculation process more systematic and standardized.

[0148] In some embodiments, the augmented state variable can be represented as:

[0149]

[0150] in, To augment state variables.

[0151] Because non-first-order low-pass filters have complex dynamic response characteristics, a single parameter cannot fully describe their impact on the current signal. By combining the sampled current value, the actual current, and the current slope into an augmented state variable, the variation of the current in the filtering stage can be comprehensively reflected, facilitating subsequent matrix operations and state updates. This approach can more accurately simulate the characteristics of multi-order filters, improve the accuracy of current calculations, ensure more reliable calculation of the q-axis current deviation, and thus enhance the stability and accuracy of the motor control system.

[0152] Step S43: Determine the updated value of the augmented state variable, and determine the updated sampled current value based on the updated value of the augmented state variable.

[0153] In this embodiment, the system updates the augmented state variables, which include the sampled current value, the actual current, and the current slope, through specific mathematical operations to obtain an updated value that contains complete response information of the filter at the current time step. Then, a new sampled current value is extracted from the updated value to provide data support for subsequent deviation calculation.

[0154] In some embodiments, the system can calculate the updated value of the augmented state variable according to formula (8):

[0155] (8)

[0156] in, To augment the updated values ​​of state variables, This is the state transition matrix obtained through matrix exponentiation. The augmented state matrix, The calculation satisfies formula (9) to calculate the updated value of the augmented state variable:

[0157] (9)

[0158] In formula (9), A and B are both state matrices determined by the filter transfer function. When the transfer function of a non-first-order low-pass filter satisfies formula (10):

[0159] (10)

[0160] The state matrix satisfies formula (11):

[0161] (11)

[0162] Where H(s) is the transfer function of the non-first-order low-pass filter, describing the output characteristics of the input signal after passing through the filter; G1(s), G2(s), ..., Gk(s) are the first-order low-pass filter elements connected in series in the non-first-order low-pass filter; d is the number of first-order low-pass filter elements contained in the non-first-order low-pass filter; b1, b2, ..., bd are the gain coefficients of each first-order low-pass filter element; a1, a2, ..., ad are the time constant related parameters of each first-order low-pass filter element; and s is the complex frequency variable in the Laplace transform.

[0163] Step S44: Using the updated sampled current value as the initial condition, iteratively update the sampled current value at the intersection of each voltage vector segment.

[0164] The specific implementation process of this step is the same as that of step S32, and will not be repeated here.

[0165] Step S45: Determine the q-axis current deviation value based on the sampled current value at the intersection point of each updated voltage vector segment.

[0166] The specific implementation process of this step is the same as that of step S33, and will not be repeated here.

[0167] Please refer to Figure 6 ,for Figure 1 A flowchart illustrating a practical manifestation of step S03 in a current-compensated motor control method.

[0168] When the q-axis current deviation is calculated using the second calculation method, step S03 may include, for example: Figure 6 The steps shown are as follows:

[0169] Step S51: Calculate the slope of the q-axis current change in the intermediate zero vector action interval based on the motor parameters.

[0170] In this embodiment, the slope of the q-axis current change is the rate of change of the q-axis current over time during the intermediate zero-vector action interval. The system uses motor parameters to calculate the slope of the q-axis current change during the intermediate zero-vector action interval, which can serve as the basis for calculating the q-axis current deviation value. This reflects the dynamic characteristics of the current during the zero-vector action period and provides key data support for subsequent compensation.

[0171] In some embodiments, the system can calculate the slope of the q-axis current change in the intermediate zero vector action interval according to formula (12):

[0172] (12)

[0173] in, The slope of the q-axis current change in the middle zero vector action interval is 4. 4 represents the zero vector number at the sampling point when using seven-segment SVPWM modulation. The zero vector is ordered as edge 0, effective 1, effective 2-, middle 0, effective 2, effective 1, edge 0. The number of the middle zero vector action interval is 4.

[0174] During the zero-vector action period, the change in q-axis current is mainly affected by the motor back EMF and q-axis inductance. By calculating the slope of the q-axis current change, the dynamic change law of the current during the zero-vector action period can be accurately reflected, providing a reliable basis for subsequent q-axis current deviation calculations.

[0175] Step S52: Determine whether the filter contains a non-first-order low-pass filter.

[0176] If yes, proceed to step S53; otherwise, proceed to step S54.

[0177] Step S53: Determine the non-first-order low-pass filter as a cascaded set of multiple first-order low-pass filters.

[0178] In this embodiment, when the filter includes non-first-order low-pass filters, the calculation process is quite complex if performed directly. Therefore, the system defines the non-first-order low-pass filters as a series set of multiple first-order low-pass filters to simplify the calculation process. After decomposition into first-order filters, a unified algorithm can be used to process them, making the current calculation more efficient while maintaining the accuracy of the filtering characteristics.

[0179] After performing step S53, proceed to step S54 to calculate the q-axis current deviation value.

[0180] Step S54: Calculate the q-axis current deviation value based on the time constants of all first-order low-pass filters and the slope of the q-axis current change.

[0181] In this embodiment, the system uses the time constant and q-axis current change slope of each first-order low-pass filter to calculate the q-axis current deviation value, thereby accurately quantifying the measurement error caused by the filtering effect and providing data support for subsequent current compensation.

[0182] In some embodiments, the system can calculate the q-axis current deviation value according to formula (13):

[0183] (13)

[0184] in, Here is the q-axis current deviation value, and ORDER is the total order. Let be the time constant of the i-th first-order low-pass filter.

[0185] In this embodiment, when the intermediate zero vector action time is greater than or equal to the first time threshold, it indicates that the current change is relatively smooth when the intermediate zero vector action time is long. At this time, by adding the time constants of all first-order low-pass filters and multiplying them by the slope of the q-axis current change, the q-axis current deviation value can be obtained, and the influence of the entire filtering system on the current signal can be accurately estimated.

[0186] Please refer to Figure 7 This is a schematic diagram of a motor control system based on current compensation provided in an embodiment of the present invention. Figure 7 As shown, the current-compensated motor control system may include:

[0187] The acquisition module 100 is used to acquire motor parameters and control parameters of the motor in zero torque control mode;

[0188] The module 200 is used to determine the intermediate zero vector action time based on the control parameters, and to determine the calculation method of the q-axis current deviation value based on the intermediate zero vector action time.

[0189] Calculation module 300 is used to calculate the q-axis current deviation value by taking motor parameters and control parameters as input.

[0190] The control module 400 is used to compensate the sampled current value based on the q-axis current deviation value, and to control the motor based on the compensated sampled current value.

[0191] Based on the above embodiments, in some embodiments, the control parameters include the three-phase duty cycle and the time constant of each filter;

[0192] The determining module 200 can specifically be used for:

[0193] The duration of action of the intermediate zero vector is determined based on the three-phase duty cycle.

[0194] The first time threshold is determined based on the time constant of each filter;

[0195] Determine whether the duration of action of the intermediate zero vector is less than the first time threshold;

[0196] If so, then the calculation method for the q-axis current deviation value is determined to be the first calculation method;

[0197] If not, then the calculation method for the q-axis current deviation value is determined to be the second calculation method.

[0198] Based on the above embodiments, in some embodiments, the computing module 300 may specifically be used for:

[0199] When the q-axis current deviation is calculated using the first calculation method, the ripple current is reconstructed and the filtering effect is calculated based on the motor parameters to obtain the q-axis current deviation.

[0200] Based on the above embodiments, in some embodiments, the control parameters also include rotor position;

[0201] Specifically, this computing module 300 can be used for:

[0202] The seven-segment voltage vector sequence is determined based on the three-phase duty cycle, and the q-axis voltage corresponding to each segment of the voltage vector is determined based on the rotor position and the seven-segment voltage vector sequence.

[0203] Calculate the current slope corresponding to each voltage vector segment based on the q-axis voltage, and determine the q-axis current at the intersection of each voltage vector segment;

[0204] Using the q-axis current as the initial condition, the actual current at the intersection of each voltage vector segment is calculated iteratively.

[0205] Based on the above embodiments, in some embodiments, the filter includes a first-order low-pass filter;

[0206] Specifically, this computing module 300 can be used for:

[0207] Based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment, the sampling current value of the first-order low-pass filter is calculated.

[0208] Using the sampled current value as the initial condition, iteratively update the sampled current value at the intersection point of each voltage vector segment;

[0209] The q-axis current deviation is determined based on the sampled current values ​​at the intersection points of the updated voltage vectors.

[0210] Based on the above embodiments, in some embodiments, the filter includes a non-first-order low-pass filter;

[0211] Specifically, this computing module 300 can be used for:

[0212] Based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment, the sampling current value of the non-first-order low-pass filter is calculated.

[0213] An augmented state variable is constructed based on the sampled current value, the actual current, and the current slope.

[0214] Determine the updated values ​​of the augmented state variables, and determine the updated sampled current values ​​based on the updated values ​​of the augmented state variables;

[0215] Using the updated sampled current value as the initial condition, iteratively update the sampled current value at the intersection point of each voltage vector segment;

[0216] The q-axis current deviation is determined based on the sampled current values ​​at the intersection points of the updated voltage vectors.

[0217] Based on the above embodiments, in some embodiments, the computing module 300 may specifically be used for:

[0218] When the q-axis current deviation is calculated using the second calculation method, the slope of the q-axis current change in the intermediate zero vector action interval is calculated based on the motor parameters.

[0219] Determine whether the filter contains a non-first-order low-pass filter;

[0220] If so, the non-first-order low-pass filter is determined as a cascaded set of multiple first-order low-pass filters.

[0221] The q-axis current deviation is calculated based on the time constants of all first-order low-pass filters and the slope of the q-axis current change.

[0222] This embodiment provides an electronic device, including a processor and a memory. The memory is used to store at least one instruction. When the instruction is loaded and executed by the processor, it implements the above-described method for motor control based on current compensation. Its execution method and beneficial effects are similar and will not be described again here.

[0223] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for motor control based on current compensation. The execution method and beneficial effects are similar and will not be described again here.

[0224] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.

[0225] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for motor control based on current compensation, characterized in that, include: Obtain motor parameters and control parameters in zero-torque control mode; The intermediate zero vector action time is determined based on the control parameters, and the calculation method for the q-axis current deviation value is determined based on the intermediate zero vector action time. Using the motor parameters and the control parameters as inputs, the q-axis current deviation value is calculated using the calculation method described above; The sampled current value is compensated based on the q-axis current deviation value, and the motor is controlled based on the compensated sampled current value.

2. The method according to claim 1, characterized in that, The control parameters include the three-phase duty cycle and the time constant of each filter; The method for determining the intermediate zero vector action time based on the control parameters and for determining the q-axis current deviation value based on the intermediate zero vector action time includes: The duration of action of the intermediate zero vector is determined based on the three-phase duty cycle. The first time threshold is determined based on the time constant of each of the filters; Determine whether the duration of action of the intermediate zero vector is less than the first time threshold; If so, then the calculation method for the q-axis current deviation value is determined to be the first calculation method; If not, then the calculation method for the q-axis current deviation value is determined to be the second calculation method.

3. The method according to claim 2, characterized in that, When the calculation method for the q-axis current deviation is the first calculation method, the step of calculating the q-axis current deviation using the motor parameters and the control parameters as inputs and the calculation method includes: Based on the motor parameters, ripple current reconstruction and filtering effect calculation are performed to obtain the q-axis current deviation value.

4. The method according to claim 3, characterized in that, The control parameters also include rotor position; Based on the motor parameters, ripple current reconstruction is performed, including: A seven-segment voltage vector sequence is determined based on the three-phase duty cycle, and the q-axis voltage corresponding to each segment of the voltage vector is determined based on the rotor position and the seven-segment voltage vector sequence. Calculate the current slope corresponding to each voltage vector segment based on the q-axis voltage, and determine the q-axis current at the intersection of each voltage vector segment; Using the q-axis current as the initial condition, the actual current at the intersection of each voltage vector segment is calculated iteratively.

5. The method according to claim 4, characterized in that, The filters include first-order low-pass filters; The step of reconstructing the ripple current and calculating the filtering effect based on the motor parameters to obtain the q-axis current deviation value includes: Based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment, the sampling current value of the first-order low-pass filter is calculated. Using the sampled current value as the initial condition, iteratively update the sampled current value at the intersection point of each voltage vector segment; The q-axis current deviation value is determined based on the sampled current value at the intersection point of each updated voltage vector segment.

6. The method according to claim 4, characterized in that, Filters include non-first-order low-pass filters; The step of reconstructing the ripple current and calculating the filtering effect based on the motor parameters to obtain the q-axis current deviation value includes: Based on the actual current at the intersection of each voltage vector segment and the current slope corresponding to each voltage vector segment, the sampling current value of the non-first-order low-pass filter is calculated. An augmented state variable is constructed based on the sampled current value, the actual current, and the current slope. Determine the updated value of the augmented state variable, and determine the updated sampled current value based on the updated value of the augmented state variable; Using the updated sampled current value as the initial condition, iteratively update the sampled current value at the intersection point of each voltage vector segment; The q-axis current deviation value is determined based on the sampled current value at the intersection point of each updated voltage vector segment.

7. The method according to claim 2, characterized in that, When the calculation method for the q-axis current deviation is the second calculation method, the step of calculating the q-axis current deviation using the motor parameters and the control parameters as inputs and the calculation method includes: Calculate the slope of the q-axis current change in the intermediate zero vector action interval based on the motor parameters; Determine whether the filter contains a non-first-order low-pass filter; If so, the non-first-order low-pass filter is determined as a series set of multiple first-order low-pass filters. The q-axis current deviation is calculated based on the time constants of all first-order low-pass filters and the slope of the q-axis current change.

8. A motor control system based on current compensation, characterized in that, include: The acquisition module is used to acquire motor parameters and control parameters of the motor in zero-torque control mode; The determination module is used to determine the intermediate zero vector action time based on the control parameters, and to determine the calculation method of the q-axis current deviation value based on the intermediate zero vector action time. The calculation module is used to calculate the q-axis current deviation value using the motor parameters and the control parameters as inputs and the calculation method. The control module is used to compensate the sampled current value according to the q-axis current deviation value, and to control the motor according to the compensated sampled current value.

9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the current-compensated motor control method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the current-compensated motor control method as described in any one of claims 1-7.