Three-phase motor phase current real-time acquisition method and device
By dynamically adjusting the current acquisition time node and PWM signal duty cycle, the inaccuracy problem of motor current sampling under different PWM control situations is solved, and the accuracy of current acquisition and the stability of motor control are improved.
Patent Information
- Application Number
- CN202411088192.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-09
AI Technical Summary
The existing motor current sampling methods cannot be dynamically adjusted under different PWM control conditions, resulting in inaccurate current acquisition and are susceptible to supply voltage, temperature drift and environmental electromagnetic interference, resulting in large errors and affecting zero torque control and motor control performance.
By dividing the target current closed-loop control period into the first sub-cycle and the second sub-cycle, the time node for collecting the reference current and the basic phase current is determined according to the intermediate time point of each sub-cycle and the current sampling time, and the duty of the PWM signal is adjusted. The phase current value is collected, dynamically adjust the current sampling time to reduce errors.
It improves the accuracy of current acquisition, reduces errors caused by temperature drift, supply voltage drift and environmental electromagnetic interference, and enhances the stability and accuracy of motor control.
Smart Images

Figure CN118631120B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of motor technology, and specifically to a method and device for real-time acquisition of phase current of a three-phase motor. Background Art
[0002] In modern industrial production, motors are an important power source, and the accuracy and stability of their control systems directly affect production efficiency and product quality. One of the keys to motor control is the accurate sampling of motor phase currents. Through real-time monitoring and feedback of currents, accurate control of motors can be achieved, thereby improving the operating efficiency and stability of motors. At the same time, current sampling is also a key parameter of many other electronic devices, which is of great significance for the normal operation and safe operation of equipment. In existing motor control technologies, current sensors and current sampling resistors are usually used to sample motor currents. Sampling resistors are more widely used because of their low cost. Current sampling resistors can convert current signals into voltage signals, and then after amplification by operational amplifier circuits, analog voltage signals are converted into digital signals through analog-to-digital converters (ADCs) for processing by microcontrollers (MCUs).
[0003] Solutions of the prior art: In the existing motor current sampling scheme, multiple current values are usually collected by triggering at fixed points multiple times during initialization, and then the current values are filtered to obtain the self-learned zero current value. Then, after the periodic task is started, the real-time current value is obtained through fixed sampling. The zero current value learned by initialization is subtracted from this current value to obtain the final phase current value. In addition, there are some methods that detect the voltage and resistance of the motor and then estimate the current of the motor through calculation.
[0004] However, there are some problems with the existing motor current sampling method:
[0005] First, the current sampling time is fixed, which means that the sampling time of the three-phase motor cannot be dynamically adjusted under different PWM control conditions, so it is impossible to collect the current value at the optimal time or the current value when the current is in the process of current stabilization or pulsation interference.
[0006] Secondly, the internal resistance of the current sampling resistor is very small, generally 0.5 milliohms or 1 milliohms, and the voltage drop caused by 1A current is only 0.5 millivolts or 1 millivolt. Even after amplification by the operational amplifier, it is usually a few millivolts or more than ten millivolts corresponding to 1 ampere current. Therefore, the acquisition of current signals is often easily affected by factors such as power supply voltage, temperature drift, and environmental transient electromagnetic interference, resulting in large errors in current sampling, which in turn leads to zero torque control fluctuations, motor electromagnetic noise, and poor control performance. Summary of the invention
[0007] In order to overcome the deficiencies of the prior art, an object of an embodiment of the present invention is to provide a method and device for real-time acquisition of phase current of a three-phase motor, which can acquire phase current more accurately.
[0008] To solve the above problem, a first aspect of an embodiment of the present invention discloses a method for real-time acquisition of phase current of a three-phase motor, which comprises the following steps:
[0009] The target current closed-loop control period is equally divided into a first sub-period and a second sub-period according to the time sequence;
[0010] Determine the time node for collecting the reference current according to the middle time point of the first sub-cycle and the current sampling time, which is recorded as the first time node; determine the time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time, which is recorded as the second time node;
[0011] Collecting a first current value and a second current value at the first time node and the second time node respectively;
[0012] The phase current of the three-phase motor in the target current closed-loop control period is obtained according to the first current value and the second current value.
[0013] As a preferred embodiment, in a first aspect of an embodiment of the present invention, determining a time node for collecting a reference current according to an intermediate time point of a first sub-cycle and a current sampling time includes:
[0014] Adjusting the duty cycle of the PWM signal that triggers the acquisition of the reference current according to the current sampling time and the target current closed-loop control period, recorded as a first duty cycle;
[0015] The center of the PWM signal that triggers the acquisition of the reference current is aligned with the middle time point of the first sub-cycle, the falling edge of the PWM signal that triggers the acquisition of the reference current is determined, and the falling edge of the PWM signal that triggers the acquisition of the reference current is used as the first time node.
[0016] As a preferred embodiment, in the first aspect of the embodiment of the present invention, adjusting the duty cycle of the PWM signal that triggers the acquisition of the reference current according to the current sampling time and the target current closed-loop control period includes:
[0017] The first duty cycle is calculated by the following formula:
[0018] D1=1-t / T
[0019] Wherein, D1 is the first duty cycle, t is the current sampling time, and T is the time of the first sub-cycle.
[0020] As a preferred embodiment, in a first aspect of the embodiment of the present invention, determining the time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time includes:
[0021] Determining a target sector where the motor rotor position is located during the second sub-period;
[0022] Determine the duty cycle time of the low side of the target phase according to the target sector, the target phase being the one with the smallest duty cycle of the low side among the three phases in the target sector;
[0023] The second time node is determined according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period.
[0024] As a preferred embodiment, in the first aspect of the embodiment of the present invention, determining the second time node according to the duty cycle time of the low side of the target phase, the current sampling time and the middle time point of the second sub-period includes:
[0025] The duty cycle time of the low side of the target phase minus the corresponding current sampling time is used as the duty cycle time of the PWM signal for triggering the acquisition of the basic phase current, which is recorded as the second duty cycle time;
[0026] The middle time point of the second sub-cycle is used as the center of the PWM signal for triggering the acquisition of the basic phase current, the falling edge of the PWM signal for triggering the acquisition of the basic phase current is determined, and the falling edge of the PWM signal for triggering the acquisition of the basic phase current is used as the second time node.
[0027] As a preferred embodiment, in the first aspect of the embodiment of the present invention, the duty cycle time of the low side of the target phase minus the corresponding current sampling time is used as the duty cycle time of the PWM signal for triggering the acquisition of the basic phase current, including:
[0028] T2=T1-2t
[0029] Wherein, t is the current sampling time, T2 is the time of the second duty cycle, and T1 is the duty cycle time of the low side of the target phase.
[0030] As a preferred embodiment, in a first aspect of the embodiment of the present invention, obtaining the phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value includes:
[0031] Converting the first current value and the second current value to obtain a first actual current value and a second actual current value respectively;
[0032] The first actual current value is subtracted from the second actual current value to obtain the phase current of the target current closed-loop control period.
[0033] A second aspect of an embodiment of the present invention discloses a three-phase motor phase current real-time acquisition device, which includes:
[0034] A splitting unit, used for dividing the target current closed-loop control period into a first sub-period and a second sub-period in equal parts according to the time sequence;
[0035] A determination unit, configured to determine a time node for collecting a reference current according to an intermediate time point of a first sub-cycle and a current sampling time, recorded as a first time node, and to determine a time node for collecting a basic phase current according to an intermediate time point of a second sub-cycle and a current sampling time, recorded as a second time node;
[0036] A collection unit, configured to collect a first current value and a second current value at the first time node and the second time node respectively;
[0037] A calculation unit is used to obtain the phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value.
[0038] A third aspect of an embodiment of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute a three-phase motor phase current real-time acquisition method disclosed in the first aspect of the embodiment of the present invention.
[0039] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute a method for real-time acquisition of phase current of a three-phase motor disclosed in the first aspect of an embodiment of the present invention.
[0040] A fifth aspect of an embodiment of the present invention discloses a computer program product. When the computer program product runs on a computer, the computer executes a method for real-time acquisition of phase current of a three-phase motor disclosed in the first aspect of an embodiment of the present invention.
[0041] A sixth aspect of an embodiment of the present invention discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes a three-phase motor phase current real-time acquisition method disclosed in the first aspect of an embodiment of the present invention.
[0042] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0043] The current sampling time of the embodiment of the present invention changes with the duty cycle of the motor control, so that the current signal quality at the current sampling moment is better and the phase current acquisition accuracy is higher; and the current sampling is always accompanied by current compensation, rather than calculating the zero current only once during initialization. In this way, the current error caused by temperature drift, the current error caused by supply voltage drift, and the error caused by current change caused by environmental transient electromagnetic interference can be eliminated. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of a method for real-time acquisition of phase current of a three-phase motor provided by an embodiment of the present invention;
[0045] Figure 2 Schematic diagram of the principle of a three-phase motor PWM signal provided by an embodiment of the present invention;
[0046] Figure 3 is a schematic diagram of the principle of obtaining a first time node provided by an embodiment of the present invention;
[0047] Figure 4 is a schematic diagram of a process for obtaining a first time node provided by an embodiment of the present invention;
[0048] Figure 5 is a schematic diagram of the principle of obtaining a second time node provided by an embodiment of the present invention;
[0049] Figure 6 is a schematic diagram of a process for obtaining a second time node provided by an embodiment of the present invention;
[0050] Figure 7 is a sector diagram of a three-phase motor provided by an embodiment of the present invention;
[0051] Figure 8 1 is a schematic diagram of the principle of a three-phase motor phase current real-time acquisition circuit provided by an embodiment of the present invention;
[0052] Fig. 9 It is a structural schematic diagram of a three-phase motor phase current real-time acquisition device provided by an embodiment of the present invention;
[0053] Fig.10 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] This specific implementation manner is merely an explanation of an embodiment of the present invention, and it is not a limitation of the embodiment of the present invention. After reading this specification, a person skilled in the art may make non-creative modifications to the embodiment as needed, but as long as it is within the scope of the claims of the embodiment of the present invention, it is protected by the patent law.
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention.
[0056] The term "comprise" and any variations thereof in the specification and claims of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0057] In the embodiments of the present invention, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0058] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0059] Embodiment 1
[0060] See also Figure 1 As shown, Figure 1 1 is a flow chart of a method for real-time acquisition of phase current of a three-phase motor disclosed in an embodiment of the present invention. Please refer to 1, which may include the following steps:
[0061] S110, dividing the target current closed-loop control period into a first sub-period and a second sub-period in equal parts according to the time sequence.
[0062] As the complexity of motor control increases and the amount of functional safety code increases, the CPU load rate of the motor control current closed loop will be very high within 50us. The usual practice is that the frequency of the motor current loop control is half of the motor control carrier frequency, that is, the time to execute the current closed loop and voltage space vector generation is 100us, and the period of the PWM carrier signal is 50us, that is, the closed-loop control of the complex current is realized within a 100us period, and two PWM signals are generated at the same time.
[0063] Please refer to Figure 2 , 3As shown in 5 , assuming that the first current closed-loop control cycle 210 is the target current closed-loop control cycle, the first half of the current closed-loop control cycle 210 is defined as a first sub-cycle 220 (corresponding to the first PWM carrier signal), and the second half of the current closed-loop control cycle 210 is defined as a second sub-cycle 240 (corresponding to the second PWM carrier signal).
[0064] Here, the example of the first half of each current closed-loop control cycle being a low level and the second half being a high level is taken, that is, the starting point of the current closed-loop control cycle 210 is used as the starting point of the first sub-cycle 220, and the rising edge of the current closed-loop control cycle 210 is used as the ending point of the first sub-cycle 220. At the same time, it is also used as the starting point of the second sub-cycle 240, and the falling edge of the current closed-loop control cycle 210 is used as the ending point of the second sub-cycle 240. In other embodiments, the falling edge of the center of the current closed-loop control cycle can also be used as the dividing point between the first sub-cycle and the second sub-cycle.
[0065] Assuming that the current closed-loop control period 210 is 100 us, the first sub-period 220 and the second sub-period 240 are both 50 us.
[0066] At the same time, here, taking the first sub-period 220 and the second sub-period 240 as an example, the first half of the cycle is low level, and the second half of the cycle is high level, the falling edge of the first sub-period 220 and the second sub-period 240 are used as nodes for updating the trigger current sampling PWM duty cycle, so that the time node of current acquisition can be adjusted in real time. The current acquisition here includes the acquisition of reference current and basic phase current, wherein the reference current is a zero current signal, which is used to correct the basic phase current to obtain the actual phase current, and the basic phase current is the current signal obtained at the basic phase current acquisition time node. In other embodiments, the rising edge of each sub-period end point can also be used as a node for updating the trigger current sampling PWM duty cycle.
[0067] S120. Determine a time node for collecting the reference current according to the middle time point of the first sub-cycle and the current sampling time, recorded as the first time node; determine a time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time, recorded as the second time node.
[0068] In a preferred embodiment of the present invention, on the one hand, the actual phase current of each current closed-loop control cycle is obtained by comparing the reference current and the basic phase current in each current closed-loop control cycle, so that the precise current value actually required for each current closed-loop control cycle can be obtained, and the current error caused by temperature drift, the current error caused by supply voltage drift, and the error caused by current change caused by environmental transient electromagnetic interference can be avoided. On the other hand, the current sampling moment is adjusted as the duty cycle of the motor control changes, which can avoid errors caused by noise during MOS switching and current instability during the current stabilization process.
[0069] The current sampling time is affected by the time required for the MCU's AD steady-state conversion, the dead time of PWM insertion, the delay time of the pre-driver to the PWM signal conditioning, and the delay time of the MOS switch. Usually the current sampling time can be obtained through actual testing, and the specific test method is not repeated here.
[0070] Based on the above principle, the reference current and basic phase current acquisition time corresponding to each current closed-loop control cycle can be obtained according to the duty cycle of the motor control, thereby obtaining the precise current value required for each current closed-loop control cycle.
[0071] The time node for collecting the reference current can be determined according to the middle time point of the first sub-cycle and the current sampling time (recorded as the first time node for distinction). Figure 4 As shown, it may include the following steps:
[0072] S1211. Adjust the duty cycle of the PWM signal that triggers the collection of the reference current according to the current sampling time and the target current closed-loop control period, which is recorded as a first duty cycle.
[0073] The first duty cycle can be calculated by the following formula:
[0074] D1=1-t / T
[0075] Wherein, D1 is the first duty cycle, t is the current sampling time, and T is the time of the first sub-period, that is, the time corresponding to the first PWM carrier signal period.
[0076] The first duty cycle corresponds to the first sub-period, and the time of the first duty cycle represents the time of the high level of the PWM signal in the first sub-period. The first duty cycle time is divided by the time of the first sub-period to obtain the first duty cycle. For example, assuming that the target current closed-loop control period is 100us and the current sampling time is 1us, the first duty cycle is 98%, that is, the first duty cycle time is 49us (the first sub-period is 50us).
[0077] S1212. Align the center of the PWM signal that triggers the acquisition of the reference current with the middle time point of the first sub-period, determine the falling edge of the PWM signal that triggers the acquisition of the reference current, and use the falling edge of the PWM signal that triggers the acquisition of the reference current as the first time node.
[0078] The first time node needs to be collected when the high-side MOS is fully turned on and the low-side MOS is fully turned off. Since the current does not flow through the low-side sampling resistor at this time, the current collected by the sampling resistor should be 0A, which is used as the reference current of zero current. Based on this, combined with step S1211, the falling edge of the PWM signal that triggers the collection of the reference current can be determined, so that the collection of the reference current is triggered at the falling edge of the PWM signal that triggers the collection of the reference current. During the collection process, it can be ensured that the current does not flow through the low-side sampling resistor.
[0079] Specifically, please combine Figure 3 As shown, the center of the PWM signal that triggers the acquisition of the reference current (i.e., the middle time point of the first duty cycle, corresponding to Figure 3 B in the first sub-period) and the middle time point of the first sub-period (corresponding to Figure 3 If the U phase high side, the V phase high side and the W phase high side are aligned with point A in the figure, the falling edge of the PWM signal for collecting the reference current is triggered at point C, and this continues until the current sampling ends. The U phase high side, the V phase high side and the W phase high side are all high levels, while the U phase low side, the V phase low side and the W phase low side are all low levels. Therefore, it can be used as a reference current for zero current.
[0080] Still taking the above target current closed-loop control period as 100us, the falling edge of the PWM signal that triggers the acquisition of the reference current, that is, the position of the first time node is at 49.5us of the 100us.
[0081] In other embodiments, the rising edge of the PWM signal that triggers the acquisition of the reference current may be used as the first time node. In this case, the first duty cycle = 2t / T, that is, Figure 3 The first duty cycle time 230 is in the form of a downward flip.
[0082] The time node for collecting the basic phase current is determined according to the middle time point of the second sub-cycle and the current sampling time (recorded as the second time node for distinction). For details, please refer to Figure 6 As shown, it may include the following steps:
[0083] S1221. Determine the target sector where the motor rotor position is located during the second sub-period.
[0084] Due to the noise during MOS switching and the unstable current during the current stabilization process, the current sampling point should be as late as possible, but it cannot be delayed to the moment when the low-side MOS is turned off, because AD sampling requires a holding time, otherwise the AD sampling will not be accurate.
[0085] Based on the above process, it is particularly appropriate to complete the processing before the low-side MOS of each phase is turned off. Therefore, it is necessary to determine the target sector where the motor rotor position is located in the second sub-cycle. Once the target sector is determined, it can be known which phase's low-side MOS is turned off the earliest. By completing AD sampling before its low-side MOS is turned off (within the second sub-cycle), the problem of inaccurate current collection caused by noise during MOS switching and current instability during current stabilization can be avoided.
[0086] S1222. Determine a duty cycle time of a low side of a target phase according to the target sector, wherein the target phase is the one with the smallest duty cycle of the low side among the three phases in the target sector.
[0087] Based on the principle of step S1221, the target phase can be determined from the target sector. The target phase here refers to the earliest one in which the low-side MOS is turned off in the target sector, that is, the one with the smallest duty cycle (or duty cycle time) of the low-side PWM signal in the second cycle.
[0088] Sector diagram Figure 7 As shown in the figure, when the motor rotor position is in sector 2 or sector 3, the U phase low side duty cycle is the narrowest, and when the motor rotor position is in sector 4 or sector 6, the W phase duty cycle is the narrowest. When the motor rotor position is in sector 1 or sector 5, the V phase duty cycle is the narrowest.
[0089] Therefore, when the target sector is 2 sectors or 3 sectors, the target phase is U phase. Similarly, when the target sector is 4 sectors or 6 sectors, the target phase is W phase. When the target sector is 1 sector or 5 sectors, the target phase is V phase. Figure 5 It can be seen that during the second sub-period 240, the sector (ie, the target sector) where the motor rotor position is located is sector 1 or sector 5, and the target phase is the V phase.
[0090] S1223. Determine a second time node according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period.
[0091] Since the AD sampling of the basic phase current needs to be completed before the target phase low-side MOS is turned off, the duty cycle time of the target phase low side minus the corresponding current sampling time can be used as the duty cycle time of the PWM signal that triggers the acquisition of the basic phase current, which is recorded as the second duty cycle time.
[0092] The second duty cycle time is similar to the first duty cycle time, which corresponds to the second sub-period, that is, the second duty cycle time is equal to the second duty cycle time divided by the time of the second sub-period, that is, the second duty cycle time is the high level time of the PWM signal that triggers the acquisition of the basic phase current.
[0093] At the middle time point of the second sub-cycle ( Figure 5 Point D in the figure) is used as the center of the PWM signal that triggers the acquisition of the basic phase current (i.e., the middle time point of the second duty cycle, corresponding to Figure 5 According to point E in the figure), the falling edge of the PWM signal for triggering the acquisition of the basic phase current is determined, and the falling edge of the PWM signal for triggering the acquisition of the basic phase current is used as the second time node.
[0094] Since it is necessary to start the AD sampling of the basic phase current at the falling edge of the PWM signal that triggers the acquisition of the basic phase current, and the sampling must be completed before the low-side MOS of the target phase is turned off, it can be known that the falling edge of the PWM signal that triggers the acquisition of the basic phase current ( Figure 5 The time from point F shown in the figure to the target phase low-side MOS shutdown (point G) is not less than the current sampling time. Therefore, the sampling can be completed just when the target phase low-side MOS is turned off (point G). The later the basic current sampling point is, the later the basic current sampling point is. Moreover, it is not delayed to the target phase low-side MOS shutdown moment. Therefore, the time of the second duty cycle can be determined by the following formula:
[0095] T2=T1-2t
[0096] Wherein, t is the current sampling time, T2 is the time of the second duty cycle, and T1 is the duty cycle time of the low side of the target phase.
[0097] Of course, in other embodiments, the multiple of the current sampling time in the above formula may be adjusted to be slightly greater than 2, for example, 2.2, 2.5, etc.
[0098] In other embodiments, the rising edge of the PWM signal for triggering the acquisition of the basic phase current may be used as the first time node. In this case, the time of the second duty cycle = T1-2t, that is, Figure 5 The second duty cycle time 250 is in the form of a downward flip.
[0099] S130. Collect a first current value and a second current value at the first time node and the second time node respectively.
[0100] The target current closed-loop control cycle is divided into a first sub-cycle and a second sub-cycle according to the time before and after, and AD sampling is performed once in each sub-cycle to collect the reference current and the basic phase current respectively. This method can effectively reduce the CPU load rate and improve the efficiency of the motor control system.
[0101] Please refer to Figure 8 As shown, in a preferred embodiment of the present invention, the corresponding reference current or basic phase current is obtained by sampling the current at both ends of the sampling resistor. The sampling resistor is placed on the low side of the bridge arm, and the sampling resistor can be 2 or 3. When sampling, the 2-phase or 3-phase currents must be synchronously triggered to satisfy Kirchhoff's current law.
[0102] The subsequent specific method of obtaining the first current value and the second current value can adopt existing conventional technology. For example, the reference current and the basic phase current are collected by synchronously triggering sampling of the two-phase currents. After the sampling is completed, the obtained current AD values are transferred to variables A and B respectively through DMA, so that variables A and variable B are recorded as the first current value and the second current value respectively.
[0103] S140. Obtain the phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value.
[0104] The first current value and the second current value are respectively converted to obtain the first actual current value and the second actual current value. The conversion method is an existing conventional technology. For example, the first current value and the second current value can be respectively converted to obtain the first actual current value and the second actual current value through a correlation coefficient, wherein the first actual current value and the second actual current value correspond to the zero current signal and the basic phase current signal respectively, and the difference between the two (the second actual current value minus the first actual current value) is used as the precise phase current required for the target current closed-loop control cycle.
[0105] Embodiment 2
[0106] See also Fig. 9 , Fig. 9 Schematic diagram of a three-phase motor phase current real-time acquisition device disclosed in an embodiment of the present invention. Fig. 9 As shown, the three-phase motor phase current real-time acquisition device may include:
[0107] A splitting unit 310, configured to divide the target current closed-loop control period into a first sub-period and a second sub-period in equal time.
[0108] A determination unit 320 is used to determine a time node for collecting a reference current according to an intermediate time point of a first sub-cycle and a current sampling time, recorded as a first time node, and to determine a time node for collecting a basic phase current according to an intermediate time point of a second sub-cycle and a current sampling time, recorded as a second time node;
[0109] A collection unit 330, configured to collect a first current value and a second current value at the first time node and the second time node respectively;
[0110] The calculation unit 340 is used to obtain the phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value.
[0111] Preferably, the determining unit 320 may include:
[0112] Adjusting the duty cycle of the PWM signal that triggers the acquisition of the reference current according to the current sampling time and the target current closed-loop control period, recorded as a first duty cycle;
[0113] Aligning the center of the PWM signal that triggers the acquisition of the reference current with the middle time point of the first sub-period, determining the falling edge of the PWM signal that triggers the acquisition of the reference current, and taking the falling edge of the PWM signal that triggers the acquisition of the reference current as the first time node;
[0114] Determining a target sector where the motor rotor position is located during the second sub-period;
[0115] Determine the duty cycle time of the low side of the target phase according to the target sector, the target phase being the one with the smallest duty cycle of the low side among the three phases in the target sector;
[0116] The second time node is determined according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period.
[0117] Among them, adjusting the duty cycle of the PWM signal that triggers the acquisition of the reference current according to the current sampling time and the target current closed-loop control period may include:
[0118] The first duty cycle is calculated by the following formula:
[0119] D1=1-t / T
[0120] Wherein, D1 is the first duty cycle, t is the current sampling time, and T is the time of the first sub-cycle.
[0121] Determining a time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time includes:
[0122] Determining the second time node according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period may include:
[0123] The duty cycle time of the low side of the target phase minus the corresponding current sampling time is used as the duty cycle time of the PWM signal for triggering the acquisition of the basic phase current, which is recorded as the second duty cycle time; specifically:
[0124] T2=T1-2t
[0125] Where, t is the current sampling time, T2 is the time of the second duty cycle, and T1 is the duty cycle time of the low side of the target phase;
[0126] The middle time point of the second sub-cycle is used as the center of the PWM signal for triggering the acquisition of the basic phase current, the falling edge of the PWM signal for triggering the acquisition of the basic phase current is determined, and the falling edge of the PWM signal for triggering the acquisition of the basic phase current is used as the second time node.
[0127] Preferably, the calculation unit 340 may include:
[0128] Converting the first current value and the second current value to obtain a first actual current value and a second actual current value respectively;
[0129] The first actual current value is subtracted from the second actual current value to obtain the phase current of the target current closed-loop control period.
[0130] Embodiment 3
[0131] See also Fig.10 , Fig.10 A schematic diagram of an electronic device that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present invention described or / and claimed herein.
[0132] like Fig.10 As shown, the electronic device includes at least one processor 410, and a memory connected to the at least one processor 410, such as a ROM (read-only memory) 420, a RAM (random access memory) 430, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 410 can perform various appropriate actions and processes according to the computer program stored in the ROM 420 or the computer program loaded from the storage unit 480 to the random access memory RAM 430. In the RAM 430, various programs and data required for the operation of the electronic device can also be stored. The processor 410, the ROM 420, and the RAM 430 are connected to each other via a bus 440. The I / O (input / output) interface 450 is also connected to the bus 440.
[0133] A number of components in the electronic device are connected to the I / O interface 450, including: an input unit 460, such as a keyboard, a mouse, etc.; an output unit 470, such as various types of displays, speakers, etc.; a storage unit 480, such as a disk, an optical disk, etc.; and a communication unit 490, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 490 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet or / and various telecommunication networks.
[0134] The processor 410 may be a variety of general or / and special processing components with processing and computing capabilities. Some examples of the processor 410 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 410 executes one or more steps of a three-phase motor phase current real-time acquisition method described in the first embodiment above.
[0135] In some embodiments, a method for real-time acquisition of phase current of a three-phase motor may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 480. In some embodiments, part or all of the computer program may be loaded into or / and installed on an electronic device via ROM 420 and / or communication unit 490. When the computer program is loaded into RAM 430 and executed by processor 410, one or more steps of a method for real-time acquisition of phase current of a three-phase motor described in the first embodiment above may be executed. Alternatively, in other embodiments, processor 410 may be configured to execute a method for real-time acquisition of phase current of a three-phase motor by any other appropriate means (e.g., by means of firmware).
[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, or / and combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed or / and interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general purpose programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0137] The computer programs for implementing the methods of the embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart or / and the block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0138] In the context of an embodiment of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0139] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0140] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0141] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0142] The above is a detailed introduction to a method and device for real-time acquisition of phase current of a three-phase motor disclosed in the present invention. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for real-time acquisition of phase current of a three-phase motor, characterized in that: It includes the following steps: The target current closed-loop control period is equally divided into a first sub-period and a second sub-period according to the time sequence; Determine the time node for collecting the reference current according to the middle time point of the first sub-cycle and the current sampling time, which is recorded as the first time node; determine the time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time, which is recorded as the second time node; Collecting a first current value and a second current value at the first time node and the second time node respectively; Obtaining the phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value; Determining a time node for collecting the reference current according to the middle time point of the first sub-cycle and the current sampling time includes: Adjusting the duty cycle of the PWM signal that triggers the acquisition of the reference current according to the current sampling time and the target current closed-loop control period, recorded as a first duty cycle; Aligning the center of the PWM signal that triggers the acquisition of the reference current with the middle time point of the first sub-period, determining the falling edge of the PWM signal that triggers the acquisition of the reference current, and taking the falling edge of the PWM signal that triggers the acquisition of the reference current as the first time node; Determining a time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time includes: Determining a target sector where the motor rotor position is located during the second sub-period; Determine the duty cycle time of the low side of the target phase according to the target sector, the target phase being the one with the smallest duty cycle of the low side among the three phases in the target sector; The second time node is determined according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period.
2. The method for real-time acquisition of phase current of a three-phase motor according to claim 1, characterized in that: The duty cycle of the PWM signal that triggers the acquisition of the reference current is adjusted according to the current sampling time and the target current closed-loop control period, including: The first duty cycle is calculated by the following formula: D1=1-t / T Wherein, D1 is the first duty cycle, t is the current sampling time, and T is the time of the first sub-cycle.
3. The method for real-time acquisition of phase current of a three-phase motor according to claim 1, characterized in that: Determining a second time node according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period includes: The duty cycle time of the low side of the target phase minus the corresponding current sampling time is used as the duty cycle time of the PWM signal for triggering the acquisition of the basic phase current, which is recorded as the second duty cycle time; The middle time point of the second sub-cycle is used as the center of the PWM signal for triggering the acquisition of the basic phase current, the falling edge of the PWM signal for triggering the acquisition of the basic phase current is determined, and the falling edge of the PWM signal for triggering the acquisition of the basic phase current is used as the second time node.
4. The method for real-time acquisition of phase current of a three-phase motor according to claim 3, characterized in that: The duty cycle time of the low side of the target phase minus the corresponding current sampling time is used as the duty cycle time of the PWM signal for triggering the acquisition of the basic phase current, including: T2=T1-2t Wherein, t is the current sampling time, T2 is the time of the second duty cycle, and T1 is the duty cycle time of the low side of the target phase.
5. The method for real-time acquisition of phase current of a three-phase motor according to any one of claims 1 to 4, characterized in that: Obtaining the phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value, comprising: Converting the first current value and the second current value to obtain a first actual current value and a second actual current value respectively; The first actual current value is subtracted from the second actual current value to obtain the phase current of the target current closed-loop control period.
6. A three-phase motor phase current real-time acquisition device, characterized in that: It includes: A splitting unit, used for dividing the target current closed-loop control period into a first sub-period and a second sub-period in equal parts according to the time sequence; A determination unit, configured to determine a time node for collecting a reference current according to an intermediate time point of a first sub-cycle and a current sampling time, recorded as a first time node, and to determine a time node for collecting a basic phase current according to an intermediate time point of a second sub-cycle and a current sampling time, recorded as a second time node; A collection unit, configured to collect a first current value and a second current value at the first time node and the second time node respectively; A calculation unit, configured to obtain a phase current of the three-phase motor in the target current closed-loop control period according to the first current value and the second current value; Determining a time node for collecting the reference current according to the middle time point of the first sub-cycle and the current sampling time includes: Adjusting the duty cycle of the PWM signal that triggers the acquisition of the reference current according to the current sampling time and the target current closed-loop control period, recorded as a first duty cycle; Aligning the center of the PWM signal that triggers the acquisition of the reference current with the middle time point of the first sub-period, determining the falling edge of the PWM signal that triggers the acquisition of the reference current, and taking the falling edge of the PWM signal that triggers the acquisition of the reference current as the first time node; Determining a time node for collecting the basic phase current according to the middle time point of the second sub-cycle and the current sampling time includes: Determining a target sector where the motor rotor position is located during the second sub-period; Determine the duty cycle time of the low side of the target phase according to the target sector, the target phase being the one with the smallest duty cycle of the low side among the three phases in the target sector; The second time node is determined according to the duty cycle time of the low side of the target phase, the current sampling time, and the middle time point of the second sub-period.
7. An electronic device, characterized in that: It includes: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the three-phase motor phase current real-time acquisition method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: It stores a computer program, wherein the computer program enables a computer to execute the method for real-time acquisition of phase current of a three-phase motor as described in any one of claims 1-5.
