Permanent magnet synchronous motor and resistance current sampling method

By running the algorithm in the FOC control system, selecting the voltage value continuously in the target voltage interval, determining the voltage jitter and smooth switching points, thus solving the problem of cumbersome and high cost of measuring the current rise time in the prior art, and achieving a high-precision and low-cost measurement method.

CN119945228APending Publication Date: 2025-05-06GIGADEVICE SEMICON (BEIJING) INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311459830.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art requires expensive instruments when measuring the current rise time of permanent magnet synchronous motors, and the measurement process is cumbersome and expensive, making it difficult to quickly adapt when there is a change in the drive system.

Method used

By running the corresponding algorithm in the FOC control system, selecting the voltage value continuously within the target voltage interval, determining the voltage jitter and smooth switching points, thereby determining the minimum sampling time Tmin, and achieving accurate measurements without external instruments.

Benefits of technology

This method simplifies the measurement process of current rise time, reduces costs, improves measurement flexibility and accuracy, is suitable for single-resistance sampling scenarios, and allows for more accurate measurements when sectors complete conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945228A_ABST
    Figure CN119945228A_ABST
Patent Text Reader

Abstract

The invention discloses a permanent magnet synchronous motor and a resistance current sampling method. The permanent magnet synchronous motor controls a three-phase inverter based on an SVPWM strategy, and the method comprises the following steps: selecting a target voltage vector interval in which a sampling window is located; in a plurality of continuous control periods, voltage values at the two ends of the corresponding resistor are collected in the target voltage vector interval at a preset sampling interval; determining a voltage jitter and stable switching point position based on the acquired voltage value; and determining a minimum sampling window of the permanent magnet synchronous motor based on the switching point position. The invention provides a method for continuously acquiring voltage values in a target voltage interval and finding out a jitter stable switching point so as to determine the minimum sampling time Tmin. According to the method, instruments are not needed, only an FOC control system and a motor are needed, corresponding algorithms are operated through an MCU, and the method is convenient, simple and high in precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of motors, and in particular to a permanent magnet synchronous motor and a resistance current sampling method. Background Art

[0002] In the control process of permanent magnet synchronous motor (PMSM), in order to obtain the maximum torque output in the entire control cycle, FOC (Field-Oriented Control) is often used to control the motor.

[0003] In FOC control, it is necessary to sample the three-phase current i a 、i b and i c Participate in the control of the current loop. In resistor sampling, whether it is single resistor or multi-resistor sampling, it is necessary to clearly know the current rise time T rise . T rise The time corresponding to the current ramp and oscillation when the power tube is switched is determined by the actual drive system and is a value that needs to be measured.

[0004] The existing technology requires the use of instruments such as oscilloscopes, phase current sensors, and power analyzers to measure the voltage across a single resistor and the PWM waveform, and to measure T based on these waveforms. rise This measurement method requires rebuilding the measurement environment and re-measuring when the drive system changes, which is cumbersome and costly.

[0005] Therefore, an improved current rise time measurement method is needed. Summary of the invention

[0006] A technical problem to be solved by the present disclosure is to provide a method for continuously collecting voltage values ​​in a target voltage range and thereby finding a jitter stable switching point, thereby determining a minimum sampling time T min This method does not require any instrumentation, only requires a FOC control system and a motor, and uses an MCU to run the corresponding algorithm. It is convenient, simple and highly accurate.

[0007] According to the first aspect of the present disclosure, a resistance current sampling method for a permanent magnet synchronous motor is provided, wherein the permanent magnet synchronous motor controls a three-phase inverter based on an SVPWM strategy, and the method comprises: selecting a target voltage vector interval in which a sampleable window is located; sampling voltage values ​​across a corresponding resistor within the target voltage vector interval at a predetermined sampling interval over a plurality of continuous control cycles; determining a switching point position of voltage jitter and stability based on the collected voltage values; and determining a minimum sampling window of the permanent magnet synchronous motor based on the switching point position.

[0008] Optionally, the acquisition interval covers a predicted position range of voltage jitter and stable switching points.

[0009] Optionally, the acquisition interval starts from the starting point of the target voltage vector interval plus the dead time and ends at the ending point of the target voltage vector interval minus the channel sampling time.

[0010] Optionally, determining the switching point position based on the collected voltage value includes: calculating a variance change rate of the collected voltage value; and taking a voltage collection position at which the variance change rate is less than a predetermined threshold as the switching point position.

[0011] Optionally, a target voltage vector interval is selected in each of the multiple sectors to determine the jitter smoothing switching point position in the sector, and determining the minimum sampling window of the permanent magnet synchronous motor based on the switching point position includes: selecting a latest switching point position from the switching point positions of each of the multiple sectors; and determining the minimum sampling window based on the latest switching point position.

[0012] Optionally, the resistance sampling method is a single resistance sampling method, and the method further includes: selecting a control period after each sector switching is completed as a starting control period for acquisition, and selecting a target voltage vector interval whose voltage vector is the same as the voltage vector when the sector is switched.

[0013] Optionally, the method further comprises: driving the permanent magnet synchronous motor to rotate in an open loop, wherein the continuous acquisition is performed after the permanent magnet synchronous motor rotates stably.

[0014] Optionally, the resistance sampling method is a single resistance sampling method, and driving the permanent magnet synchronous motor to rotate in open loop includes: performing SVPWM calculation according to initial parameters, writing the calculated corresponding values ​​of the switching points of phases A, B and C into the comparator of the first timer, and writing two sampling count values ​​into the register of the first timer; in the next control cycle, the first timer performs the following operations: generating a PWM signal according to the corresponding values ​​of the switching points of phases A, B and C in the comparator and sending it to the three-phase inverter; when the counter of the first timer is equal to the two sampling count values ​​respectively, triggering the first ADC to perform two samplings; reconstructing the three-phase current according to the sampling values ​​of the two samplings for the next FOC control and SVPWM calculation.

[0015] Optionally, the two sampling count values ​​respectively correspond to the end points of two target voltage vector intervals where the sampleable window is located minus the channel sampling time of the first ADC, wherein the end point of the target voltage vector interval is determined by the corresponding value of the switching point of the corresponding phase.

[0016] Optionally, within a plurality of continuous control cycles, collecting the voltage values ​​across the corresponding resistor within the target voltage vector interval at a predetermined sampling interval includes: when the counters of the second timer are respectively equal to the sampling count values, triggering the second ADC to perform sampling, and storing the sampled predetermined number of sampled values ​​into a sampled value array; determining the switching point position based on the collected voltage values ​​includes: calculating the sampled values ​​in the sampled value array to determine the switching point position.

[0017] Optionally, the sampling includes: the initial value of the sampling count value of the second timer is equal to the corresponding value of the switching point of the corresponding phase; and the second ADC is triggered to perform a sampling once in each control cycle of the continuous acquisition, and the sampling count value is reduced by a step length until the sampling count value reaches the corresponding value of the switching point of another phase plus the dead time.

[0018] Optionally, the resistance sampling method is a multi-resistance sampling method, and the target voltage vector interval in which the sampleable window is located is a zero voltage vector interval, and the collecting of the voltage values ​​across the corresponding resistors within the target voltage vector interval at a predetermined sampling interval within a plurality of continuous control cycles includes: collecting the voltage values ​​across two resistors among the plurality of resistors within the target voltage vector interval at a predetermined sampling interval within a plurality of continuous control cycles, and determining the switching point position based on the collected voltage values ​​includes: determining the switching point positions corresponding to the two resistors based on the continuous collection of the voltage values ​​across the two resistors among the plurality of resistors; and determining the minimum sampling window of the permanent magnet synchronous motor based on the later switching point position among the switching point positions corresponding to the two resistors.

[0019] According to a second aspect of the present disclosure, a permanent magnet synchronous motor is provided, comprising: a motor; a magnetic oriented vector control module for controlling the motor, and comprising: a minimum sampling window determination module for executing the method described in the first aspect to determine the minimum sampling window of the permanent magnet synchronous motor.

[0020] Optionally, the magnetic oriented vector control module further includes: an open-loop control module, configured to drive the permanent magnet synchronous motor to rotate in an open loop.

[0021] Optionally, the open-loop control module controls a first timer and a first ADC, and the first timer is controlled to: generate a PWM signal according to the corresponding values ​​of the switching points of phase A, phase B and phase C in the comparator and send it to the three-phase inverter; when the counter of the first timer is equal to two sampling count values ​​respectively, trigger the first ADC to perform two samplings; reconstruct the three-phase current according to the sampling values ​​of the two samples for the next FOC control and SVPWM calculation.

[0022] Optionally, the minimum sampling window determination module controls a second timer and a second ADC, and the second timer is controlled to: in multiple FOC control cycles for continuous sampling, whenever the counter is equal to the sampling count value, trigger the second ADC to sample, and the second ADC is controlled to: be triggered for sampling in multiple continuous FOC control cycles, and store the collected multiple sampling values ​​into a sampling value array.

[0023] Therefore, the method disclosed in the present invention can distinguish the jitter area and the stable area without the help of external instruments, thereby confirming the current fluctuation time. The method is preferably used in a single resistor sampling scenario, and can perform more sampling for a longer target voltage vector when the sector completes the conversion, thereby ensuring the measurement accuracy of the current fluctuation time. The measurement method disclosed in the present invention is not limited by the environment, is economical and convenient, stable and reliable, and has adjustable accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.

[0025] Figure 1 The schematic diagram of FOC control for PMSM is shown.

[0026] Figure 2 The topology diagram of the single resistor sampling drive system is shown.

[0027] Figure 3 The space vector diagram of a three-phase inverter is shown.

[0028] Figure 4 The corresponding relationship between single resistor sampling and phase current in different sectors is shown.

[0029] Figure 5 A schematic diagram showing the phase current sampling of sector I using a single resistor.

[0030] Figure 6 A schematic flow chart of a resistance current sampling method for a permanent magnet synchronous motor according to an embodiment of the present invention is shown.

[0031] Figure 7 A schematic diagram of a sampling area according to a preferred embodiment of the present invention is shown.

[0032] Figure 8 FIG. 4 is a schematic diagram showing continuous voltage sampling when switching to sector I according to an embodiment of the present invention.

[0033] Fig. 9 An example of using the variance slope to find the switching point is shown.

[0034] Fig.10 The MCU is used to measure T according to an embodiment of the present disclosure. rise The overall block diagram of the algorithm.

[0035] Fig.11A -B shows a diagram of a method for measuring T based on an MCU according to an embodiment of the present disclosure. rise Relevant hardware diagram of the algorithm.

[0036] Fig.12 The VF control curve is shown.

[0037] Fig.13 It shows that T rise Schematic diagram of the sampling and storage process during measurement.

[0038] Fig.14 A schematic diagram of the measurement initialization sub-process is shown.

[0039] Fig.15 shows the voltage u p Flowchart of the sampling setup subprocess.

[0040] Fig.16 shows the voltage u p Flow chart of the storage setting subprocess.

[0041] Fig.17 The analysis flow for the stored voltage value is shown.

[0042] Fig.18 A flow chart for calculating the respective current rise time for each sector is shown.

[0043] Fig.19 The topology diagram of the three-resistance sampling drive system is shown.

[0044] Fig. 20 The corresponding relationship between three-resistance sampling and phase current in different sectors is shown. DETAILED DESCRIPTION

[0045] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0046] In the control process of permanent magnet synchronous motor (PMSM), in order to obtain the maximum torque output in the entire control cycle, FOC (magnetic oriented vector control) is often used to control the motor. Figure 1The schematic diagram of FOC control for PMSM is shown.

[0047] As shown in the figure, a position sensor such as a magnetic encoder obtains the rotor speed n and the rotor position θ of the motor M. In practical applications, for example, a speed reference n obtained based on user input ref The subtraction is made from the acquired rotor speed n and is input to PID1 (i.e., speed loop PID). The output of the speed loop PID is the q-axis reference current i qref For simplicity, when weak magnetic control is not performed, the d-axis reference current i dref = 0. At this time, the reference current i of the q-axis and d-axis can be qref and i dref The q-axis and d-axis current i of the motor are actually fed back q and i d The q-axis and d-axis voltages V are output after being adjusted by PID2 (i.e., q-axis current loop) and PID3 (i.e., d-axis current loop) respectively. d and V q , and then converted into α-axis and β-axis voltage V through Park inverse transformation α and V β , and then through SVPWM (space voltage vector modulation) to obtain the three-phase voltage V a 、V b 、V c , and then drives the motor M to rotate through the three-phase inverter bridge. In FOC control, the three-phase current i is obtained through the sampling resistor a 、i b 、i c , after Clark transformation, we get the α-axis and β-axis current i α and i β , and then the feedback d-axis and q-axis currents i are obtained through Park transformation d and i q , respectively input into PID2 and PID3 to participate in the current loop control. In addition, although Figure 1 It is not shown in the figure, but in many cases, it is necessary to perform weak magnetic control on the motor, that is, at this time, the d-axis reference current i dref ≠ 0. At this time, the MTPA control strategy can be used to optimally control the permanent magnet synchronous motor, especially the salient pole PMSM, in the constant torque region.

[0048] In the FOC control system, the phase current of the motor winding needs to be known in each FOC control cycle. There are various sensors for obtaining the phase current of the motor winding, such as the HALL current sensor, mutual inductance current sensor, resistance measurement method, etc.

[0049] Among the many sensors for measuring phase current, the resistance measurement method is relatively low in cost, easy to install, and highly stable. You only need to connect a resistor to the circuit, measure the voltage across the resistor through an op amp, and then use an ADC to collect the amplified voltage to obtain the phase current.

[0050] The resistance measurement method can include a single resistance measurement method and a multi-resistance measurement method. Since only one resistor needs to be arranged on the busbar, the single resistance measurement method has a simpler structure and higher stability. Figure 2 The topology diagram of the single resistor sampling drive system is shown in FIG. Figure 2 As shown in the three-phase full-bridge drive topology diagram, in the three-phase drive circuit composed of 6 MOSFET tubes (VT1~VT6), the R arranged on the bus p is a sampling resistor. The three-phase current can be reconstructed according to the current collected on the sampling resistor.

[0051] In the FOC control process, SVPWM (space vector pulse width modulation) strategy is often used to control the three-phase inverter. The basic principle of SVPWM is to represent the instantaneous value of the output voltage of the three-phase inverter with a space vector U rotating at an angular velocity ω = 2πf (f is the power frequency), and divide the 360° rotation space of the space vector U into six sectors (sectors I to VI). Figure 3 The space vector diagram of the three-phase inverter is shown. As shown in the figure, the six sectors divided are sector I in the two-phase αβ coordinate system.

[0052] The FOC output voltage vector (synthesized voltage vector in the voltage vector circle) U rotated to any sector can be synthesized by two non-zero voltage vectors located at the boundary of the sector and a zero vector (e.g., U0 or U7). Non-zero voltage vectors include U4 (100), U6 (110), U2 (010), U3 (011), U1 (001), and U5 (101). When the sector is switched, it only corresponds to one voltage vector. For example, when switching from sector VI to sector I, 0° corresponds to a non-zero voltage vector U4 (100), and 30°, for example, located in the middle of sector I corresponds to two non-zero voltage vectors U4 (100) and U6 (110).

[0053] Common SVPWM is divided into seven-segment SVPWM, five-segment SVPWM, three-segment SVPWM, etc. The seven-segment SVPWM has eight specific space vectors from U0 to U7; the five-segment 000 injection SVPWM has seven specific space vectors from U0 to U6; and the five-segment 111 injection SVPWM has seven vectors from U1 to U7, of which U0 and U7 are zero vectors.

[0054] When using single resistor sampling, it is necessary to perform current sampling once in each of the other two voltage vector intervals where the output voltage vector is not U0 (000) or U7 (111). Figure 4 The corresponding relationship between single resistor sampling and phase current in different sectors is shown. In the same sector, the phase with the longest conduction time of the lower bridge arm remains unchanged, while in different sectors, the phase with the longest conduction time of the lower bridge arm is not the same. By controlling the action time of the three position-specific space vectors participating in the vector synthesis, the modulus and direction of the space vector U can be controlled. The same sector contains multiple control cycles. For example, in sector I, the synthesized voltages at different angles have different proportional relationships between U4 and U6, and the modulus of the synthesized voltage depends on the length of the sampling window. Therefore Figure 4 It can be regarded as the phase current diagram of the six sectors outputting the space vector U with specific modulus and direction in a certain FOC control cycle.

[0055] When sampling with a single resistor, i p = "the voltage of the three phases ABC and the current of the other two phases". For example, in sector I, the current i of phase A can be obtained by sampling U4 (100) (representing that the upper tube of phase A is turned on and the lower tube of phase BC is turned off). a ; By sampling U6 (110) (representing that the upper tube of the AB phase is turned on and the lower tube of the C phase is turned off), the negative current of the C phase -i c .

[0056] According to Kirchhoff's current law, the three-phase current i flowing through the three-phase system a ,i b and i c There are the following relationships:

[0057] i a +i b +i c =0 (1)

[0058] From formula (1), we can know that the instantaneous sum of the three-phase current values ​​is zero. Therefore, through the above relationship, the third-phase current can be estimated in sector I based on the two AC phases collected from the three-phase current. Figure 4 As shown, in sectors II to VI, two-phase currents can be collected in a non-zero vector and the current of the third phase can be obtained based on Hoff's current law.

[0059] When collecting current with a single resistor, a sufficiently long sampling window is required for sampling the bus current, which requires that the non-zero voltage vector must last for a minimum sampling time T. min For the sake of convenience, Figure 5 The schematic diagram of the single resistor sampling phase current in sector I is shown in detail. The figure shows the power tube switch and current i in a certain PWM cycle (i.e., a certain FOC control cycle) in sector I.p Condition.

[0060] In sector I, it is necessary to obtain the negative current -i of phase C at sampling U6 (110) c , sampling U4 (100) to obtain the A phase current i a Therefore, it is impossible to collect current during the period t0 to t1 shown in the figure. Although at time t1, the MOS tube VT3 of phase C has been switched (corresponding to the red point C in the figure), the period t1 to t2 corresponds to the dead time T to prevent the upper and lower bridge arms from being turned on at the same time due to switching speed issues. dead Therefore, it is impossible to collect the phase C current. dead Afterwards, it flows through R p The current i p There will be a period of climbing and oscillation, which is the current rise time T rise Since the current is unstable at this time, the ADC (analog-to-digital converter) needs to skip T dead and T rise , then sample R p The voltage across the two ends is u p According to Ohm's law, we can get the current i p =u p / R p , and according to i p Corresponding to the phase current, the sampled C phase negative current -i c In other words, Figure 5 In the example, the current rise time T needs to pass at time t2. rise After that, until the time t3 corresponding to point B, the sampling of the C phase current is completed. Similarly, the period t3 to t4 also corresponds to the dead time T dead Therefore, it is necessary to wait for the current rise time T at time t4. rise Thereafter, until time t5 corresponding to point A, the sampling of phase A current is completed.

[0061] Figure 5 The lower part shows the sampling of phase A. As shown in the figure, the dead time t dead After that, after the current rise time t rise , sampling can only be performed after the current stabilizes (i.e., after the voltage jitter and stable switching point shown in the figure), and the sampling time of the ADC corresponds to t sample .exist Figure 5 In the example, ADCx can sample At time t (i.e., point x-S1 in the figure), U6 is sampled, and at t5-t sampleAt time (i.e., point x-S2 in the figure), U4 is sampled. Here, ADCx (i.e., the "first ADC" in the present disclosure) can be regarded as a sampling device for sampling. Figure 2 The resistor R p Voltage across the two ends u p A conventional ADC can collect two-phase voltages in one control cycle and obtain three-phase currents from them.

[0062] When sampling phase current with a single resistor, it is necessary to know the dead time T dead , Current rise time t rise and ADC channel sampling time t sample Here, we can set the minimum sampling time t min = Dead time t dead +Current rise time T rise +ADC channel sampling time T sample . Minimum sampling time T min It determines whether the ADC can sample the phase current during the current FOC control cycle. dead and T sample is the time that the MCU (microcontroller unit) can configure, and T rise It is the time of current ramping and oscillation when the power tube is switched, which is determined by the actual drive system and motor. rise It is determined by the PCB (printed circuit board) hardware of the control system and the motor body. For a fixed PCB and motor control system, T rise The time is basically fixed and needs to be obtained through actual measurement. Therefore, it is necessary to obtain T rise The value of can know the minimum sampling time T min .

[0063] In the prior art rise The measurement needs to be carried out with the help of expensive instruments such as oscilloscopes and power analyzers, which is time-consuming, labor-intensive and inflexible. To this end, the present disclosure proposes a method of continuously collecting voltage values ​​in the target voltage range and finding the jitter stable switching point, thereby determining the minimum sampling time T min This method does not require any instrumentation, only requires a FOC control system and a motor, and the MCU runs the corresponding algorithm. It is convenient, simple and highly accurate.

[0064] Figure 6 A schematic flow chart of a resistance current sampling method for a permanent magnet synchronous motor according to an embodiment of the present invention is shown. Here, the permanent magnet synchronous motor controls the three-phase inverter based on the SVPWM strategy, and the method is applicable to the above combined Figure 2 , 4 The single resistor current sampling scenario described in 5 is also applicable to the following combination Figure 19-20 The multi-resistance sampling scenario is illustrated.

[0065] In step S610, a target voltage vector interval in which the sampleable window is located is selected. Here, the target voltage vector interval can be selected according to the sector in which it is located. Specifically, the target voltage vector interval can be selected within an initial control cycle (i.e., an initial FOC control cycle). In single-resistance sampling, the target voltage vector interval in which the sampleable window is located is an interval used for synthesizing voltage vectors in each sector. Specifically, in sector I, the target voltage vector interval may be the interval where voltage vectors U4 (100) and / or U6 (110) are located; in sector II, the target voltage vector interval may be the interval where voltage vectors U6 (110) and / or U2 (010) are located; in sector III, the target voltage vector interval may be the interval where voltage vectors U2 (010) and / or U3 (011) are located; in sector IV, the target voltage vector interval may be the interval where voltage vectors U3 (011) and / or U1 (001) are located; in sector V, the target voltage vector interval may be the interval where voltage vectors U1 (001) and / or U5 (101) are located; in sector VI, the target voltage vector interval may be the interval where voltage vectors U5 (101) and / or U4 (100) are located. In the following combination Figure 7 In the preferred embodiment described in detail, the target voltage vector interval can be the interval where the voltage vector corresponding to the switching point after the sector switching is completed is located. That is, in sector I, it is the interval where the voltage vector U4 (100) is located; in sector II, it is the interval where the voltage vector U6 (110) is located; in sector III, it is the interval where the voltage vector U2 (010) is located; in sector IV, it is the interval where the voltage vector U3 (011) is located; in sector V, it is the interval where the voltage vector U1 (001) is located; in sector VI, it is the interval where the voltage vector U5 (101) is located.

[0066] In multi-resistance sampling, for example, when three resistors are used for sampling, the current is collected when the upper tube of the three phases is turned off and the lower tube is turned on, and the output voltage vector is U0(000). Therefore, the target voltage vector interval where the sampling window is located is the interval corresponding to the output voltage vector U0(000). Fig. 20 Give a description.

[0067] Subsequently, in step S620, the voltage value across the corresponding resistor is collected within the target voltage vector interval at a predetermined sampling interval within a plurality of continuous control cycles. Here, the continuous collection does not mean that multiple collections are performed continuously within one FOC control cycle, but that a voltage collection is performed once in each control cycle within successive FOC control cycles, and the collection positions are spaced apart. For example, the collection position of each current control cycle is one predetermined sampling interval ahead of or behind the previous collection position.

[0068] In a single resistor setting, the corresponding resistor is the bus resistance R p In a multi-resistance setting, the corresponding resistor is the phase resistance of the corresponding phase being sampled. Continuous sampling can be multiple samplings at predetermined intervals, for example, using an ADCy different from the conventional ADCx (i.e., the "second ADC" in the present disclosure) with its sampling interval (e.g., as follows Fig.15 The sampling interval needs to cover the expected position range of the voltage jitter and stable switching points. In one embodiment, the sampling interval can start from the starting point of the target voltage vector interval plus the dead time and end at the end point of the target voltage vector interval minus the channel sampling time. Figure 5 For example, if the target voltage vector interval is U6, ADCy can be dead From time x to time x-S1 (i.e., t3-T sample ) for continuous acquisition; and if the target voltage vector interval is the U4 interval, then it can be collected from t4 (i.e., t3+T dead ) to x-S2 (i.e., t5-T sample ). In another embodiment, the collection interval may start from the starting point of the target voltage vector interval plus the dead time and end after collecting a predetermined number of voltage values, for example, collecting 200 voltage values ​​continuously. At this time, it is necessary to ensure that after collecting the predetermined number of voltage values, it is still in the current target voltage vector interval.

[0069] It should be understood that, since the duration of the target voltage vector will change in different FOC cycles, for example, in the process from 0° to 10°, the duration interval of U4 (100) will become shorter (correspondingly, the duration interval of U6 (110) will become longer, so that the direction of the synthesized voltage vector will change from 0° to 10°), because the open-loop control ensures that the amplitude and rotation speed of the synthesized voltage vector remain unchanged, the starting point and end point of the U4 (100) vector action time can remain unchanged compared to the previous switch to sector I in the first FOC control cycle after switching to sector I. And in the first FOC control cycle of each switch to sector I, the U4 (100) vector action time is the longest in sector I. Each time the sector is switched, the control cycle that initially starts the acquisition can be acquired from the moment when the end point of the target voltage vector interval is subtracted from the channel sampling time, and the acquisition position of each subsequent control cycle is advanced by a predetermined sampling interval compared to the previous acquisition position, until the predetermined number of sampling times or the sampling position is advanced by the start point of the target voltage vector interval of the current control cycle plus the dead time (as will be referred to below). Figure 8 details).

[0070] After acquiring multiple voltage sampling values, in step S630, the switching point position of voltage jitter and stability can be determined based on the collected voltage values. The multiple voltage values ​​collected in multiple continuous FOC control cycles can reflect the change of voltage values ​​over time. Therefore, the switching point indicating the switching from jitter to stability can be found from the multiple voltage values ​​according to a suitable mathematical method, and then the current rise time T can be determined. rise . Due to T rise It is determined by the control system hardware, and for a fixed PCB system and motor body, this time is basically fixed, and the dead time T dead and ADC channel sampling time T sample is the time that the MCU can configure, so in step S640, the minimum sampling window of the permanent magnet synchronous motor can be determined based on the switching point position. That is, the minimum sampling time T as mentioned above min = Dead time T dead +Current rise time T rise +ADC channel sampling time T sample .

[0071] Therefore, the current sampling method disclosed in the present invention can determine the current rise time T by continuously sampling the target voltage and calculating the jitter and stable switching points based on the multiple values ​​collected. rise , thus avoiding the need to use an oscilloscope to test each hardware system in the prior art.

[0072] In one embodiment, in order to further improve the accuracy of measurement and analysis, a target voltage vector interval can be selected in each of the multiple sectors to determine the position of the jitter stable switching point in the sector, and the longest duration is selected as the current rise time T rise Specifically, a respective switching point position may be calculated for each sector, and determining the minimum sampling window of the permanent magnet synchronous motor based on the switching point position may include: selecting a latest switching point position from the respective switching point positions of a plurality of sectors; and determining the minimum sampling window based on the latest switching point position.

[0073] Furthermore, the resistance sampling method disclosed in the present invention may be a single resistance current sampling method, that is, the sampling resistor is as follows: Figure 2 Arranged on the busbar as shown, and as Figure 4 In one embodiment, in order to make the target voltage vector interval long enough to facilitate continuous sampling, the control period after each sector switching is selected as the initial control period for continuous sampling, and the target voltage vector interval whose voltage vector is the same as the voltage vector when the sector is switched is selected. Figure 7The schematic diagram of the sampling area according to a preferred embodiment of the present invention is shown, wherein u0~u7 are 7 reference voltage vectors of CSVPWM (i.e., continuous SVPWM). When each sector just completes the change, continuous sampling and current rise time T rise This is done because although Figure 4 As shown in the figure, the space voltage vector in each sector is synthesized by the two voltage vectors corresponding to the sector. However, when the sector change is just completed, such as Figure 7 When the position is shown in the red area, the space voltage vector U is synthesized by a relatively long voltage and a relatively short voltage, for example Figure 8 The space voltage vector U shown is synthesized from U4 (100) of longer duration and U6 (110) of shorter duration.

[0074] Figure 8 FIG. 1 is a schematic diagram showing continuous voltage sampling when switching to sector I according to an embodiment of the present invention. Compared with U4 (100) and U6 (110), which are closer in duration, Figure 5 , Figure 8 Since the synthetic vector shown is closer to the switching point of sector I (for example, the phase voltage waveform at 1° is shown), the duration of U4 is much longer than that of U6. Continuous acquisition can be gradually advanced from the latest acquisition position, and the sampling position of each subsequent control cycle is advanced by a predetermined sampling interval compared with the previous sampling position, until the predetermined number of sampling times or the sampling position is advanced to the starting point of the U4 (100) vector interval of the current control cycle plus the dead time. Specifically, the initial acquisition can be from T before the A-phase MOS tube VT1 completes the switching. sample (i.e., point A-T in the figure sample ) and advances a predetermined sampling interval (e.g., Sample_step as follows) in each subsequent FOC control cycle until the sampling position is earlier than the B-phase MOS tube VT2 of the current FOC control cycle completes switching and passes the dead time (i.e., point B + T in the figure). dead ) until it moves forward.

[0075] This is Figure 8 As shown in the bottom, especially the enlarged sampling diagram on the right side of the bottom, each small red vertical line in the diagram represents the start time of a collection of the U4 voltage in one FOC control cycle, and the interval between adjacent small red vertical lines is the sampling interval, for example, the duration is one Sample_step. Figure 8 As shown, ADCy can be at point A-T when sector I switching is just completed. sampleis the initial sampling position (initial sampling time), and in each subsequent FOC control cycle, the sampling position is advanced by one Sample_step until the sampling position of a certain FOC control cycle is greater than point B+T of the cycle. dead The multiple voltage values ​​thus collected can be used to determine the switching position between the shaking area and the stable area, that is, the switching point between the shaking and the stable area.

[0076] ADCx and ADCy preferably use the same clock and have the same channel sampling time. It should be understood that the interval of the small red vertical lines shown in the figure corresponds to the sampling interval, that is, the time interval between the start of each sampling in adjacent cycles, which is different from the channel sampling time T of ADCx and ADCy. sample .

[0077] Any suitable method may be used to calculate the switching point between jitter and stability from a plurality of voltage values. In one embodiment, since the voltage values ​​in the stable region tend to be consistent, the first sampling position where the fluctuating voltage appears may be selected as the switching point. In other embodiments, the switching point may be obtained based on a relatively more complex calculation. For example, the variance change rate of the continuously collected voltage values ​​may be calculated; and the corresponding voltage sampling position where the variance change rate is less than a predetermined threshold may be used as the switching point position. Fig. 9 An example of using the variance slope to find the switching point is shown in FIG. Figure 8 The N voltage values ​​continuously collected in multiple FOC control cycles after sector I is switched are numbered as voltage values ​​i, i∈1~N (where N is equal to the total number of sampling times, for example, 200 times). Subsequently, the variance of each of the N voltage values ​​from the initial point to the current point is calculated, and then the variance slope corresponding to the current point and the previous point is calculated. Fig. 9 In the example, the horizontal axis i represents the sampling point (i represents the index of the sampling point), and the vertical axis Var_Bindex represents the variance of each point. The parameter Klimit can be set to determine the boundary between stability and fluctuation. Klimit>0, the lower the value, the better the effect. Figure 8As shown in the example, it is preferred to move the sampling time forward from the latest sampling position in each control cycle, so as the value of i increases, the sampling enters the fluctuation zone from the stable zone. In one embodiment, N continuous voltage values ​​can be sampled for each sector, and these 6 groups of voltage values ​​can be stored in six arrays respectively, and the switching points of each sector can be found. At this time, the parameter Klimit is the threshold of the slope of the variance of each array. The stable fluctuation switching points of sectors I-VI correspond to Point_S1~Point_S6. The figure shows that for a certain sector, the stable zone and the fluctuation zone are distinguished based on Klimit to find the switching point Point_Sx. After finding Point_S1~Point_S6, the current rise time T can be determined according to the maximum value among them. rise , and then determine the minimum sampling time T min .

[0078] In one embodiment, the method disclosed herein requires that the current rise time T be performed when the permanent magnet synchronous motor rotates in an open loop. rise To this end, the current acquisition method disclosed in the present invention may further include: driving the permanent magnet synchronous motor to rotate in an open loop. Thus, after the permanent magnet synchronous motor rotates stably, the voltage value can be continuously acquired.

[0079] When single resistor sampling is used, it can be implemented by a timer (i.e., a first timer) and an ADC (i.e., the first ADC mentioned above) under the VF (voltage frequency conversion) open-loop control algorithm of the MCU. To this end, driving the permanent magnet synchronous motor to rotate in an open loop may include:

[0080] SVPWM calculation is performed based on the initial parameters, and the calculated values ​​of switching to phase A, phase B, and phase C (for example, Figure 5 and Figure 8 The A, B and C points shown in the figure are written into the comparator of the first timer (i.e., TIMERx), and the two sampling count values ​​are written into the register of the first timer. In the next control cycle, the first timer performs the following operations: a PWM signal is generated according to the corresponding values ​​of the switching points of phase A, phase B and phase C in the comparator and sent to the three-phase inverter; when the counter of the first timer is equal to the two sampling count values, the first ADC (i.e., ADCx as described above) is triggered to perform two samplings; and the three-phase current is reconstructed according to the sampling values ​​of the two samplings for the next FOC control and SVPWM calculation. Since the current rise time T riseActually, it is unknown, so the sampling time can be as far back as possible in the target voltage vector interval to avoid sampling the voltage in the band area. To this end, in one embodiment, the two sampling count values ​​correspond to the end points of the two target voltage vector intervals where the sampleable window is located minus the channel sampling time of the first ADC. The end point of the target voltage vector interval is determined by the corresponding value of the switching point of the corresponding phase. For example Figure 5 As shown, in sector I, the two sampling count values ​​may correspond to the positions of x_S1 and x_S2, that is, to point B-T. sample and point A-T sample This means that during the open loop rotation phase, Tsample before the commutation point (eg, point A, point B, or point C of the corresponding sector) triggers the ADC sampling.

[0081] After the motor keeps rotating stably through the open-loop drive, the second timer and the second ADC can be used to continuously collect voltage and current rise time T rise To this end, within a plurality of continuous control cycles, collecting the voltage values ​​at both ends of the corresponding resistor within the target voltage vector interval at a predetermined sampling interval may include: when the counters of the second timer (i.e., TIMERy) are respectively equal to the sampling count value, triggering the second ADC (i.e., ADCy) to perform sampling, and storing the obtained sampling values ​​in the sampling value array. Thus, based on the collected voltage values, determining the switching point position may include: calculating the sampling values ​​in the sampling value array to determine the switching point position.

[0082] exist Figure 8 In the example, the sampling starting point of the target voltage vector interval is located at point B + T dead , the sampling end point is point A-T sample Here, the sampling count value may correspond to the position of a predetermined sampling end point in the target voltage vector interval, for example, from point A to point T. sample Starting from point B, the sampling interval is used as the step length. The sampling position of each subsequent control cycle is one sampling interval ahead of the previous cycle until the sampling time is earlier than point B + T dead This ensures that the continuously acquired position interval covers the actual fluctuation stable switching point and avoids voltage acquisition during the dead time.

[0083] The current rise time T according to the present disclosure will be described below in conjunction with the accompanying drawings. rise The specific implementation of the measurement method is described. Fig.10 The MCU is used to measure T according to an embodiment of the present disclosure. rise The overall block diagram of the algorithm. Based on MCU measurement T riseThe algorithm is generally divided into two parts: a driving motor open-loop rotation algorithm unit 1020 and a measurement algorithm unit 1010. Fig.11A -B shows a diagram of a method for measuring T based on an MCU according to an embodiment of the present disclosure. rise Relevant hardware diagram of the algorithm.

[0084] Fig.11A shows the MCU based measurement of T rise The main hardware devices of the MCU required for the algorithm include the first timer (TIMERx) and the first ADC (ADCx) as described above for controlling the three-phase inverter, and also include a second timer (TIMERy) and a second ADC (ADCy) for T rise Continuous voltage acquisition during measurement. In a preferred embodiment, ADCx and ADCy have the same clock, and each channel has the same sampling time of T sample Accordingly, Fig. 11B It is a block diagram corresponding to the MCU hardware modules (including TIMERx, TIMERy, ADCx, ADCy, DMA (direct memory access)) and each algorithm flow.

[0085] The following will be combined Fig.11A -B for a preferred current rise time T rise The measurement process is described.

[0086] (I) Open-loop rotation of the drive motor

[0087] In order to calculate T rise Before the voltage is actually collected, the motor needs to be driven to rotate in open loop. Fig.10 The VF open-loop control algorithm drives the permanent magnet synchronous motor to rotate in an open loop by means of voltage frequency conversion. The hardware required for this part is TIMERx and ADCx, where TIMERx triggers ADCx sampling. Fig. 11B As shown, TIMERx may include four groups of outputs, the first three groups each with two channels (corresponding to the first group CH0 and CH0N, the second group CH1 and CH1N, and the third group CH2 and CH3N). These six channels are used to drive the motor, for example, to generate Fig. 11B The fourth group of outputs (CH3) is used to trigger ADCx.

[0088] In order to control the motor open-loop conversion, five parameters need to be preset first:

[0089] period VF :Voltage and frequency conversion duration

[0090] u q_start : q-axis starting voltage

[0091] u q_end : Final voltage of q axis. In order to provide a good measurement environment for the sampling algorithm, the range can be selected as: where u dc is the DC bus voltage.

[0092] ω e_start : Initial open-loop electrical angular velocity

[0093] ω e_end : Final open-loop electrical angular velocity

[0094] Each PWM cycle maintains u d_VF =0, and adjust u q_VF and θ e_VF , so that it can be output according to the curve specified by the above five parameters. Fig.12 The VF control curve is shown.

[0095] After each SVPWM calculation is completed, the following main parameters are output:

[0096] 1. Three comparison values ​​of TIMERx: the values ​​of the corresponding positions of point A, point B and point C, that is, the values ​​of the switching positions of the A-phase MOS tube VT1, the B-phase MOS tube VT2 and the C-phase MOS tube VT3. These three values ​​are written into the comparator of TIMERx, and in the next PWM cycle, TIMERx will generate PWM according to these three comparison values ​​(through the first 3 groups of TIMERx output). Figure 4 As shown, at a certain angle in sector I, if the output is Figure 4 As shown in the waveform in the upper right corner, VT3 is switched at the point corresponding to the value of point C, VT2 is switched at the point corresponding to the value of point B, and VT1 is switched at the point corresponding to the value of point A (VT6 to VT4 differ from their upper arm by a dead time); then, VT1, VT2 and VT3 are switched with a symmetrical waveform, thereby achieving Figure 4 The input of the waveform shown in the upper right corner completes the PWM control of the current cycle.

[0097] 2. Two values ​​of TIMERx that trigger ADCx sampling: ADCx_S1 and ADCx_S2. Write these two values ​​into the comparison register of TIMERx. In the next PWM cycle, TIMERx will trigger an ADC sampling when the counter is equal to these two values ​​(triggered by the 4th group output of TIMERx). After the two ADC samplings are completed, FOC control and SVPWM calculation are performed again. The following table 1 shows an example of the phase current sampling points in each sector. Taking sector I as an example, Figure 5 ADCx_S1 and ADCx_S2 correspond to points B-T sample and point A-Tsample For example (x_S1 and x_S2 in the figure), this means that ADCx is at point B-T sample Perform U6 sampling and at point A-T sample Perform U4 sampling.

[0098] Table 1. Phase current sampling points

[0099]

[0100] Since the 4 groups of TIMERx outputs are as follows: rise The "measurement" phase also needs to work continuously to generate SVPWM waves and trigger ADC sampling (using ADCx) to calculate the three-phase currents for normal FOC control. Therefore, additional TIMERy and ADCy are required to perform "(II)T rise Up sampling and storage of "measurement".

[0101] (II) T rise Measurement: Sampling and Storage

[0102] When the control motor VF rotates in open loop, there will be a current i p Flow through the sampling resistor R p After the motor rotates stably, TIMERy is used to trigger ADCy to continuously sample the voltage u. p It should be clear that whether TIMERx triggers ADCx sampling for FOC control, or TIMERy triggers ADCy for T rise The continuous sampling of the measurement, which is also the sampling resistor R in the single resistor setting p The voltage across the two ends is u p The difference is that TIMERy triggers ADCy to do sampling in a certain FOC cycle of each sector (for example, Figure 7 The sampling time points in the six sectors are ADCy_S1 to ADCy_S6, starting from the starting point (the value is the starting point of the target voltage vector area + T dead ) Each sampling will increase by one step.

[0103] Fig.13 It shows that T rise Schematic diagram of the sampling and storage process in measurement. The minimum value of parameter M in the figure is set to 2, which means the waiting time is M*period. VFAfter that, the measurement algorithm starts. VF controls the motor operation. It takes a while for the motor to run stably before subsequent measurements can be performed. Parameter M is used to adjust the waiting time. After the motor runs stably, no disturbance is given to the motor. In the figure, Sector 1 to 6 (i.e., S1 to S6) correspond to sectors I to VI respectively, and when Sector_x is sector I, Sector_x-1 is sector VI. In addition, the voltage u in the figure p The storage and sampling setting sub-processes can be swapped as long as the corresponding criteria are correct.

[0104] After completing the initial parameter relationship setting, the initialization sub-process is performed. This process is used to initialize measurement-related peripherals and variables. Fig.14 The schematic diagram of the measurement initialization sub-process is shown. In this sub-process, the sampling points of ADCy of the six sectors are assigned initial values ​​of Point A, Point A, Point B, Point B, Point C and Point C, which are the same as the three comparison values ​​(the three comparison values ​​define the commutation points of the PMW wave) generated by TIMERx in stage (I).

[0105] Then, the disabled trigger TIMERy is set to enable triggering, the disabled trigger conversion ADCy is set to enable triggering conversion and the sampling setting sub-process is entered. This sub-process mainly realizes setting the sampling range of the sampling points ADCy_S1 to ADCy_S6 of TIMERy. Fig.15 shows the voltage u p Flowchart of the sampling setup subprocess.

[0106] Sample_step (sampling step length) in the figure: represents the scanning accuracy of TIMERy_CLK, and the minimum value is 1. In each sector, the sampling point will increase or decrease by a step length each time to scan u within a reference voltage vector. p , until the interval scan is completed, the Sample_step size is used to adjust the scan accuracy.

[0107] The reference voltage vector scanned by each sector change is shown in Table 2. Figure 7 As shown, it is preferred that ADCy continuously collects voltage when the sector has just completed switching, and the collected target voltage vector is the vector of the sector switching point, that is, as shown in Table 2, U4 is collected in sector I, U6 is collected in sector II, U2 is collected in sector III, U3 is collected in sector IV, U1 is collected in sector V, and U5 is collected in sector VI, and the continuous collection interval of ADCy corresponds to point B+T dead ~Point A (Sector I), Point C + T dead ~Point A (Sector II), Point C + T dead~Point B (Sector III), Point A + T dead ~Point B (Sector IV), Point A + T dead ~Point C (Sector V), Point B + T dead ~Point A (Sector VI), which is also what the measurement initialization and sampling setup subprocesses set.

[0108] In the example shown in the figure, the initial value of the sampling count value of ADCy is equal to the corresponding value of the switching point of the corresponding phase; and the ADCy is triggered to perform a sampling once in each control cycle of continuous acquisition, and the sampling count value is reduced by a step length until the sampling count value reaches the corresponding value of the switching point of another phase plus the dead time.

[0109] Table 2. Voltage vector scanned by ADCy for each sector change

[0110] Sector_previous Sector6 Sector1 Sector2 Sector3 Sector4 Sector5 Sector_current Sector1 Sector2 Sector3 Sector4 Sector5 Sector6 Scanned voltage vector <![CDATA[u4]]> <![CDATA[u6]]> <![CDATA[u2]]> <![CDATA[u3]]> <![CDATA[u1]]> <![CDATA[u5 <!-- 11 -->]]> Variables to scan ADCy_S1 ADCy_S2 ADCy_S3 ADCy_S4 ADCy_S5 ADCy_S6

[0111] Then, proceed to voltage u p Storage process. Fig.16 shows the voltage u p In order to store multiple voltage values ​​sampled for sectors I to VI, six arrays u can be allocated. p _bufferS1~u p _bufferS6, and can be Fig.16 As shown, the ADCy conversion results triggered by each sector are stored in their respective arrays. p _bufferS1~u p _bufferS6. Thus, the sampling and storage are completed, and the storage voltage u can be used to p Analysis and T rise The process of obtaining.

[0112] (III) T rise Measurement: Analyze the results

[0113] After scanning, sampling and storage, each sector will get an array: u p _bufferSx[], (x = 1..6). Perform data analysis on these six arrays to find the stored u for each sector. p The index corresponding to the boundary between the stable area and the fluctuating area of ​​the waveform (that is, the corresponding index value, indicating which acquisition it is in the continuous acquisition, and thereby determining the position of the switching point).

[0114] Fig.17 The analysis process for storing voltage values ​​is shown. p _bufferSx[] Each can be based on Fig.17 To calculate the index of the switching point between the fluctuation area and the stable area. The specific calculation method can be as before Figure 8 As shown, an array u p _bufferSx[] stores N voltage values, and calculates the initial voltage value (i.e., u p _bufferSx[0]) to the current voltage value (i.e., u p _bufferSx[index]), and then calculate the slope between the variance of the current voltage value and the variance of the previous voltage value, and compare the slope with the parameter Klimit used to determine the boundary between stability and fluctuation. When the slope is greater than the threshold specified by the parameter Klimit, the index of the voltage value is determined to be the index corresponding to the switching point between the fluctuation area and the stable area. The switching point Point_Sx can be found for sectors I-VI. After finding Point_S1~Point_S6, the current rise time Sx_T corresponding to each sector can be calculated. rise .

[0115] Specifically, Fig.18 FIG. 4 shows a flow chart for calculating the current rise time for each sector. As shown in the figure, here, T rise is the total duration of the fluctuation region and is calculated as follows:

[0116] Sx_T rise =Point_Sx×Sample_step×T TIMERy_CLK +T dead

[0117] Among them, T TIMERy_CLK is the counter clock period of TIMERy.

[0118] Based on the found Point_S1~Point_S6, we can apply the above formula to calculate S1_T rise ~S6_T rise , and take the maximum value of the six intermediate results as the final T rise :

[0119] T rise =max{S1_T rise ~S6_T rise}

[0120] The final T rise can be used as a constant of the motor (i.e., as the current rise time T of the motor rise When the motor is operating normally, ADCx skips T dead and T rise , then the sampling resistor R p The voltage across the two ends is up When using the TIMERx with four outputs as described above, the fourth output of TIMERx will be at two points of A, B, and C corresponding to the sampleable voltage vector of the current sector + T dead +T rise Output a trigger signal to trigger the ADC to sample the voltages of the corresponding two phases and thereby reconstruct the three-phase currents for PWM control.

[0121] The current collection method using resistors disclosed in the present invention can also be used in the case of multi-resistor sampling, such as three-resistor and two-resistor sampling. Fig.19 The topology diagram of the three-resistance sampling drive system is shown in FIG. Compared with the sampling resistor R arranged on the busbar when sampling with a single resistor, p (See Figure 2 ) is different in that the three resistors R arranged in the lower bridge arm a , R b and R c is a sampling resistor. The three-phase current can be reconstructed according to the current collected on the sampling resistor. Fig. 20 The corresponding relationship between three-resistance sampling and phase current in different sectors is shown. When three-resistance sampling is used, current is collected when the upper tube of the three phases is turned off, the lower tube is turned on, and the output voltage vector is U0(000), that is, Fig. 20 The sampling window position.

[0122] Thus, when sampling three resistors, the target voltage vector interval where the sampling window is located is a zero voltage vector interval, and the sampling of the voltage values ​​at both ends of the corresponding resistors at a predetermined sampling interval in the target voltage vector interval during multiple continuous control cycles includes: sampling the voltage values ​​at both ends of two resistors among the multiple resistors at a predetermined sampling interval in the target voltage vector interval during multiple continuous control cycles. Determining the switching point position based on the collected voltage values ​​includes: determining the switching point positions corresponding to the two resistors based on the voltage values ​​collected at both ends of the two resistors among the multiple resistors; and determining the minimum sampling window of the permanent magnet synchronous motor based on the later switching point position among the switching point positions corresponding to the two resistors.

[0123] Here, taking sector I as an example, when selecting to collect the voltages of phases B and C to reconstruct the three-phase current, the A point where the MOS tube VT1 of phase A is turned off + T dead As a starting point, use ADCy1 and ADCy2 to compare R b and R c Continuous voltage sampling is performed, and the collected voltage values ​​are analyzed to find the switching points of the fluctuation and stable regions of the B-phase and C-phase voltages of sector I. In one embodiment, the later switching point of the two switching points can be directly selected to calculate T riseIn a preferred embodiment, the two-phase voltage of each sector can be continuously collected and analyzed, and finally the latest switching point is selected from the 12 switching points to calculate T rise .

[0124] In one embodiment, the present disclosure may also be implemented as a permanent magnet synchronous motor, comprising: a motor and a magnetic orientation vector control module for controlling the motor. The magnetic orientation vector control module may include a minimum sampling window determination module for executing the T rise The measurement method determines the minimum sampling window of the permanent magnet synchronous motor. The permanent magnet synchronous motor is composed of Fig.10 As shown, a measurement algorithm unit 1010 may be included. In one embodiment, the minimum sampling window determination module corresponds to the measurement algorithm unit 1010.

[0125] In one embodiment, it is necessary to perform T when the motor is running in open loop. rise At this time, the minimum sampling window determination module further includes an open-loop control unit 1020, which is used to drive the permanent magnet synchronous motor to rotate in an open loop.

[0126] The open-loop control unit 920 can Fig.11A -B is controlled by the first timer (TIMERx) and the first ADC (ADCx). The first timer is controlled to: generate a PWM signal according to the corresponding values ​​of the switching points of phase A, phase B and phase C in the comparator and send it to the three-phase inverter; when the counter of the first timer is equal to the two sampling count values ​​respectively, trigger the first ADC to perform two samplings; reconstruct the three-phase current according to the sampling values ​​of the two samplings for the next FOC control and SVPWM calculation.

[0127] Furthermore, the measurement algorithm unit 910 can also Fig.11A -B. The second timer (TIMERy) and the second ADC (ADCy) are controlled. The second timer is controlled to: trigger the second ADC to sample whenever the counter is equal to the sampling count value during multiple FOC control cycles of continuous sampling, and the second ADC is controlled to: be triggered to sample during multiple FOC control cycles, and store the collected multiple sampling values ​​into the sampling value array. Therefore, the sampling value can be analyzed and the index value corresponding to the switching point can be obtained, thereby completing the T rise measurement.

[0128] The permanent magnet synchronous motor and the resistance current sampling method according to the present disclosure have been described in detail above with reference to the accompanying drawings. The present disclosure continuously collects voltage values ​​in the target voltage interval and thereby finds the jitter stable switching point, thereby determining the minimum sampling time T minThis method does not require any instrumentation, only requires a FOC control system and a motor, and allows the MCU to run the corresponding algorithm. It is convenient, simple and highly accurate.

[0129] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A resistance current sampling method for a permanent magnet synchronous motor, wherein the permanent magnet synchronous motor controls a three-phase inverter based on an SVPWM strategy, and the method comprises: Selecting a target voltage vector interval in which the sampleable window is located; During a plurality of continuous control cycles, the voltage value across the corresponding resistor is collected within the target voltage vector interval at a predetermined sampling interval; Based on the collected voltage value, determining the switching point position of voltage jitter and stability; as well as A minimum sampling window of the permanent magnet synchronous motor is determined based on the switching point position.

2. The method of claim 1, wherein: The acquisition interval covers the expected position range of voltage jitter and stable switching points.

3. The method of claim 2, wherein: The acquisition interval starts from the starting point of the target voltage vector interval plus the dead time and ends at the end point of the target voltage vector interval minus the channel sampling time.

4. The method of claim 1, wherein: Based on the collected voltage value, determining the switching point position includes: Calculating the variance change rate of the collected voltage value; and The voltage acquisition position at which the variance change rate is less than a predetermined threshold is used as the switching point position.

5. The method of claim 1, wherein: A target voltage vector interval is selected in each of the plurality of sectors to determine the position of the jitter stabilization switching point in the sector, and The determining of the minimum sampling window of the permanent magnet synchronous motor based on the switching point position comprises: Selecting a latest switching point position from the respective switching point positions of the plurality of sectors; and The minimum sampling window is determined based on the latest switching point position.

6. The method of claim 5, wherein: The resistance sampling method is a single resistance sampling method, and the method further includes: The control period after each sector switching is completed is selected as the starting control period for acquisition, and a target voltage vector interval whose voltage vector is the same as the voltage vector when the sector is switched is selected.

7. The method of claim 1, further comprising: driving the permanent magnet synchronous motor to rotate in an open loop, Wherein, the continuous collection is performed after the permanent magnet synchronous motor rotates stably.

8. The method of claim 7, wherein: The resistance sampling method is a single resistance sampling method, and driving the permanent magnet synchronous motor to rotate in an open loop includes: Perform SVPWM calculation according to the initial parameters, write the calculated corresponding values ​​of the switching points of phase A, phase B and phase C into the comparator of the first timer, and write the two sampling count values ​​into the register of the first timer; In the next control cycle, the first timer performs the following operations: Generate a PWM signal according to the corresponding values ​​of the switching points of phase A, phase B and phase C in the comparator and send it to the three-phase inverter; When the counter of the first timer is equal to the two sampling count values ​​respectively, triggering the first ADC to perform two samplings; The three-phase currents are reconstructed according to the sampled values ​​of the two samples for the next FOC control and SVPWM calculation.

9. The method of claim 8, wherein: The two sampling count values ​​respectively correspond to the end points of the two target voltage vector intervals where the sampleable window is located minus the channel sampling time of the first ADC, wherein the end point of the target voltage vector interval is determined by the corresponding value of the switching point of the corresponding phase.

10. The method of claim 8, wherein: The step of collecting the voltage value at both ends of the corresponding resistor within the target voltage vector interval at a predetermined sampling interval during the continuous multiple control cycles includes: When the counters of the second timer are respectively equal to the sampling count value, the second ADC is triggered to perform sampling, and the sampling values ​​of the predetermined number of samplings are stored in the sampling value array; The determining of the switching point position based on the collected voltage value includes: The sampling values ​​in the sampling value array are calculated to determine the switching point position.

11. The method of claim 10, wherein: The sampling includes: The initial value of the sampling count value of the second timer is equal to the corresponding value of the switching point of the corresponding phase; and the second ADC is triggered to perform a sampling once in each control cycle of the continuous acquisition, and the sampling count value is reduced by a step length until the sampling count value reaches the corresponding value of the switching point of another phase plus the dead time.

12. The method of claim 1, wherein: The resistance sampling method is a multi-resistance sampling method, and the target voltage vector interval in which the sampleable window is located is a zero voltage vector interval. Furthermore, the step of collecting the voltage value across the corresponding resistor within the target voltage vector interval at a predetermined sampling interval within the continuous multiple control cycles includes: In a plurality of continuous control cycles, voltage values ​​across two resistors of the plurality of resistors are respectively collected within the target voltage vector interval at a predetermined sampling interval, The determining of the switching point position based on the collected voltage value includes: Determine the switching point positions corresponding to the two resistors respectively based on continuously collecting voltage values ​​across two resistors among the plurality of resistors; and The minimum sampling window of the permanent magnet synchronous motor is determined based on the later switching point position of the switching point positions corresponding to the two resistors.

13. A permanent magnet synchronous motor, comprising: Motor; A magnetic oriented vector control module is used to control the motor and comprises: A minimum sampling window determination module is used to execute the method as described in any one of claims 1 to 12 to determine the minimum sampling window of the permanent magnet synchronous motor.

14. The electric machine according to claim 13, wherein: The magnetic oriented vector control module also includes: The open-loop control module is used to drive the permanent magnet synchronous motor to rotate in an open loop.

15. The electric machine according to claim 13, wherein: The open-loop control module controls a first timer and a first ADC, wherein the first timer is controlled to: Generate a PWM signal according to the corresponding values ​​of the switching points of phase A, phase B and phase C in the comparator and send it to the three-phase inverter; When the counter of the first timer is equal to two sampling count values ​​respectively, triggering the first ADC to perform two samplings; The three-phase currents are reconstructed according to the sampled values ​​of the two samples for the next FOC control and SVPWM calculation.

16. The electric machine according to claim 15, wherein: The minimum sampling window determination module controls the second timer and the second ADC, The second timer is controlled to: In a plurality of FOC control cycles of continuous acquisition, whenever the counter is equal to the sampling count value, the second ADC is triggered to perform sampling, and The second ADC is controlled to: Sampling is triggered during a plurality of FOC control cycles, and the collected plurality of sampling values ​​are stored in a sampling value array.