Method and device for determining a three-phase current
Patent Information
- Application Number
- CN202611177605.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-30
AI Technical Summary
相关技术中引入多个电阻,因此存在着不同温度环境会对三个电阻的采样结果产生影响,导致三相电流测量不准确的问题
[0010]根据本申请实施例提供的三相电流的确定方法以及设备,通过确定电机所在的目标扇区,并确定目标扇区内需要对母线电流进行采样的第一采样时间点和第二采样时间点,接着在计时器的计时时间点到达第一采样时间点的情况下,可以利用母线上的采样电阻来获取母线上的电流,该电流可以表征三相电流中的某一相电流,然后在计时器的计时时间点到达第二采样时间点的情况下,利用母线上的采样电阻来获取母线上的电流,该电流可以表征三相电流中的又一相电流,在获取到两相电流后可以根据两相电流,确定第三相的电流。本申请实施例通过在母线上设置单个采样电阻即可重构三相电流,降低了多个电阻对三相电流进行采样时因温漂差异导致的采样偏差,提高了三相电流测量的准确性。
Smart Images

Figure CN123019559A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of motor control, and in particular relates to a method and device for determining three-phase current. Background Technology
[0002] In the field of sensorless motor control, the rotor position is determined by the three-phase current to achieve speed control.
[0003] In related technologies, a common method for obtaining three-phase current is to connect at least one sampling resistor between the three-phase lines of the motor and the inverter bridge of the controller, and then sample the three-phase current through multiple resistors. However, the introduction of multiple resistors in these technologies introduces a problem where different temperature environments can affect the sampling results of the three resistors, leading to inaccurate three-phase current measurements. Summary of the Invention
[0004] This application provides a method and apparatus for determining three-phase current, which can improve the accuracy of three-phase current measurement.
[0005] In a first aspect, embodiments of this application provide a method for determining three-phase current, including: Based on the obtained position of the motor rotor, determine the target sector where the motor is located; Determine the first sampling time point and the second sampling time point within the target sector; When the timer reaches the first sampling time point, the first current on the bus is determined using the sampling resistor on the bus. The first current on the bus represents the first phase current. When the timing point of the timer reaches the second sampling point, the second current on the bus is determined using the sampling resistor on the bus. The second current on the bus represents the second phase current. The third phase current is determined based on the first and second phase currents.
[0006] Based on the same inventive concept, in a second aspect, embodiments of this application also provide a three-phase current determination device, comprising: The target sector determination module is used to determine the target sector where the motor is located based on the obtained position of the motor rotor; The sampling time point determination module is also used to determine the first sampling time point and the second sampling time point within the target sector; The first phase current determination module is used to determine the first current on the bus by using the sampling resistor on the bus when the timing point of the timer reaches the first sampling time point. The first current on the bus represents the first phase current. The second phase current determination module is used to determine the second current on the bus by using the sampling resistor on the bus when the timing point of the timer reaches the second sampling point. The second current on the bus represents the second phase current. The third phase current determination module is also used to determine the third phase current based on the first phase current and the second phase current.
[0007] Based on the same inventive concept, in a third aspect, embodiments of this application also provide an electronic device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method for determining three-phase current in the first aspect, or any embodiment of the first aspect.
[0008] Based on the same inventive concept, in a fourth aspect, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the first aspect, or the method for determining three-phase current in any embodiment of the first aspect.
[0009] Based on the same inventive concept, in a fifth aspect, embodiments of this application also provide a computer program product, wherein instructions in the computer program product, when executed by a processor of a device, enable the device to execute the method for determining three-phase current in the first aspect or any embodiment of the first aspect.
[0010] According to the three-phase current determination method and device provided in this application, by determining the target sector where the motor is located, and determining the first and second sampling time points within the target sector where the bus current needs to be sampled, when the timer reaches the first sampling time point, the current on the bus can be obtained using the sampling resistor on the bus. This current can represent one phase current of the three-phase current. Then, when the timer reaches the second sampling time point, the current on the bus can be obtained using the sampling resistor on the bus. This current can represent another phase current of the three-phase current. After obtaining two phase currents, the current of the third phase can be determined based on these two phase currents. This application embodiment can reconstruct the three-phase current by setting a single sampling resistor on the bus, reducing the sampling deviation caused by temperature drift differences when multiple resistors sample the three-phase current, and improving the accuracy of three-phase current measurement. Attached Figure Description
[0011] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings, in which the same or similar reference numerals denote the same or similar features, and the drawings are not drawn to scale.
[0012] Figure 1This is a schematic diagram of a structure for acquiring three-phase current using the relevant technology provided in this application embodiment; Figure 2 This is a flowchart illustrating a method for determining three-phase current provided in an embodiment of this application; Figure 3 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 4 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 5 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 6 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 7 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 8 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 9 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 10 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application; Figure 11 This is a schematic diagram of a circuit structure for collecting three-phase current in an embodiment of this application; Figure 12 This is a schematic diagram showing the relationship between bus current and phase current in each sector in the method for determining three-phase current provided in this application embodiment; Figure 13 This is a schematic diagram illustrating the process of determining the first sampling time point and the second sampling time point in the method for determining three-phase current provided in this application embodiment; Figure 14 This is a schematic diagram of a three-phase current determination device provided in an embodiment of this application; Figure 15 This is a schematic diagram of a three-phase current determination device provided in an embodiment of this application. Detailed Implementation
[0013] The features and exemplary embodiments of various aspects of this application will now be described in detail. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain this application and are not configured to limit this application. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples of this application.
[0014] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0015] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0016] Various modifications and variations can be made to this application without departing from its spirit or scope, which will be apparent to those skilled in the art. Therefore, this application is intended to cover modifications and variations falling within the scope of the corresponding claims (the claimed technical solutions) and their equivalents. It should be noted that the implementation methods provided in the embodiments of this application can be combined with each other without contradiction.
[0017] Before describing the technical solutions provided in the embodiments of this application, in order to facilitate understanding of the embodiments of this application, this application first specifically explains the problems existing in the related technologies: In the field of sensorless motor control, the rotor position is determined by the three-phase current to achieve speed control. By sampling the motor's three-phase current using resistors, the motor's control capability can be effectively improved. Simultaneously, by using sampling resistors to control the motor and detecting overcurrent faults through phase current values, the control effect can be optimized, reducing research and development and maintenance costs.
[0018] Output current sampling refers to measuring the current output from the stator windings of a motor. This current directly reflects the generation of electromagnetic force and the motor's torque output. By connecting a sampling resistor in series with the motor, the current measured across the sampling resistor is the current of the motor's phase, which can be directly applied to the motor's FOC control algorithm and related current fault detection.
[0019] Related technologies for measuring the three-phase current of brushless motors, such as... Figure 1 As shown: 1) Connect sampling resistors R1, R2 and R3 respectively between the three-phase lines of the motor and the inverter bridge of the controller; 2) The voltage across the sampling resistors R1, R2, and R3 is amplified using an operational amplifier circuit; 3) The voltage value after amplification by the amplifier circuit is acquired by the AD acquisition module of the digital signal processor (DSP); 4) Calculate the voltage value using the formula and output the three-phase current value.
[0020] The relevant technology connects sampling resistors R1, R2 and R3 between the three-phase lines of the motor and the inverter bridge of the controller, respectively, and samples the three-phase current through these three resistors.
[0021] However, due to the inherent deviations in the characteristics of different resistors, and the influence of different temperature environments on the sampling results of the three resistors during motor operation, the three-phase current measurement becomes inaccurate, affecting the accuracy of rotor position estimation and speed control, and reducing the reliability and stability of the motor control system.
[0022] Therefore, the relevant technology suffers from inaccurate three-phase current measurement.
[0023] Based on this, the embodiments of this application provide a method and device for determining three-phase current. By setting a single sampling resistor on the bus, the three-phase current can be reconstructed, which reduces the sampling deviation caused by temperature drift differences when multiple resistors sample the three-phase current, and improves the accuracy of three-phase current measurement.
[0024] The method for determining three-phase current provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0025] Figure 2This is a schematic flowchart of a method for determining three-phase current provided in an embodiment of this application, as shown below. Figure 2 As shown, the method may include steps S110 to S150.
[0026] S110, determine the target sector where the motor is located based on the obtained position of the motor rotor.
[0027] A sector is a region that divides the electrical cycle of a motor based on the position of the motor rotor. Each region can be called a sector, and each sector corresponds to a specific angular range.
[0028] Specifically, the first step is to determine the current sector of the motor based on the obtained position of the motor rotor. This sector can be called the target sector. For example, one rotation of the motor rotor can be divided into six fixed sectors, each with a 60° electrical angle. When the rotor position is within the range of 0° to 60° electrical angle, the target sector is sector 1; when it is within the range of 60° to 120° electrical angle, the target sector is sector 2.
[0029] S120, determine the first sampling time point and the second sampling time point within the target sector.
[0030] Specifically, two samples can be taken within the target sector where the motor is currently located. The time points of the two samples need to be determined, which can be called the first sampling time point and the second sampling time point. The first sampling time point is earlier than the second sampling time point.
[0031] For example, the first and second sampling time points corresponding to the target sector can be obtained from a preset correspondence between sectors and sampling time points. There is no need to sample the current flowing through the sampling resistor on the bus in real time; sampling only needs to be performed at two sampling time points within a sector. This reduces power consumption and saves costs by eliminating the need to obtain the current information of the sampling resistor flowing through the bus in real time.
[0032] S130: When the timing point of the timer reaches the first sampling time point, the first current on the bus is determined using the sampling resistor on the bus. The first current on the bus represents the first phase current.
[0033] The sampling resistor is located on the busbar. For example, the sampling resistor can be located on the positive busbar.
[0034] Two of the three-phase currents are obtained by sampling the bus current at the first and second sampling time points, respectively, while the third phase current is calculated based on the two-phase currents and Kirchhoff's laws.
[0035] The bus current sampled at the first sampling time point is numerically equal to one of the three-phase currents, and therefore can represent one phase current in the three-phase current. Which specific phase current is represented is determined by the target sector.
[0036] Specifically, a timer can be used to monitor whether the current time is the first sampling time point. If the timer detects that the current time is the first sampling time point, the current flowing through the sampling resistor on the bus can be obtained. The bus current collected at the first sampling time point is numerically equal to the current of a certain phase, so it can characterize the current of a certain phase.
[0037] S140: When the timing point of the timer reaches the second sampling point, the second current on the bus is obtained using the sampling resistor on the bus. The second current on the bus represents the second phase current.
[0038] Specifically, a timer can be used to monitor whether the current time is the second sampling time point. If the timer detects that the current time is the second sampling time point, the current flowing through the sampling resistor on the bus can be obtained. The bus current collected at the second sampling time point is numerically equal to the current of another phase in the three-phase current. Therefore, the second current on the bus can characterize the second phase current.
[0039] S150, determine the third phase current based on the first phase current and the second phase current.
[0040] Specifically, the current on the bus collected at the first sampling time point represents one phase current of the three-phase current, the current on the bus collected at the second sampling time point represents another phase current of the three-phase current, and the third phase current can be calculated using Kirchhoff's current law.
[0041] In one example, the initial position of the motor rotor is known. When the motor starts, the target sector where the motor is located can be determined based on the angle range corresponding to the known initial position of the motor rotor. For example, if the motor rotor position is within the electrical angle range of 0° to 60°, the target sector is sector 1. By sampling at the two sampling time points corresponding to sector 1 and reconstructing the three-phase current, the real-time position and speed of the motor rotor can be determined, and it can be determined when the motor rotor arrives at sector 2. After the motor rotor arrives at sector 2, sampling can be performed at the two sampling time points corresponding to sector 2, and the three-phase current can be reconstructed, and the real-time position and speed of the motor rotor can be determined, and it can be determined when the motor rotor arrives at sector 3, and so on.
[0042] According to the three-phase current determination method provided in this application embodiment, the target sector where the motor is located is determined, and the first and second sampling time points for sampling the bus current within the target sector are determined. Then, when the timer reaches the first sampling time point, the current on the bus can be obtained using the sampling resistor on the bus. This current can represent one phase current of the three-phase current. Then, when the timer reaches the second sampling time point, the current on the bus can be obtained using the sampling resistor on the bus. This current can represent another phase current of the three-phase current. After obtaining two phase currents, the current of the third phase can be determined based on the two phase currents. This application embodiment can reconstruct the three-phase current by setting a single sampling resistor on the bus, reducing the sampling deviation caused by temperature drift differences when sampling the three-phase current with multiple resistors, and improving the accuracy of three-phase current measurement.
[0043] It should be noted that in the field of sensorless motor control, the rotor position needs to be determined through three-phase current to achieve speed control. In related technologies, the three-phase current needs to be sampled through three resistors R1, R2, and R3. However, in this embodiment, the method of obtaining the current is optimized, namely, the single shunt resistor technology, which only uses the information contained in the current flowing through the DC bus to reconstruct the three-phase current, and then uses it for sensorless control.
[0044] Figure 3 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application.
[0045] In some embodiments, such as Figure 3 As shown, step S110 determines the target sector where the motor is located based on the obtained position of the motor rotor, and may include steps S111 and S112.
[0046] Steps S111 and S112 are methods for determining the target sector where the motor rotor is currently located based on the obtained position of the motor rotor during the motor startup phase.
[0047] S111, based on the angular position of the motor rotor, divides one revolution of the motor rotor into multiple fixed sectors.
[0048] Specifically, the rotation of the motor rotor can be divided into multiple fixed sectors in advance based on the different angular positions of the motor rotor. For example, the rotation of the motor rotor can be divided into six sectors, each sector being 60° electrical angle. When the rotor position is in the range of 0° to 60° electrical angle, it corresponds to sector 1; when it is in the range of 60° to 120° electrical angle, it corresponds to sector 2, and so on.
[0049] S112, Determine the target sector where the motor is located based on the angle range corresponding to the initial position of the motor rotor.
[0050] Specifically, the actual position of the motor rotor at startup is known. Based on this position, the sector in which the motor starts can be determined. Then, the motor is driven, and the three-phase current is acquired in real-time according to steps S120-S150 to determine the rotor position and speed. For example, when the actual position of the motor rotor at startup is within the electrical angle range of 0° to 60°, it corresponds to sector 1. As another example, when the actual position of the motor rotor at startup is within the electrical angle range of 60° to 120°, it corresponds to sector 2.
[0051] This application embodiment first determines the sector where the motor starts based on the actual position of the motor rotor when it starts, then drives the motor and obtains the three-phase current in real time according to steps S120~S150 to determine the position and speed of the motor rotor, thereby determining the target sector where the motor is located at different times, and then steps S110~S150 can be executed cyclically.
[0052] Figure 4 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application.
[0053] In some embodiments, such as Figure 4 As shown, step S120 determines the first sampling time point and the second sampling time point within the target sector, and may include steps S121 to S124.
[0054] S121, obtain the duty cycle corresponding to each phase pulse width modulation signal.
[0055] S122, among multiple duty cycles, determine the first type of duty cycle and the second type of duty cycle based on the target sector.
[0056] The first type of duty cycle is used to calculate the first sampling time point, and the second type of duty cycle is used to calculate the second sampling time point.
[0057] For example, by querying Table 1, the first type of duty cycle and the second type of duty cycle can be determined based on the target sector.
[0058] Table 1 Among them, T su T represents the duty cycle corresponding to the U-phase pulse width modulation signal. sv T represents the duty cycle corresponding to the V-phase pulse width modulation signal. sw This represents the duty cycle corresponding to the W-phase pulse width modulation signal.
[0059] S123, determine the first sampling time point within the target sector based on the first type of duty cycle.
[0060] S124, determine the second sampling time point within the target sector based on the second type of duty cycle.
[0061] Specifically, the calculation of the sampling time point varies depending on the sector where the motor is located. Specifically, the duty cycle corresponding to each phase pulse width modulation signal can be divided into two categories based on the target sector, namely the first type of duty cycle and the second type of duty cycle. Thus, the first sampling time point in the target sector can be determined based on the first type of duty cycle, and the second sampling time point in the target sector can be determined based on the second type of duty cycle.
[0062] In this embodiment of the application, the first type of duty cycle and the second type of duty cycle corresponding to different target sectors can be determined by looking up Table 1. Then, the first sampling time point in the target sector can be determined according to the first type of duty cycle, and the second sampling time point in the target sector can be determined according to the second type of duty cycle. Thus, the bus current can be sampled when the first sampling time point and the second sampling time point arrive.
[0063] In some embodiments, such as Figure 5 As shown, the first type of duty cycle includes the first duty cycle T. sx1 Second duty cycle T sx2 Step S123 determines the first sampling time point in the target sector based on the first type of duty cycle, which may include steps S1231 to S1234.
[0064] S1231, Obtain the period T of the pulse width modulation signal. PWM .
[0065] S1232, the first preset coefficient k1 is combined with the period T of the pulse width modulation signal. PWM Multiply them to get the first product.
[0066] S1233, set the second preset coefficient k2 and the period T of the pulse width modulation signal. PWM and the first duty cycle T sx1 Second duty cycle T sx2 Multiply the sums together to get the second product.
[0067] S1234, subtract the second product from the first product to obtain the first sampling time point CmpA within the target sector. PWM4 .
[0068] For example, the first type of duty cycle can be substituted into Formula 1 to calculate the first sampling time point in the target sector.
[0069] Among them, CmpA PWM4 The first sampling time point within the target sector, k1 is the first preset coefficient, k2 is the second preset coefficient, and Tsx1 and T sx2 For the first type of duty cycle, T PWM This represents the period duration of the pulse width modulation signal.
[0070] For example, T in the first type of duty cycle can be determined by looking up Table 2. sx1 and T sx2 When the target sector is sector 1, T sx1 =T su T sx2 =T sv Substituting this into Equation 1 above, we can obtain the first sampling time point CmpA within the target sector. PWM4 .
[0071] Table 2 This application embodiment can be based on the first type duty cycle T corresponding to different target sectors. sx1 and T sx2 The first sampling time point can be calculated quickly and accurately.
[0072] In some embodiments, such as Figure 6 As shown, the second type of duty cycle includes the third duty cycle T. sy1 and the fourth duty cycle T sy2 Step S124 determines the second sampling time point within the target sector based on the second type of duty cycle, and may include steps S1241 to S1243.
[0073] S1241, the third preset coefficient k3 is combined with the period T of the pulse width modulation signal. PWM Multiply them to get the third product.
[0074] S1242, set the fourth preset coefficient k4 and the period T of the pulse width modulation signal. PWM and the third duty cycle T sy1 and the fourth duty cycle T sy2 Multiplying the sums together, we get the fourth product.
[0075] S1243, subtract the fourth product from the third product to obtain the second sampling time point CmpA within the target sector. PWM5 .
[0076] For example, the second type of duty cycle can be substituted into Formula 2 to calculate the second sampling time point within the target sector.
[0077] Among them, CmpA PWM5 The second sampling time point within the target sector, k3 is the third preset coefficient, k4 is the fourth preset coefficient, and T sy1and T sy2 This is the second type of duty cycle.
[0078] For example, k1=k3, k2=k4.
[0079] For example, T in the second type of duty cycle can be determined by querying Table 3. sy1 and T sy2 When the target sector is sector 1, T sy1 =T sv T sy2 =T sw Substituting this into Equation 2 above, we can obtain the second sampling point CmpA within the target sector. PWM5 .
[0080] Table 3 This application embodiment can be based on the second type duty cycle T corresponding to different target sectors. sy1 and T sy2 The second sampling time point can be calculated quickly and accurately.
[0081] In one example, k1=k3=0.5, k2=k4=0.25.
[0082] For example, the first sampling time point CmpA can be calculated using formulas 3 and 4. PWM4 Second sampling time point CmpA PWM5 : Among them, T sx1 T sx2 T sy1 and T sy2 The results can be obtained by querying Tables 2 and 3.
[0083] This application embodiment can be based on the first type duty cycle T corresponding to different target sectors. sx1 and T sx2 The first sampling time point is calculated quickly and accurately, and the second type of duty cycle T corresponding to different target sectors is used as the basis for calculation. sy1 and T sy2 The second sampling time point can be calculated quickly and accurately.
[0084] In some embodiments, such as Figure 7 As shown, step S122 determines the first type of duty cycle and the second type of duty cycle based on the target sector among multiple duty cycles, and may include steps S1221 to S1226.
[0085] S1221, when the target sector is the first sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal.
[0086] For example, when the target sector is sector 1, the duty cycle T of the first type of duty cycle, including the U-phase pulse width modulation signal, can be obtained by looking up Table 2. su Duty cycle T of the phase V pulse width modulation signal sv By referring to Table 3, we can obtain the duty cycle T of the second type of duty cycle, which includes the V-phase pulse width modulation signal. sv Duty cycle T of the W-phase pulse width modulation signal sw .
[0087] S1222, and / or, when the target sector is the second sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal.
[0088] S1223, and / or, when the target sector is the third sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal.
[0089] S1224, and / or, when the target sector is the fourth sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal.
[0090] S1225, and / or, when the target sector is the fifth sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal.
[0091] S1226, and / or, when the target sector is the sixth sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal.
[0092] For example, the first sector is sector 1, the second sector is sector 2, ..., and the sixth sector is sector 6. The first type of duty cycle for each sector can be obtained by looking up Table 2, and the second type of duty cycle for each sector can be obtained by looking up Table 3.
[0093] This application embodiment solidifies the sampling logic under six sectors into specific duty cycle combination rules, so that the controller does not need to perform complex real-time vector calculations. It only needs to directly read the corresponding two-phase duty cycle according to the sector number, thereby reducing the computational burden of the DSP, enabling rapid calculation of the sampling time point, and improving the accuracy and efficiency of determining the sampling time point.
[0094] Figure 8 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application.
[0095] In some embodiments, such as Figure 8 As shown, step S130, when the timer reaches the first sampling time point, uses the sampling resistor on the bus to determine the first current on the bus, and may include steps S131 to S134.
[0096] S131, when the timer reaches the first sampling time point, a first trigger signal is generated.
[0097] S132, in response to receiving the first trigger signal, detects information about the first current flowing through the sampling resistor on the bus.
[0098] S133: After storing the information of the first current in the memory, a first interrupt enable signal is generated.
[0099] S134 uses an interrupt function to respond to the received first interrupt enable signal and reads the information of the first current from the memory.
[0100] Specifically, when the timer reaches the pre-calculated first sampling time point, a hardware trigger signal can be generated, such as a level transition of the PWM4 wave. This signal will trigger the detection of the current flowing through the sampling resistor on the bus, store the current sampling result in the memory, and at the same time generate an interrupt enable signal. In the interrupt service function, a read operation is performed to retrieve the current information just stored in the memory.
[0101] In this embodiment, when the timer reaches the first sampling time point, the first current flowing through the sampling resistor on the bus can be collected. Then, the collected first current information is stored in the memory and an interrupt enable signal is generated. The first current information can be read from the memory using a pre-programmed interrupt function, ensuring that the first current information on the bus can be obtained in a timely and accurate manner, providing a reliable guarantee for the accurate determination of the three-phase current.
[0102] Figure 9 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application.
[0103] In some embodiments, such as Figure 9 As shown, step S140, when the timing point of the timer reaches the second sampling time point, uses the sampling resistor on the bus to determine the second current on the bus, and may include steps S141 to S144.
[0104] S141, when the timer reaches the second sampling time point, a second trigger signal is generated.
[0105] S142, in response to receiving the second trigger signal, detects information about the second current flowing through the sampling resistor on the bus.
[0106] S143, after storing the information of the second current in the memory, generates a second interrupt enable signal.
[0107] S144, in response to receiving the second interrupt enable signal, uses the interrupt function to read the information of the second current from the memory.
[0108] Specifically, when the timer reaches the pre-calculated second sampling time point, a hardware trigger signal can be generated, such as a level transition of the PWM5 wave. This signal will trigger the detection of the current flowing through the sampling resistor on the bus, store the current sampling result in the memory, and simultaneously generate an interrupt enable signal. In the interrupt service function, a read operation is performed to retrieve the newly stored current information from the memory.
[0109] In this embodiment, when the timer reaches the second sampling time point, the second current flowing through the sampling resistor on the bus can be collected. The collected second current information is stored in the memory and an interrupt enable signal is generated. Then, the first current information can be read from the memory using the programmed interrupt function, ensuring that the second current information on the bus can be obtained in a timely and accurate manner, providing a reliable guarantee for the accurate determination of the three-phase current.
[0110] Figure 10 This is another flowchart illustrating the method for determining three-phase current provided in the embodiments of this application.
[0111] In some embodiments, such as Figure 10 As shown, step S150 determines the third phase current based on the first phase current and the second phase current, which may include step S151.
[0112] S151, sum the first phase current and the second phase current and then invert the sum to obtain the third phase current.
[0113] For example, if the first current is phase A current Ia, the second current is phase B current Ib, and the third current is phase C current Ic, then the three-phase currents Ia, Ib, and Ic satisfy Kirchhoff's Current Law: Among them, the ABC phases can also be referred to as the UVW phases, respectively.
[0114] According to the embodiments of this application, the third phase current can be quickly and accurately determined from the first phase current and the second phase current based on Kirchhoff's current law, thereby determining the three-phase current.
[0115] In one embodiment, such as Figure 11 As shown, a sampling resistor R0 can be added in series at the bus end, and the DSP collects the voltage across R0 after processing by the operational amplifier circuit. Based on different conduction states of the inverter bridge, the sampling time point is adjusted through DSP software, and the three-phase current of the motor is calculated and reconstructed according to Kirchhoff's laws. The process of reconstructing the three-phase current is as follows: It should be noted that, according to the inventor's research, based on the principle of PWM, within each tiny time unit, the upper and lower transistors of the UVW three-phase (or ABC three-phase) will always exhibit a situation where the phase current can be calculated from the bus current. Taking the upper transistor of the UVW three-phase as an example, at time 110 (1 represents the transistor being on), to avoid shoot-through, the lower transistor is at 001, meaning the lower transistor of phase W is on. At this time, according to Kirchhoff's current theorem, the bus current I... dc It is equivalent to the opposite current of phase W. = Similarly, when the value is 100, since only the U-phase switch is active, the bus current is equal to the U-phase current. For example... Figure 12 As shown, each sector has two different pipe opening conditions.
[0116] It should be noted that, through further research, the inventors discovered that by observing the switching transistors in all sectors, each sector has its own corresponding two-phase current. The current of the third phase can be calculated using Kirchhoff's theorem. This requires the use of PWM (Pulse Width Modulation). Figure 12 An interruption occurs at the first sampling time point in the blue box and the second sampling time point in the red box to acquire the current bus current. Based on the application scenario described above, AD acquisition needs to be triggered at both the first sampling time point in the blue box and the second sampling time point in the red box to obtain the bus current at that moment.
[0117] The calculation methods for the first and second sampling time points are as follows: When controlling a brushless motor, three PWM waves (with duty cycles of PWM1, PWM2, and PWM3) need to be output. , , Controls the output current of the three-phase inverter.
[0118] For example, when the first sampling time point of sector 1 arrives, PWM4 can transition from low to high. The rising edge signal of PWM4 can serve as the sampling trigger signal, and the DC bus current sampling begins upon receiving the rising edge signal of PWM4. Similarly, when the second sampling time point of sector 1 arrives, PWM5 can transition from low to high. The rising edge signal of PWM5 can also serve as the sampling trigger signal, and the DC bus current sampling begins upon receiving the rising edge signal of PWM5. As another example, when the first sampling time point of sector 2 arrives, PWM4 can transition from high to low. The falling edge signal of PWM4 can serve as the sampling trigger signal, and the DC bus current sampling begins upon receiving the falling edge signal of PWM4. Likewise, when the second sampling time point of sector 2 arrives, PWM5 can transition from high to low. The falling edge signal of PWM5 can also serve as the sampling trigger signal, and the DC bus current sampling begins upon receiving the falling edge signal of PWM5. Similarly, the positions of the first sampling time point and the first sampling time point can be determined by the newly added PWM4, PWM5 and timer. In other words, the newly added PWM4 and PWM5 can generate sampling trigger signals at the first and second sampling time points of each sector to sample the bus current.
[0119] In one example, the timer resets to zero every time the motor rotor rotates one sector. In another example, the timer resets to zero every time the motor rotor completes one revolution. The timing of the timer reset can be set according to actual needs.
[0120] It should be noted that the software configuration method in this embodiment is as follows: Configure the PWM register, and use the upward counting mode for the timer; PWM4: set the rising edge or falling edge as the trigger for the first sampling time point; PWM5: set the rising edge or falling edge as the trigger for the second sampling time point. Configure the ADC register, enable the SEQ1 interrupt, set the SEQ1 interrupt function, and read the bus current value in the interrupt function. For example, see [link to relevant documentation]. Figure 13 When the timer reaches the first or second sampling time point, a PWM4 or PWM5 level transition signal is generated as a trigger signal. After receiving the trigger signal, the current flowing through the sampling resistor on the bus is detected and the current information is stored in the memory. Then, an interrupt enable signal is generated. The interrupt function responds to the interrupt enable signal and reads the current information from the memory.
[0121] This application proposes a software implementation method for reconstructing three-phase current using a single shunt resistor via DSP. By adding PWM4 and PWM5 in the software, the acquisition and triggering of key sampling time points in the DSP current reconstruction algorithm are realized. The implementation process reduces the number of sampling resistors used, while ensuring the accuracy of the reconstructed phase current. This solves the problems of high device cost, high maintenance cost, and phase current deviation caused by poor resistor consistency.
[0122] In other embodiments, only PWM4 can be added. PWM4 changes when the first sampling time point or the second sampling time point arrives. PWM4 jumps from high level to low level or from low level to high level. Bus current sampling is performed after receiving the rising edge signal or falling edge signal of PWM4.
[0123] Based on the same inventive concept, embodiments of this application also provide a device for determining three-phase current, such as... Figure 14 As shown, the device 1400 may include a target sector determination module 1410, a sampling time point determination module 1420, a first phase current determination module 1430, a second phase current determination module 1440, and a third phase current determination module 1450. The target sector determination module 1410 is used to determine the target sector where the motor is located based on the obtained position of the motor rotor; The sampling time point determination module 1420 is also used to determine the first sampling time point and the second sampling time point within the target sector; The first phase current determination module 1430 is used to determine the first current on the bus by using the sampling resistor on the bus when the timing point of the timer reaches the first sampling time point. The first current on the bus represents the first phase current. The second phase current determination module 1440 is used to determine the second current on the bus by using the sampling resistor on the bus when the timing point of the timer reaches the second sampling point. The second current on the bus represents the second phase current. The third phase current determination module 1450 is also used to determine the third phase current based on the first phase current and the second phase current.
[0124] In some embodiments, the target sector determination module is used to determine the target sector where the motor is located based on the obtained position of the motor rotor, specifically for: Based on the angular position of the motor rotor, one revolution of the motor rotor is divided into multiple fixed sectors; The target sector where the motor is located is determined based on the angle range corresponding to the initial position of the motor rotor.
[0125] In some embodiments, the sampling time point determination module is used to determine a first sampling time point and a second sampling time point within the target sector, specifically for: Obtain the duty cycle corresponding to each phase pulse width modulation signal; Among multiple duty cycles, the first type of duty cycle and the second type of duty cycle are determined according to the target sector; Based on the first type of duty cycle, determine the first sampling time point within the target sector; Based on the second type of duty cycle, determine the second sampling time point within the target sector.
[0126] In some embodiments, the first type of duty cycle includes a first duty cycle and a second duty cycle; the sampling time point determination module is used to determine the first sampling time point within the target sector based on the first type of duty cycle, specifically for: Obtain the period duration of the pulse width modulation signal; Multiply the first preset coefficient by the period duration of the pulse width modulation signal to obtain the first product; The second product is obtained by multiplying the second preset coefficient, the period of the pulse width modulation signal, and the sum of the first duty cycle and the second duty cycle. Subtracting the second product from the first product yields the first sampling time point within the target sector.
[0127] In some embodiments, the second type of duty cycle includes a third duty cycle and a fourth duty cycle; the sampling time point determination module is used to determine a second sampling time point within the target sector based on the second type of duty cycle, specifically for: Multiply the third preset coefficient by the period of the pulse width modulation signal to obtain the third product; The fourth product is obtained by multiplying the fourth preset coefficient, the period of the pulse width modulation signal, and the sum of the third and fourth duty cycles. Subtracting the fourth product from the third product yields the second sampling time point within the target sector.
[0128] In some embodiments, the sampling time point determination module is used to determine a first type of duty cycle and a second type of duty cycle based on the target sector among multiple duty cycles, specifically for: When the target sector is the first sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal. And / or, when the target sector is the second sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal. And / or, when the target sector is the third sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal. And / or, when the target sector is the fourth sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal. And / or, when the target sector is the fifth sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal. And / or, when the target sector is the sixth sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal.
[0129] In some embodiments, the first phase current determination module is used to determine the first current on the bus using the sampling resistor on the bus when the timer's timing point reaches the first sampling point, specifically for: When the timer reaches the first sampling time point, a first trigger signal is generated; In response to receiving a first trigger signal, a first current flowing through the sampling resistor on the bus is detected; After storing the information of the first current in the memory, a first interrupt enable signal is generated. The interrupt function is used to respond to the first interrupt enable signal received and read the information of the first current from the memory.
[0130] In some embodiments, the second phase current determination module is used to determine the second current on the bus using the sampling resistor on the bus when the timing point of the timer reaches the second sampling point, specifically for: When the timer reaches the second sampling time point, a second trigger signal is generated; In response to receiving the second trigger signal, a second current flowing through the sampling resistor on the bus is detected; After storing the information of the second current in the memory, a second interrupt enable signal is generated. The interrupt function is used to respond to the received second interrupt enable signal and read the information of the second current from the memory.
[0131] In some embodiments, the third-phase current determination module is used to determine the third-phase current based on the first-phase current and the second-phase current, specifically for: The third phase current is obtained by summing the first and second phase currents and then inverting the sum.
[0132] The modules in the three-phase current determination device provided in this application embodiment can achieve... Figures 1 to 13 The functions of each step in the method for determining three-phase current, and the corresponding technical effects, are described briefly and will not be elaborated here.
[0133] Figure 15 A schematic diagram of the hardware structure of the three-phase current determination device provided in an embodiment of this application is shown.
[0134] The device for determining three-phase current may include a processor 1501 and a memory 1502 storing computer program instructions.
[0135] Specifically, the processor 1501 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0136] Memory 1502 may include mass storage for data or instructions. For example, and not limitingly, memory 1502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where suitable, memory 1502 may include removable or non-removable (or fixed) media. Where suitable, memory 1502 may be internal or external to a three-phase current-determining device. In a particular embodiment, memory 1502 is a non-volatile solid-state memory.
[0137] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0138] The processor 1501 reads and executes computer program instructions stored in the memory 1502 to implement any of the three-phase current determination methods in the above embodiments.
[0139] In one example, the device for determining the three-phase current may further include a communication interface 1503 and a bus 1504. Wherein, as Figure 15 As shown, the processor 1501, memory 1502, and communication interface 1503 are connected through bus 1504 and complete communication with each other.
[0140] The communication interface 1503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0141] Bus 1504 includes hardware, software, or both, that couples components of a defined three-phase current-carrying device together. For example, and not limited to, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Linear Predictive Coding (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VESA LocalBus, VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 1504 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnection is contemplated herein.
[0142] This device can execute the three-phase current determination method in the embodiments of this application based on each unit / component in the three-phase current determination device, thereby achieving a combination Figures 1 to 13 The method for determining three-phase current is described.
[0143] Furthermore, in conjunction with the three-phase current determination method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the three-phase current determination methods in the above embodiments.
[0144] This application also provides a computer program product in which the instructions, when executed by a processor of an electronic device, cause the electronic device to perform various processes implementing any of the above-described embodiments of the method for determining three-phase current.
[0145] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0146] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0147] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0148] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope 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 protection scope of this application.
Claims
1. A method for determining three-phase current, characterized in that, include: Based on the obtained position of the motor rotor, determine the target sector where the motor is located; Determine the first sampling time point and the second sampling time point within the target sector; When the timing point of the timer reaches the first sampling time point, the first current on the bus is determined using the sampling resistor on the bus, and the first current on the bus represents the first phase current. When the timing point of the timer reaches the second sampling time point, the second current on the bus is determined using the sampling resistor on the bus, and the second current on the bus represents the second phase current. The third phase current is determined based on the first phase current and the second phase current.
2. The method according to claim 1, characterized in that, The step of determining the target sector where the motor is located based on the obtained position of the motor rotor includes: Based on the angular position of the motor rotor, one revolution of the motor rotor is divided into multiple fixed sectors; Based on the angle range corresponding to the initial position of the motor rotor, the target sector where the motor is located is determined.
3. The method according to claim 1, characterized in that, Determining the first sampling time point and the second sampling time point within the target sector includes: Obtain the duty cycle corresponding to each phase pulse width modulation signal; Among the multiple duty cycles, a first type of duty cycle and a second type of duty cycle are determined based on the target sector; Based on the first type of duty cycle, determine the first sampling time point within the target sector; Based on the second type of duty cycle, the second sampling time point within the target sector is determined.
4. The method according to claim 3, characterized in that, The first type of duty cycle includes a first duty cycle and a second duty cycle; determining the first sampling time point within the target sector based on the first type of duty cycle includes: Obtain the period duration of the pulse width modulation signal; Multiply the first preset coefficient by the period duration of the pulse width modulation signal to obtain the first product; The second product is obtained by multiplying the second preset coefficient, the period duration of the pulse width modulation signal, and the sum of the first duty cycle and the second duty cycle. Subtracting the second product from the first product yields the first sampling time point within the target sector.
5. The method according to claim 4, characterized in that, The second type of duty cycle includes a third duty cycle and a fourth duty cycle; determining the second sampling time point within the target sector based on the second type of duty cycle includes: Multiply the third preset coefficient by the period duration of the pulse width modulation signal to obtain the third product; The fourth product is obtained by multiplying the fourth preset coefficient, the period duration of the pulse width modulation signal, and the sum of the third duty cycle and the fourth duty cycle. Subtracting the fourth product from the third product yields the second sampling time point within the target sector.
6. The method according to claim 3, characterized in that, Determining a first type of duty cycle and a second type of duty cycle based on the target sector among multiple duty cycles includes: When the target sector is the first sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal. And / or, in the case that the target sector is the second sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal. And / or, in the case that the target sector is the third sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal. And / or, in the case that the target sector is the fourth sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the V-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal. And / or, in the case that the target sector is the fifth sector, the first type of duty cycle includes the duty cycle of the W-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the U-phase pulse width modulation signal. And / or, if the target sector is the sixth sector, the first type of duty cycle includes the duty cycle of the U-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal, and the second type of duty cycle includes the duty cycle of the V-phase pulse width modulation signal and the duty cycle of the W-phase pulse width modulation signal.
7. The method according to claim 1, characterized in that, When the timing point of the timer reaches the first sampling time point, determining the first current on the bus using the sampling resistor on the bus includes: When the timer reaches the first sampling time point, a first trigger signal is generated; In response to receiving the first trigger signal, a first current flowing through the sampling resistor on the bus is detected; After storing the information of the first current in the memory, a first interrupt enable signal is generated. In response to receiving the first interrupt enable signal, the interrupt function reads the information of the first current from the memory.
8. The method according to claim 1, characterized in that, When the timing point of the timer reaches the second sampling time point, determining the second current on the bus using the sampling resistor on the bus includes: When the timer reaches the second sampling time point, a second trigger signal is generated; In response to receiving the second trigger signal, a second current flowing through the sampling resistor on the bus is detected; After storing the information of the second current in the memory, a second interrupt enable signal is generated. In response to receiving the second interrupt enable signal, the interrupt function reads the information of the second current from the memory.
9. The method according to any one of claims 1 to 8, characterized in that, The step of determining the third phase current based on the first phase current and the second phase current includes: The third phase current is obtained by summing the first phase current and the second phase current and then inverting the sum.
10. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the method for determining three-phase current as described in any one of claims 1 to 9.
