Motor control methods and electric vehicles

By monitoring the DC bus current between the motor and the battery in real time and dynamically adjusting the lower limit of the torque current, the problem of voltage surge and zero-current stop-and-go racing during deep field weakening exit of permanent magnet synchronous motors is solved, thus improving the safety and reliability of the electric drive system.

CN123122375APending Publication Date: 2026-11-17GUANGDONG GOBAO INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611481144.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

When a permanent magnet synchronous motor exits deep field weakening, the magnetic energy stored in the inductance of the motor windings is easily released instantaneously, causing an abnormal surge in bus voltage. Furthermore, when stopping at zero current, the motor may continue to rotate at high speed, posing a safety risk.

Method used

By acquiring the real-time DC bus current between the motor and the battery, adjusting the lower limit of the torque current, dynamically adjusting the torque current command of the motor, blocking the energy feedback path and allowing braking torque output, the voltage surge and runaway phenomenon are prevented.

Benefits of technology

It effectively suppresses voltage spikes caused by weak magnetic field withdrawal, prevents damage to power devices, and ensures the safety and reliability of motor operation under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122375A_ABST
    Figure CN123122375A_ABST
Patent Text Reader

Abstract

This application discloses a motor control method and an electric vehicle. The method includes: acquiring the real-time current of the DC bus between the motor and the battery; dynamically adjusting the lower limit of the motor's torque current based on the real-time current to obtain a target dynamic lower limit value; adjusting the initial given command of the torque current according to the target dynamic lower limit value to obtain a target given command; and sending the target given command into the motor's current loop to control motor operation. This application utilizes the zero-delay response characteristic of current signals to energy flow to dynamically adjust the lower limit value of the torque current, thereby blocking energy feedback before voltage rise to prevent voltage surge, and allowing braking torque output during zero-command stop to prevent runaway, thus improving the safety and reliability of the electric drive system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor control technology, and in particular to a motor control method and an electric vehicle. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs) have become the mainstream solution for electric drive systems in new energy two-wheeled vehicles and automobiles due to their high efficiency, high power density, and excellent speed regulation performance. To meet the maximum speed requirements of the vehicle, PMSMs must have the capability for deep field weakening operation.

[0003] However, as the bus voltage platform continues to increase, the voltage safety margin becomes more strained. When the permanent magnet synchronous motor exits deep field weakening, the magnetic energy stored in the motor winding inductance is easily released instantaneously and flows into the DC bus capacitor, causing the bus voltage to surge abnormally.

[0004] Meanwhile, when the vehicle controller issues a zero-current stop command, if the motor is still rotating at high speed and the DC bus current is still positive, the motor may continue to rotate at high speed, resulting in a runaway phenomenon, which may cause uncontrollable safety risks. Summary of the Invention

[0005] Based on this, this application provides a motor control method and an electric vehicle, which can ensure the safe operation of the motor under complex working conditions such as deep field weakening and zero-current stopping, and improve the safety and reliability of the electric drive system.

[0006] In a first aspect, this application provides a motor control method, including: Obtain the real-time current of the DC bus between the motor and the battery; Based on the real-time current, the lower limit of the motor's torque current is adjusted to obtain the target dynamic lower limit of the torque current. Based on the target dynamic lower limit, the initial command for torque current is adjusted to obtain the target command. The target command is sent into the motor's current loop to control the motor's operation.

[0007] Optionally, based on the real-time current, the lower limit of the motor's torque current is adjusted to obtain the target dynamic lower limit of the torque current, including: If the real-time current is greater than the preset positive current threshold, the current change rate of the DC bus is generated. If the rate of change of current is less than the preset current drop slope threshold, the target dynamic lower limit value is obtained by raising the lower limit value of the motor torque current based on the real-time current.

[0008] Optionally, the motor control method further includes: If the real-time current is less than the preset negative current threshold, the maximum torque current of the motor is generated based on the rated maximum torque current of the motor. The initial command is adjusted based on the maximum torque current to obtain the target command.

[0009] Optionally, if the rate of change of current is less than a preset current decrease slope threshold, the target dynamic lower limit value is obtained by raising the lower limit of the motor torque current based on the real-time current positive increase, including: If the rate of change of current is less than the preset current drop slope threshold, obtain the energy recovery allow flag bit sent by the vehicle controller corresponding to the motor; If the energy recovery allow flag is a preset flag, the target dynamic lower limit value is obtained by raising the lower limit value of the motor torque current based on the real-time current.

[0010] Optionally, the target command is sent into the motor's current loop to control the motor's operation, including: If the rate of change of current is less than the preset current drop slope threshold, adjust the rate of change of the field weakening current of the motor to obtain the adjusted rate of change command. The target given command and / or the adjusted rate of change command are sent to the motor's current loop to control the motor's operation.

[0011] Optionally, based on the real-time current, the lower limit of the motor's torque current is adjusted to obtain the target dynamic lower limit of the torque current, including: Based on the rate of change of current, obtain at least one dynamic lower limit value from the mapping table between the dynamic lower limit value and the rate of change of current. Based on the motor speed corresponding to the rate of change of current, the target dynamic lower limit value is obtained from at least one dynamic lower limit value.

[0012] Optionally, based on the real-time current, the lower limit of the motor's torque current is adjusted to obtain the target dynamic lower limit of the torque current, including: If the real-time current is greater than the preset positive current threshold and the initial given command is zero, the lower limit of the motor's torque current is raised negatively based on the real-time current to obtain the target dynamic lower limit.

[0013] Optionally, the motor control method further includes: The current deviation of the DC bus is obtained based on the preset safe current threshold and the real-time current. Perform PI calculation on the current deviation to obtain the dynamic increment of the lower limit of the torque current; The dynamic increment is limited to obtain the target dynamic lower limit value.

[0014] Optionally, the dynamic increment is subjected to a limiting process to obtain the target dynamic lower limit value, including: If the rate of change of the DC bus current is less than the preset current drop slope threshold, the maximum torque current of the motor is generated based on the rated maximum torque current of the motor. Adjust the baseline lower limit of torque current to the first target lower limit; Based on the rated maximum torque current, adjust the lower limit of the torque current to the first target upper limit; Based on the first target lower limit and the first target upper limit, the dynamic increment is limited to obtain the target dynamic lower limit.

[0015] Optionally, before obtaining the current deviation of the DC bus based on a preset safe current threshold and real-time current, the method further includes: If the rate of change of current in the DC bus is less than the preset current drop slope threshold, the safety current threshold is adjusted to obtain the adjusted safety current threshold.

[0016] Optionally, the dynamic increment is subjected to a limiting process to obtain the target dynamic lower limit value, including: If the real-time current is greater than the preset positive current threshold and the initial given command is zero, the maximum braking current of the motor is generated based on the rated maximum torque current of the motor. Based on the maximum braking current, the basic lower limit of the torque current is adjusted to the second target lower limit. Based on the motor's rated maximum drive current, the lower limit of the torque current is adjusted to the second target upper limit. Based on the lower limit and upper limit of the second target, the dynamic increment is limited to obtain the dynamic lower limit of the target.

[0017] Optionally, the dynamic increment is subjected to a limiting process to obtain the target dynamic lower limit value, including: The dynamic increment is limited to obtain the initial dynamic lower limit value; The initial dynamic lower limit value is low-pass filtered to obtain the target dynamic lower limit value.

[0018] Optionally, the initial setpoint command for the torque current is adjusted according to the target dynamic lower limit value to obtain the target setpoint command, including: The maximum torque current of the motor is generated based on the rated maximum torque current of the motor. Based on the target dynamic lower limit and the maximum torque current, the initial given command is limited to obtain the target given command.

[0019] Optionally, an inverter is provided between the motor and the battery to obtain the real-time current of the DC bus between the motor and the battery, including: Obtain the real-time AC current between the motor and the inverter; Based on the law of conservation of charge, the real-time alternating current is processed to obtain the real-time current.

[0020] Optionally, based on the law of conservation of charge, the real-time alternating current is processed to obtain the real-time current, including: Based on the law of conservation of charge, the real-time alternating current is processed to obtain the initial current; The initial current is filtered and compensated to obtain the real-time current.

[0021] Optionally, an inverter is provided between the motor and the battery, and a current sensor is connected in series between the inverter and the DC bus to obtain the real-time current of the DC bus between the motor and the battery, including: Obtain the sampled value from the current sensor; The sampled values ​​are low-pass filtered to obtain the real-time current.

[0022] Optionally, the motor control method further includes: Obtain the real-time voltage of the DC bus; Based on the real-time voltage and real-time current, generate the real-time power at the DC bus; Based on the real-time power, adjust the lower limit of the motor's mechanical output power to obtain the dynamic lower limit of the mechanical output power; The initial command for the mechanical output power is adjusted based on the dynamic lower limit of the mechanical output power to control the motor operation.

[0023] Secondly, this application also provides an electric vehicle, including a motor controller, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the motor control method provided in the first aspect.

[0024] The motor control method provided in this application acquires the real-time current of the DC bus between the motor and the battery. Utilizing the zero-delay response characteristic of the current signal to changes in energy flow direction, it dynamically adjusts the lower limit of the motor's torque current to obtain a target dynamic lower limit. Based on this target dynamic lower limit, the initial setpoint command for the torque current is adjusted to obtain a target setpoint command, which is then sent into the motor's current loop to control motor operation. This allows for the prediction of energy feedback risks before a significant increase in the bus voltage. Consequently, when an abnormal downward trend in the bus current is detected, the lower limit of the torque current is raised to block the reverse energy flow path from the motor side to the DC bus. It effectively suppresses voltage spikes caused by field weakening exit and, when the control system command is zero but the motor is still detected to be in driving state, it negatively probes the lower limit of torque current to allow braking torque output and consume the motor's rotational kinetic energy. This effectively solves the technical problems that the DC bus is prone to unexpected abnormal voltage rise when the motor quickly exits from a deep field weakening state, and that the motor speed may run out of control when the control system issues a zero torque command for stopping or coasting. It avoids damage to power devices due to overvoltage surges or unexpected shutdown of the drive system, and also eliminates the safety hazards caused by the inability to brake at high speeds. It significantly improves the operational reliability, safety, and control accuracy of the electric drive system under complex dynamic conditions. Attached Figure Description

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

[0026] Figure 1 A schematic block diagram of an electric vehicle provided in an embodiment of this application; Figure 2 A schematic flowchart illustrating the motor control method provided in an embodiment of this application; Figure 3 A schematic block diagram of a motor control device provided in an embodiment of this application; Figure 4 This is a schematic block diagram of a motor controller provided in an embodiment of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0028] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0029] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0030] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0031] Furthermore, in this application, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication between two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific implementation.

[0032] In related technologies, in the permanent magnet synchronous motor drive system of electric two-wheelers and new energy vehicles, when the motor is running in a deep field weakening zone, if the driver suddenly releases the accelerator pedal or the vehicle controller issues a large torque reduction command, the rapid pullback of the d-axis field weakening current (id) during the motor's rapid exit from the deep field weakening state causes the magnetic energy stored in the motor winding inductance to be released instantaneously. The energy is rectified by the inverter's anti-parallel diodes and injected into the DC bus capacitor, causing an abnormal surge in the bus voltage, which may exceed the withstand voltage level of the power devices (IGBT / SiC MOSFET), causing device breakdown and damage; or it may accidentally trigger the hardware overvoltage protection mechanism of the motor controller, resulting in an unexpected shutdown of the drive output, loss of vehicle power, and a serious safety hazard.

[0033] Meanwhile, when the vehicle controller issues a zero-current stop command, if the motor is still rotating at high speed and the DC bus current is still positive (indicating that the motor is still being driven and not braked), it cannot generate braking torque to consume the motor's rotational kinetic energy, which may cause the motor to continue rotating at high speed, i.e., runaway, resulting in uncontrollable safety risks.

[0034] Currently, for voltage control and protection during motor field weakening operation, the industry mainly adopts the bus voltage closed-loop control method and the MTPV (Maximum Torque Per Voltage) lookup table control method.

[0035] For the bus voltage closed-loop control method, the DC bus voltage is monitored in real time. When the voltage exceeds the preset overvoltage protection threshold, a correction amount is applied to the d-axis or q-axis current command through a PI / PID controller to pull the bus voltage back within a safe range. For example, during motor braking, a braking voltage threshold Udc_brake is set, and the quadrature-axis current iq limit value is adjusted through P control or PI control according to the degree of voltage over-limit. For example, in field weakening control, the bus voltage is compared with the field weakening limit voltage, and a field weakening compensation current is output through a PI controller.

[0036] For the MTPV lookup table control method, the optimal d-axis current (id) and q-axis current (iq) setpoints that meet the voltage constraints under different speeds and different bus voltages are determined in advance through simulation or bench tests. These setpoints are then created into two-dimensional or multi-dimensional tables and stored in the controller. During operation, the controller looks up the table in real time based on the current speed and bus voltage to obtain the current command.

[0037] However, the bus voltage closed-loop control method is a reactive control strategy. Its causal chain is: field weakening exit → energy backflow → actual increase in bus voltage → voltage sensor detects over-limit → controller response and adjustment. Furthermore, voltage, as the controlled variable, has an inherent lag, and the energy storage characteristics of the bus capacitor give voltage changes inertia. By the time an over-limit is detected, energy backflow has already occurred, and the power devices have already experienced voltage surges. Repeated overvoltage surges accelerate the aging of the bus capacitor and the degradation of the IGBT, shortening the controller's lifespan. In addition, the response speed of the voltage closed loop is limited by the control cycle and the bandwidth of the PI regulator, and may not be able to respond in time under extreme conditions of deep field weakening and rapid exit.

[0038] The MTPV lookup table control method requires extensive calibration of the MTPV table for different speeds, bus voltages, and torque conditions, resulting in a huge calibration workload. Furthermore, the table is generated offline, covering limited operating conditions. Influenced by practical factors such as battery voltage variations, motor parameter temperature drift, and manufacturing differences, the lookup values ​​may deviate from the true optimal operating point. Moreover, MTPV is essentially an optimal efficiency control strategy rather than a safety protection strategy; its design goal is not to prevent voltage spikes, but to maximize voltage utilization. Without additional safety constraints, MTPV lookup tables cannot handle voltage spikes during rapid dynamic processes.

[0039] Therefore, this application provides a motor control method. Since current is the direct carrier of power and has zero-delay response characteristics to changes in the direction of energy flow, the method acquires the real-time current of the DC bus between the motor and the battery. Based on the real-time current, the lower limit of the motor's torque current is adjusted to obtain a target dynamic lower limit value for the torque current. According to the target dynamic lower limit value, the initial setpoint command for the torque current is adjusted to obtain a target setpoint command. The target setpoint command is then sent to the motor's current loop to control the motor's operation, thereby enabling real-time monitoring of the amplitude and changes of the DC bus current throughout the entire process. The trend is to anticipate the occurrence of energy feedback before the voltage rises, and dynamically adjust the lower limit of the torque current in both directions. By positively raising the lower limit of the torque current, the energy feedback path is limited, preventing voltage surges caused by field weakening exit; by negatively lowering the lower limit of the torque current, braking torque output is allowed during zero-current stopping, preventing runaway. Thus, without adding extra hardware, a unified current observation and torque current limiting mechanism solves the two major safety protection problems of voltage surges during field weakening exit and runaway during zero-current stopping, realizing a paradigm shift from reactive remediation to proactive prevention.

[0040] Please see Figure 1 , Figure 1 This is a schematic block diagram of an electric vehicle provided in an embodiment of this application.

[0041] In one embodiment, this application provides an electric vehicle including a motor controller. The motor controller includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the motor control method provided in this application.

[0042] Specifically, the motor control method provided in this application embodiment can be applied to the motor controller (Microcontroller Unit, MCU) 110 of an electric vehicle. The electric vehicle includes a motor controller 110, a motor 120, an inverter 130, a DC bus 140, a battery 150, and a vehicle control unit (VCU) 160. The motor controller 110 uses the motor control method provided in this application to control the motor 120. The motor 120 is connected to the inverter 130, and the inverter 130 is connected to the battery 150 through the DC bus 140. The vehicle controller 160 can collect information on the accelerator / brake pedal, gear position, and battery state of charge. After strategy calculation, it sends commands for target torque, speed limit, operating mode, and energy recovery intensity to the motor controller 110. After receiving the commands, the motor controller 110 uses algorithms such as vector control to calculate the torque requirement into three-phase current parameters to drive the power module to invert DC power into AC power, precisely controlling the output of the motor 120. The electric vehicle can be a two-wheeled electric vehicle or a four-wheeled electric vehicle.

[0043] It should be noted that the application scenarios described in the following embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0044] Terminology Explanation: Id: The d-axis current of the motor, i.e., the excitation / weakening current.

[0045] Iq: The q-axis current of the motor, i.e., the torque current.

[0046] Deep field weakening: When the motor operates at speeds higher than its base speed, the back electromotive force (EMF) of the permanent magnet approaches or exceeds the upper limit of the DC bus voltage. At this point, a large negative d-axis current (id) must be applied to weaken the rotor's permanent magnet magnetic field, keeping the combined back EMF below the bus voltage. The deep field weakening region typically refers to the area with a large field weakening depth and an id negative amplitude close to the current limiting circle.

[0047] Field Weakening Exit: This is the process by which the motor transitions from a deep field weakening operation to normal MTPA (Maximum Torque Per Ampere) control or a lower speed range. Common triggering conditions include: a sudden drop in torque command due to the driver releasing the accelerator pedal, a decrease in vehicle speed, or a change in operating conditions. During field weakening exit, the field ID (id) rapidly returns from a deep negative state to near zero. If not properly controlled, the magnetic energy stored in the motor winding inductance will flow back to the DC bus through the inverter, causing a voltage spike.

[0048] Voltage Kickback / Voltage Overshoot: When the motor exits the field weakening zone, the rapid change in the d-axis current causes the release of energy stored in the motor inductance. The energy is rectified by the inverter's freewheeling diode and injected into the DC bus capacitor, causing the bus voltage to rise abnormally in a short period of time. This may exceed the voltage withstand rating of the power devices, triggering overvoltage protection or even hardware damage.

[0049] Bus Current Observer: A functional module that performs real-time processing (filtering, slope calculation, threshold comparison, etc.) on the sampled values ​​of the DC bus current sensor to extract current change characteristics, so as to predict possible voltage surges and trigger preventive control when the bus current shows an abnormal downward trend.

[0050] The motor control method provided in this application will be described in detail below.

[0051] like Figure 2 As shown, the motor control method includes the following steps S210~S240.

[0052] S210, Obtain the real-time current of the DC bus between the motor and the battery; S220. Based on the real-time current, adjust the lower limit of the motor's torque current to obtain the target dynamic lower limit of the torque current. S230. Adjust the initial command for torque current according to the target dynamic lower limit value to obtain the target command; S240. Send the target command to the motor's current loop to control the motor's operation.

[0053] In this embodiment, the real-time current characterizes the direction and amplitude of instantaneous energy flow between the motor and the battery. The polarity of the real-time current directly reflects the direction of energy flow: a positive value usually indicates that energy flows from the battery to the motor (driving state), while a negative value indicates that energy is fed back from the motor to the battery (braking or energy recirculation state). The real-time current can serve as the basis for subsequent judgment of the motor's operating status and energy flow direction, and its accuracy directly affects the effectiveness of the motor control strategy.

[0054] As an example, in the process of acquiring real-time current, this application can periodically sample the bus current (10kHz or 20kHz) by connecting a Hall current sensor or other acquisition device in series between the battery terminal and the inverter DC bus, and perform low-pass filtering on the sampled values ​​to filter out high-frequency switching noise, thereby obtaining a smooth real-time current signal.

[0055] As another example, this application can also calculate the real-time current of the DC bus by reconstructing the real-time AC current between the motor and the inverter based on the law of conservation of charge.

[0056] The lower limit of torque current can be understood as the minimum torque current that limits the output of the motor, that is, the range of the motor's ability to adjust in the braking direction (usually corresponding to the negative torque current).

[0057] This application adjusts the lower limit of the torque current based on the energy flow trend reflected by the current bus current, thereby dynamically changing the constraint boundary of the torque current and actively intervening in the energy flow at the physical level.

[0058] The target dynamic lower limit can be understood as a dynamic constraint boundary calculated based on the real-time characteristics of the real-time current, used to replace the fixed lower limit.

[0059] Specifically, in the process of adjusting the lower limit of the motor torque current based on the real-time current, this application can use proportional-integral calculation to process the current deviation and then superimpose it on the basic lower limit, or determine it by looking up a table based on the current change rate.

[0060] When an abnormal downward trend or a negative value is detected in the real-time current, it indicates a risk of energy flowing back from the motor side to the battery side. In this case, by positively raising the lower limit of the torque current, the motor is forced to maintain at least a certain degree of positive torque output, blocking the energy feedback path at the source and preventing the DC bus voltage from surging due to energy accumulation. When a positive value is detected in the real-time current and the control command requires zero torque, the lower limit of the torque current is negatively adjusted to allow the motor to output negative torque current to generate braking torque, consume the motor's rotational kinetic energy, and prevent the motor from running away uncontrollably.

[0061] The initial given command can come from the upper-level control strategy, such as the torque request calculated based on the accelerator pedal opening or the output of the speed loop regulator.

[0062] This application uses a target dynamic lower limit value to limit the initial given command, ensuring that the command finally sent to the motor controller does not violate the minimum torque limit specified by the current safety state. This ensures that when there is a risk of voltage backlash, the motor will not enter the energy feedback state due to the command being too low; and when there is a risk of overspeed, the motor can output sufficient braking torque, thus embedding safety constraints directly into the torque command generation process.

[0063] The current loop can be understood as the inner loop of the motor control system, which is responsible for quickly adjusting the actual current of the motor windings according to the input current command, so as to achieve precise control of the motor torque.

[0064] In this application, the target setpoint command, after safety limiting adjustment, is sent to the current loop. The current loop is the innermost closed-loop control structure in the field-oriented control system, and it contains a proportional-integral (PI) regulator. The regulator uses the difference between the target setpoint command and the actual q-axis current feedback value of the motor as the input error, performs proportional and integral calculations on the error, and outputs the corresponding q-axis voltage command. Simultaneously, the d-axis current command is also processed by the PI regulator in the current loop, outputting the d-axis voltage command.

[0065] The d-axis voltage command and q-axis voltage command can be converted into voltage commands in a two-phase stationary coordinate system through inverse coordinate transformation, and then sent to the space vector pulse width modulation module. The space vector pulse width modulation module generates a corresponding pulse width signal duty cycle signal according to the voltage command, drives the power switching transistors in the inverter to turn on and off, so that the three-phase AC voltage required by the inverter output is applied to the stator winding of the motor, thereby controlling the actual current in the motor winding to follow the target given command, and finally realizing the control of the motor's operating state.

[0066] The timing sequence of the existing voltage closed-loop scheme is as follows: At time t0, the field weakening exit begins, id callback occurs, and the inductor energy storage is released; at time t1, the real-time current of the DC bus begins to decrease (energy backflow has begun at the current level); at time t2, the real-time voltage of the DC bus begins to rise (after capacitor integration delay); at time t3, the real-time voltage exceeds the protection threshold; at time t4, the motor controller begins to respond (PI regulation is established); at time t5, the real-time voltage stops rising, and the device continues to withstand overvoltage during this window.

[0067] The timing sequence of the current closed-loop scheme provided in this application is as follows: at time t0, the field weakening exit begins, the torque current is reversed, and the inductor energy is released; at time t1, the real-time current of the DC bus begins to decrease, and the current observer detects an abnormal slope in the same control cycle; at time t2, the target dynamic lower limit of the torque current is raised in real time, blocking the energy feedback path; at time t3, the real-time voltage of the DC bus hardly increases, and the protection is completed before the voltage abnormality.

[0068] It can be seen that the time difference between the two is Δt = t4 - t2 ≈ capacitor integration delay + voltage detection delay + PI settling delay. In the motor control system, the time Δt is crucial to the safety margin of the power devices.

[0069] In this application, the trigger signal for voltage backlash protection is moved from the protected object (voltage) itself to the direct carrier of energy flow (current). By utilizing the zero-delay response characteristic of current to power changes, a paradigm shift is achieved from detecting the problem and then reacting to anticipating the problem and immediately blocking it. At the same time, the same current observation and IQ limiting mechanism cover both voltage surge protection and runaway protection, realizing the integration of motor protection functions.

[0070] Specifically, when no anomalies are detected, the target given command is equal to the initial given command, and the motor operates according to the normal control strategy. When the current observer detects an abnormal drop in the bus current, the dynamic lower limit is raised to a positive value, the target given command is forced to remain positive, and the current loop adjusts the output voltage accordingly to keep the motor in drive mode and block the path of energy backflow to the DC bus via the inverter. When in zero-current stop condition and the bus current is still positive, the dynamic lower limit drops to a negative value, the target given command is allowed to be negative, and the current loop adjusts the output voltage accordingly to generate braking torque in the motor, consume rotational kinetic energy, achieve safe stop, and avoid dangerous situations such as voltage surge or runaway.

[0071] In some embodiments, step S220 involves adjusting the lower limit of the motor's torque current based on the real-time current to obtain a target dynamic lower limit of the torque current, including: if the real-time current is greater than a preset positive current threshold, generating the current change rate of the DC bus; if the current change rate is less than a preset current drop slope threshold, raising the lower limit of the motor's torque current in the positive direction based on the real-time current to obtain the target dynamic lower limit.

[0072] In this embodiment, the forward current threshold is used to define the effective current range for the motor in electric drive mode. The rate of change of current characterizes the rate of change of the DC bus current over time.

[0073] Specifically, after obtaining the real-time current of the DC bus between the motor and the battery, this application can compare the real-time current with a forward current threshold. When the real-time current is greater than the preset forward current threshold, it indicates that the motor is currently drawing energy from the battery and is in drive mode, at which point the current change rate generation logic is triggered.

[0074] Meanwhile, this application extracts the rate of change of current by performing differential operations on the real-time current sequence to identify the downward trend of the bus current, thereby predicting the risk of energy backflow before the voltage rises. The formula for the rate of change of current is:

[0075] Where slope is the rate of change of current, Ts is the control period, N is the differential span (N is 10, determined according to the feedback bus current), Idc_filt(k) is the current current of the DC bus, Idc_filt(kN) is the historical current of the DC bus, and K is the index of the current discrete time.

[0076] In this application, the current drop slope threshold can determine whether there is an abnormally rapid downward trend in the DC bus current. When the generated current change rate is less than the preset current drop slope threshold, the DC bus current is decreasing at a rate exceeding the expected rate under normal driving conditions, indicating that the energy demand on the motor side is decreasing sharply, or even that energy is about to flow back to the battery side.

[0077] Under these conditions, this application can calculate a positive offset based on the magnitude of the real-time current and superimpose the positive offset onto the original lower limit of the torque current, thereby positively raising the lower limit of the torque current to obtain the target dynamic lower limit. Thus, even if the upper-level torque control command requires a reduction or cut-off of the output, the actual output of the current loop is limited to above the target dynamic lower limit, forcing the motor to maintain a certain degree of positive torque output. This can consume the magnetic energy released in the motor winding inductance and block the physical path of energy backflow to the DC bus capacitor through the inverter freewheeling diode, thereby preventing the bus voltage from spiked and achieving predictive suppression of voltage backflow risk during the field weakening exit process.

[0078] In some embodiments, the motor control method further includes: if the real-time current is less than a preset negative current threshold, generating the maximum torque current of the motor based on the rated maximum torque current of the motor; adjusting the initial given command based on the maximum torque current to obtain the target given command.

[0079] In this embodiment, the negative current threshold is the key criterion for determining whether the system has entered a strong energy feedback state. The negative current threshold is not a single fixed value, but a critical parameter determined based on the power level of the motor drive system, the battery charging characteristics, and the bus capacitor capacity.

[0080] The negative current threshold can be determined during the system development phase by recording the bus current value when the bus voltage begins to rise significantly due to energy backflow under different load and speed conditions through bench testing; alternatively, the minimum negative current value covering more than 95% of dangerous operating conditions can be selected as a benchmark and then adjusted downwards with a certain safety margin to determine the threshold.

[0081] In actual operation, when the real-time current is less than the preset negative current threshold, it indicates that the energy fed back from the motor side to the DC bus side is large and exceeds the scope of slight feedback. The control strategy needs to be adjusted to ensure the controllability of torque output.

[0082] Specifically, when the real-time current is less than the preset negative current threshold, the maximum torque current under the current operating condition can be generated based on the motor's rated maximum torque current. The rated maximum torque current refers to the upper limit of the current that the motor can output under short-term overload or specific operating conditions. It is usually determined by the motor's thermal characteristics and the current-carrying capacity of the controller hardware, and its value is greater than the motor's rated current for long-term operation.

[0083] Meanwhile, this application can read the motor parameter table pre-stored in the system to obtain the nominal value of the rated maximum torque current; or, based on the current battery voltage, motor temperature and other operating status parameters, the nominal value can be dynamically corrected.

[0084] As an example, this application can appropriately reduce the current limit to prevent overcurrent when the battery voltage is low; and appropriately increase the limit to fully utilize the motor's overload capacity when the motor temperature is low, thereby ensuring that the maximum torque current can play a protective role under the current operating conditions without exceeding the physical safety boundary of the system.

[0085] In this application, the initial given command is limited and adjusted by the maximum torque current of the motor to block the reverse flow path of energy from the motor side to the DC bus, effectively suppressing the voltage surge caused by field weakening exit. At the same time, it can also ensure that under any operating condition, the target given command sent into the current loop will not cause the motor output torque to exceed the system's carrying capacity, thereby avoiding hardware damage or control failure caused by excessive control command.

[0086] In some embodiments, if the rate of change of current is less than a preset current descent slope threshold, the target dynamic lower limit value is obtained by raising the lower limit value of the motor torque current based on the real-time current, including: if the rate of change of current is less than the preset current descent slope threshold, obtaining the energy recovery allow flag bit sent by the vehicle controller corresponding to the motor; if the energy recovery allow flag bit is a preset flag bit, the target dynamic lower limit value is obtained by raising the lower limit value of the motor torque current based on the real-time current.

[0087] In this embodiment, when the rate of change of the DC bus current (i.e., the current drop slope) is less than the current drop slope threshold, it indicates that the bus current is showing a rapid downward trend, and the system has the potential risk of energy feedback or voltage surge.

[0088] To accurately distinguish whether the risk belongs to the unexpected weak magnetic feedback that needs protection, or to the expected energy recovery triggered by the driver or executed by the vehicle strategy, it is necessary to further obtain the energy recovery permission flag bit sent by the vehicle controller.

[0089] The energy recovery enable flag is a status signal generated by the vehicle controller based on the vehicle status (such as brake pedal signal, vehicle speed, battery state of charge, etc.) to indicate whether the current vehicle operating condition allows the energy recovery function to be executed.

[0090] In this application, the energy recovery enable flag can be transmitted to the motor controller via the controller local area network bus. After receiving the flag, the motor controller uses it as one of the necessary conditions for triggering the torque current lower limit adjustment logic.

[0091] Specifically, by introducing vehicle-level intent signals, this application can confirm the functional intent at the vehicle level before performing protective adjustments, thereby avoiding conflicts between protection strategies and normal energy recovery strategies.

[0092] The preset flag can be a logic value that indicates whether energy recovery is permitted or whether the system is currently in an active energy recovery state. When the energy recovery permission flag is determined to be the preset flag, the decrease in the current bus current is an expected behavior triggered by the driver's active braking or the vehicle's energy recovery strategy, rather than an abnormal backflow caused by the field weakening exit.

[0093] In this case, in order to ensure that the vehicle's braking energy recovery efficiency is not affected and to improve the driving range and driving experience, the protection logic of raising the lower limit of torque current is not executed. Instead, the lower limit of torque current is maintained within the normal operating range (for example, negative values ​​are allowed to generate braking torque), so that the motor can output negative torque current normally and convert the vehicle's kinetic energy into electrical energy to feed back to the battery.

[0094] Conversely, if the energy recovery enable flag is not the preset flag (i.e., the vehicle controller has not requested energy recovery), but the current change rate still drops abnormally, it is confirmed as an unexpected risk of magnetic field withdrawal. At this time, the lower limit of the torque current is raised in the positive direction to trigger the anti-backlash protection, which effectively prevents the protection logic from erroneously interfering with the normal braking function, thus taking into account both the safety and functionality of the system.

[0095] In some embodiments, step S240, sending a target given command to the current loop of the motor to control the operation of the motor, includes: if the rate of change of the current is less than a preset current drop slope threshold, adjusting the rate of change command of the field weakening current of the motor to obtain an adjusted rate of change command; and sending the target given command and / or the adjusted rate of change command to the current loop of the motor to control the operation of the motor.

[0096] In this embodiment, when the rate of change of the DC bus current (i.e., the current drop slope) is less than the current drop slope threshold, the motor is in a rapid dynamic process of withdrawing from deep field weakening. Simply raising the lower limit of the torque current may not be enough to completely suppress the voltage rise. Under this condition, the command for the rate of change of the field weakening current can be further adjusted.

[0097] The rate of change command is used to control the rate at which the d-axis current (i.e., the excitation current component) returns from a deep negative value to zero. This application slows down the recovery speed of the d-axis current by limiting the rate of change command of the field weakening current, thereby delaying the release rate of magnetic energy in the motor winding inductance from the source and preventing energy from being concentrated and backflowed to the DC bus in a short period of time.

[0098] Specifically, in the process of adjusting the change rate command of the field weakening current of the motor, this application can limit the change rate command of the field weakening current to a small negative value or zero value. The specific value can be dynamically calculated based on the current bus voltage rise rate or the steepness of the current drop.

[0099] For example, this application can adopt a proportional adjustment strategy, which calculates a negative correction amount based on the deviation between the current change rate and a preset threshold, and adds it to the original change rate command to form an adjusted change rate command.

[0100] Furthermore, after obtaining the adjusted rate of change command, at least one of the adjusted rate of change command and the target given command can be sent to the current loop of the motor to control the motor operation.

[0101] Specifically, the target given command (i.e., the adjusted torque current command) blocks the energy feedback path to the DC bus by forcibly maintaining a positive torque current of a certain amplitude; the adjusted rate of change command reduces the source power of energy release by controlling the gradual change of the field weakening current, thereby enabling the motor controller to respond more smoothly to the field weakening exit process, effectively suppressing the surge of DC bus voltage, ensuring the stable operation of the motor system, thus solving the problem of insufficient response capability of a single control variable under extreme dynamic conditions, and significantly improving the robustness and safety of the motor control system.

[0102] In some embodiments, step S220, adjusting the lower limit of the motor torque current based on the real-time current to obtain a target dynamic lower limit of the torque current includes: obtaining at least one dynamic lower limit value from a mapping table between dynamic lower limit values ​​and current change rates according to the current change rate; and obtaining the target dynamic lower limit value from at least one dynamic lower limit value according to the motor speed corresponding to the current change rate.

[0103] In this embodiment, the mapping table between the dynamic lower limit value and the rate of change of current is the core data structure for realizing adaptive protection under operating conditions. Its essence is a discretized data set that characterizes the correspondence between the trend of DC bus current change and the torque current limiting intensity.

[0104] Meanwhile, the mapping table is not a simple correspondence of single values, but rather stores a set of candidate values ​​for the lower limit of torque current that have been calibrated and verified and can effectively suppress voltage backlash for specific current change rate ranges or levels.

[0105] The rate of change of current reflects the intensity and direction of energy flow from the motor side to the DC bus side. The larger the absolute value, the faster the inductor energy is released, and the higher the required reverse torque current limiting strength. This application transforms the complex dynamic physical process into an engineering data table that can be quickly queried by establishing a mapping relationship table, thereby reducing the online calculation load of the controller and ensuring the real-time response.

[0106] It should be noted that the mapping table between the dynamic lower limit value and the current change rate can be constructed during the offline calibration stage of the system.

[0107] During the construction of the mapping table, different vehicle operating conditions (such as the field weakening exit process under different speeds and loads) can be simulated on a motor test bench. Data on the DC bus current change rate during each field weakening exit process, as well as the minimum torque current limit value required to effectively prevent voltage surge, can be collected. The current change rate can be segmented or clustered according to its numerical range, and similar current change rates can be grouped into the same interval. The optimal torque current lower limit value within the interval can be calculated or selected as the corresponding mapping entry. The correspondence between the current change rate interval and the lower limit value can be stored in the controller's non-volatile memory in the form of a two-dimensional table or key-value pairs.

[0108] As an example, the structure of the mapping table can be set as a lookup table with the current change rate slope as the index and the corresponding set of candidate values ​​for the lower limit of torque current as the content. The set of candidate values ​​can include multiple lower limit values ​​preset for different motor speed ranges.

[0109] It is understandable that the mapping table can be statically read during vehicle operation and can be updated or fine-tuned online via host computer software to adapt to the aging of motor parameters or the optimization of control strategies.

[0110] Specifically, when the bus current change rate is less than the current drop slope threshold, triggering the voltage backflash protection logic, the current real-time current change rate is calculated, and the calculated current change rate is used as the search keyword to search in the mapping relationship table between the dynamic lower limit value and the current change rate.

[0111] The search result may be a single dynamic lower limit value, or it may be a set of multiple dynamic lower limits preset for the current change rate and matched with different motor speeds or operating conditions. If multiple candidate values ​​are retrieved, these candidate values ​​are temporarily stored to provide a data basis for subsequent precise screening; if a single value is retrieved and the speed factor has been comprehensively considered, it can be directly used as the target dynamic lower limit value.

[0112] Furthermore, this application can obtain the target dynamic lower limit value from at least one dynamic lower limit value based on the motor speed corresponding to the rate of change of current.

[0113] Motor speed is a key physical quantity for determining the current operating state of a motor and the level of inductor energy storage. In the field of motor control, motor speed not only determines the magnitude of the back electromotive force, but also directly affects the depth of field weakening control and the total amount of magnetic energy stored in the inductor.

[0114] When the motor is in the high-speed range, the energy feedback impact caused by the higher back electromotive force is often more severe than in the low-speed range under the same current change rate. Therefore, for the same current change rate, a stricter torque current lower limit limit (i.e., a higher lower limit value) needs to be applied at high speeds to ensure effective blocking of energy feedback. This application introduces motor speed as a correction factor, which can select the unique target value that best matches the current motor operating state from multiple candidate dynamic lower limit values ​​obtained from a lookup table. This achieves secondary calibration of protection accuracy, ensuring a high degree of matching between protection strength and actual physical state, thereby significantly improving the voltage stability of the motor under complex dynamic conditions such as deep field weakening withdrawal.

[0115] In some embodiments, step S220, adjusting the lower limit of the motor's torque current based on the real-time current to obtain a target dynamic lower limit of the torque current includes: if the real-time current is greater than a preset positive current threshold and the initial given command indicates zero, raising the lower limit of the motor's torque current negatively based on the real-time current to obtain the target dynamic lower limit.

[0116] In this embodiment, under zero-current stopping conditions, to protect against the risk of motor overrunning, it is necessary to identify and intervene in abnormal drive states. The forward current threshold can be used as a distinction between effective drive current and zero-current noise. Its value is determined based on the no-load current of the motor system and the measured noise level, and can be set to 1% to 3% of the rated maximum torque current of the motor.

[0117] Specifically, when the initial given command is zero, it indicates that the vehicle controller or upper-level control logic has sent a stop drive or coasting command, and theoretically, the motor output torque is expected to be zero.

[0118] Under these conditions, if the real-time current of the DC bus is still greater than the preset positive current threshold, it indicates that the motor is still absorbing electrical energy from the battery and maintaining drive torque output, which constitutes a logical contradiction with the zero torque command. This state usually occurs when the motor enters the coasting stage from high-speed rotation. Due to the high back electromotive force of the motor or the delay in control logic, the motor is still in a driving state rather than a controlled braking consumption state, which poses a risk of continuous acceleration or runaway that cannot be stopped.

[0119] To address this, this application introduces a negative adjustment strategy, which raises the lower limit of torque current by reducing the lower limit value. In engineering implementation, the lower limit value is adjusted from the usual 0 or positive value to a negative value to remove the conventional restriction on the non-negative torque current and actively guide the torque current into the negative region to eliminate the risk.

[0120] In some embodiments, the motor control method further includes: obtaining the current deviation of the DC bus based on a preset safe current threshold and real-time current; performing PI calculation on the current deviation to obtain the dynamic increment of the lower limit value of the torque current; and performing amplitude limiting processing on the dynamic increment to obtain the target dynamic lower limit value.

[0121] In this embodiment, the safe current threshold can be used as a benchmark parameter to determine whether the DC bus current is within a safe range, characterizing the DC bus current level that the control system expects to maintain. The safe current threshold is not fixed; it can be dynamically adjusted based on the motor's operating conditions and the battery status.

[0122] For example, it can be set to a positive value of 1% to 3% of the rated current, thereby reserving sufficient response space for proportional-integral (PI) regulation, and appropriately increasing the threshold to trigger the protection mechanism in advance when a sharp drop in current is detected.

[0123] Specifically, this application calculates the difference between the safe current threshold and the real-time current to obtain the current deviation of the DC bus, which can be used as the input source of the PI controller. The larger the positive value, the more serious the degree to which the real-time current is below the safe threshold, that is, the higher the risk of energy backflow; conversely, it indicates that the current is within the safe range or the motor is in normal driving state.

[0124] Furthermore, a PI calculation is performed on the current deviation to obtain the dynamic increment of the lower limit of the torque current, so as to realize the real-time adjustment of the lower limit of the torque current.

[0125] PI operation, or proportional-integral operation, is a linear control algorithm that combines the advantages of proportional control and integral control.

[0126] In this application, PI calculation can be used as the core regulation logic to convert the current deviation into a dynamic increment for adjusting the lower limit of torque current, so as to reflect the correction requirements of the current operating condition for the lower limit of torque current, and provide an accurate data basis for subsequent limiting processing.

[0127] A PI controller can be composed of a proportional unit and an integral unit connected in parallel. The proportional term outputs the adjustment value instantly based on the current current deviation, characterized by fast response and the ability to quickly react to sudden changes in bus current. The integral term accumulates historical current deviations to eliminate steady-state errors, ensuring continuous regulation even when the current deviates from the safety threshold for an extended period, until the deviation returns to zero. The formula for PI operation is:

[0128] Where iq_min_offset is the dynamic increment of the lower limit of torque current; Kp is the proportional coefficient, which responds quickly to the instantaneous current deviation (i.e., adjusts iq_min_offset quickly in response to changes in the bus); Ki is the integral coefficient, which ensures that the current maintains a safe direction in the long term (preventing integral saturation); err_Idc is the current deviation, err_Idc=I_ref-Idc_filt (I_ref is a preset safe current threshold, which takes a slightly positive value, 1%~3% of the rated current, to reserve space for PI adjustment. When the current drops sharply, I_ref will be appropriately increased); I_ref-Idc is the safe current threshold, and Idc_filt is the real-time current.

[0129] Furthermore, this application performs amplitude limiting processing on the dynamic increment to obtain the target dynamic lower limit value.

[0130] Limiting is a process of applying boundary constraints to dynamic increments to prevent uncontrollable and drastic fluctuations in torque current commands caused by excessive PI controller output, thereby ensuring the smoothness and safety of motor operation.

[0131] Specifically, this application achieves amplitude limiting of the dynamic increment by restricting it within a preset range, enabling the adjustment of the lower limit of the torque current to follow the changing trend of the DC bus current in real time and accurately. The combination of the rapid response of the proportional term and the steady-state correction of the integral term, along with the boundary protection of the amplitude limiting process, constitutes a robust closed-loop control system. This ensures that the protection mechanism is triggered promptly under different operating conditions while avoiding secondary vibrations or abnormal drive problems caused by excessive control input. The upper and lower limits of the preset range can be determined based on the motor's hardware parameters and safety strategies.

[0132] In one example, this application may employ a saturation limiting algorithm to restrict the dynamic increment iq_min_offset to between the base lower limit iq_min_base and the maximum upper limit iq_max_base.

[0133] The lower limit value `iq_max_base` can be set to 0 (normal operating condition) or a negative value (e.g., -5% of the rated maximum torque current, used for overload protection). The upper limit value `iq_max_base` can be set to a positive value of 2%~5% of the rated maximum torque current (used to prevent voltage backlash). The formula for limiting the dynamic increment is as follows:

[0134] Where iq_min_limit is the target dynamic lower limit value; mc_sat is the limiting method, which is used to limit the upper and lower limits of the input amount based on the set limit, that is, to limit the dynamic increment iq_min_offset between iq_min_base and iq_max_base.

[0135] In this application, the lower limit of voltage backlash protection dynamically fluctuates between 0 and the maximum torque current limit (which is taken as 2% to 5% of the rated maximum torque current depending on the actual operating conditions). The lower limit of overspeed protection dynamically fluctuates between the maximum allowable braking current (negative value) and the rated maximum drive current (positive value). Meanwhile, under normal operating conditions, the lower limit is close to zero; during voltage overshoot warning, the lower limit rises to a positive value; and during overspeed protection, the lower limit drops to a negative value.

[0136] Specifically, when the dynamic increment exceeds the preset range, the boundary value of the range is forcibly output; when the dynamic increment is within the preset range, the actual calculated value is output, which is the target dynamic lower limit value. The target dynamic lower limit value is used to correct the initial given command of torque current. By applying a restriction in the forward path of the current loop, abnormal energy feedback or forced consumption of motor kinetic energy is effectively blocked, thereby realizing the protection function of preventing voltage backlash and preventing runaway at the physical level.

[0137] In some embodiments, limiting the dynamic increment to obtain a target dynamic lower limit includes: if the rate of change of the DC bus current is less than a preset current drop slope threshold, generating the maximum torque current of the motor based on the rated maximum torque current of the motor; adjusting the basic lower limit of the torque current to a first target lower limit; adjusting the basic lower limit of the torque current to a first target upper limit based on the rated maximum torque current; and limiting the dynamic increment based on the first target lower limit and the first target upper limit to obtain the target dynamic lower limit.

[0138] In this embodiment, during the current observation process, when the rate of change of the DC bus current is detected to be less than the current decline slope threshold, it indicates that the DC bus current is in a state of rapid decline, and the system faces a high risk of energy backflow.

[0139] Under this operating condition, in order to block energy feedback and reserve adjustment margin to cope with large current fluctuations, the maximum torque current of the motor can be determined based on the rated maximum torque current of the motor. The maximum torque current is different from the normal operating current. It is the upper limit of short-time overload capacity determined based on physical constraints such as the motor's thermal limit, magnetic saturation limit, or the current withstand capability of the inverter's power devices.

[0140] Specifically, this application can read the nameplate parameters stored in the motor controller during the system initialization phase and extract the rated maximum torque current parameter value measured by the motor manufacturer in bench tests. During operation, calling the maximum torque current parameter value as the benchmark for subsequent limit calculations can ensure that under high-risk operating conditions, the adjustment action will not exceed the physical bearing capacity of the motor, and can make full use of the motor's overload capacity to suppress voltage backlash, thereby ensuring system safety.

[0141] Meanwhile, this application adjusts the basic lower limit of torque current to the first target lower limit. The basic lower limit can be understood as the minimum allowable torque current under normal or low-risk operating conditions. For example, it is often set to 0 in conventional motoring mode, allowing the motor to coast freely to a zero-torque state. Under high-risk operating conditions with abnormal current change rate, to prevent the motor from abruptly switching from a driving state to a power-feeding state and causing voltage backlash, the zero-torque or negative torque limit needs to be removed, forcing the motor to maintain a certain positive torque output.

[0142] The first target lower limit can be set as a small positive current value or a positive value close to zero. When the current change rate is detected to meet the trigger condition, the current basic lower limit variable is directly updated to the first target lower limit value to ensure that the final torque command calculated subsequently is not lower than this threshold. This physically cuts off the path of energy flowing in reverse from the motor side to the DC bus side, preventing voltage backlash from occurring at the source.

[0143] Furthermore, this application can adjust the basic limit of the torque current to a first target upper limit value based on the rated maximum torque current.

[0144] Specifically, in order to raise the lower limit while retaining sufficient positive adjustment space and avoid control failure or response lag due to an excessively narrow limit range, the basic limit value of the torque current is adjusted synchronously.

[0145] The first target upper limit value depends on the rated maximum torque current. This application achieves the goal of widening the upper limit of the adjustable range of torque current under high-risk operating conditions by adjusting the basic upper limit value to the first target upper limit value.

[0146] For example, this application may set the first target upper limit value to be equal to the maximum torque current, which may be 2% to 5% of the rated maximum torque current.

[0147] In engineering implementation, the rated maximum torque current parameter can be read and assigned to the upper limit variable of the limiting module. This ensures that when the calculated dynamic incremental value is large, it will not be truncated at the originally lower upper limit, but will instead rise to a higher level defined by the maximum torque current. When the risk of voltage backlash is extremely high, the control system can rapidly increase the torque current command, utilizing the motor's high torque output characteristics to quickly dissipate reverse energy or counteract back electromotive force, thereby achieving strong suppression of the DC bus voltage.

[0148] Furthermore, based on the first target lower limit and the first target upper limit, the dynamic increment is subjected to amplitude limiting to obtain the target dynamic lower limit.

[0149] Specifically, after completing the dynamic configuration of the limiting boundary, this application can limit the dynamic increment based on the first target lower limit and the first target upper limit, and output the target dynamic lower limit. This ensures that the motor control system can adjust to the maximum extent within the safety boundary under the condition of weak field withdrawal and voltage surge protection. This avoids voltage backlash due to an excessively low lower limit and also prevents insufficient adjustment capability due to an excessively low upper limit. It achieves a balance between protection performance and control performance, and significantly improves the robustness and safety of the system under extreme dynamic conditions.

[0150] In some embodiments, before obtaining the current deviation of the DC bus based on the preset safe current threshold and the real-time current, the method further includes: if the rate of change of the DC bus current is less than the preset current drop slope threshold, adjusting the safe current threshold to obtain the adjusted safe current threshold.

[0151] In this embodiment, when the rate of change of current is less than the threshold of the current decline slope, it indicates that the bus current is in a state of rapid decline. This is a typical precursor to energy backflow caused by the deep field weakening exit of the motor.

[0152] Under this operating condition, if a fixed safe current threshold is continued to be used as the benchmark, the absolute value of the calculated current deviation may be too small, which will cause the subsequent proportional-integral (PI) calculation to be delayed and unable to intervene in the control in time before the voltage surge, so as to ensure that sufficient anti-backlash torque margin can be provided in the early stage of the voltage backlash risk and effectively suppress the abnormal rise of DC bus voltage.

[0153] Specifically, this application can superimpose a positive adjustment amount on the safe current value to generate an adjusted safe current threshold, so as to ensure that the threshold can be dynamically updated with the real-time current state, thereby driving the controller to output a stronger adjustment effect and thus speeding up the response speed of the dynamic lower limit value.

[0154] In adjusting the safe current threshold, this application can employ a piecewise linear adjustment strategy or an adaptive adjustment strategy. For example, the smaller the rate of change of current, i.e., the faster the current decreases, the greater the upward adjustment of the safe current threshold; or an adaptive coefficient can be set according to the magnitude of the real-time current, using a larger upward adjustment coefficient under high-speed, high-current conditions, thereby adaptively correcting the sensitivity of the protection trigger according to the drastic change in current: maintaining a lower sensitivity during low-speed, stable operation to avoid false triggering caused by noise interference; and increasing sensitivity during high-speed, rapid changes to ensure rapid activation of the protection strategy.

[0155] In some embodiments, the dynamic increment is limited to obtain a target dynamic lower limit value, including: if the real-time current is greater than a preset positive current threshold and the initial given command is zero, generating the maximum braking current of the motor based on the rated maximum torque current of the motor; adjusting the basic lower limit value of the torque current to a second target lower limit value based on the maximum braking current; adjusting the basic lower limit value of the torque current to a second target upper limit value based on the rated maximum drive current of the motor; and limiting the dynamic increment based on the second target lower limit value and the second target upper limit value to obtain the target dynamic lower limit value.

[0156] In this embodiment, when the real-time current is greater than the preset positive current threshold and the initial given command is zero, it is determined that the current operating condition meets the overspeed protection trigger condition.

[0157] If the real-time current is greater than the forward current threshold, it indicates that the motor is still in a driving state where it draws power from the battery. If the initial given command is zero, it indicates that the vehicle controller has sent a request to stop or zero torque. Therefore, it can be determined that the vehicle has an abnormal driving risk, i.e., a runaway risk.

[0158] Specifically, this application can obtain the rated maximum torque current value defined in the motor nameplate parameters; determine the proportional coefficient based on the vehicle braking safety strategy and the motor's back EMF withstand capability, and multiply the rated maximum torque current by the proportional coefficient to calculate the maximum braking current.

[0159] Among them, the maximum braking current is a negative parameter. Its physical meaning is to define the current boundary of the maximum reverse braking torque that the motor is allowed to generate when the overspeed protection intervenes. Its absolute value can be set to, for example, 2% to 5% of the rated maximum torque current.

[0160] Furthermore, this application can adjust the basic lower limit of the torque current to a second target lower limit based on the maximum braking current.

[0161] Specifically, this application assigns the value of the maximum braking current to the baseline lower limit of the torque current to form a second target lower limit. This allows the motor's torque current command to cross zero and enter the negative region, thereby controlling the motor to generate braking torque. This ensures that when a risk of runaway is detected, the motor can immediately output sufficient braking torque to consume rotational kinetic energy, forcing the speed to decrease, thus physically preventing the runaway state from continuing. Since the maximum braking current is negative, the second target lower limit is also negative.

[0162] In addition, this application can adjust the basic limit of the torque current to a second target upper limit value based on the rated maximum drive current of the motor.

[0163] Specifically, this application can read the rated maximum drive current parameter stored in the motor controller, which is the maximum positive torque current that the motor can continuously output under rated operating conditions, and defines the physical boundary of the motor's drive capability.

[0164] Meanwhile, this application sets the value of the rated maximum drive current as the basic limit of the torque current, that is, to obtain the second target upper limit value (positive value). Even if there are fluctuations in the overrun protection intervention and dynamic incremental calculation, the positive output of the torque current must be strictly limited to not exceed the rated drive capacity of the motor, so as to provide a two-way constraint for the current loop command.

[0165] Furthermore, in the zero-current parking anti-runaway condition, this application can limit the dynamic increment based on the second target lower limit and the second target upper limit to obtain the target dynamic lower limit.

[0166] Specifically, this application compares the dynamic increment with both the second target lower limit and the second target upper limit. If the dynamic increment is less than the second target lower limit, the second target lower limit is output as the target dynamic lower limit. If the dynamic increment is greater than the second target upper limit, the second target upper limit is output as the target dynamic lower limit. If the dynamic increment is between the second target lower limit and the second target upper limit, the value of the dynamic increment is directly used as the target dynamic lower limit. Thus, in the overspeed protection scenario, the lower limit of the torque current can be adjusted to a negative value, allowing the motor to generate braking torque to suppress overspeed. At the same time, this lower limit is restricted to not exceeding the second target upper limit, preventing the drive state from being falsely triggered due to abnormally high lower limit values ​​caused by algorithm anomalies or measurement noise. This ensures that the overspeed protection function has sufficient braking power while remaining within a safe and controllable range, avoiding abnormal motor vibration or system loss of control caused by improper limiting. Therefore, without increasing hardware costs, reliable suppression of zero-current stop overspeed phenomenon is achieved, improving the safety and robustness of the motor control system.

[0167] In some embodiments, the dynamic increment is subjected to amplitude limiting processing to obtain a target dynamic lower limit value, including: performing amplitude limiting processing on the dynamic increment to obtain an initial dynamic lower limit value; and performing low-pass filtering processing on the initial dynamic lower limit value to obtain a target dynamic lower limit value.

[0168] Specifically, this application can extract the control quantity at the current moment from the dynamic increment output by the PI calculation module and perform a limiting operation to determine the initial dynamic lower limit value, so as to constrain the dynamic increment within the preset safety range and avoid the motor from entering the unexpected overdrive or overbrake region due to the excessive output amplitude of the control algorithm.

[0169] Due to high-frequency noise and jitter caused by sampling quantization errors in the initial dynamic lower limit value, the calculated increment is prone to drastic fluctuations when the current sensor signal has ripple or the system is subjected to external interference. If such fluctuating signals are directly used as the torque current lower limit value, the motor's output torque command will oscillate at high frequency, leading to unstable motor operation and a jerky driving experience.

[0170] Therefore, this application can perform low-pass filtering on the initial dynamic lower limit value to obtain the target dynamic lower limit value, thereby effectively attenuating signal components higher than the cutoff frequency while retaining effective signals lower than the cutoff frequency. This limits the rate of change of the target dynamic lower limit value to a reasonable range, thus preserving the ability to track abnormal trends in bus current while effectively suppressing unnecessary high-frequency fluctuations, thereby ensuring the smooth operation of the motor when voltage backlash protection or runaway protection is activated.

[0171] In some embodiments, step S230 involves adjusting the initial given command of the torque current according to the target dynamic lower limit value to obtain the target given command, including: generating the maximum torque current of the motor according to the rated maximum torque current of the motor; and performing amplitude limiting processing on the initial given command according to the target dynamic lower limit value and the maximum torque current to obtain the target given command.

[0172] In this embodiment, the maximum torque current can be generated based on the rated maximum torque current of the motor. The maximum torque current characterizes the peak current capability that the motor can withstand in a short period of time.

[0173] Specifically, this application can combine the thermal characteristics of the motor and the demagnetization curve of the permanent magnet to multiply the rated maximum torque current by a safety factor or overload factor to determine the maximum torque current.

[0174] Furthermore, this application can limit the initial given command based on the target dynamic lower limit value and the maximum torque current to obtain the target given command.

[0175] Specifically, this application, during the amplitude constraint process of the initial torque current command, inserts a lower limit limiting element in the iq channel of the current loop before the initial command enters the current PI regulator of the FOC (Field-Oriented Control) layer. This ensures that the initial command falls within the feasible range defined by the dynamic lower limit and the physical upper limit, guaranteeing the stable operation of the control system. The formula for limiting the initial command can be:

[0176] Wherein, Iq_ref_final is the target given command, iq_ref_ori is the initial given command, iq_max_limit is the maximum torque current, and iq_min_limit is the target dynamic lower limit value. Under normal operating conditions, iq_min_limit is approximately equal to 0, and the initial given command is passed directly without modification, allowing the vehicle to respond normally to the driver's intentions. Under high voltage conditions, iq_min_limit > 0, and when the initial given command is lower than the lower limit, the lower limit value is forcibly adopted to ensure that the motor maintains at least a certain positive torque current and prevents the establishment of an energy feedback path. Under overspeed conditions, iq_min_limit < 0, allowing the initial given command to output a certain negative command value to ensure that the motor can stop normally.

[0177] In some embodiments, an inverter is provided between the motor and the battery. In step S210, obtaining the real-time current of the DC bus between the motor and the battery includes: obtaining the real-time AC current between the motor and the inverter; and processing the real-time AC current based on the law of conservation of charge to obtain the real-time current.

[0178] Specifically, this application can collect the phase current data of the motor stator winding, i.e., the real-time AC current, by using a three-phase current sensor (such as a Hall sensor or a shunt resistor sampling circuit) set between the motor and the inverter.

[0179] The real-time alternating current includes at least the U-phase current, V-phase current, and W-phase current (denoted as , respectively). , , ).

[0180] After acquiring the real-time AC current, it can be output as an analog signal. This signal is then sampled by an analog-to-digital converter (ADC) and converted into a digital signal for the processor to read. Simultaneously, the sampling frequency is synchronized with the current loop control frequency to ensure the real-time performance and accuracy of the current signal.

[0181] Furthermore, this application can process real-time alternating current based on the law of charge conservation to obtain real-time current, which can solve the problem of not being able to implement current feedforward control in scenarios where DC-side hardware sensors are not equipped.

[0182] Specifically, this application utilizes the law of conservation of charge and Kirchhoff's current law to map the AC side current to the DC side through the inverter's switching state function. The conduction state of the power switching devices (such as IGBTs or MOSFETs) in the inverter at any given time determines the connection between the motor phase current and the DC bus current.

[0183] For example, this application can obtain the current switching state of each phase bridge arm of the inverter, represented by PWM duty cycle or switching functions Sa, Sb, Sc, where the upper switch is on (1) and the lower switch is on (0), and calculate the real-time current flowing into or out of the DC bus by combining this with the real-time AC current. The formula for calculating the real-time current can be:

[0184] Where Idc_est is the real-time current of the DC bus, Ia, Ib, and Ic are the real-time AC currents of phases A, B, and C, respectively, and Da, Db, and Dc are the conduction times of the upper or lower bridge arms of the three phases.

[0185] In some embodiments, the real-time alternating current is processed based on the law of charge conservation to obtain a real-time current, including: processing the real-time alternating current based on the law of charge conservation to obtain an initial current; and performing filtering and compensation processing on the initial current to obtain a real-time current.

[0186] Due to the severe disturbances introduced by the high-frequency switching operations of the inverter (such as the turn-on and turn-off of IGBTs or MOSFETs), the initial current contains a large amount of high-frequency ripple components with the same frequency as the switching frequency, as well as random quantization noise introduced during analog-to-digital conversion. Therefore, this application can perform filtering and compensation processing on the initial current to obtain the real-time current.

[0187] In this embodiment, filtering and compensation processes can be used to transform the initial current containing interference into a smooth and accurate real-time current, thus ensuring the quality of the input signal of the current observer.

[0188] Specifically, this application can use a digital filtering algorithm to perform low-pass filtering on the initial current to filter out high-frequency harmonic components caused by the switching of power devices.

[0189] As an example, this application can use an Infinite Impulse Response (IIR) filter or a Finite Impulse Response (FIR) filter as the filter architecture to achieve a balance between suppressing high-frequency noise and maintaining the dynamic response of the signal. Meanwhile, considering the stringent real-time requirements of motor control, the filter's cutoff frequency can be set, for example, to a value slightly lower than the switching frequency, thereby effectively attenuating ripple without introducing excessive phase delay.

[0190] In some embodiments, an inverter is provided between the motor and the battery, and a current sensor is connected in series between the inverter and the DC bus. In step S210, obtaining the real-time current of the DC bus between the motor and the battery includes: obtaining the sampled value of the current sensor; and performing low-pass filtering on the sampled value to obtain the real-time current.

[0191] In this embodiment, a current sensor is connected in series between the inverter and the DC bus to collect current signals in real time, which can be accomplished by an analog-to-digital converter (ADC).

[0192] Specifically, the analog-to-digital converter quantizes the analog voltage signal output by the current sensor at a fixed sampling frequency (e.g., 10 kHz or 20 kHz synchronized with the current loop control frequency) to obtain a digital sample value.

[0193] Meanwhile, due to the effects of motor commutation, inverter switching, and electromagnetic interference, the sampled values ​​contain high-frequency ripple noise. If the sampled values ​​are used directly, the control strategy will be falsely triggered. Therefore, the sampled values ​​need to be low-pass filtered to obtain the real-time current.

[0194] The physical essence of low-pass filtering is to construct a system that allows low-frequency signals to pass through while attenuating high-frequency components. Its engineering purpose is to filter out the high-frequency ripple caused by the PWM switching frequency and its sidebands, and extract the low-frequency current component that can truly reflect the energy flow trend of the DC bus.

[0195] In this application, it can be designed as a first-order hysteresis filter or a second-order Butterworth filter. The setting of its cutoff frequency needs to take into account both the noise suppression effect and the dynamic response speed of the system. For example, it can be set to a value that is less than one-tenth of the PWM switching frequency.

[0196] In some embodiments, the motor control method further includes: acquiring the real-time voltage of the DC bus; generating the real-time power at the DC bus based on the real-time voltage and real-time current; adjusting the lower limit of the mechanical output power of the motor based on the real-time power to obtain a dynamic lower limit of the mechanical output power; and adjusting the initial given command of the mechanical output power based on the dynamic lower limit of the mechanical output power to control the motor operation.

[0197] Specifically, this application can acquire the real-time voltage of the DC bus by deploying a voltage acquisition circuit on the DC bus side. The real-time voltage can characterize the potential level on the DC side, and at the same time reflect the current state of charge of the DC side energy storage unit and the key physical quantity of the system's energy supply and demand balance.

[0198] In the process of acquiring the real-time voltage of the DC bus, a high-precision voltage divider network can be used in conjunction with an isolation operational amplifier to linearly scale the DC bus voltage on the high-voltage side to the range allowed by the analog-to-digital converter of the microcontroller; the discrete digital voltage quantity, i.e., the real-time voltage, can be obtained by periodically sampling the voltage at a preset sampling frequency through the analog-to-digital converter.

[0199] Furthermore, this application can generate real-time power at the DC bus based on real-time voltage and real-time current.

[0200] Real-time power characterizes the instantaneous energy exchange rate between the motor controller and the battery, representing the amount of electrical energy transferred per unit time through the DC bus interface. Since real-time current has directionality (positive values ​​represent driving, negative values ​​represent power generation), real-time power also has a directional sign: positive power indicates that the battery outputs energy to the motor side, while negative power indicates that the motor feeds energy back to the battery.

[0201] In this application, compared with single current or voltage monitoring, by monitoring the changes in the amplitude and sign of real-time power, the energy flow status of the system can be grasped more comprehensively and the overall energy balance of the system can be reflected more accurately.

[0202] Furthermore, this application can adjust the lower limit of the mechanical output power of the motor according to the real-time power to obtain the dynamic lower limit of the mechanical output power, thereby determining the dynamic lower limit of the mechanical output power.

[0203] Mechanical output power can be understood as the power output from the motor shaft, obtained by subtracting copper loss, iron loss, and mechanical loss from electromagnetic power. It is the direct energy source for driving the vehicle load. The lower limit of mechanical output power constitutes the boundary condition constraining the minimum energy output of the motor. Dynamic adjustment of this lower limit allows the system to actively define the minimum output or feedback capability of the mechanical side based on the energy flow state on the DC side.

[0204] When abnormal fluctuations occur in the real-time power at the DC bus (e.g., a sharp drop or a reverse surge), it indicates that the energy supply and demand balance of the system has been broken. At this time, it is necessary to adjust the lower limit of the mechanical output power to match the energy carrying capacity of the DC side.

[0205] Specifically, this application can calculate the deviation between the DC bus power and the target power threshold in real time, and use a proportional-integral (PI) control algorithm to calculate the deviation to obtain the power adjustment amount. The power adjustment amount is then superimposed on the lower limit of the basic mechanical output power to generate a dynamic lower limit. If the real-time power is too low (indicating a shortage of DC side energy), the dynamic lower limit is raised positively to limit the motor from continuously drawing too much mechanical energy from the load and prevent the DC bus voltage from collapsing. If the real-time power is too high and in a feedback state (indicating an overvoltage risk), the dynamic lower limit is adjusted accordingly to cooperate with the torque current limiting logic and further constrain the energy feedback intensity from the power dimension.

[0206] Furthermore, this application can also adjust the initial setpoint command of the mechanical output power based on the dynamic lower limit of the mechanical output power to control the motor operation. Here, the initial setpoint command of the mechanical output power represents the desired motor output power; without limitation, under extreme operating conditions, this may lead to a mismatch between the motor output and the system capability.

[0207] Specifically, this application can set a limiter in the power command processing stage of the motor controller. Its lower limit boundary is determined by the dynamic lower limit value of the mechanical output power, and the upper limit boundary is determined by the physical limit power of the motor and the inverter. The initial given command of the mechanical output power is input into the limiter. When the initial command is lower than the dynamic lower limit value, the output command is forced to be the dynamic lower limit value. When the initial command is within the normal range, the initial command remains unchanged.

[0208] Furthermore, the adjusted target command is sent to the power outer loop or torque inner loop of the motor control system, and then converted into a specific torque current command to control the motor's operating state. This ensures that no matter how drastically the load demand changes, the mechanical output of the motor system is always within the safe range allowed by the DC bus energy flow. This achieves full-link coordinated protection from the electrical side (current, voltage) to the mechanical side (power), thereby avoiding the control blind spots that may exist in single-dimensional protection and significantly improving the energy management safety and robustness of the electric drive system under extreme operating conditions.

[0209] In the motor control method provided in this application embodiment, by acquiring the real-time current of the DC bus between the motor and the battery, and utilizing the zero-delay response characteristic of the current signal to changes in the energy flow direction, the lower limit of the motor's torque current is dynamically adjusted to obtain a target dynamic lower limit value for the torque current. The initial given command for the torque current is then adjusted based on the target dynamic lower limit value to obtain a target given command, which is then sent into the motor's current loop to control motor operation. This allows for the prediction of energy feedback risks before a significant increase in the bus voltage occurs. Consequently, when an abnormal downward trend in the bus current is detected, the lower limit of the torque current is positively raised to block the reverse energy flow path from the motor side to the DC bus. It effectively suppresses voltage spikes caused by field weakening exit and, when the control system command is zero but the motor is still detected to be in driving state, it negatively probes the lower limit of torque current to allow braking torque output and consume the motor's rotational kinetic energy. This effectively solves the technical problems that the DC bus is prone to unexpected abnormal voltage rise when the motor quickly exits from a deep field weakening state, and that the motor speed may run out of control when the control system issues a zero torque command for stopping or coasting. It avoids damage to power devices due to overvoltage impact or accidental shutdown of the drive system, and also eliminates the safety hazards caused by the inability to brake at high speeds. It significantly improves the reliability, safety and control accuracy of the electric drive system under complex dynamic conditions.

[0210] In some embodiments, this application also provides a motor control device 300 for executing any of the aforementioned motor control methods.

[0211] For details, please refer to Figure 3 , Figure 3 This is a schematic block diagram of the motor control device 300 provided in the embodiments of this application.

[0212] like Figure 3 As shown, the motor control device 300 provided in this application includes: an acquisition unit 310, a first adjustment unit 320, a second adjustment unit 330, and an output unit 340.

[0213] The acquisition unit 310 is used to acquire the real-time current of the DC bus between the motor and the battery; the first adjustment unit 320 is used to adjust the lower limit of the motor torque current based on the real-time current to obtain the target dynamic lower limit of the torque current; the second adjustment unit 330 is used to adjust the initial given command of the torque current according to the target dynamic lower limit to obtain the target given command; the output unit 340 is used to send the target given command into the current loop of the motor to control the motor operation.

[0214] The motor control device 300 provided in this application embodiment can obtain the real-time current of the DC bus between the motor and the battery; based on the real-time current, adjust the lower limit of the motor's torque current to obtain a target dynamic lower limit of the torque current; adjust the initial given command of the torque current according to the target dynamic lower limit to obtain a target given command; and send the target given command into the motor's current loop to control the motor operation.

[0215] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned motor control device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0216] The aforementioned motor control device 300 can be implemented as a computer program, which can, for example... Figure 4 The motor controller shown is running.

[0217] Please see Figure 4 , Figure 4 This is a schematic block diagram of the motor controller provided in the embodiments of this application.

[0218] See Figure 4 The electronic device 400 includes a processor 402, a memory, and a network interface 405 connected via a system bus 401. The memory may include a storage medium 403 and internal memory 404.

[0219] The storage medium 403 may store an operating system 4031 and a computer program 4032. When the computer program 4032 is executed, it causes the processor 402 to execute a motor control method.

[0220] The processor 402 provides computing and control capabilities to support the operation of the entire electronic device 400.

[0221] The internal memory 404 provides an environment for the operation of the computer program 4032 in the non-volatile storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute the motor control method.

[0222] This network interface 405 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the device to which the present application is applied. Specific devices may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.

[0223] The processor 402 is used to run the computer program 4032 stored in the memory to perform the following functions: acquire the real-time current of the DC bus between the motor and the battery; adjust the lower limit of the motor torque current based on the real-time current to obtain the target dynamic lower limit of the torque current; adjust the initial given command of the torque current according to the target dynamic lower limit to obtain the target given command; and send the target given command into the current loop of the motor to control the motor operation.

[0224] Those skilled in the art will understand that Figure 4 The embodiments of the electronic device 400 shown do not constitute a limitation on the specific configuration of the motor controller 110 provided in this application. In other embodiments, the electronic device 400 may include more or fewer components than shown, or combine certain components, or have different component arrangements, to form the motor controller 110 mentioned in this application. For example, in some embodiments, the electronic device 400 may only include a memory and a processor 402. In such embodiments, the structure and function of the memory and processor 402 are similar to those shown in the illustrations. Figure 4 The embodiments shown are consistent and will not be repeated here.

[0225] It should be understood that in the embodiments of this application, the processor 402 may be a central processing unit (CPU), or it may be other general-purpose processors 402, digital signal processors 402 (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 402 may be a microprocessor 402, or it may be any conventional processor 402, etc.

[0226] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a motor controller reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the motor controller to perform the following steps: acquiring the real-time current of the DC bus between the motor and the battery; adjusting the lower limit of the motor's torque current based on the real-time current to obtain a target dynamic lower limit value for the torque current; adjusting the initial setpoint command for the torque current according to the target dynamic lower limit value to obtain a target setpoint command; and sending the target setpoint command into the motor's current loop to control motor operation.

[0227] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0228] In another embodiment of this application, a computer storage medium is provided. This storage medium can be a non-volatile computer-readable storage medium or a volatile storage medium. The storage medium stores a computer program 4032, which, when executed by a processor 402, performs the following steps: acquiring the real-time current of the DC bus between the motor and the battery; adjusting the lower limit of the motor's torque current based on the real-time current to obtain a target dynamic lower limit value for the torque current; adjusting the initial given command for the torque current according to the target dynamic lower limit value to obtain a target given command; and sending the target given command into the motor's current loop to control the motor's operation.

[0229] The storage medium can be any computer-readable storage medium that can store program code, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0230] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0231] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0232] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0233] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a motor controller (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods provided in the various embodiments of this application.

[0234] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A motor control method, characterized in that, include: Obtain the real-time current of the DC bus between the motor and the battery; Based on the real-time current, the lower limit of the motor's torque current is adjusted to obtain the target dynamic lower limit of the torque current. Based on the target dynamic lower limit value, the initial given command of the torque current is adjusted to obtain the target given command; The target command is sent into the current loop of the motor to control the operation of the motor.

2. The motor control method according to claim 1, characterized in that, The step of adjusting the lower limit of the motor's torque current based on the real-time current to obtain the target dynamic lower limit of the torque current includes: If the real-time current is greater than the preset positive current threshold, the current change rate of the DC bus is generated; If the rate of change of current is less than the preset current drop slope threshold, the target dynamic lower limit value is obtained by positively raising the lower limit value of the motor torque current based on the real-time current.

3. The motor control method according to claim 2, characterized in that, The method further includes: If the real-time current is less than the preset negative current threshold, the maximum torque current of the motor is generated based on the rated maximum torque current of the motor. The initial given command is adjusted based on the maximum torque current to obtain the target given command.

4. The motor control method according to claim 2, characterized in that, If the rate of change of current is less than a preset current drop slope threshold, the target dynamic lower limit value is obtained by positively raising the lower limit value of the motor's torque current based on the real-time current, including: If the rate of change of current is less than the preset current drop slope threshold, obtain the energy recovery permission flag bit sent by the vehicle controller corresponding to the motor; If the energy recovery allow flag is a preset flag, the target dynamic lower limit value is obtained by positively raising the lower limit value of the motor torque current based on the real-time current.

5. The motor control method according to claim 2, characterized in that, The step of sending the target command into the current loop of the motor to control the operation of the motor includes: If the rate of change of current is less than the preset current drop slope threshold, the rate of change of the field weakening current of the motor is adjusted to obtain the adjusted rate of change command. The target given command and / or the adjusted rate of change command are sent to the current loop of the motor to control the operation of the motor.

6. The motor control method according to claim 2, characterized in that, The step of adjusting the lower limit of the motor's torque current based on the real-time current to obtain the target dynamic lower limit of the torque current includes: Based on the current change rate, at least one of the dynamic lower limit values ​​is obtained from the mapping table between the dynamic lower limit value and the current change rate. Based on the motor speed corresponding to the current change rate, the target dynamic lower limit value is obtained from at least one of the dynamic lower limit values.

7. The motor control method according to claim 1, characterized in that, The step of adjusting the lower limit of the motor's torque current based on the real-time current to obtain the target dynamic lower limit of the torque current includes: If the real-time current is greater than the preset positive current threshold and the initial given command is zero, the lower limit of the motor torque current is negatively raised according to the real-time current to obtain the target dynamic lower limit value.

8. The motor control method according to claim 2 or 7, characterized in that, The method further includes: The current deviation of the DC bus is obtained based on the preset safe current threshold and the real-time current. Perform a PI calculation on the current deviation to obtain the dynamic increment of the lower limit value of the torque current; The dynamic increment is subjected to amplitude limiting to obtain the target dynamic lower limit value.

9. The motor control method according to claim 8, characterized in that, The step of limiting the dynamic increment to obtain the target dynamic lower limit value includes: If the rate of change of the current of the DC bus is less than the preset current drop slope threshold, the maximum torque current of the motor is generated according to the rated maximum torque current of the motor. The baseline lower limit of the torque current is adjusted to the first target lower limit. Based on the rated maximum torque current, the lower limit of the torque current is adjusted to the first target upper limit. Based on the first target lower limit and the first target upper limit, the dynamic increment is subjected to amplitude limiting to obtain the target dynamic lower limit.

10. The motor control method according to claim 8, characterized in that, Before obtaining the current deviation of the DC bus based on the preset safe current threshold and the real-time current, the method further includes: If the rate of change of the current of the DC bus is less than the preset current drop slope threshold, the safety current threshold is adjusted to obtain the adjusted safety current threshold.

11. The motor control method according to claim 8, characterized in that, The step of limiting the dynamic increment to obtain the target dynamic lower limit value includes: If the real-time current is greater than the preset positive current threshold and the initial given command is zero, the maximum braking current of the motor is generated according to the rated maximum torque current of the motor. Based on the maximum braking current, the basic lower limit of the torque current is adjusted to the second target lower limit. Based on the rated maximum drive current of the motor, the lower limit of the torque current is adjusted to the second target upper limit. Based on the second target lower limit and the second target upper limit, the dynamic increment is subjected to amplitude limiting to obtain the target dynamic lower limit.

12. The motor control method according to claim 8, characterized in that, The step of limiting the dynamic increment to obtain the target dynamic lower limit value includes: The dynamic increment is subjected to amplitude limiting to obtain an initial dynamic lower limit value; The initial dynamic lower limit value is subjected to low-pass filtering to obtain the target dynamic lower limit value.

13. The motor control method according to claim 1, characterized in that, The step of adjusting the initial given command of the torque current according to the target dynamic lower limit value to obtain the target given command includes: The maximum torque current of the motor is generated based on the rated maximum torque current of the motor. Based on the target dynamic lower limit and the maximum torque current, the initial given command is subjected to amplitude limiting processing to obtain the target given command.

14. The motor control method according to claim 1, characterized in that, An inverter is provided between the motor and the battery. The step of acquiring the real-time current of the DC bus between the motor and the battery includes: Obtain the real-time AC current between the motor and the inverter; Based on the law of conservation of charge, the real-time alternating current is processed to obtain the real-time current.

15. The motor control method according to claim 14, characterized in that, The process of processing the real-time alternating current based on the law of charge conservation to obtain the real-time current includes: Based on the law of conservation of charge, the real-time alternating current is processed to obtain the initial current; The initial current is filtered and compensated to obtain the real-time current.

16. The motor control method according to claim 1, characterized in that, An inverter is provided between the motor and the battery, and a current sensor is connected in series between the inverter and the DC bus. The step of acquiring the real-time current of the DC bus between the motor and the battery includes: Obtain the sampled value of the current sensor; The sampled value is low-pass filtered to obtain the real-time current.

17. The motor control method according to claim 1, characterized in that, The method further includes: Obtain the real-time voltage of the DC bus; The real-time power at the DC bus is generated based on the real-time voltage and the real-time current. Based on the real-time power, the lower limit of the mechanical output power of the motor is adjusted to obtain the dynamic lower limit of the mechanical output power; The initial given command for the mechanical output power is adjusted according to the dynamic lower limit of the mechanical output power to control the operation of the motor.

18. An electric vehicle, characterized in that, The method includes a motor controller, which includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the steps of the motor control method according to any one of claims 1 to 17.