Permanent magnet synchronous motor phase current reconstruction method based on single resistor
By setting the PWM adjustment method of the power bridge to align the left edge and obtaining the phase shift time of the three-phase PWM phase shift to the right, the problem of large amount of reconstruction phase current calculation in the prior art is solved, and efficient reconstruction phase current on the low-end controller is achieved.
Patent Information
- Application Number
- CN202510276803.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, the reconstruction phase current method has a large amount of calculation and depends on sector judgment, which leads to difficulty in application on low-end controllers.
By setting the PWM adjustment method of the power bridge to align the left edge, the three phase shift times of the three-phase PWM shifting phase to the right are obtained, and two fixed sampling windows are determined based on these times, and the three-phase current is obtained through the ADC sampling time for reconstruction.
The calculation formula for fixed and reconstructed phase current is realized, which reduces the calculation amount and simplifies the implementation process, and is suitable for low-end controllers.
Smart Images

Figure CN120200523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of permanent magnet synchronous motor control, and particularly to a method for reconstructing the phase current of a permanent magnet synchronous motor based on a single resistor. Background Art
[0002] Permanent magnet synchronous motors have the advantages of high power density, small volume, low operating noise, etc., and are widely used in the fields of household appliances, industrial control, aerospace, automobiles, etc.
[0003] The realization of vector control of permanent magnet synchronous motors depends on the acquisition of three-phase currents, and the three-phase currents can be obtained in various ways. Due to the pursuit of lower hardware costs and smaller hardware space in permanent magnet synchronous motor drive systems, the technology of reconstructing the three-phase currents of permanent magnet synchronous motors using a single resistor on the bus has been widely applied. The basic principle of the single-resistor phase current reconstruction technology is to utilize different switching states of the power bridge, measure the instantaneous current of the DC bus, and combine software algorithms to reconstruct the three-phase currents of the motor. The traditional method is to determine the sampling points through the three PWM duty ratios of the power bridge switches; since the duty ratio sizes are constantly changing, the sampling points need to be calculated and updated in real time; and there are non-sampling regions, and sampling points also need to be created through phase shift or level inversion; different formulas are also required for different sectors to calculate the reconstructed current. These all increase the computational burden of the main controller, resulting in difficulties in applying the traditional method to low-end controllers. Summary of the Invention
[0004] Aiming at the deficiencies in the prior art, the present invention provides a method for reconstructing the phase current of a permanent magnet synchronous motor based on a single resistor to solve the technical problems of large computational amount and dependence on sector judgment in the prior art for reconstructing the phase current method.
[0005] The present invention provides a method for reconstructing the phase current of a permanent magnet synchronous motor based on a single resistor, including the following steps:
[0006] Step 1: Set the PWM adjustment mode of the power bridge to left-edge alignment;
[0007] Step 2: Obtain three phase-shift times for the three-phase PWM shifted to the right through the turn-on time of the power device, the ADC delay sampling time, the ADC conversion time, and the PWM cycle time;
[0008] Step 3: Obtain two ADC sampling moments through the three phase-shift times for the three-phase PWM shifted to the right, the ADC delay sampling time, and the ADC conversion time;
[0009] Step 4: Reconstruct the three-phase currents by collecting the two-phase currents at the two ADC sampling moments and obtaining the third-phase current based on the collected two-phase currents.
[0010] Further, in the step 1, the specific method for setting the PWM adjustment mode of the power bridge to left-edge alignment is as follows:
[0011] Set the PWM count value from zero to D×T pwm as the duration of the PWM high-level output; set the PWM count value from D×T pwm +1 to T pwm as the duration of the PWM low-level output, where D is the PWM duty cycle; T pwm is the PWM period value.
[0012] Further, in the step 2, the specific formula for obtaining the three phase-shifting times of the three-phase PWM shifted to the right is as follows:
[0013] T1 = T pwm
[0014] T2 = T pwm -T on -T adc_delay -T adc_trans
[0015] T3 = T pwm -2×(T on +T adc_delay +T adc_trans )
[0016] In the formula, T1 is the first phase-shifting time; T2 is the second phase-shifting time; T3 is the third phase-shifting time; T pwm is the PWM period value; T on is the turn-on time of the power device; T adc_delay is the ADC delay sampling time; T adc_trans is the ADC conversion time.
[0017] Further, in the step 2, it further includes: setting the phases to which the three phase-shifting times apply, specifically:
[0018] Select one permutation method from the full permutation methods of the three phase-shifting times and apply it to the PWM control of the A, B, and C phases respectively.
[0019] Further, in the step 3, the specific method for obtaining the two ADC sampling moments is as follows:
[0020] Calculate the two ADC sampling moments according to the second phase-shifting time, the third phase-shifting time, and the ADC conversion time.
[0021] Further, the calculation formula for obtaining the two ADC sampling moments is as follows:
[0022] T sample1 = T3 + T adc_trans
[0023] T sample2 = T2 + T adc_trans
[0024] Wherein, T sample1 is the first sampling moment; T sample2 is the second sampling moment; T2 is the second phase-shifting time; T3 is the third phase-shifting time; T adc_trans is the ADC conversion time.
[0025] Furthermore, in the step 4, the method for obtaining three-phase currents according to two ADC sampling moments is as follows:
[0026] Collect the positive current of the phase affected by the third phase-shifting time at the first sampling moment, and collect the negative current of the phase affected by the first phase-shifting time at the second sampling moment; the calculation formula for the positive current of the remaining phase is:
[0027] i3 = 0 - i2 - i1
[0028] Wherein, i3 is the current value of the remaining phase; i1 and i2 are the current values collected at two sampling moments respectively.
[0029] Furthermore, in the step 1, when setting the PWM adjustment mode of the power bridge, it further includes:
[0030] Restrict the high-level time of PWM according to the PWM period value, the turn-on time of the power device, the ADC delay sampling time, and the ADC conversion time.
[0031] Furthermore, the constraint range is:
[0032] 2×(T on + T adc_delay + T adc_trans ) ≤ T G ≤ T pwm - 2×(T on + T adc_delay + T adc_trans )
[0033] Wherein, T G is the high-level time of PWM; T pwm is the PWM period value; T on is the turn-on time of the power device; T adc_delay is the ADC delay sampling time; T adc_trans is the ADC conversion time.
[0034] Advantages of the present invention:
[0035] The present invention realizes the fixation of sampling points and the unification of the formula for reconstructing phase current. Different from the traditional method where the phase shift value and sampling points need to be recalculated in each PWM cycle, the method of the present invention has a low computational complexity and is simple and easy.
[0036] The present invention determines the time for the three-phase PWM to shift to the right according to the turn-on time of the power device, the ADC delay sampling time, the ADC conversion time, and the PWM cycle time, effectively establishing two fixed sampling windows and fully considering the current ringing phenomenon, that is, the influence of the ADC delay sampling time and the turn-on time of the power device.
[0037] In the present invention, the first phase shift time, the second phase shift time, and the third phase shift time can act on the PWMs of different phases respectively, and there are 6 combinations to choose from, and the phase currents collected at the two sampling moments can be changed according to different selections, improving the adaptability of the method and making the application more convenient.
[0038] The present invention fully considers the influence of the DC offset and gives a method for restricting the high-level duration of the PWM, which can effectively improve the robustness of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings. The drawings are schematic and should not be construed as limiting the present invention in any way. In the drawings:
[0040] Figure 1 is a flowchart of a specific embodiment of the present invention;
[0041] Figure 2 is a left-edge alignment schematic diagram in a specific embodiment of the present invention;
[0042] Figure 3 is a schematic diagram of right phase shift and sampling window in a specific embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0044] The present invention will be further clarified below with reference to specific embodiments. Those skilled in the art should understand that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. Modifications of various equivalent forms of the present invention all fall within the scope defined by the appended claims of this application.
[0045] As shown Figure 1 The present invention provides a single - resistor - based permanent - magnet synchronous motor phase current reconstruction method, including the following steps:
[0046] Step 1: Set the PWM adjustment mode of the power bridge to left - edge alignment. The specific method is:
[0047] Take the PWM count value from zero to D×T pwm as the duration of the PWM high - level output; take the PWM count value from D×T pwm +1 to T pwm as the duration of the PWM low - level output, where D is the PWM duty cycle; T pwm is the PWM period value;
[0048] As shown Figure 2 For the A - phase, the duty cycle is 40%. The count value ranges from 0 to 40%×Tpwm, and the A - phase PWM outputs a high level; the count value ranges from 40%×Tpwm + 1 to Tpwm, and the A - phase PWM outputs a low level;
[0049] To avoid introducing a DC offset, it is necessary to constrain the high - level time of the PWM to prevent the high - level duration of the PWM from being too short or too long, which may affect the sampling interval. The specific constraint method is:
[0050] According to the PWM period value, the turn - on time of the power device, the ADC delay sampling time, and the ADC conversion time, constrain the high - level time of the PWM. The constraint range is:
[0051] 2×(T on +T adc_delay +T adc_trans )≤T G ≤T pwm -2×(T on +T adc_delay +T adc_trans )
[0052] In the formula, T G is the high - level time of the PWM; T pwm is the PWM period value; T on is the turn - on time of the power device; T adc_delay is the ADC delay sampling time; T adc_trans is the ADC conversion time;
[0053] Step 2: Obtain three phase - shifting times for the three - phase PWM shifted to the right through the turn - on time of the power device, the ADC delay sampling time, the ADC conversion time, and the PWM period time. The specific formula is:
[0054] T1 = T pwm
[0055] T2 = T pwm -T on -T adc_delay -T adc_trans
[0056] T3 = T pwm -2×(T on +T adc_delay +T adc_trans )
[0057] Wherein, T1 is the first phase-shifting time; T2 is the second phase-shifting time; T3 is the third phase-shifting time; T pwm is the PWM period value; T on is the turn-on time of the power device; T adc_delay is the ADC delay sampling time; T adc_trans is the ADC conversion time;
[0058] Set the phases to which the three phase-shifting times act, specifically:
[0059] Select one of the full permutation ways of the three phase-shifting times and act on the PWM controls of phases A, B, and C respectively. Specifically:
[0060] The first phase-shifting time T1 acts on the PWM of phase A, the second phase-shifting time T2 acts on the PWM of phase B, and the third phase-shifting time T3 acts on the PWM of phase C;
[0061] Or, the first phase-shifting time T1 acts on the PWM of phase A, the third phase-shifting time T3 acts on the PWM of phase B, and the second phase-shifting time T2 acts on the PWM of phase C;
[0062] Or, the first phase-shifting time T1 acts on the PWM of phase B, the second phase-shifting time T2 acts on the PWM of phase A, and the third phase-shifting time T3 acts on the PWM of phase C;
[0063] Or, when the first phase-shifting time T1 acts on the PWM of phase B, the third phase-shifting time T3 acts on the PWM of phase A, and the second phase-shifting time T2 acts on the PWM of phase C;
[0064] Or, the first phase-shifting time T1 acts on the PWM of phase C, the second phase-shifting time T2 acts on the PWM of phase A, and the third phase-shifting time T3 acts on the PWM of phase B;
[0065] Or, the first phase-shifting time T1 acts on the PWM of phase C, the third phase-shifting time T3 acts on the PWM of phase A, and the second phase-shifting time T2 acts on the PWM of phase B;
[0066] Step 3: Obtain two ADC sampling moments through the three phase-shifting times of the three-phase PWM shifted to the right, the ADC delay sampling time, and the ADC conversion time. The specific method is:
[0067] Calculate two ADC sampling moments based on the second phase-shifting time, the third phase-shifting time, and the ADC conversion time. The calculation formula is as follows:
[0068] T sample1 = T3 + T adc_trans
[0069] T sample2 = T2 + T adc_trans
[0070] In the formula, T sample1 is the first sampling moment; T sample2 is the second sampling moment; T2 is the second phase-shifting time; T3 is the third phase-shifting time; T adc_trans is the ADC conversion time;
[0071] Step 4: Collect two-phase currents according to the two ADC sampling moments, obtain the third-phase current based on the collected two-phase currents, and reconstruct the three-phase currents. Among them, the method for obtaining the three-phase currents is as follows:
[0072] Collect the positive current of the phase affected by the third phase-shifting time at the first sampling moment, and collect the negative current of the phase affected by the first phase-shifting time at the second sampling moment; the calculation formula for the positive current of the remaining one phase is:
[0073] i3 = 0 - i2 - i1
[0074] In the formula, i3 is the current value of the remaining one phase; i1 and i2 are the current values collected at the two sampling moments,
[0075] Specifically:
[0076] When the first phase-shifting time T1 acts on the A-phase PWM, the second phase-shifting time T2 acts on the B-phase PWM, and the third phase-shifting time T3 acts on the C-phase PWM, the current collected at the first sampling moment is the positive current of the C phase + i c , and the current collected at the second sampling moment is the negative current of the A phase - i a , then the positive current of the B phase + ib is 0 - i a - i c ;
[0077] Or, when the first phase-shifting time T1 acts on the A-phase PWM, the third phase-shifting time T3 acts on the B-phase PWM, and the second phase-shifting time T2 acts on the C-phase PWM, the current collected at the first sampling moment is the positive current of the B phase + i b , and the current collected at the second sampling moment is the negative current of the A phase - i a , then the positive current of the C phase is + i c is 0 - i a - i b ;
[0078] Or, when the first phase - shift time T1 acts on the PWM of phase B, the second phase - shift time T2 acts on the PWM of phase A, and the third phase - shift time T3 acts on the PWM of phase C, the current collected at the first sampling moment is the positive current of phase C + i c , and the current collected at the second sampling moment is the negative current of phase B - i b , then the positive current of phase A is + i a is 0 - i b -i c ;
[0079] Or, when the first phase - shift time T1 acts on the PWM of phase B, the third phase - shift time T3 acts on the PWM of phase A, and the second phase - shift time T2 acts on the PWM of phase C, the current collected at the first sampling moment is the positive current of phase A + i a , and the current collected at the second sampling moment is the negative current of phase B - i b , then the positive current of phase C is + i c is 0 - i a -i b ;
[0080] Or, when the first phase - shift time T1 acts on the PWM of phase C, the second phase - shift time T2 acts on the PWM of phase A, and the third phase - shift time T3 acts on the PWM of phase B, the current collected at the first sampling moment is the positive current of phase B + i b , and the current collected at the second sampling moment is the negative current of phase C - i c , then the positive current of phase A is + i a is 0 - i b -i c ;
[0081] Or, when the first phase - shift time T1 acts on the PWM of phase C, the third phase - shift time T3 acts on the PWM of phase A, and the second phase - shift time T2 acts on the PWM of phase B, the current collected at the first sampling moment is the positive current of phase A + i a , and the current collected at the second sampling moment is the negative current of phase C - ic, then the positive current of phase B + i b is 0 - i a -i c .
[0082] As Figure 3 shown, the first phase - shift time T1 acts on the PWM of phase A, the second phase - shift time T2 acts on the PWM of phase B, and the third phase - shift time T3 acts on the PWM of phase C. Before phase - shifting, the PWM phases of phases A, B, and C are the same; after right - phase - shifting, phase A leads phase B, and phase C leads phase B, and the leading time is equal to the turn - on time T of the power device on , the ADC delay sampling time T adc_delay , the ADC conversion time Tadc_trans The sum of the times. This generates two window times that can be sampled.
[0083] Based on the time of the three-phase PWM shifted to the right, the ADC delay sampling time, and the ADC conversion time, two ADC sampling moments are determined; the first sampling moment T sample1 : T sample1 = T3 + T adc_trans ; the second sampling moment T sample2 : T sample1 = T2 + T adc_trans . As Figure 3 In the first sampling point and the second sampling point, they correspond to the first sampling moment and the second sampling moment when the first phase-shifting time T1 is applied to the A-phase PWM, the second phase-shifting time T2 is applied to the B-phase PWM, and the third phase-shifting time T3 is applied to the C-phase PWM.
[0084] As Figure 3 In it, the first phase-shifting time T1 is applied to the A-phase PWM, the second phase-shifting time T2 is applied to the B-phase PWM, and the third phase-shifting time T3 is applied to the C-phase PWM; in the first sampling moment, for the driving bridge arm, the upper bridge arm of the C-phase is opened, and the lower bridge arms of the A and B phases are opened. The current sampled by the single resistor is equal to the positive current of the C-phase + i c ; in the second sampling moment, for the driving bridge arm, the upper bridge arms of the B and A phases are opened, and the lower bridge arm of the A is opened. The current sampled by the single resistor is equal to the negative current of the A-phase - i a , and by the fact that the sum of the three-phase currents is zero, the current of the B-phase can be calculated.
[0085] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor, characterized in that: The steps include: Step 1: Set the PWM adjustment mode of the power bridge to left edge alignment; Step 2: Obtain three phase shift times of the three-phase PWM right shift through the power device turn-on time, ADC delayed sampling time, ADC conversion time and PWM cycle time; Step 3: Obtain two ADC sampling moments through three phase shift times of the three-phase PWM right shift, ADC delayed sampling time and ADC conversion time; Step 4: According to the two-phase currents collected at the two ADC sampling moments, the third-phase current is obtained according to the collected two-phase currents, and the three-phase current is reconstructed.
2. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 1, characterized in that: In step 1, the specific method of setting the PWM adjustment mode of the power bridge to left edge alignment is: The PWM count value is from zero to D×T pwm As the PWM high level output duration; The PWM count value is converted from D×T pwm +1 to T pwm As the PWM low level output duration, where D is the PWM duty cycle; T pwm is the PWM period value.
3. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 1, characterized in that: In step 2, the specific formula for obtaining the three phase shift times of the three-phase PWM phase shift to the right is: T1=T pwm T2=T pwm -T on -T adc_delay -T adc_trans T3=T pwm -2×(T on +T adc_delay +T adc_trans ) Where, T1 is the first phase shift time; T2 is the second phase shift time; T3 is the third phase shift time; T pwm is the PWM period value; T on is the turn-on time of the power device; T adc_delay T is the ADC delay sampling time; adc_trans is the ADC conversion time.
4. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 1 or 3, characterized in that: The step 2 also includes: setting three phases of phase shift time action, specifically: One of the three phase shift time arrangements is selected to act on the PWM control of the three phases A, B, and C respectively.
5. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 1, characterized in that: In step 3, the specific method of obtaining two ADC sampling moments is: Two ADC sampling times are calculated according to the second phase shift time, the third phase shift time, and the ADC conversion time.
6. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 5, characterized in that: The calculation formula for obtaining two ADC sampling moments is: T sample1 =T3+T adc_trans T sample2 =T2+T adc_trans Where, T sample1 is the first sampling time; T sample2 is the second sampling time; T2 is the second phase shift time; T3 is the third phase shift time; T adc_trans is the ADC conversion time.
7. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 1, characterized in that: In step 4, the method for obtaining the three-phase current according to the two ADC sampling moments is: At the first sampling moment, the positive current of the phase affected by the third phase shift time is collected, and at the second sampling moment, the negative current of the phase affected by the first phase shift time is collected; the calculation formula for the positive current of the remaining phase is: i3=0-i2-i1 Where i3 is the current value of the remaining phase; i1 and i2 are the current values collected at two sampling moments respectively.
8. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 1, characterized in that: In the step 1, when setting the PWM adjustment mode of the power bridge, it also includes: The high level time of PWM is constrained according to the PWM cycle value, the turn-on time of the power device, the ADC delayed sampling time and the ADC conversion time.
9. The method for reconstructing phase current of a permanent magnet synchronous motor based on a single resistor according to claim 8, characterized in that: The constraints are: 2×(T on +T adc_delay +T adc_trans )≤T G ≤T pwm -2×(T on +T adc_delay +T adc_trans ) Where, T G is the high level time of PWM; T pwm is the PWM period value; T on is the turn-on time of the power device; T adc_delay T is the ADC delay sampling time; adc_trans is the ADC conversion time.