Single-resistance current sampling method, device, equipment and medium
By reverse phase shifting the three-phase PWM waveform and sampling on both sides of the carrier cycle center line, the problem of inaccurate current sampling in the non-observation region of the single-resistor current sampling method is solved, achieving smooth transition of the motor and reducing harmonics, thereby improving the accuracy and efficiency of motor control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MR SEMICON LTD
- Filing Date
- 2024-11-26
- Publication Date
- 2026-06-02
AI Technical Summary
The single-resistor current sampling method has the problem of inaccurate current sampling in the non-observation area, which leads to harmonic interference during motor operation and affects the normal operation and service life of the motor.
By performing reverse phase shifting on the three-phase PWM waveform within the current carrier cycle, the sampling trigger point is determined to be located on both sides of the center line of the carrier cycle. Single-resistor current sampling is then performed at this point to ensure the waveform symmetry of adjacent carrier cycles and avoid the generation of harmonics.
It effectively reduces current harmonics, ensures normal operation of the motor and sampling accuracy, and improves the precision and efficiency of motor control.
Smart Images

Figure CN122137280A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of motor control technology, and in particular relates to a single-resistor current sampling method, device, equipment and medium. Background Technology
[0002] In the field of motor control, especially in high-performance AC motor vector control systems, accurate and real-time current sampling is crucial. Current sampling data is used in feedback control systems to precisely adjust the motor's voltage and frequency, thereby achieving precise control of the motor's speed, torque, and position. Among various current sampling methods, single-resistor current sampling has significant advantages in certain applications due to its low hardware cost and simple wiring.
[0003] The single-resistor current sampling method samples the motor phase current by setting a resistor at the DC bus. Since the sum of the three-phase currents of the motor is zero (ignoring leakage current), only one phase current needs to be sampled, and the other two phase currents are reconstructed through an algorithm. However, this method suffers from inaccurate current sampling in the non-observation region (the transition region between sectors and the low-speed region). The conventional method is to perform phase shifting operation on PWM (Pulse Width Modulation) in the non-observation region of single-resistor sampling.
[0004] However, phase shift can induce harmonics, which can interfere with the normal operation of the motor, causing noise and unnecessary vibration. This not only reduces the motor's operating efficiency but may also negatively impact its lifespan. Summary of the Invention
[0005] This application provides an implementation scheme that differs from related technologies, in order to solve the technical problem in related technologies where phase shift during single-resistor current sampling generates harmonics, thereby interfering with the normal operation of the motor.
[0006] In a first aspect, this application provides a single-resistor current sampling method, including:
[0007] The three-phase PWM waveform within the current carrier cycle is subjected to phase shifting processing, wherein the phase shifting processing operation corresponding to the current carrier cycle is the inverse operation of the phase shifting processing operation corresponding to the previous cycle of the current carrier cycle.
[0008] The sampling trigger point corresponding to the current carrier cycle is determined based on the three-phase PWM waveform within the current carrier cycle after phase shifting. The sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous cycle are located on both sides of the center line of the carrier cycle, respectively.
[0009] The motor current is sampled at the sampling trigger point using a single resistance.
[0010] Secondly, this application provides a single-resistor current sampling device, comprising:
[0011] A phase-shifting unit is used to perform phase-shifting processing on the three-phase PWM waveform within the current carrier cycle, wherein the phase-shifting processing operation corresponding to the current carrier cycle is the inverse operation of the phase-shifting processing operation corresponding to the previous cycle of the current carrier cycle.
[0012] The determining unit is used to determine the sampling trigger point corresponding to the current carrier cycle based on the three-phase PWM waveform within the current carrier cycle after phase shifting processing, wherein the sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous cycle of the current carrier cycle are located on both sides of the center line of the carrier cycle, respectively.
[0013] The sampling unit is used to sample the motor current at the sampling trigger point using a single resistance.
[0014] Thirdly, this application provides an electronic device, comprising:
[0015] Processor; and
[0016] Memory for storing the executable instructions of the processor;
[0017] The processor is configured to execute the first aspect, or any method in any possible implementation of the first aspect, by executing the executable instructions.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the first aspect, or any method in any possible implementation of the first aspect.
[0019] This application provides a phase-shifting process for the three-phase PWM waveform within the current carrier cycle. The phase-shifting operation corresponding to the current carrier cycle is the inverse of the phase-shifting operation corresponding to the previous carrier cycle. The sampling trigger point corresponding to the current carrier cycle is determined based on the phase-shifted three-phase PWM waveform within the current carrier cycle. The sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous carrier cycle are located on opposite sides of the center line of the carrier cycle. A scheme for single-resistor current sampling of the motor at the sampling trigger point is implemented by setting the phase-shifting operations of the three-phase PWM waveforms corresponding to two adjacent carrier cycles as inverse operations. That is, the two three-phase PWM waveforms corresponding to two adjacent carrier cycles are moved in opposite directions. This ensures that the two phase-shifted three-phase PWM waveforms corresponding to two adjacent carrier cycles are symmetrical at the center point of the two adjacent carrier cycles, guaranteeing a smooth transition of the current waveform in time, reducing harmonic components, and thus achieving the technical effect of avoiding current harmonics and ensuring normal motor operation. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0021] Figure 1 This is a voltage space vector diagram for detecting DC bus current using a single resistor, provided in an embodiment of this application.
[0022] Figure 2 A schematic flowchart illustrating the single-resistor current sampling method provided in this application embodiment;
[0023] Figure 3 A phase-shifting schematic diagram of a three-phase PWM waveform provided in an embodiment of this application;
[0024] Figure 4 This is another schematic flowchart of the single-resistor current sampling method provided in the embodiments of this application;
[0025] Figure 5 This is a schematic diagram of the structure of the single-resistor current sampling device provided in the embodiments of this application;
[0026] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0028] The terms "first" and "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the solution can be implemented in a different order than that illustrated or described in this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes 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 such processes, methods, products, or apparatus.
[0029] First, some terms used in the embodiments of this application will be explained below to facilitate understanding by those skilled in the art.
[0030] PWM signal: A PWM signal is a special type of signal widely used in various aspects of electronics. PWM is a method of controlling or simulating signals by changing the width (duty cycle) of a pulse signal. In a PWM signal, each pulse consists of a high level and a low level, and the ratio of the pulse width (i.e., the duration of the high level) to the entire cycle is called the duty cycle. By adjusting the duty cycle, PWM signals can achieve approximate or precise control of analog signals. In motor control, PWM signals are used to control the motor's voltage and frequency, thereby achieving precise control of the motor's speed, torque, and position.
[0031] Phase shift: refers to shifting the trigger time of the PWM signal forward or backward by a certain distance in time.
[0032] Low modulation ratio: The modulation ratio typically refers to the ratio between the modulating signal and the carrier signal in PWM or similar techniques. A low modulation ratio means that the amplitude of the modulating signal is relatively small relative to the amplitude of the carrier signal.
[0033] An ADC (Analogue to Digital Converter) is an electronic device that converts analog signals into digital signals. In motor control systems, ADCs are commonly used to sample current. An ADC requires a specific time window to complete the sampling process, which is usually related to the period of the PWM signal. However, at low modulation ratios, the amplitude of the effective vector may be too small, potentially hindering direct sampling by the ADC. Specifically, if the duty cycle of the PWM signal is too small, the ADC may not be able to find a suitable time window for sampling within the PWM signal's period, or the sampling result may be affected by the edge effects of the PWM signal, leading to inaccurate sampling.
[0034] The single-resistor current sampling method suffers from inaccurate current sampling in non-observation regions (transition regions during sector transitions and low-voltage modulation regions). Please refer to... Figure 1 , Figure 1 The voltage space vector diagram for detecting DC bus current with a single resistor provided in the embodiments of this application is as follows: Figure 1 As shown, Figure 1 The gray area represents the transition zone between the low-voltage modulation region and the sector transition zone. The DC bus current cannot be accurately detected in this transition zone. A conventional method involves phase-shifting the PWM waveform in the non-observation region of single-resistor sampling to create a sampling window for ADC sampling. This ensures the minimum non-zero fundamental vector operating time, thereby achieving accurate detection of the DC bus current.
[0035] However, because the shifting phase distorts the originally symmetrical waveform, it introduces large current harmonics, which in turn causes vibration and noise, interfering with the normal operation of the motor.
[0036] To address this technical problem, this application provides a single-resistor current sampling method, apparatus, device, and medium, which solves the technical problem in related technologies where phase shift during single-resistor current sampling generates harmonics, thereby interfering with the normal operation of the motor.
[0037] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0038] Figure 2 A flowchart illustrating a single-resistor current sampling method provided for an exemplary embodiment of this application is shown. The method includes at least the following steps:
[0039] S11. Perform phase shifting processing on the three-phase PWM waveform within the current carrier cycle, wherein the phase shifting processing operation corresponding to the current carrier cycle is the inverse operation of the phase shifting processing operation corresponding to the previous cycle of the current carrier cycle.
[0040] In some embodiments, the motor controller can generate a three-phase PWM waveform for driving the motor based on a preset motor control algorithm and parameters, using an internal timer module or a dedicated PWM generation module. The three-phase PWM waveform consists of three independent PWM waveforms, each corresponding to one phase of the motor (typically the U phase, V phase, and W phase).
[0041] Three-phase PWM waveforms are periodic waveforms with a carrier cycle. When using single-resistor current sampling to control the motor, it is necessary to detect the current in each carrier cycle to obtain the current information of each phase when the motor is running, so as to monitor the motor's operating status in real time and perform precise control of the motor as needed.
[0042] In the solution provided in the embodiments of this application, the three phases are arranged in descending order of the pulse width of the PWM waveform as the maximum phase, the middle phase, and the minimum phase.
[0043] To optimize the sampling process and ensure accurate and effective sampling of the motor's three-phase current within each carrier cycle, while avoiding sampling conflicts and errors, the three-phase PWM waveform within the current carrier cycle needs to undergo phase shifting. This ensures that the effective duration of the non-zero vector is sufficiently long within each carrier cycle to meet the minimum sampling time requirement. This ensures that the effective value of the current is captured during sampling, thereby improving the accuracy and reliability of the sampling.
[0044] In the solution provided in this application embodiment, when performing phase shift processing on the three-phase PWM waveform within the current carrier cycle, the inverse operation of the phase shift processing operation corresponding to the previous cycle of the current carrier cycle is used as the phase shift processing operation corresponding to the current carrier cycle.
[0045] The inverse operation of phase shifting refers to the operation in the opposite direction of phase shift. Specifically, for a given phase, the inverse operation of shifting the phase to the left is shifting it to the right, and the inverse operation of shifting the phase to the right is shifting it to the left. The inverse operation of keeping the phase unchanged is keeping it unchanged. For example, if the phase shifting operation corresponding to the previous period of the current carrier cycle was a maximum phase left shift, then the phase shifting operation corresponding to the current carrier cycle is a maximum phase right shift; if the phase shifting operation corresponding to the previous period of the current carrier cycle was a minimum phase left shift, then the phase shifting operation corresponding to the current carrier cycle is a minimum phase right shift; and if the phase shifting operation corresponding to the previous period of the current carrier cycle was an intermediate phase unchanged, then the phase shifting operation corresponding to the current carrier cycle is an intermediate phase unchanged.
[0046] In this embodiment, two completely opposite phase shifting methods are used in two adjacent carrier cycles, so that the two three-phase PWM waveforms in the two adjacent carrier cycles after phase shifting are symmetrical about the center line of the carrier cycle. According to the volt-second equivalence principle, the average voltage of the two carrier cycles after phase shifting is unchanged and no current harmonics are generated.
[0047] In some embodiments, the phase shift operation corresponding to the current carrier period can be determined based on the parity of the current carrier period. (See also: [link to relevant documentation]). Figure 3 , Figure 3 This is a phase-shifting diagram of a three-phase PWM waveform provided in an embodiment of this application, specifically:
[0048] If the current carrier period is an odd period, then in S11, the three-phase PWM waveform within the current carrier period is phase-shifted, including:
[0049] Shift the smallest phase of the three-phase PWM waveform in the current carrier cycle to the right, and shift the largest phase of the three-phase PWM waveform in the current carrier cycle to the left.
[0050] Specifically, by shifting the smallest phase of the three-phase PWM waveform to the right and the largest phase to the left, the sampling window time can be increased, thus making the sampling window wide enough to meet the minimum sampling time required by the system.
[0051] If the current carrier period is even, then in S11, the three-phase PWM waveform within the current carrier period is phase-shifted, including:
[0052] Shift the largest phase of the three-phase PWM waveform in the current carrier cycle to the right, and shift the smallest phase of the three-phase PWM waveform in the current carrier cycle to the left.
[0053] Specifically, by shifting the largest phase of the three-phase PWM waveform to the right and the smallest phase to the left, the sampling window time can be increased, thus making the sampling window wide enough to meet the minimum sampling time required by the system.
[0054] When performing phase-shifting processing on the three-phase PWM waveform within the current carrier cycle, the middle phase remains unchanged.
[0055] S12. Determine the sampling trigger point corresponding to the current carrier cycle based on the three-phase PWM waveform within the current carrier cycle after phase shifting. The sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous cycle are located on both sides of the center line of the carrier cycle, respectively.
[0056] In this embodiment, when determining the sampling trigger point corresponding to each carrier cycle, the sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous carrier cycle are respectively set on both sides of the carrier cycle. For example, if the sampling trigger point of the current carrier cycle is on the left side of the center line of the current carrier cycle, the sampling trigger point of the next carrier cycle should be on the right side of the next carrier cycle. This ensures that the three-phase current of the motor can be accurately and effectively sampled in each carrier cycle, while avoiding collisions and errors during sampling.
[0057] In some embodiments, if the current carrier period is an odd period, then in S12, the sampling trigger point corresponding to the current carrier period is determined according to the three-phase PWM waveform within the current carrier period after phase shifting, including: determining the sampling trigger point corresponding to the current carrier period according to the rise time of the number of high-level states of the three-phase PWM waveform within the current carrier period after phase shifting, wherein the number of high-level states of the three-phase PWM waveform is the number of phases that are simultaneously in a high-level state.
[0058] In this embodiment, by using the rising time of the high-level state number, the time when the phase current is relatively stable in the current carrier cycle can be quickly determined, thereby determining the sampling time when an accurate sampling current can be collected.
[0059] Specifically, when the number of high-level states increases from a lower value (such as 0, 1, or 2) to a higher value (such as 1, 2, or 3), this rise moment is identified and recorded. This moment is the rise moment of the high-level state count, which marks the increase of high-level states in the three-phase PWM waveform. The sampling trigger point corresponding to the current carrier cycle is determined based on the rise moment of the high-level state count of the three-phase PWM waveform in the current carrier cycle after phase shifting.
[0060] In some embodiments, determining the sampling trigger point corresponding to the current carrier period based on the rise time of the number of high-level states of the three-phase PWM waveform within the current carrier period after phase shifting includes:
[0061] The rising edge of the largest phase and the rising edge of the middle phase in the three-phase PWM waveform within the current carrier cycle after phase shifting are used as the sampling trigger points corresponding to the current carrier cycle.
[0062] In this embodiment, the rising edge of the largest phase and the rising edge of the middle phase in the three-phase PWM waveform are used as the sampling trigger points corresponding to the current carrier cycle. This can capture the moment when the current is relatively stable, thereby avoiding sampling when the current fluctuates greatly and improving the accuracy of sampling.
[0063] For details, please continue reading. Figure 3The time corresponding to the carrier count value T1 is the rising edge of the largest phase in the three-phase PWM waveform within the current carrier period after phase shifting. The time corresponding to the carrier count value T2 is the rising edge of the middle phase in the three-phase PWM waveform within the current carrier period after phase shifting. The time corresponding to the carrier count value T1 is taken as the first sampling trigger point within the current carrier period, and the time corresponding to the carrier count value T2 is taken as the second sampling trigger point within the current carrier period.
[0064] In some embodiments, if the current carrier period is an even period, then in S12, the sampling trigger point corresponding to the current carrier period is determined according to the three-phase PWM waveform within the current carrier period after phase shifting, including: determining the sampling trigger point corresponding to the current carrier period according to the time when the number of high-level states of the three-phase PWM waveform within the current carrier period after phase shifting.
[0065] In this embodiment, by determining the time when the high-level state count decreases, the time when the phase current is relatively stable in the current carrier cycle can be quickly identified, thereby determining the sampling time when an accurate sampling current can be acquired.
[0066] Specifically, when the number of high-level states decreases from a higher value (such as 1, 2, or 3) to a lower value (such as 0, 1, or 2), this falling moment is identified and recorded. This moment is the rising moment of the number of high-level states, which marks the reduction of high-level states in the three-phase PWM waveform. The sampling trigger point corresponding to the current carrier cycle is determined based on the falling moment of the number of high-level states in the three-phase PWM waveform within the current carrier cycle after phase shifting.
[0067] In some embodiments, determining the sampling trigger point corresponding to the current carrier period based on the time when the number of high-level states of the three-phase PWM waveform within the current carrier period decreases after phase shifting includes:
[0068] The falling edge of the smallest phase and the falling edge of the middle phase in the three-phase PWM waveform within the current carrier cycle after phase shifting are used as the sampling trigger points corresponding to the current carrier cycle.
[0069] In this embodiment, the falling edge of the smallest phase and the falling edge of the middle phase in the three-phase PWM waveform are used as the sampling trigger points corresponding to the current carrier cycle. This can capture the moment when the current is relatively stable, thereby avoiding sampling when the current fluctuates greatly and improving the accuracy of sampling.
[0070] For details, please continue reading. Figure 3The time corresponding to the carrier count value T3 is the falling edge of the smallest phase in the three-phase PWM waveform within the current carrier period after phase shifting. The time corresponding to the carrier count value T4 is the falling edge of the middle phase in the three-phase PWM waveform within the current carrier period after phase shifting. The time corresponding to the carrier count value T3 is taken as the first sampling trigger point within the current carrier period, and the time corresponding to the carrier count value T4 is taken as the second sampling trigger point within the current carrier period.
[0071] S13. Perform single-resistance current sampling on the motor at the sampling trigger point.
[0072] Specifically, at the sampling trigger point, the motor current is sampled by a single-resistor current sampling circuit. Furthermore, according to Kirchhoff's law (the sum of the three-phase currents is 0), the three-phase current can be reconstructed from the current values obtained from the two samplings.
[0073] Please see Figure 4 To enable those skilled in the art to better understand the present invention, Figure 4 This is another schematic flowchart of a single-resistor current sampling method provided in an embodiment of this application. The single-resistor current sampling method may include the following steps:
[0074] S41. Determine the parity of the current carrier period. If the current carrier period is odd, execute S42. If the current carrier period is even, execute S44.
[0075] S42. Shift the phase with the smallest duty cycle in the three-phase PWM waveform within the current carrier cycle to the right, shift the phase with the smallest duty cycle to the left, and leave the phase with the second smallest duty cycle unchanged.
[0076] S43. Collect the motor current at the rising edge of the phase with the largest duty cycle and the rising edge of the phase with the second largest duty cycle after phase shifting.
[0077] S44. Shift the phase with the smallest duty cycle in the three-phase PWM waveform within the current carrier cycle to the left, shift the phase with the largest duty cycle to the left, and leave the phase with the second largest duty cycle unchanged.
[0078] S45. Collect the motor current at the falling edge of the phase with the smallest duty cycle and the falling edge of the phase with the second largest duty cycle after phase shifting.
[0079] This application provides a phase-shifting process for the three-phase PWM waveform within the current carrier cycle. The phase-shifting operation corresponding to the current carrier cycle is the inverse of the phase-shifting operation corresponding to the previous carrier cycle. The sampling trigger point corresponding to the current carrier cycle is determined based on the phase-shifted three-phase PWM waveform within the current carrier cycle. The sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous carrier cycle are located on opposite sides of the center line of the carrier cycle. A scheme for single-resistor current sampling of the motor is provided at the sampling trigger point. The phase-shifting operation of the waveform to be shifted in the three-phase PWM waveforms corresponding to two adjacent carrier cycles is set as an inverse operation, that is, the two three-phase PWM waveforms corresponding to two adjacent carrier cycles are shifted in opposite directions. This ensures that the two three-phase PWM waveforms corresponding to two adjacent carrier cycles are symmetrical at the center point of the two adjacent carrier cycles after phase shifting, guaranteeing a smooth transition of the current waveform in time, reducing harmonic components, and thus achieving the technical effect of avoiding current harmonics and ensuring normal motor operation.
[0080] Figure 5 A schematic diagram of the structure of a single-resistor current sampling device provided for an exemplary embodiment of this application;
[0081] The device includes:
[0082] Phase shifting unit 51 is used to perform phase shifting processing on the three-phase PWM waveform in the current carrier cycle, wherein the phase shifting processing operation corresponding to the current carrier cycle is the inverse operation of the phase shifting processing operation corresponding to the previous cycle of the current carrier cycle.
[0083] The determining unit 52 is used to determine the sampling trigger point corresponding to the current carrier cycle based on the three-phase PWM waveform within the current carrier cycle after phase shifting processing, wherein the sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous cycle of the current carrier cycle are located on both sides of the center line of the carrier cycle.
[0084] The sampling unit 53 is used to sample the motor current at the sampling trigger point using a single resistance.
[0085] In some embodiments, if the current carrier period is an odd period, the phase shifting unit 51, when performing phase shifting processing on the three-phase PWM waveform within the current carrier period, is specifically used for:
[0086] The minimum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the right, and the maximum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the left. The three phases are arranged in descending order of the pulse width of the PWM waveform as the maximum phase, the middle phase, and the minimum phase.
[0087] In some embodiments, if the current carrier period is an odd period, the determining unit 52, when determining the sampling trigger point corresponding to the current carrier period based on the three-phase PWM waveform within the current carrier period after phase shifting, is specifically used for:
[0088] The sampling trigger point corresponding to the current carrier cycle is determined based on the rise time of the number of high-level states of the three-phase PWM waveform within the current carrier cycle after phase shifting processing, wherein the number of high-level states is the number of phases that are simultaneously in a high-level state.
[0089] In some embodiments, when determining the sampling trigger corresponding to the current carrier period based on the rising time of the number of high-level states of the three-phase PWM waveform within the current carrier period after phase shifting, the determining unit 52 is specifically used for:
[0090] The rising edge of the largest phase and the rising edge of the middle phase in the three-phase PWM waveform within the current carrier period after phase shifting are used as the sampling trigger points corresponding to the current carrier period.
[0091] In some embodiments, if the current carrier period is an even period, the phase shifting unit 51, when performing phase shifting processing on the three-phase PWM waveform within the current carrier period, is specifically used for:
[0092] The maximum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the right, and the minimum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the left. The three phases are arranged in descending order of the pulse width of the PWM waveform as the maximum phase, the middle phase, and the minimum phase.
[0093] In some embodiments, if the current carrier period is an even period, the determining unit 52, when determining the sampling trigger point corresponding to the current carrier period based on the three-phase PWM waveform within the current carrier period after phase shifting, is specifically used for:
[0094] The sampling trigger point corresponding to the current carrier cycle is determined based on the time when the number of high-level states of the three-phase PWM waveform in the current carrier cycle decreases after the phase shifting process, wherein the number of high-level states is the number of phases that are simultaneously in a high-level state.
[0095] In some embodiments, when determining the sampling trigger point corresponding to the current carrier period based on the decrease in the number of high-level states of the three-phase PWM waveform within the current carrier period after phase shifting, the determining unit 52 is specifically used for:
[0096] The falling edge time of the minimum phase and the falling edge time of the intermediate phase in the three-phase PWM waveform within the current carrier period after phase shifting are used as the sampling trigger points corresponding to the current carrier period.
[0097] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, they will not be repeated here. Specifically, the device can execute the above method embodiments, and the foregoing and other operations and / or functions of each module in the device correspond to the corresponding processes in the various methods in the above method embodiments, which will not be repeated here for the sake of brevity.
[0098] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0099] Figure 6 This is a schematic block diagram of an electronic device provided in an embodiment of this application. The electronic device may include:
[0100] The system includes a memory 601 and a processor 602. The memory 601 stores computer programs and transfers the program code to the processor 602. In other words, the processor 602 can retrieve and run the computer programs from the memory 601 to implement the methods described in the embodiments of this application.
[0101] For example, the processor 602 can be used to execute the above-described method embodiments according to instructions in the computer program.
[0102] In some embodiments of this application, the processor 602 may include, but is not limited to:
[0103] 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.
[0104] In some embodiments of this application, the memory 601 includes, but is not limited to:
[0105] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0106] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 601 and executed by the processor 602 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0107] like Figure 6 As shown, the electronic device may also include:
[0108] Transceiver 603, which may be connected to processor 602 or memory 601.
[0109] The processor 602 can control the transceiver 603 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 603 may include a transmitter and a receiver. The transceiver 603 may further include antennas, and the number of antennas may be one or more.
[0110] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0111] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0112] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0113] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0115] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0116] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0117] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A single-resistor current sampling method, characterized in that, include: A phase-shifting process is performed on the three-phase pulse width modulation (PWM) waveform within the current carrier cycle, wherein the phase-shifting operation corresponding to the current carrier cycle is the inverse operation of the phase-shifting operation corresponding to the previous cycle of the current carrier cycle. The sampling trigger point corresponding to the current carrier cycle is determined based on the three-phase PWM waveform within the current carrier cycle after phase shifting. The sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous cycle are located on both sides of the center line of the carrier cycle, respectively. The motor current is sampled at the sampling trigger point using a single resistance.
2. The method according to claim 1, characterized in that, If the current carrier period is an odd period, the phase-shifting process for the three-phase PWM waveform within the current carrier period includes: The minimum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the right, and the maximum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the left. The three phases are arranged in descending order of the pulse width of the PWM waveform as the maximum phase, the middle phase, and the minimum phase.
3. The method according to claim 2, characterized in that, If the current carrier period is an odd period, determining the sampling trigger point corresponding to the current carrier period based on the three-phase PWM waveform within the current carrier period after phase shifting includes: The sampling trigger point corresponding to the current carrier cycle is determined based on the rise time of the number of high-level states of the three-phase PWM waveform within the current carrier cycle after phase shifting processing, wherein the number of high-level states is the number of phases that are simultaneously in a high-level state.
4. The method according to claim 3, characterized in that, The sampling trigger point corresponding to the current carrier period is determined based on the rise time of the number of high-level states of the three-phase PWM waveform within the current carrier period after phase shifting, including: The rising edge of the largest phase and the rising edge of the middle phase in the three-phase PWM waveform within the current carrier period after phase shifting are used as the sampling trigger points corresponding to the current carrier period.
5. The method according to claim 1, characterized in that, If the current carrier period is an even period, the phase-shifting process for the three-phase PWM waveform within the current carrier period includes: The maximum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the right, and the minimum phase of the three-phase PWM waveform in the current carrier cycle is shifted to the left. The three phases are arranged in descending order of the pulse width of the PWM waveform as the maximum phase, the middle phase, and the minimum phase.
6. The method according to claim 5, characterized in that, If the current carrier period is an even period, determining the sampling trigger point corresponding to the current carrier period based on the three-phase PWM waveform within the current carrier period after phase shifting includes: The sampling trigger point corresponding to the current carrier cycle is determined based on the time when the number of high-level states of the three-phase PWM waveform in the current carrier cycle decreases after the phase shifting process, wherein the number of high-level states is the number of phases that are simultaneously in a high-level state.
7. The method according to claim 6, characterized in that, The sampling trigger point corresponding to the current carrier period is determined based on the time when the number of high-level states of the three-phase PWM waveform within the current carrier period decreases after the phase-shifting process, including: The falling edge time of the minimum phase and the falling edge time of the intermediate phase in the three-phase PWM waveform within the current carrier period after phase shifting are used as the sampling trigger points corresponding to the current carrier period.
8. A single-resistor current sampling device, characterized in that, include: The phase-shifting unit is used to perform phase-shifting processing on the three-phase pulse width modulation (PWM) waveform within the current carrier cycle, wherein the phase-shifting processing operation corresponding to the current carrier cycle is the inverse operation of the phase-shifting processing operation corresponding to the previous cycle of the current carrier cycle. The determining unit is used to determine the sampling trigger point corresponding to the current carrier cycle based on the three-phase PWM waveform within the current carrier cycle after phase shifting processing, wherein the sampling trigger point corresponding to the current carrier cycle and the sampling trigger point corresponding to the previous cycle of the current carrier cycle are located on both sides of the center line of the carrier cycle, respectively. The sampling unit is used to sample the motor current at the sampling trigger point using a single resistance.
9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.