Motor control method and device, equipment and storage medium
By predicting and updating the control strategy based on interrupt signals in the motor controller, the uncertainty in the execution of the control strategy caused by the delay of the drive chip is solved, and the efficiency of electric drive is improved.
Patent Information
- Application Number
- CN202511133527.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-14
AI Technical Summary
The delay in the driver chip's recognition of the control strategy in the motor controller leads to uncertainty in the execution time of the control strategy, resulting in low electric drive efficiency.
By predicting whether a control strategy needs to be switched in the next cycle based on the interrupt signal in the motor controller, and temporarily updating the flag bit and sending the target control strategy when the interrupt signal arrives in the next cycle, the driver chip can be ensured to recognize and execute the new control strategy on the rising edge of the PWM signal in the next cycle.
This ensures the precise execution time of the control strategy, improves electric drive efficiency, and reduces the uncertainty of execution time.
Smart Images

Figure CN120956162A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor technology, and in particular to a motor control method, device, equipment and storage medium. Background Technology
[0002] The motor controller is a key component of the electric drive system. It can invert the DC power output from the power battery pack into three-phase AC power to control the motor to drive the load (such as a vehicle).
[0003] In the motor controller, the controller and driver chip can control the switching on and off of the hybrid switch based on a control strategy, thereby controlling the current in the motor windings to control the motor's torque and speed. Specifically, the controller can switch control strategies according to the vehicle's operating conditions and send the switched control strategy to the driver chip to adapt to changes in motor torque. The driver chip can load the control strategy on the rising edge of the pulse width modulation (PWM) signal and execute the control strategy on the rising edge of the next PWM signal cycle.
[0004] However, due to the inherent characteristics of the driver chip, a delay is required to identify the control strategy. This may cause the driver chip to delay by 1 to 2 PWM signal cycles to execute the switched control strategy, making it impossible to accurately guarantee the specific execution time of the control strategy, which in turn leads to low electric drive efficiency. Summary of the Invention
[0005] This application provides a motor control method, apparatus, device, and storage medium to improve electric drive efficiency.
[0006] In a first aspect, embodiments of this application provide a motor control method, the method being applied to a motor controller, the motor controller including a controller, a driver chip, and a hybrid switch, the motor controller being connected to a motor; the method includes:
[0007] In response to the interrupt signal in the i-th cycle, if the flag bit is determined to be the first value, it is determined whether the control strategy of the hybrid switch needs to be switched in the (i+2)-th cycle; if so, the flag bit is updated to the second value, and the target control strategy is updated; wherein, the target control strategy represents the control strategy of the hybrid switch in the (i+2)-th cycle; i is a positive integer;
[0008] In response to the interrupt signal in the (i+1)th cycle, if the flag bit is determined to be the second value, a target control strategy is sent to the driver chip, and the flag bit is updated to the first value; wherein, the target control strategy is executed by the driver chip in the (i+2)th cycle to control the on / off state of the hybrid switch to control the motor.
[0009] In one possible implementation, determining whether the control strategy for the hybrid switch needs to be switched in the (i+2)th cycle includes:
[0010] Obtain the motor's angle and angular velocity at the i-th cycle;
[0011] Based on the angle and the angular velocity, predict the current in the motor windings during the (i+2)th cycle;
[0012] Based on the current, determine the control strategy to be switched;
[0013] If it is determined that the control strategy to be switched is inconsistent with the target control strategy, then it is determined that the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle.
[0014] In one possible implementation, predicting the current in the motor windings during the (i+2)th cycle based on the angle and the angular velocity includes:
[0015] Obtain the desired current along the direct axis and the desired current along the quadrature axis; and determine the target angle of the motor at the (i+2)th cycle based on the angle and the angular velocity.
[0016] Based on the target angle, the desired direct-axis current, and the desired quadrature-axis current, determine the current in the motor windings during the (i+2)th cycle.
[0017] In one possible implementation, determining the motor winding current in the (i+2)th cycle based on the target angle, the desired direct-axis current, and the desired quadrature-axis current includes:
[0018] A first transformation process is performed on the target angle, the desired direct-axis current, and the desired quadrature-axis current to obtain a first intermediate current and a second intermediate current; wherein the first intermediate current and the second intermediate current characterize the current in a two-phase stationary coordinate system.
[0019] The first intermediate current and the second intermediate current are subjected to a second transformation process to obtain the current of the motor winding.
[0020] In one possible implementation, the updated target control strategy includes:
[0021] Update the target control strategy to the control strategy to be switched.
[0022] In one possible implementation, before determining whether the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle, the following is included:
[0023] If the flag is determined to be the first value and the counter value is 0, then it is determined whether the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle.
[0024] If the flag is determined to be the first value and the counter value is not 0, then the counter value is decremented by one and a preset interrupt algorithm is executed.
[0025] In one possible implementation, the method further includes:
[0026] If the flag is determined to be the second value, the value of the counter is updated to the third value.
[0027] Secondly, embodiments of this application provide a motor control device, which is applied to a motor controller. The motor controller includes a controller, a driver chip, and a hybrid switch, and is connected to a motor. The device includes:
[0028] An update module is used to respond to an interrupt signal in the i-th cycle. If the flag bit is determined to be the first value, it determines whether the control strategy of the hybrid switch needs to be switched in the (i+2)-th cycle. If so, the flag bit is updated to the second value, and the target control strategy is updated. The target control strategy represents the control strategy of the hybrid switch in the (i+2)-th cycle, where i is a positive integer.
[0029] The sending module is used to respond to the interrupt signal in the (i+1)th cycle. If the flag bit is determined to be the second value, the module sends the target control strategy to the driver chip and updates the flag bit to the first value. The target control strategy is executed by the driver chip in the (i+2)th cycle to control the on / off state of the hybrid switch to control the motor.
[0030] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0031] The memory stores computer-executed instructions;
[0032] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0033] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0034] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0035] The motor control method, apparatus, device, and storage medium provided in this application embodiment allow the motor controller to update the target control strategy and update the flag bit when it is determined that the hybrid switch needs to switch control strategies in the next cycle based on an interrupt signal and a flag bit is set to a first value. This ensures that when the interrupt signal arrives in the next cycle, the target control strategy can be sent to the driver chip based on the flag bit, allowing the driver chip to execute the target control strategy in the next cycle to control the switching of the hybrid switch and thus control the motor. This method allows for prediction in the current cycle whether a control strategy switch is needed in the next cycle. When a switch is determined, the control strategy can be immediately issued in response to the interrupt signal of the next cycle based on the definite relationship between the interrupt signal and the rising edge of the PWM signal. This ensures that the distance between the switching time of the control strategy and the rising edge of the PWM signal is greater than the switching delay of the driver chip, thereby ensuring that the control strategy can be executed in the next cycle. Compared to the uncertainty of the execution time of the control strategy in the prior art, this method guarantees the specific execution time of the control strategy and improves the efficiency of the electric drive. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0037] Figure 1 A schematic diagram illustrating one application scenario provided in this application;
[0038] Figure 2 A schematic diagram of a hybrid switch provided in this application;
[0039] Figure 3 A schematic diagram of the control strategy for the hybrid switch provided in this application;
[0040] Figure 4 A schematic diagram of a hybrid control strategy for a hybrid switch provided in this application;
[0041] Figure 5 A schematic diagram of a driver chip provided in this application;
[0042] Figure 6 A schematic diagram illustrating a control strategy switching method provided in this application;
[0043] Figure 7 Flowchart of the motor control method provided in this application Figure 1 ;
[0044] Figure 8 Flowchart of the motor control method provided in this application Figure 2 ;
[0045] Figure 9A schematic diagram of the structure of the motor control device provided in this application;
[0046] Figure 10 A schematic diagram of the structure of the electronic device provided in this application.
[0047] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0049] First, the terms used in this application will be explained:
[0050] Silicon devices: These are power semiconductor devices whose main semiconductor material is silicon, such as insulated gate bipolar transistors (IGBTs).
[0051] Silicon carbide (SiC) devices: These are power semiconductor devices whose main semiconductor material is SiC. For example, they can be SiC-metal-oxide-semiconductor field-effect transistors (SiC-MOSFETs).
[0052] Field-Oriented Control (FOC) is an advanced motor control method that decomposes the stator current into a d-axis (excitation component) aligned with the rotor magnetic field and a q-axis (torque component) orthogonal to it through coordinate transformation, thereby achieving independent control of the magnetic field and torque. The FOC algorithm is typically implemented in an interrupt service routine, which is triggered at a certain frequency, such as once every 100 microseconds.
[0053] Deadband: In motor control systems, deadband is a protective measure used to prevent shoot-through of switching transistors on the same bridge arm, which could damage the switching devices. Due to the inherent characteristics of the switching transistors, both turning on and turning off require a certain amount of time, with the turning-off time typically longer than the turning-on time. To prevent shoot-through during switching, a delay is usually added to the control signal of the switching transistor; this delay time is called the deadband.
[0054] Figure 1 This is a schematic diagram illustrating one application scenario provided by this application. For example... Figure 1 As shown, the electric drive system includes a motor controller and a motor. The motor controller includes a controller, multiple drive chips, and multiple hybrid switches. The motor controller is connected to a power battery pack, and it can invert the DC power supplied by the power battery pack into three-phase AC power to drive the motor and provide power to the vehicle.
[0055] It is understandable that the winding current of the motor includes three phases: U, V, and W. Each phase can include an upper bridge arm and a lower bridge arm, wherein each bridge arm can include... Figure 1 The driver chip and hybrid switch are shown within the dashed box. It should be noted that... Figure 1 The schematic structure of phase U is shown. The controller can send control signals and control strategies to the driver chip 1 of the upper bridge arm and the driver chip 2 of the lower bridge arm, respectively, to drive the hybrid switch 1 of the upper bridge arm and the hybrid switch 2 of the lower bridge arm, thereby generating the U-phase winding current. It should be noted that the other phases are similar to phase U, and will not be exemplified here.
[0056] The aforementioned controller is used to monitor, adjust, and control the operating state of the motor, and output control signals and control strategies to the drive chip. The control signal may be, for example, a PWM signal. The controller may be a microcontroller unit (MCU) or a central processing unit (CPU), or other chip with processing capabilities; this application does not limit the specific implementation of the controller.
[0057] The aforementioned driver chip is used to output a gate drive signal according to the control signal and control strategy from the controller, so as to control the turn-on and turn-off of the power semiconductor devices in the hybrid switch.
[0058] The aforementioned hybrid switch is used to convert DC power into three-phase AC power with adjustable frequency and voltage, providing suitable drive power for a three-phase motor and enabling the motor to operate at the desired speed and torque. This hybrid switch can be a hybrid switch composed of IGBTs and SiC-MOSFETs connected in parallel, or a hybrid switch composed of IGBTs and gallium nitride-MOSFETs connected in parallel, or other forms of hybrid switches, depending on actual requirements. Figure 2 A schematic diagram of a hybrid switch provided in this application is shown below. Figure 2 As shown, IGBTs and SiC-MOSFETs are connected in parallel to form a hybrid switch.
[0059] Taking a hybrid switch composed of IGBTs and SiC-MOSFETs connected in parallel as an example, in order to give full play to the advantages of the two power devices and obtain a higher current overload capacity, it is necessary to control the gate drive of the hybrid switch. Figure 3 This is a schematic diagram of the control strategy for the hybrid switch provided in this application. The gate drive signals of the SiC-MOSFET and IGBT of the hybrid switch can be referenced. Figure 3 As shown.
[0060] Under strategy I, enable delay t. on_delay and shutdown delay t off_delay Both values > 0, meaning that in a hybrid switch, the SiC-MOSFET is prioritized for turn-on before the IGBT and its turn-off is delayed. This allows the IGBT to operate in a zero-voltage switching state, reducing its switching losses and thus the overall losses of the hybrid switch. However, strategy I is an ideal scenario. Because SiC-MOSFETs are low-current devices, they need to withstand conduction currents several times their rated current for short periods during turn-on and turn-off, causing them to overheat and potentially damage. Furthermore, due to the high cost of SiC-MOSFETs, based on different t values... on_delay and t off_delay You can also set such as Figure 3 The other strategies shown are as follows.
[0061] Under strategy II, t on_delay =0,t off_delay A value >0 means that the IGBT can quickly turn on, which can improve the dynamic response capability of the system.
[0062] Under strategy III, t on_delay <0,t off_delay<0, the turn-on of the SiC-MOSFET lags behind that of the IGBT, and the turn-off of the SiC-MOSFET precedes that of the IGBT. This means that the SiC-MOSFET does not participate in operation for a certain period of time, which can reduce the usage time of the relatively expensive SiC-MOSFET and reduce costs.
[0063] Under strategy IV, t on_delay <0,t off_delay With a value >0, the SiC-MOSFET turns on later than the IGBT, but turns off later than the IGBT. This allows the SiC-MOSFET to maintain a current path for a period of time after the IGBT turns off, which helps to smoothly transition the current and reduce electromagnetic interference caused by sudden current changes.
[0064] It can also be adopted Figure 4 The hybrid control strategy shown Figure 4 A schematic diagram of a hybrid control strategy for a hybrid switch provided in this application. (Reference) Figure 4 As shown, different switching modes can be selected according to different operating conditions, when the current is less than or equal to the current threshold I. th When the aforementioned strategy I is adopted, if the current is greater than the current threshold I... th The aforementioned strategy III shall be adopted.
[0065] By employing the different control strategies described above, the on / off state of the hybrid switch can be controlled to regulate the winding current of the motor, thereby achieving motor control.
[0066] refer to Figure 5 As shown, Figure 5 This application provides a schematic diagram of a driver chip. As mentioned above, the driver chip can respond to the control signal G output by the controller. IN Depending on the control strategy, different gate drive signals are output. For example, when the driver chip recognizes that the control strategy issued by the controller is strategy I, it can output the gate drive signal corresponding to strategy I; when the issued control strategy is strategy III, it can output the gate drive signal corresponding to strategy III. The drive signal for the SiC-MOSFET is G. SiC The drive signal for the IGBT is G. Si However, due to the inherent characteristics of the driver chip, when the controller needs to switch control strategies, the driver chip needs to switch delays Δt (approximately 300ns) to identify the level signal of the control strategy, and this also needs to be done in G... IN The control strategy after the rising edge load switching, and in the next G IN The control strategy is executed on the rising edge.
[0067] For example, refer to Figure 6 As shown, Figure 6This application provides a schematic diagram of a control strategy switching method. When executing strategy I, it is necessary to switch to strategy III. At this time, if the timing of issuing the control strategy switching command coincides with G... IN If the distance between rising edges is greater than or equal to the switching delay Δt, it can be used in the current G. IN The rising edge identifies and loads Strategy III, and in the next G... IN Strategy III is executed on the rising edge. However, if the timing of the control strategy switching command is related to G... IN The distance between rising edges is less than the switching delay Δt, so it needs to be done in the next G IN The rising edge identifies and loads Strategy III, and then on the next G... IN The rising edge execution strategy III causes the driver chip to delay by at least one PWM signal cycle to execute the switched control strategy, making it impossible to accurately guarantee the specific execution time of the control strategy, which in turn leads to low electric drive efficiency.
[0068] In view of this, this application provides a motor control method that determines whether the hybrid switch needs to switch control strategies in the next cycle when each interrupt occurs. If switching is required, the value of the switching flag is updated to ensure that a new control strategy is immediately issued when an interrupt occurs in the next cycle. This ensures that the driver chip can recognize and load the new control strategy at the rising edge of the control signal in the next cycle, and then execute the new control strategy at the rising edge of the control signal in the cycle after that. In this way, the controller can guarantee the specific execution time of the control strategy and improve the efficiency of the electric drive.
[0069] The execution subject of this application embodiment can be the aforementioned motor controller, specifically, it can be the controller in the aforementioned motor controller.
[0070] The following describes the technical solution of this application and how it solves the aforementioned technical problems, taking the controller in the motor controller as an example. The specific embodiments described below can be combined with each other, and similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0071] Figure 7 Flowchart of the motor control method provided in this application Figure 1 ,like Figure 7 As shown, the method includes:
[0072] S101. In response to the interrupt signal of the i-th cycle, if the flag bit is determined to be the first value, determine whether it is necessary to switch the control strategy of the hybrid switch in the i+2-th cycle.
[0073] For example, the aforementioned interrupt signal can be an FOC interrupt signal. As mentioned earlier, the controller has a preset FOC interrupt algorithm that generates an interrupt signal periodically to trigger the interrupt. The aforementioned period is the period of the PWM signal, where i is a positive integer. It can be understood that the interrupt signal is synchronized with the PWM period; in other words, the FOC interrupt can be triggered at a specific moment in each PWM period.
[0074] For example, the aforementioned flag bit indicates whether a control strategy switch is required. For instance, the value of this flag bit can be stored in a first register. This flag bit value can be either a first value or a second value. The first value indicates that a control strategy switch is not required, for example, it can be 0 or 1. The second value indicates that a control strategy switch is required, and the second value is different from the first value. It should be noted that the address of the first register is not limited in this embodiment. In one example, the controller, in response to an interrupt signal in the i-th cycle, determines whether the flag bit is the first value by reading the value of the first register.
[0075] For example, as described above, the controller can send a control strategy to the hybrid switch to control its on / off state. Due to the time delay in the driver chip's recognition of the control strategy, to ensure the accurate execution of the control strategy, it is predicted whether the control strategy of the hybrid switch needs to be switched in cycle i+2.
[0076] Optionally, the controller may preset a second register to characterize the target control strategy, wherein the target control strategy is the control strategy of the hybrid switch in the (i+2)th cycle, and the value of the second register may be the number of the aforementioned control strategy or the ID assigned by the controller to each control strategy.
[0077] In one example, the controller can predict the current of the motor windings in the (i+2)th cycle and determine the control strategy to be switched by the hybrid switch in the (i+2)th cycle based on the current of the motor windings. If it is determined that the control strategy to be switched is inconsistent with the target control strategy, it is determined that the control strategy needs to be switched. If yes, it means that the control strategy needs to be switched, and step S102 is executed; if no, it means that the control strategy does not need to be switched, and the preset FOC interrupt algorithm can be executed. The content of the interrupt algorithm is not limited in this embodiment of the application.
[0078] In one possible implementation, the controller may have a preset prediction model. This prediction model can predict the current of the motor winding in the (i+2)th cycle based on the historical current of the motor winding in the time series. It should be noted that the embodiments of this application do not limit the type of prediction model.
[0079] In another possible implementation, the controller can first obtain the motor's angle and angular velocity at the i-th cycle, and then determine the motor's angle at the i+2-th cycle, and predict the motor winding current at the i+2-th cycle based on the motor's angle at the i+2-th cycle.
[0080] S102. Update the flag bit to the second value and update the target control policy.
[0081] For example, the target control strategy described above characterizes the control strategy of the hybrid switch in the i+2th cycle.
[0082] In one example, when the controller determines that the control strategy for switching the hybrid switch needs to be changed in cycle i+2, it can update the flag bit by updating the value of the first register, that is, updating the value of the first register to the second value. As mentioned above, when the controller determines that the control strategy for switching the hybrid switch needs to be changed in cycle i+2, it can determine the control strategy to be switched to and update the target control strategy to the control strategy to be switched to. For example, refer to... Figure 7 As shown, the control strategy to be switched can be Strategy III, and the target control strategy that has not been updated is Strategy I. It should be noted that... Figure 7 The illustration uses Strategy I and Strategy III as examples, and does not limit the control strategy for switching.
[0083] Optionally, after updating the flag bit to the second value and updating the target control policy, a preset FOC interrupt algorithm can be executed.
[0084] S103. In response to the interrupt signal of the (i+1)th cycle, if the flag bit is determined to be the second value, the target control strategy is sent to the driver chip and the flag bit is updated to the first value.
[0085] For example, in response to the interrupt signal of the (i+1)th cycle, when the controller determines that the flag bit is the second value, it can send the target control strategy to the driver chip. It is understood that the controller can send the number or ID of the control strategy represented by the target control strategy to the driver chip at this time, and update the value of the first register to the first value to update the flag bit.
[0086] It should be noted that the controller can insert a dead time T when generating the PWM signal. dead Typically in the microsecond range, the specific time can be set according to actual needs, for example, it could be 2µs. In this embodiment, the shortest time between the trigger time of the FOC interrupt signal and the rising edge of the PWM signal is T. dead / 2, and since FOC is time-triggered, the timing relationship between the rising edge of the FOC interrupt signal and the PWM signal can be accurately determined. (Reference) Figure 7As shown, after the interrupt signal in the i-th cycle is triggered, step S101 is executed immediately. When the flag bit is determined to be the first value, and the hybrid switch needs to switch control strategies in the (i+2)-th cycle, by setting the flag bit to the second value, after the interrupt signal in the (i+1)-th cycle is triggered, the controller can immediately send the target control strategy to the driver chip when the flag bit is determined to be the second value. Since the shortest time between the trigger time of the FOC interrupt signal and the rising edge of the PWM signal is T... dead / 2, which is much greater than the switching delay of the driver chip. That is, it can be ensured that the distance between the release time of the control strategy and the rising edge of the PWM signal is greater than the switching delay. In this way, it can be ensured that the above target control strategy can be executed by the driver chip in the i+2th cycle to control the on and off of the hybrid switch to control the motor.
[0087] Optionally, if the flag bit is determined to be the second value in response to the interrupt signal of the i-th cycle, it indicates that the control strategy for the i+1-th cycle needs to be sent in the i-th cycle. This control strategy for the i+1-th cycle can be sent to the driver chip in the i-th cycle and executed by the driver chip in the i+1-th cycle to control the on / off state of the hybrid switch to control the motor. When the flag bit is determined to be the first value in response to the interrupt signal of the i+1-th cycle, the process is similar to the aforementioned step S101, and so on. The embodiments of this application will not be illustrated in detail here.
[0088] Optionally, the driver chip has pre-set calibrated turn-on delay and turn-off delay corresponding to each strategy. Then, after receiving the target control strategy issued by the controller, it can generate the corresponding gate drive signal according to the turn-on delay and turn-off delay corresponding to the target control strategy.
[0089] Optionally, after sending the target control strategy and updating the flag bit to the first value, the controller may execute a preset FOC interrupt algorithm. The content of the interrupt algorithm is not limited in this embodiment.
[0090] It should be noted that the winding current of the motor includes three phases: U, V, and W. Each corresponding hybrid switch can be controlled through the aforementioned steps. It can be determined phase by phase or executed in parallel. This application does not limit this.
[0091] The motor control method provided in this application allows the motor controller to update the target control strategy and the flag bit when it determines that the hybrid switch needs to switch control strategies in the next cycle, based on an interrupt signal and a flag bit set to a first value. This ensures that when the interrupt signal arrives in the next cycle, the target control strategy can be sent to the driver chip based on the flag bit, allowing the driver chip to execute the target control strategy in the next cycle to control the switching of the hybrid switch and thus the motor. This method allows for advance prediction of whether a control strategy switch is needed in the next cycle. When a switch is determined, the control strategy can be immediately issued in response to the interrupt signal of the next cycle based on the definite relationship between the interrupt signal and the rising edge of the PWM signal. This ensures that the distance between the control strategy switching time and the rising edge of the PWM signal is greater than the switching delay of the driver chip, thereby guaranteeing that the control strategy can be executed in the next cycle. Compared to the uncertainty of control strategy execution time in existing technologies, this method ensures the precise execution time of the control strategy and improves electric drive efficiency.
[0092] Figure 8 Flowchart of the motor control method provided in this application Figure 2 ,like Figure 8 As shown, in this embodiment... Figure 7 Based on the embodiments, the motor control method is described in detail, which includes:
[0093] S201. In response to the interrupt signal of the i-th cycle, determine whether the flag bit is the first value.
[0094] If yes, proceed to step S202; otherwise, proceed to step S208. It should be noted that this step is similar to the aforementioned step S101, and will not be repeated here.
[0095] S202. Determine if the value of the counter is 0.
[0096] For example, the counter is used to prevent frequent switching of control strategies and ensure the stability of the motor system. If yes, then step S203 is executed; otherwise, step S209 is executed.
[0097] S203. Obtain the motor angle and angular velocity during the i-th cycle.
[0098] For example, the controller can obtain the motor's angle and angular velocity at the i-th cycle by reading the values of the motor's angle sensor and angular velocity sensor.
[0099] S204. Based on the angle and angular velocity, predict the current in the motor windings during the (i+2)th cycle.
[0100] For example, the current in the motor winding refers to the current passing through each winding of the motor, i.e., the phase current.
[0101] In some possible implementations, the controller may have a preset neural network model, which is trained based on the motor angle, the motor angular velocity, and the motor winding current in the (i+2)th cycle of the sample. Therefore, the controller can input the angle and angular velocity in the i-th cycle into the neural network model and output the motor winding current in the (i+2)th cycle.
[0102] In some possible implementations, the desired direct-axis current and the desired quadrature-axis current are obtained; and the target angle of the motor at the i+2th cycle is determined based on the angle and angular velocity; and the current of the motor winding at the i+2th cycle is determined based on the target angle, the desired direct-axis current, and the desired quadrature-axis current.
[0103] For example, in motor control, the desired current in the dq rotating coordinate system, i.e., the desired direct-axis current I, can be preset. dDes and the desired cross-axis current I qDes The controller can determine the target angle of the motor in the (i+2)th cycle based on the mapping relationship between angle, angular velocity, pulse period, and target angle. Then, based on the target angle, it transforms the desired current of the direct axis and the desired current of the quadrature axis to obtain the current of the motor winding in the (i+2)th cycle. Since the angle of the motor changes with time and speed, the mapping relationship between angle, angular velocity, pulse period, and target angle can be shown in formula (1).
[0104] θ NN = θ + ω × 2 × T s , formula (1)
[0105] Where, θ NN θ represents the target angle, ω represents the angular velocity, and T represents the target angle. s This indicates the pulse period, i.e., the period of the PWM signal.
[0106] Specifically, as shown in formulas (2) and (3) below, the controller can perform a first transformation process on the target angle, the desired current on the direct axis and the desired current on the quadrature axis to obtain a first intermediate current and a second intermediate current; and perform a second transformation process on the first intermediate current and the second intermediate current to obtain the current of the motor winding.
[0107] For example, the first intermediate current and the second intermediate current described above represent the current in a two-phase stationary coordinate system. The first transformation process described above can be an inverse transformation process of Park's Transformation, used to transform the current components in the rotating coordinate system to the two-phase stationary α-β coordinate system to obtain the first intermediate current I.α Second intermediate current I β The second transformation process can be the inverse transformation process of the Clarke Transformation, used to transform the two-phase stationary coordinate system back into the three-phase stationary coordinate system.
[0108]
[0109] Among them, I u I v I w Characterizes the three-phase current in the motor windings.
[0110] S205. Determine the control strategy to be switched based on the current.
[0111] For example, the controller can preset multiple switching conditions, each of which corresponds to a control strategy. Therefore, the controller can determine the switching conditions satisfied by the current and thus determine the control strategy to be switched.
[0112] For example, refer to Figure 4 The hybrid control strategy shown can switch on the condition that the current is greater than the current threshold I. th Then the control strategy to be switched can be determined as Strategy III; if the current is less than or equal to the current threshold I th If so, the control strategy to be switched to can be determined as Strategy I. Alternatively, a hybrid control system with multiple strategies can be set, and the switching conditions can be as shown in Table 1. It should be noted that Table 1 is merely illustrative, and the embodiments of this application do not limit the switching conditions for the control strategies.
[0113] Table 1 Switching Conditions
[0114] Switching conditions Control strategy [Current threshold 1, Current threshold 2] Strategy I [Current threshold 2, Current threshold 3] Strategy II [Current threshold 3, Current threshold 4] Strategy III [Current threshold 4, Current threshold 5] Strategy IV
[0115] S206. Determine whether the control strategy to be switched is consistent with the target control strategy.
[0116] For example, as mentioned above, a control strategy to be switched can be obtained. The controller can compare whether the control strategy to be switched is consistent with the target control strategy. If not, it means that the control strategy to be switched is inconsistent with the target control strategy. Then it is determined that the control strategy of the hybrid switch in the i+2 cycle needs to be switched, and step S207 is executed. If yes, it means that the control strategy does not need to be switched, and step S210 can continue to be executed.
[0117] It should be understood that in each cycle, the target control strategy is updated based on the judgment of the current cycle. In this step, the target control strategy before the update can represent the control strategy of the (i+1)th cycle. Then, the control strategy to be switched can be compared with the target control strategy to determine whether the control strategy of the (i+2)th cycle needs to be switched.
[0118] S207. Update the flag bit to the second value and update the target control policy.
[0119] It should be noted that this step is similar to the aforementioned step S102, and will not be repeated here.
[0120] Optionally, the target control policy can be updated to the control policy to be switched.
[0121] It should be noted that step S210 can be performed after this step.
[0122] S208: Send the target control strategy to the driver chip and update the flag bit to the first value.
[0123] For example, at this time, the flag bit is the second value, indicating that a control strategy switch is required. Therefore, the target control strategy determined in the (i-1)th cycle is sent to the driver chip. It should be noted that this step is similar to the aforementioned step S103, and will not be described again here.
[0124] Optionally, if the flag is determined to be the second value, the counter value is updated to the third value. This third value can be, for example, a preset value greater than 2, used to reduce the number of times the control strategy is updated; however, this embodiment does not limit the specific values.
[0125] Optionally, after this step, S210 can be executed.
[0126] S209. Decrement the value of the counter by one.
[0127] It should be noted that after completing this step, you can continue to execute step S210.
[0128] S210, Execute the preset interrupt algorithm.
[0129] For example, the preset interrupt algorithm can be the aforementioned FOC interrupt algorithm.
[0130] The motor control method provided in this application embodiment allows the motor controller to predict the motor winding current in the next cycle based on the motor's current angle and angular velocity when the flag bit is at a first value and the counter value is 0, based on an interrupt signal. The controller then determines the control strategy to be switched based on the motor winding current. By comparing the control strategy to be switched with the target control strategy, it determines whether the hybrid switch needs to switch the control strategy in the next cycle. If switching is required, the target control strategy is updated, and the flag bit is also updated. This allows the target control strategy to be sent to the driver chip based on the flag bit when the interrupt signal arrives in the next cycle, so that the target control strategy can be executed by the driver chip in the next cycle to control the switching of the hybrid switch and thus control the motor.
[0131] This method allows for the prediction of whether a control strategy switch is needed in the next cycle based on the motor winding current. When a switch is determined, the control strategy can be immediately issued in response to the interrupt signal of the next cycle, based on the deterministic relationship between the rising edges of the interrupt signal and the PWM signal. This ensures that the distance between the control strategy switch and the rising edge of the PWM signal is greater than the switching delay of the driver chip, thereby guaranteeing that the control strategy can be executed in the cycle after that. This ensures the precise execution time of the control strategy and improves the efficiency of the electric drive. Simultaneously, a counter is used to prevent frequent control strategy switching, ensuring the stability of the electric drive system.
[0132] Figure 9 A schematic diagram of the structure of the motor control device provided in this application is shown below. Figure 9 As shown, the motor control device 300 provided in this embodiment includes:
[0133] The update module 301 is used to respond to the interrupt signal of the i-th cycle. If the flag bit is determined to be the first value, it determines whether the control strategy of the hybrid switch needs to be switched in the (i+2)-th cycle. If so, the flag bit is updated to the second value, and the target control strategy is updated. The target control strategy represents the control strategy of the hybrid switch in the (i+2)-th cycle, where i is a positive integer.
[0134] The sending module 302 is used to respond to the interrupt signal in the (i+1)th cycle. If the flag bit is determined to be the second value, the target control strategy is sent to the driver chip and the flag bit is updated to the first value. The target control strategy is executed by the driver chip in the (i+2)th cycle to control the on / off state of the hybrid switch to control the motor.
[0135] In one possible implementation, the update module 301 is specifically used for:
[0136] Obtain the motor's angle and angular velocity at the i-th cycle;
[0137] Based on the angle and the angular velocity, predict the current in the motor windings during the (i+2)th cycle;
[0138] Based on the current, determine the control strategy to be switched;
[0139] If it is determined that the control strategy to be switched is inconsistent with the target control strategy, then it is determined that the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle.
[0140] In one possible implementation, the update module 301 is specifically used for:
[0141] Obtain the desired current along the direct axis and the desired current along the quadrature axis; and determine the target angle of the motor at the (i+2)th cycle based on the angle and the angular velocity.
[0142] Based on the target angle, the desired direct-axis current, and the desired quadrature-axis current, determine the current in the motor windings during the (i+2)th cycle.
[0143] In one possible implementation, the update module 301 is specifically used for:
[0144] A first transformation process is performed on the target angle, the desired direct-axis current, and the desired quadrature-axis current to obtain a first intermediate current and a second intermediate current; wherein the first intermediate current and the second intermediate current characterize the current in a two-phase stationary coordinate system.
[0145] The first intermediate current and the second intermediate current are subjected to a second transformation process to obtain the current of the motor winding.
[0146] In one possible implementation, the update module 301 is specifically used for:
[0147] Update the target control strategy to the control strategy to be switched.
[0148] In one possible implementation, the update module 301 is specifically used for:
[0149] If the flag is determined to be the first value and the counter value is 0, then it is determined whether the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle.
[0150] If the flag is determined to be the first value and the counter value is not 0, then the counter value is decremented by one and a preset interrupt algorithm is executed.
[0151] In one possible implementation, the sending module 302 is specifically used for:
[0152] If the flag is determined to be the second value, the value of the counter is updated to the third value.
[0153] The motor control device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0154] Figure 10 A schematic diagram of the structure of the electronic device provided in this application. Figure 10 As shown, the electronic device 400 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the electronic device 400 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404. This electronic device may, for example, be the aforementioned controller.
[0155] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.
[0156] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0157] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0158] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0159] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0160] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0161] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0162] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0163] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0164] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0165] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0166] In addition, the functional units in the various embodiments of the present invention 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.
[0167] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a 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 computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0168] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0169] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A motor control method, characterized in that, The method is applied to a motor controller, the motor controller including a controller, a driver chip, and a hybrid switch, the motor controller being connected to a motor; the method includes: In response to the interrupt signal in the i-th cycle, if the flag bit is determined to be the first value, it is determined whether the control strategy of the hybrid switch needs to be switched in the (i+2)-th cycle; if so, the flag bit is updated to the second value, and the target control strategy is updated; wherein, the target control strategy represents the control strategy of the hybrid switch in the (i+2)-th cycle; i is a positive integer; In response to the interrupt signal in the (i+1)th cycle, if the flag bit is determined to be the second value, a target control strategy is sent to the driver chip, and the flag bit is updated to the first value; wherein, the target control strategy is executed by the driver chip in the (i+2)th cycle to control the on / off state of the hybrid switch to control the motor.
2. The method according to claim 1, characterized in that, The step of determining whether the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle includes: Obtain the motor's angle and angular velocity at the i-th cycle; Based on the angle and the angular velocity, predict the current in the motor windings during the (i+2)th cycle; Based on the current, determine the control strategy to be switched; If it is determined that the control strategy to be switched is inconsistent with the target control strategy, then it is determined that the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle.
3. The method according to claim 2, characterized in that, The step of predicting the current of the motor winding in the (i+2)th cycle based on the angle and the angular velocity includes: Obtain the desired current along the direct axis and the desired current along the quadrature axis; and determine the target angle of the motor at the (i+2)th cycle based on the angle and the angular velocity. Based on the target angle, the desired direct-axis current, and the desired quadrature-axis current, determine the current in the motor windings during the (i+2)th cycle.
4. The method according to claim 3, characterized in that, The step of determining the motor winding current in the (i+2)th cycle based on the target angle, the desired direct-axis current, and the desired quadrature-axis current includes: A first transformation process is performed on the target angle, the desired direct-axis current, and the desired quadrature-axis current to obtain a first intermediate current and a second intermediate current; wherein the first intermediate current and the second intermediate current characterize the current in a two-phase stationary coordinate system. The first intermediate current and the second intermediate current are subjected to a second transformation process to obtain the current of the motor winding.
5. The method according to claim 2, characterized in that, The updated target control strategy includes: Update the target control strategy to the control strategy to be switched.
6. The method according to any one of claims 1-5, characterized in that, Before determining whether the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle, the following is included: If the flag is determined to be the first value and the counter value is 0, then it is determined whether the control strategy of the hybrid switch needs to be switched in the (i+2)th cycle. If the flag is determined to be the first value and the counter value is not 0, then the counter value is decremented by one and a preset interrupt algorithm is executed.
7. The method according to claim 6, characterized in that, The method further includes: If the flag is determined to be the second value, the value of the counter is updated to the third value.
8. A motor control device, characterized in that, The device is applied to a motor controller, the motor controller including a controller, a driver chip, and a hybrid switch, the motor controller being connected to a motor; the device includes: An update module is used to respond to an interrupt signal in the i-th cycle. If the flag bit is determined to be the first value, it determines whether the control strategy of the hybrid switch needs to be switched in the (i+2)-th cycle. If so, the flag bit is updated to the second value, and the target control strategy is updated. The target control strategy represents the control strategy of the hybrid switch in the (i+2)-th cycle, where i is a positive integer. The sending module is used to respond to the interrupt signal in the (i+1)th cycle. If the flag bit is determined to be the second value, the module sends the target control strategy to the driver chip and updates the flag bit to the first value. The target control strategy is executed by the driver chip in the (i+2)th cycle to control the on / off state of the hybrid switch to control the motor.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Silicon carbide and silicon hybrid device driving method and circuit
CN117543947A
HyS driving circuit and method for cooperatively regulating and controlling switching time sequence and driving voltage
CN117997323A