Current sampling method and device of three-phase inverter and robot

By acquiring motor sector information and duty cycle limit thresholds, and combining Kirchhoff's current law or estimation methods, the problem of motor runaway under extreme conditions in the traditional three-resistor sampling method is solved, and the sampling of effective current and the stability of motor control are achieved.

CN115173766BActive Publication Date: 2026-02-24SHENZHEN PUDU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210690164.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2026-02-24
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

In intelligent robots, the traditional three-resistance sampling method cannot sample effective current when the motor is operating under extreme conditions, leading to motor malfunction.

Method used

By acquiring the sector information of the motor, the minimum phase duty cycle of the three-phase inverter is limited to below the duty cycle limit threshold. Based on the sector information, the sampling current of the phase corresponding to the second smallest phase duty cycle is determined to be valid. The three-phase current is reconstructed using Kirchhoff's current law, or the valid current value is obtained through estimation methods.

Benefits of technology

This ensures that effective current can be sampled when the motor output power is high, preventing motor runaway and improving the accuracy and reliability of motor control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115173766B_ABST
    Figure CN115173766B_ABST
Patent Text Reader

Abstract

The application discloses a current sampling method and device of a three-phase inverter and a robot. The current sampling method comprises the following steps: acquiring sector information of a motor, obtaining a minimum phase duty cycle of a signal for controlling each bridge arm of the three-phase inverter in a current control period according to the sector information; limiting the minimum phase duty cycle below a duty cycle limiting threshold, so as to ensure that a first sampling current of a corresponding phase of the minimum phase duty cycle is effective; obtaining a second minimum phase duty cycle according to the sector information, comparing the second minimum phase duty cycle with the duty cycle limiting threshold, and determining that a second sampling current of a corresponding phase of the second minimum phase duty cycle is effective when the second minimum phase duty cycle is below the duty cycle limiting threshold; and obtaining a third sampling current of a corresponding phase of a maximum phase duty cycle according to the effective first sampling current and the second sampling current. The problem that an effective current cannot be sampled under an extreme working condition of the motor is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of motor control technology, and in particular relates to a current sampling method, device and robot for three-phase inverters. Background Technology

[0002] To achieve more flexible movement control, intelligent robots use dual-hub motors. To save costs, the current sampling of dual-hub motors typically employs a three-resistor sampling method. Figure 1 The diagram shows the circuit structure of a three-phase inverter using a three-resistor sampling method. This method is widely used due to its simple algorithm and high speed. However, in complex situations involving intelligent robots, especially when the dual-hub motor operates under extreme conditions with high output power, the three-phase duty cycle is too large. This can cause the three-resistor sampling method to fail to sample effective current, leading to motor malfunction. Summary of the Invention

[0003] In view of this, embodiments of this application provide a current sampling method, device and robot for three-phase inverters, which aim to solve the problem that the traditional three-resistor sampling method cannot sample effective current limiting under extreme operating conditions of the motor, resulting in motor runaway.

[0004] The first aspect of this application provides a current sampling method for a three-phase inverter. The three lower arms of the three-phase inverter are connected in series with three sampling resistors. The three-phase outputs of the three-phase inverter are connected to phases A, B, and C of a motor, respectively. The current sampling method includes: acquiring sector information of the motor; obtaining the minimum phase duty cycle of the signal controlling each arm of the three-phase inverter within the current control cycle based on the sector information; limiting the minimum phase duty cycle to below a duty cycle limit threshold to ensure that the first sampled current of the phase corresponding to the minimum phase duty cycle is valid; obtaining the second smallest phase duty cycle based on the sector information; comparing the second smallest phase duty cycle with the duty cycle limit threshold; and determining that the second sampled current of the phase corresponding to the second smallest phase duty cycle is valid when the second smallest phase duty cycle is less than the duty cycle limit threshold; and obtaining the third sampled current of the phase corresponding to the largest phase duty cycle based on the valid first sampled current and the second sampled current.

[0005] In one embodiment, after obtaining the duty cycle of the second smallest phase based on the sector information and comparing the duty cycle of the second smallest phase with the duty cycle limit threshold, the method further includes: if the duty cycle of the second smallest phase is greater than the duty cycle limit threshold, then determining that the second sampling current is invalid; obtaining the second sampling current through a first estimation method, and then deriving the third sampling current based on the first sampling current and the estimated second sampling current, or; obtaining the second sampling current and the third sampling current through a second estimation method.

[0006] In one embodiment, obtaining the second sampled current through the first estimation method specifically includes: obtaining a current change value from the first sampled current of the current control cycle and the first sampled current of the previous control cycle; determining the current change direction of the phase corresponding to the second smallest phase duty cycle based on historical records of several control cycles prior to the current control cycle; and, based on whether the current change direction is increasing or decreasing, adding or subtracting the current change value from the second sampled current of the previous control cycle to obtain the second sampled current of the current control cycle.

[0007] In one embodiment, obtaining the second and third sampled currents through the second estimation method specifically includes: obtaining the d-axis current and q-axis current of the motor under the current control cycle based on the parameters of the motor and the mathematical equations of the motor; calculating the minimum phase current, the second smallest phase current, and the maximum phase current under the current control cycle based on the d-axis current and the q-axis current; obtaining a proportionality coefficient based on the first sampled current and the minimum phase current; and using the proportionality coefficient to correct the second smallest phase current and the maximum phase current to obtain the second and third sampled currents.

[0008] In one embodiment, the duty cycle limit threshold is a fixed value determined based on the dead time, noise time, and current sampling time. The duty cycle limit threshold refers to the maximum duty cycle that can ensure the sampled current is valid.

[0009] In one embodiment, the phase corresponding to the minimum duty cycle refers to the phase with the smallest duty cycle among the three phases of the motor in the current control cycle; the phase corresponding to the second smallest duty cycle refers to the phase with the second smallest duty cycle among the three phases of the motor in the current control cycle; and the phase corresponding to the maximum duty cycle refers to the phase with the largest duty cycle among the three phases of the motor in the current control cycle.

[0010] A second aspect of this application provides a current sampling device for a three-phase inverter. The three lower arms of the three-phase inverter are connected in series with three sampling resistors. The three-phase outputs of the three-phase inverter are connected to phases A, B, and C of a motor, respectively. The current sampling device includes: a calculation unit, configured to calculate the minimum phase duty cycle, the second smallest phase duty cycle, and the maximum phase duty cycle of the signals of each arm of the three-phase inverter within the current control cycle based on the sector information of the motor; a comparison unit, configured to compare the minimum phase duty cycle with a preset duty cycle limit threshold, limiting the minimum phase duty cycle below the duty cycle limit threshold to ensure that the first sampling current of the phase corresponding to the minimum phase duty cycle is valid; and further configured to determine that the second sampling current of the phase corresponding to the second smallest phase duty cycle is valid when the second smallest phase duty cycle is less than the duty cycle limit threshold; the calculation unit is also configured to derive the third sampling current of the phase corresponding to the maximum phase duty cycle based on the valid first sampling current and the second sampling current.

[0011] In one embodiment, the comparison unit is further configured to determine that the second sampling current is invalid when the duty cycle of the second smallest phase is greater than the duty cycle limit threshold; the calculation unit is further configured to obtain the second sampling current through a first estimation method, and then derive a third sampling current based on the first sampling current and the estimated second sampling current. Specifically, obtaining the second sampling current through estimation includes: obtaining the current change value from the first sampling current of the current control cycle and the first sampling current of the previous control cycle; determining the current change direction of the phase corresponding to the duty cycle of the second smallest phase based on historical records of several cycles prior to the current control cycle; and adding the second sampling current of the previous control cycle to the current... The change value is used to derive the second sampled current for the current control cycle; or it is further used to obtain the second sampled current and the third sampled current through a second estimation method. The second estimation method specifically includes: obtaining the d-axis current and q-axis current of the motor under the current control cycle based on the parameters of the motor and the mathematical equations of the motor; calculating the minimum phase current, the second smallest phase current and the maximum phase current under the current control cycle based on the d-axis current and the q-axis current; obtaining a proportional coefficient based on the first sampled current and the minimum phase current; and using the proportional coefficient to correct the second smallest phase current and the maximum phase current to obtain the second sampled current and the third sampled current.

[0012] A third aspect of this application provides a robot, including a controller, a first hub motor, a second hub motor, a first analog-to-digital converter (ADC), and a second ADC; it also includes a current sampling device provided in the second aspect of the above embodiments, wherein the current sampling device has two three-phase inverters, which are respectively connected to the first hub motor and the second hub motor. The two three-phase inverters are used to drive the first hub motor and the second hub motor and to sample the three-phase current of the motors, respectively. The first ADC and the second ADC are respectively connected to the two three-phase inverters, and respectively connect the sampled current of the first hub motor and the second hub motor to the controller. The controller controls the operating state of the three-phase inverters according to the sampled current.

[0013] In one embodiment, the sampling clocks of the first analog-to-digital converter and the second analog-to-digital converter are the same to achieve synchronous sampling of the current of the first hub motor and the second hub motor.

[0014] This embodiment provides a current sampling method for a three-phase inverter. Based on the sector information of the motor, the minimum phase duty cycle of the signal controlling each arm of the three-phase inverter within the current control cycle is obtained, and the minimum phase duty cycle is limited to below the duty cycle limit threshold to ensure that the first sampled current of the phase corresponding to the minimum phase duty cycle is valid. When the duty cycle of the second smallest phase is less than the duty cycle limit threshold, the second sampled current of the phase corresponding to the second smallest phase duty cycle is determined to be valid. Based on the valid first and second sampled currents, the third sampled current of the phase corresponding to the maximum phase duty cycle is obtained. This solves the problem that when the motor output power is relatively large, the three-phase duty cycle is large, which leads to the inability to sample effective current using the three-resistor sampling method, thus causing the motor to lose control. Attached Figure Description

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

[0016] Figure 1 The circuit schematic of a three-phase inverter for three-resistor sampling;

[0017] Figure 2 A flowchart of a current sampling method based on three-resistor sampling provided in an embodiment of this application;

[0018] Figure 3 A flowchart of a current sampling method based on three-resistor sampling provided in another embodiment of this application;

[0019] Figure 4 A flowchart of a current sampling method based on three-resistor sampling provided in another embodiment of this application;

[0020] Figure 5 A flowchart of a method for obtaining a second sampling current by estimation method according to an embodiment of this application;

[0021] Figure 6 A flowchart illustrating a method for obtaining a second sampling current and a third sampling current by estimation, provided in an embodiment of this application;

[0022] Figure 7 This is a schematic diagram of the current sampling device provided in one embodiment of this application;

[0023] Figure 8 This is a schematic diagram of the principle of a robot provided in one embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0025] It should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0027] Please see Figure 1 This embodiment provides a current sampling method for a three-phase inverter 100. The three lower arms of the three-phase inverter 100 are connected in series with three sampling resistors. The three-phase outputs of the three-phase inverter 100 are connected to phases A, B, and C of a motor, respectively. Please refer to [link to relevant documentation]. Figure 1The three-phase inverter 100 includes a first switch Q1, a second switch Q2, a third switch Q3, a fourth switch Q4, a fifth switch Q5, and a sixth switch Q6. The sampling resistors include a first sampling resistor R1, a second sampling resistor R2, and a third sampling resistor R3. The three-phase outputs of the three-phase inverter 100 are connected to phases A, B, and C of the motor, respectively. Please refer to [link / reference]. Figure 2 The current sampling method includes the following steps:

[0028] Step S100: Obtain the sector information of the motor and obtain the minimum phase duty cycle of the signal controlling each arm of the three-phase inverter within the current control cycle based on the sector information. First, obtain the motor sector information. Based on the sector information, the relationship between the three-phase duty cycles can be obtained, thereby obtaining the duty cycle of the phase with the smallest upper arm duty cycle (i.e., the phase with the longest lower arm conduction time) among the three phases A, B, and C within the current motor control cycle. This is recorded as the minimum phase duty cycle. If the lower arm conduction time is too short, the sampled current will be inaccurate. Therefore, avoid sampling the current of the phase with the largest upper arm duty cycle. First, find the phase with the smallest upper arm duty cycle among the three phases A, B, and C within the control cycle and sample its current.

[0029] Step S200: Limit the duty cycle of the minimum phase to below the duty cycle limit threshold to ensure that the first sampled current of the phase corresponding to the minimum phase duty cycle is valid. To improve the accuracy of the sampled current and ensure that the sampled current is valid, a duty cycle limit threshold is preset. This duty cycle limit threshold refers to the maximum duty cycle of the upper bridge arm that ensures the sampled current is valid, i.e., the shortest lower bridge conduction time. If the duty cycle is greater than this duty cycle limit threshold, i.e., the lower bridge conduction time is shorter, it will result in no valid current being sampled for that phase. Therefore, the duty cycle of the minimum phase is limited to be less than or equal to the preset duty cycle limit threshold to ensure that the lower bridge conduction time of the phase corresponding to the minimum phase duty cycle is sufficient to ensure that at least one phase can sample a valid current.

[0030] Step S300: Obtain the duty cycle of the second smallest phase based on the sector information, compare the duty cycle of the second smallest phase with the duty cycle limit threshold, and determine that the second sampling current of the phase corresponding to the duty cycle of the second smallest phase is valid when the duty cycle of the second smallest phase is less than the duty cycle limit threshold.

[0031] Within the current motor control cycle, among the minimum, second-smallest, and maximum phase duty cycles of phases A, B, and C, the second-smallest phase duty cycle is greater than the minimum phase duty cycle but less than the maximum phase duty cycle. The down-bridge conduction time of the phase corresponding to the second-smallest phase duty cycle is second only to the down-bridge conduction time of the phase corresponding to the minimum phase duty cycle. If the second-smallest phase duty cycle is less than the duty cycle limit threshold, meaning the down-bridge conduction time of the phase corresponding to the second-smallest phase duty cycle is sufficient to sample a valid current, then the second sampled current is considered valid. It can be understood that the duty cycles of phases A, B, and C are recalculated in each control cycle, therefore, the relationship between the three-phase duty cycles needs to be determined in each cycle.

[0032] Step S400: Based on the effective first and second sampled currents, the third sampled current of the phase corresponding to the maximum phase duty cycle is obtained. Kirchhoff's current law is then used to reconstruct the three-phase currents. In one embodiment, see [reference needed]. Figure 1 The current flows into phase A from the positive terminal DC+ of the power supply and flows out from phases B and C. It passes through the sampling resistors R2 and R3 of phases B and C to the negative terminal DC- of the power supply. Assuming that the phase with the smallest duty cycle is phase C and the phase with the second smallest duty cycle is phase B, the first sampling current is denoted as Ic, the second sampling current is denoted as Ib, and the third sampling current is denoted as Ia. Assuming that the direction of the current flowing from the inverter into the motor is positive and the direction of the current flowing from the motor into the inverter is negative, then Ia is positive and Ib and Ic are negative. Based on the node current equation, Ia = -Ib - Ic, thus completing one phase current reconstruction.

[0033] This embodiment provides a current sampling method for a three-phase inverter. Based on the sector information of the motor, the minimum phase duty cycle of the signal controlling each arm of the three-phase inverter within the current control cycle is obtained, and the minimum phase duty cycle is limited to below the duty cycle limit threshold to ensure that the first sampled current of the phase corresponding to the minimum phase duty cycle is valid. When the duty cycle of the second smallest phase is less than the duty cycle limit threshold, the second sampled current of the phase corresponding to the second smallest phase duty cycle is determined to be valid, and the third sampled current of the phase corresponding to the maximum phase duty cycle is obtained based on the valid first and second sampled currents. When the motor output power is relatively high, the upper bridge conduction duty cycle of the three-phase inverter is too large and the lower bridge conduction time is too short. Due to the short conduction time of the lower bridge, the three-resistor sampling method cannot sample the effective current of the lower bridge. By limiting the duty cycle of the smallest phase to below the preset duty cycle limit threshold, it is ensured that at least one phase's effective current value can be sampled. When the duty cycle of the second smallest phase is less than the duty cycle limit threshold, it is determined that the sampled current of the phase corresponding to the second smallest phase duty cycle is valid. In this way, three-phase current reconstruction is achieved, which solves the problem of motor runaway caused by the inability to reconstruct the three-phase current due to the inability to sample the effective current of the lower bridge by the three-resistor sampling method.

[0034] Please see Figure 3After obtaining the duty cycle of the second smallest phase based on the sector information and comparing the duty cycle of the second smallest phase with the duty cycle limit threshold, the system further includes steps S500 and S600.

[0035] Step S500: When the duty cycle of the second smallest phase is greater than the duty cycle limit threshold, the second sampling current is determined to be invalid.

[0036] Step S600: Obtain the second sampling current through estimation method, and then derive the third sampling current based on the first sampling current and the estimated second sampling current.

[0037] Specifically, if the duty cycle of the second smallest phase is greater than the duty cycle limit threshold, that is, the down-bridge conduction time of the phase corresponding to the duty cycle of the second smallest phase is shorter than the shortest down-bridge conduction time that can ensure the validity of the sampled current, then the second sampled current is determined to be invalid. Then, the second sampled current is obtained through the first estimation method. The change is obtained by comparing the first sampled current sampled by the minimum phase duty cycle with the current value of the phase corresponding to the minimum phase duty cycle in the previous control cycle. Then, the current value corresponding to the second smallest phase duty cycle is estimated by combining the change law of the current value of the phase corresponding to the second smallest phase duty cycle in the previous few cycles as the second sampled current. Finally, the third sampled current is obtained based on the node current equation according to the first sampled current and the second sampled current, thus completing the phase current reconstruction.

[0038] Please see Figure 4 In one embodiment, after obtaining the duty cycle of the second smallest phase based on the sector information and comparing the duty cycle of the second smallest phase with the duty cycle limit threshold, the method further includes steps S500 and S700.

[0039] Step S500: When the duty cycle of the second smallest phase is greater than the duty cycle limit threshold, the second sampling current is determined to be invalid.

[0040] Step S700: Obtain the second sampling current and the third sampling current through estimation methods.

[0041] Specifically, if the duty cycle of the second smallest phase is greater than the duty cycle limit threshold, that is, the down-bridge conduction time of the phase corresponding to the duty cycle of the second smallest phase is shorter than the shortest down-bridge conduction time that can ensure the validity of the sampled current, then the second sampled current is determined to be invalid, and the second and third sampled currents are obtained through the second estimation method.

[0042] Please see Figure 5 In one embodiment, obtaining the second sampling current through the first estimation method specifically includes:

[0043] Step S510: Obtain the current change value from the first sampled current of the current control cycle and the first sampled current of the previous control cycle.

[0044] Step S520: Determine the current change direction of the phase corresponding to the duty cycle of the second smallest phase based on the historical records of several previous control cycles.

[0045] Step S530: Add the current change value to the second sampled current of the previous control cycle to obtain the second sampled current of the current control cycle.

[0046] The first estimation method uses the first sampled current corresponding to the minimum phase duty cycle as the effective current, while the second smallest phase duty cycle and the largest phase duty cycle have exceeded the duty cycle limit value. The corresponding second sampled current and third sampled current are invalid. Since motor control needs to know the three-phase current values, the phase currents that are determined to be invalid can be estimated by using historical records and the first sampled current of the minimum duty cycle phase.

[0047] Specifically, assuming that the change values ​​of the three-phase current in adjacent control cycles are the same in a general motor control process, the current change value is determined by the first sampled current of the phase with the smallest duty cycle in the current control cycle and the first sampled current of the previous cycle. The second sampled current can be determined by confirming whether the current change direction is increasing or decreasing from the historical record value of the phase corresponding to the second smallest duty cycle. Then, the current change value is added to the current record value of the phase corresponding to the second smallest duty cycle in the previous cycle to obtain the second sampled current in the current control cycle. Based on the node current equation, the third sampled current is obtained from the first sampled current and the second sampled current, thus completing the phase current reconstruction. The advantage of this method is that the calculation is simple.

[0048] Understandably, the third sampled current under the current control cycle can also be obtained through this first estimation method. Assuming that the change value of the three-phase current in the general motor control process is the same in adjacent control cycles, the current change value is determined by the first sampled current of the minimum phase duty cycle and the first sampled current of the previous control cycle. The current of the other two phases is determined by their historical records to see whether the current change direction is increasing or decreasing. Then, the current change value is added to or subtracted from their current records in the previous cycle.

[0049] Please see Figure 6 In one embodiment, obtaining the second sampling current and the third sampling current through the second estimation method specifically includes:

[0050] Step S610: Based on the motor parameters and the motor's mathematical equations, obtain the d-axis current and q-axis current of the motor under the current control cycle. Based on the d-axis current and q-axis current, calculate the minimum phase current, the second smallest phase current, and the maximum phase current under the current control cycle.

[0051] In an electric motor, the axis that coincides with the magnetic pole axis is called the longitudinal axis (d-axis), and the axis that is perpendicular to the magnetic pole axis is called the transverse axis (q-axis). When there is current in the armature winding, armature reaction will be generated. There are longitudinal axis armature reaction and transverse axis armature reaction. The current that generates longitudinal axis armature reaction is called d-axis current, and the current that generates transverse axis armature reaction is called q-axis current.

[0052] Step S620: Obtain a proportional coefficient based on the first sampling current and the minimum phase current. Use the proportional coefficient to correct the second smallest phase current and the maximum phase current to obtain the second sampling current and the third sampling current.

[0053] Specifically, record the voltage Ud(K) on the d-axis at time K, the voltage Uq(K) on the q-axis at time K, the current Id(K) on the d-axis at time K, and the current Iq(K) on the q-axis at time K in the previous control cycle. Let the control cycle be Ts. Assume the motor parameters are known: resistance Rs, inductances Ld and Lq, and flux linkage ψ. Then:

[0054] Id(K+1)=(1-R / Ld*Ts)*Id(K)+Lq / Ld*ω*Ts*Iq(K)+Ts / Ld*Ud(K);

[0055] Iq(K+1)=(1-R / Lq*Ts)*Iq(K)+Ld / Lq*ω*Ts*Id(K)+Ts / Lq*Uq(K)-ω*Ts*ψ / Lq;

[0056] Where Id(K+1) is the d-axis current at time K+1, and Iq(K+1) is the q-axis current at time K+1. Knowing Id(K+1) and Iq(K+1), the three-phase currents Ia(K+1), Ib(K+1), and Ic(K+1) at time K+1 after the reverse transformation can be deduced. The first sampled current (e.g., Ic) of the phase corresponding to the minimum phase duty cycle is compared with the corresponding phase current Ic(K+1) obtained after the estimated inverse transformation to obtain a scaling factor. The estimated Id(K+1) and Iq(K+1) are multiplied by this scaling factor to obtain the second sampled current (e.g., Ib) and the third sampled current (e.g., Ia). The corrected Ib and Ic are used in the phase current reconstruction calculation of the current control cycle.

[0057] In one embodiment, the preset duty cycle limit threshold is a fixed value determined based on the dead time, noise time, and current sampling time. This duty cycle limit threshold refers to the maximum duty cycle that ensures the sampled current is effective. If it is greater than this duty cycle limit threshold, the lower bridge arm conduction time is shorter than the minimum conduction time that ensures the sampled current is effective. Since there is a dead time D before the lower bridge arm turns on, and the cutoff time of the lower bridge arm conduction is the carrier period minus the upper bridge duty cycle, let the minimum conduction time be MIN. Assuming the carrier period is T1 and the duty cycle of the phase corresponding to the maximum phase duty cycle is T2, then 2T1﹣2T2﹣D≥MIN is sufficient. The noise time is generally set to 0.5~1us, or it can be obtained through testing. The current sampling time is determined by the sampling frequency and sampling period set by the controller, assuming it is 0.5us. If the noise time plus the sampling time MIN is set to 1us, it is sufficient to ensure that the lower bridge arm has at least 1us of on-time after sampling triggering.

[0058] In one embodiment, the phase with the smallest duty cycle refers to the phase with the smallest duty cycle among the three phases of the motor in the current control cycle. The phase with the second smallest duty cycle refers to the phase with the second smallest duty cycle among the three phases of the motor in the current control cycle. The phase with the largest duty cycle refers to the phase with the largest duty cycle among the three phases of the motor in the current control cycle. It can be understood that the duty cycles here all refer to the duty cycles of the upper arm of the three-phase inverter.

[0059] Based on the same concept, please refer to Figure 1 , Figure 7 The second aspect of this application provides a current sampling device for a three-phase inverter, wherein three sampling resistors are connected in series in the three lower arms of the three-phase inverter 100, and the three-phase outputs of the three-phase inverter 100 are respectively connected to phase A, phase B, and phase C of a motor. For details, please refer to [reference needed]. Figure 1 The three-phase inverter 100 includes a first switch Q1, a second switch Q2, a third switch Q3, a fourth switch Q4, a fifth switch Q5, a sixth switch Q6, a first sampling resistor R1, a second sampling resistor R2, and a third sampling resistor R3. Q1, Q2 and R1, the third switch Q3, Q4 and R2, and Q5, Q6 and R3 are connected in series between the input DC+ and ground. The series connection nodes of the first switch Q1 and the second switch Q2, the second switch Q2 and the third switch Q3, and the fifth switch Q5 and the sixth switch Q6 are connected to phase A, phase B, and phase C of the motor, respectively. Among them, Q1, Q3, and Q5 are the lower bridge arm switches of the three-phase inverter, and Q2, Q4, and Q5 are the upper bridge arm switches of the three-phase inverter. R1, R2, and R3 are connected in series between the three lower bridge arm switches and ground.

[0060] Please see Figure 7 The current sampling device includes a calculation unit 200 and a comparison unit 300. The calculation unit 200 is used to calculate the minimum phase duty cycle, the second smallest phase duty cycle, and the largest phase duty cycle of the signals of each bridge arm of the three-phase inverter 100 within the current control cycle based on the sector information of the motor. The phase corresponding to the minimum phase duty cycle refers to the phase with the smallest duty cycle among the three phases of the motor within the current control cycle. The phase corresponding to the second smallest phase duty cycle refers to the phase with the second smallest duty cycle among the three phases of the motor within the current control cycle. The phase corresponding to the largest phase duty cycle refers to the phase with the largest duty cycle among the three phases of the motor within the current control cycle. These duty cycles all refer to the duty cycles of the upper bridge arm of the three-phase inverter 100. The calculation unit 200 is also used to derive the third sampling current of the phase corresponding to the largest phase duty cycle based on the effective first and second sampling currents, that is, to complete the phase current reconstruction based on the node current equation.

[0061] The comparison unit 300 is used to compare the minimum phase duty cycle with a preset duty cycle limit threshold, and to limit the minimum phase duty cycle to below the duty cycle limit threshold. It is also used to determine that the second sampling current of the phase corresponding to the second smallest phase duty cycle is valid when the duty cycle of the second smallest phase is below the duty cycle limit threshold.

[0062] Furthermore, in one embodiment, the comparison unit 300 is further configured to determine that the second sampling current is invalid when the duty cycle of the second smallest phase is greater than the duty cycle limit threshold. The calculation unit 200 is further configured to obtain the second sampling current through a first estimation method, and then derive a third sampling current based on the first sampling current and the estimated second sampling current. The estimation of the second sampling current specifically includes: obtaining the current change value from the first sampling current of the current control cycle and the first sampling current of the previous control cycle; determining the current change direction of the phase corresponding to the duty cycle of the second smallest phase based on the historical records of several cycles prior to the current control cycle; and adding the current change value to the second sampling current of the previous control cycle to obtain the second sampling current of the current control cycle.

[0063] The calculation unit 200 may also be used to obtain the second sampling current and the third sampling current through a second estimation method. Specifically, obtaining the second sampling current and the third sampling current through the second estimation method includes: obtaining the d-axis current and q-axis current of the motor under the current control cycle based on the motor parameters and the motor's mathematical equations; calculating the minimum phase current, the second smallest phase current, and the maximum phase current under the current control cycle based on the d-axis current and the q-axis current; obtaining a proportional coefficient based on the first sampling current and the minimum phase current; and using the proportional coefficient to correct the second smallest phase current and the maximum phase current to obtain the effective second sampling current and the third sampling current under the current control cycle.

[0064] The third aspect of this application provides a robot, including a controller MCU, a first hub motor M1, a second hub motor M2, a first analog-to-digital converter (ADC) and a second ADC, and also includes a current sampling device for a three-phase inverter 100 provided in the second aspect of the above embodiment. The current sampling device comprises two three-phase inverters 100, respectively connected to the first hub motor M1 and the second hub motor M2. These two three-phase inverters 100 are used to drive the first hub motor M1 and the second hub motor M2 and to sample the three-phase currents of motors M1 and M2. The first ADC1 and the second ADC2 are respectively connected to the two three-phase inverters 100 and are used to input the sampled currents of the first hub motor M1 and the second hub motor M2 to the controller MCU. The controller MCU controls the operating state of the three-phase inverters 100 according to the sampled currents. Since motor control is not the focus of this application, the specific circuit, algorithm structure, and connection relationship diagrams for motor control are not shown, and this part will not be elaborated upon further in this application.

[0065] In one embodiment, the sampling clocks of the first analog-to-digital converter (ADC1) and the second ADC2 are the same to achieve synchronous sampling of the current of the first hub motor M1 and the second hub motor M2. It is understood that the first hub motor M1 and the second hub motor M2 are generally controlled by a single controller MCU. Since both motors are controlled by the same microprocessor, limited peripheral resources of the processor prevent synchronous current sampling of these two motors, leading to a decrease in motor control accuracy. Therefore, by adding a first ADC1 and a second ADC2, and configuring their sampling times to be the same, and limiting the minimum phase duty cycle by a preset duty cycle limit threshold, the current sampling times of the first hub motor M1 and the second hub motor M2 can be set to the same time. The first ADC1 and the second ADC2 can be triggered simultaneously, achieving synchronous current sampling of a robot driven by two hub motors under single-chip control, thus improving motor control accuracy. Furthermore, in some embodiments, the first sampling channel of the first analog-to-digital converter ADC1 and the first sampling channel of the second analog-to-digital converter ADC2 are used to sample the first hub motor M1, and the second sampling channel of the first analog-to-digital converter ADC1 and the second sampling channel of the second analog-to-digital converter ADC2 are used to sample the second hub motor M2, ensuring that the sampled motor currents are at the same time and improving the motor control accuracy.

[0066] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in the above-described method embodiments.

[0067] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0068] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0069] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of computer-readable media.

[0070] Computer-readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of RAM, ROM, electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical discs, ROM, digital versatile discs (DVDs) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include temporary computer-readable media, such as modulated data signals and carrier waves.

[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A current sampling method for a three-phase inverter, wherein the three lower arms of the three-phase inverter are connected in series with three sampling resistors, and the three-phase outputs of the three-phase inverter are respectively connected to phase A, phase B, and phase C of a motor, characterized in that, The current sampling method includes: Obtain the sector information of the motor, and obtain the minimum phase duty cycle of the signal controlling each arm of the three-phase inverter within the current control cycle based on the sector information; The minimum phase duty cycle is limited to below the duty cycle limit threshold to ensure that the first sampled current of the phase corresponding to the minimum phase duty cycle is valid; The duty cycle of the second smallest phase is obtained based on the sector information. The duty cycle of the second smallest phase is compared with the duty cycle limit threshold. If the duty cycle of the second smallest phase is less than the duty cycle limit threshold, the second sampling current of the phase corresponding to the duty cycle of the second smallest phase is determined to be valid. The third sampling current of the phase corresponding to the maximum phase duty cycle is obtained based on the effective first sampling current and second sampling current; After obtaining the second smallest phase duty cycle based on the sector information and comparing the second smallest phase duty cycle with the duty cycle limit threshold, the method further includes: If the duty cycle of the second smallest phase exceeds the duty cycle limit threshold, the second sampling current is determined to be invalid. The second and third sampling currents are obtained using the second estimation method. The process of obtaining the second sampling current and the third sampling current through the second estimation method specifically includes: Based on the parameters of the motor and the mathematical equations of the motor, the d-axis current and q-axis current of the motor under the current control cycle are obtained. Based on the d-axis current and the q-axis current, the minimum phase current, the second smallest phase current and the maximum phase current under the current control cycle are calculated. A scaling factor is obtained based on the first sampling current and the minimum phase current. The second sampling current and the third sampling current are obtained by correcting the second smallest phase current and the maximum phase current using the scaling factor.

2. The current sampling method as described in claim 1, characterized in that, After obtaining the second smallest phase duty cycle based on the sector information and comparing the second smallest phase duty cycle with the duty cycle limit threshold, the method further includes: If the duty cycle of the second smallest phase exceeds the duty cycle limit threshold, the second sampling current is determined to be invalid. The second sampling current is obtained through the first estimation method, and then the third sampling current is derived based on the first sampling current and the estimated second sampling current.

3. The current sampling method as described in claim 2, characterized in that, The process of obtaining the second sampled current through the first estimation method specifically includes: The current change value is obtained from the first sampled current of the current control cycle and the first sampled current of the previous control cycle; The direction of current change in the phase corresponding to the duty cycle of the second smallest phase is determined based on the historical records of several control cycles prior to the current control cycle. Based on whether the direction of the current change is increasing or decreasing, the second sampling current of the current control cycle is obtained by adding or subtracting the current change value from the second sampling current of the previous control cycle.

4. The current sampling method according to any one of claims 1 to 3, characterized in that, The duty cycle limit threshold is a fixed value determined based on the dead time, noise time, and current sampling time. The duty cycle limit threshold refers to the maximum duty cycle that can ensure the sampled current is effective.

5. The current sampling method according to any one of claims 1 to 3, characterized in that: The phase with the smallest duty cycle refers to the phase with the smallest duty cycle among the three phases of the motor in the current control cycle; The phase with the second smallest duty cycle refers to the phase among the three phases of the motor whose duty cycle is second only to the smallest duty cycle within the current control cycle; The phase with the largest duty cycle refers to the phase with the largest duty cycle among the three phases of the motor in the current control cycle.

6. A current sampling device for a three-phase inverter, wherein the three lower arms of the three-phase inverter are connected in series with three sampling resistors, and the three-phase outputs of the three-phase inverter are respectively connected to phase A, phase B, and phase C of a motor, characterized in that, The current sampling device includes: The calculation unit is used to calculate the minimum phase duty cycle, the second smallest phase duty cycle, and the maximum phase duty cycle of the signal of each arm of the three-phase inverter in the current control cycle based on the sector information of the motor. The comparison unit is configured to compare the minimum phase duty cycle with a preset duty cycle limit threshold, and limit the minimum phase duty cycle below the duty cycle limit threshold to ensure that the first sampled current of the phase corresponding to the minimum phase duty cycle is valid. It is also configured to determine that the second sampled current of the phase corresponding to the second smallest phase duty cycle is valid when the second smallest phase duty cycle is less than the duty cycle limit threshold; and to determine that the second sampled current is invalid when the second smallest phase duty cycle is greater than the duty cycle limit threshold. The calculation unit is further configured to derive the third sampling current of the phase corresponding to the maximum phase duty cycle based on the effective first sampling current and second sampling current; and to obtain the second sampling current and third sampling current through a second estimation method. Specifically, obtaining the second sampling current and third sampling current through the second estimation method includes: obtaining the d-axis current and q-axis current of the motor under the current control cycle based on the motor parameters and the motor's mathematical equations; calculating the minimum phase current, the second smallest phase current, and the maximum phase current under the current control cycle based on the d-axis current and the q-axis current; obtaining a proportionality coefficient based on the first sampling current and the minimum phase current; and using the proportionality coefficient to correct the second smallest phase current and the maximum phase current to obtain the second sampling current and the third sampling current.

7. The current sampling device as described in claim 6, characterized in that, The calculation unit is further configured to obtain the second sampling current through a first estimation method, and then derive a third sampling current based on the first sampling current and the estimated second sampling current. Specifically, obtaining the second sampling current through estimation includes: The current change value is obtained from the first sampled current of the current control cycle and the first sampled current of the previous control cycle; The direction of current change in the phase corresponding to the duty cycle of the second smallest phase is determined based on the historical records of several previous cycles before the current control cycle. The second sampled current of the current control cycle is obtained by adding the current change value to the second sampled current of the previous control cycle.

8. A robot, characterized in that, It includes a controller, a first hub motor, a second hub motor, a first analog-to-digital converter, and a second analog-to-digital converter; It also includes the current sampling device according to any one of claims 6-7, wherein the current sampling device has two three-phase inverters, which are respectively connected to the first hub motor and the second hub motor. The two three-phase inverters are used to drive the first hub motor and the second hub motor and to sample the three-phase current of the motors. The first analog-to-digital converter and the second analog-to-digital converter are respectively connected to the two three-phase inverters and respectively connect the sampled current of the first hub motor and the second hub motor to the controller. The controller controls the working state of the three-phase inverters according to the sampled current.

9. The robot as described in claim 8, characterized in that, The first analog-to-digital converter and the second analog-to-digital converter have the same sampling clock to achieve synchronous sampling of the current of the first hub motor and the second hub motor.

Citation Information

Patent Citations

  • Three-phase driving bridge lower bridge arm three-resistor based motor current sampling method and system

    CN109347397A

  • Phase current single-resistor sampling reconstruction optimization method forfrequency converter

    CN112994578A