Current-based motor state detection method, device, equipment, and storage medium

By detecting the phase current in the drive circuit and calculating the motor state value, the problems of high cost and insufficient integration of existing motor state detection methods are solved, and accurate detection of the motor state and low-cost integration are achieved.

CN119891829BActive Publication Date: 2025-09-05YUANENGXIN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510294322.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-09-05
Estimated Expiration
2045-03-13

AI Technical Summary

Technical Problem

Existing motor status detection methods require additional Hall sensors, optical encoders, and additional circuits, resulting in high costs and limiting the use of low-pin-count MCUs.

Method used

By detecting the phase current in the drive circuit, the MCU generates a control signal to adjust the circuit state, calculate the motor state value, and determine the motor's rotor position, rotation direction, and speed, without adding additional circuits or hardware.

Benefits of technology

The cost of motor status detection is reduced, the degree of integration is improved, and accurate detection of the motor status is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119891829B_ABST
    Figure CN119891829B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, device, equipment and storage medium for detecting the state of a motor based on current. The solution can adjust the conduction state of the drive circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the drive circuit, calculate the first voltage value, the second voltage value and the third voltage value in the three-phase motor according to the first phase current and the second phase current, calculate the motor state value corresponding to the first voltage value, the second voltage value and the third voltage value, determine the rotor position and rotation direction in the three-phase motor according to the motor state value, and calculate the speed of the three-phase motor. The present application calculates the motor state value by detecting the phase current in the drive circuit, thereby determining the various state parameters of the motor, without adding additional circuits or hardware, which can effectively reduce costs and improve the degree of integration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of drive motor technology, and specifically to a current-based motor state detection method, device, equipment, and storage medium. Background Art

[0002] When the motor is not driven, the motor's rotor may continue to rotate due to external forces or inertia, which may be reverse or forward. When the driver wants to drive the motor, it needs to know the current motor status, such as forward or reverse, the current speed and the current position of the motor rotor, in order to achieve smooth connection and drive. The operating status of the brushless DC motor can usually be detected by several methods: 1. Detecting the magnetic field state of the motor through the hall sensor, 2. Using the encoder and optical and mechanical principles for calculation, 3. Using the circuit to capture the back electromotive force voltage. The above methods can be used to determine whether the motor is currently rotating forward or reverse, the current speed, and the current position of the motor rotor.

[0003] However, the applicant discovered that the disadvantages of Hall sensors and optical encoders are that they require additional costs and are subject to installation site restrictions. The circuit-based approach also requires additional circuitry. All three methods require additional I / O pins on the single-chip (MCU), which imposes certain limitations on MCUs with low pin counts. Summary of the Invention

[0004] The present application provides a current-based motor state detection method, device, equipment and storage medium, which can calculate the motor state value by detecting the phase current in the drive circuit, thereby determining various state parameters of the motor without adding additional circuits or hardware, which can effectively reduce costs and improve the degree of integration.

[0005] The present application provides a current-based motor state detection method, which is applied to a three-phase motor. The three-phase motor includes an MCU and a drive circuit, including:

[0006] Adjusting the conduction state of the drive circuit through the control signal generated by the MCU, and collecting the first phase current and the second phase current in the drive circuit;

[0007] Calculating a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current;

[0008] Calculating motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value;

[0009] The rotor position and rotation direction of the three-phase motor are determined according to the motor state value, and the rotation speed of the three-phase motor is calculated.

[0010] Optionally, the drive circuit includes six electronic switches, namely three upper bridge arm electronic switches and three lower bridge arm electronic switches, and the control signal generated by the MCU adjusts the conduction state of the drive circuit, including:

[0011] Controlling the MCU to generate a PWM signal with a preset duty cycle;

[0012] The PWM signal is sent to three lower bridge arm electronic switches to turn on the three lower bridge arms in the driving circuit.

[0013] Optionally, after calculating the first voltage value, the second voltage value, and the third voltage value of the three-phase motor, the method further includes:

[0014] Setting a preset value according to the acquisition range of the ADC in the driving circuit;

[0015] Determining whether the first voltage value, the second voltage value, or the third voltage value exceeds the preset value;

[0016] If it does not exceed, the MCU is controlled to generate a PWM signal with a preset duty cycle, and the PWM signal is sent to all electronic switches to make the three upper bridge arms and the three lower bridge arms in the drive circuit complementary to each other.

[0017] Optionally, the calculating the motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value includes:

[0018] Determine a first state value according to the first voltage value, determine a second state value according to the second voltage value, and determine a third state value according to the third voltage value;

[0019] The sum of the first state value, the second state value, and the third state value is calculated as the motor state value.

[0020] Optionally, determining the rotor position and rotation direction of the three-phase motor according to the motor state value includes:

[0021] Determining the electrical angle interval of the motor state value corresponding to the current rotor;

[0022] Sequentially acquiring multiple motor state values ​​within one rotation cycle of the rotor;

[0023] The rotation direction of the three-phase motor is determined according to the transformation mode of the plurality of motor state values.

[0024] Optionally, calculating the rotational speed of the three-phase motor includes:

[0025] Obtain the single duration or total duration of the 6 motor status values ​​in sequence through the timer;

[0026] The rotational speed of the three-phase motor is calculated according to the single duration or the total duration.

[0027] Optionally, the method further includes:

[0028] Taking the rotor position of the three-phase motor as the initial position and setting the initial voltage of the three-phase motor according to the rotation speed of the three-phase motor;

[0029] The three-phase motor is driven to operate according to the rotation direction, initial position and initial voltage.

[0030] The present application also provides a current-based motor state detection device, which is applied to a three-phase motor. The three-phase motor includes an MCU and a drive circuit, including:

[0031] an acquisition module, configured to adjust the conduction state of the drive circuit according to the control signal generated by the MCU, and to acquire the first phase current and the second phase current in the drive circuit;

[0032] a first calculation module, configured to calculate a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current;

[0033] a second calculation module, configured to calculate motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value;

[0034] A determination module is used to determine the rotor position and rotation direction of the three-phase motor according to the motor state value, and calculate the rotation speed of the three-phase motor.

[0035] The present application also provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps of any one of the current-based motor state detection methods provided in the present application by calling the computer program stored in the memory.

[0036] The present application also provides a storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor to execute the steps of any one of the current-based motor state detection methods provided in the present application.

[0037] The current-based motor state detection method provided in the present application can adjust the conduction state of the drive circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the drive circuit, calculate the first voltage value, the second voltage value, and the third voltage value in the three-phase motor based on the first phase current and the second phase current, calculate the motor state value corresponding to the first voltage value, the second voltage value, and the third voltage value, determine the rotor position and rotation direction in the three-phase motor based on the motor state value, and calculate the speed of the three-phase motor. The present application calculates the motor state value by detecting the phase current in the drive circuit, thereby determining the various state parameters of the motor, without adding additional circuits or hardware, which can effectively reduce costs and improve the degree of integration. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in this application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 This is a flow chart of a current-based motor state detection method provided in an embodiment of the present application;

[0040] Figure 2 This is a schematic structural diagram of a driving circuit provided in an embodiment of the present application;

[0041] Figure 3 This is another flow chart of the current-based motor state detection method provided in an embodiment of the present application;

[0042] Figure 4 1 is a waveform diagram of voltage values ​​and state values ​​in a three-phase motor provided in an embodiment of the present application;

[0043] Figure 5 1 is a schematic structural diagram of a current-based motor state detection device provided in an embodiment of the present application;

[0044] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0046] It should be noted that, in this document, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0047] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and they can be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0048] It should be noted that in this article, step codes such as 101 and 102 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the order. Those skilled in the art may execute 102 first and then 101, etc. during specific implementation, but these should all be within the scope of protection of this application.

[0049] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0050] An embodiment of the present application provides a current-based motor state detection method. The executor of the current-based motor state detection method can be the current-based motor state detection device provided in the embodiment of the present application, or a server integrated with the current-based motor state detection device, wherein the current-based motor state detection device can be implemented in hardware or software.

[0051] like Figure 1 As shown, Figure 1 1 is a schematic diagram of a first flow chart of a current-based motor state detection method provided in an embodiment of the present application. The specific flow of the current-based motor state detection method may be as follows:

[0052] 101. Adjust the conduction state of the drive circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the drive circuit.

[0053] In one embodiment, the above-mentioned current-based motor state detection method is applied to a three-phase motor, which includes an MCU and a drive circuit. The structure of the drive circuit is shown in FIG. Figure 2 The drive circuit is a three-phase inverter circuit and may include a DC power supply to provide DC power to the entire drive circuit. Furthermore, Q1-Q6 consists of six electronic switches, such as MOSFETs or IGBTs. Taking MOSFETs as an example, these six MOSFETs are power switching devices in the circuit, controlling the on / off and direction of current flow, thereby driving and controlling the motor. The operating principle is that when the MOSFET gates (G1-G6) receive control signals from the MCU (microcontroller), the MOSFETs turn on or off. For example, by controlling the conduction sequence and combination of Q1-Q3 and Q4-Q6, different current loops can be formed, applying three-phase AC power to the motor and driving its rotation. Different conduction modes enable motor functions such as forward rotation, reverse rotation, and speed regulation.

[0054] In one embodiment, the drive circuit may employ a three-phase bridge inverter structure, comprising six power switching devices forming three bridge arms, each with two upper and lower switches. The MCU (microcontroller) is the core of the entire motor control system, generating corresponding control signals based on a preset algorithm or user input. These control signals are typically PWM (pulse width modulation) signals, used to control the on and off states of the power switching devices (such as MOSFETs or IGBTs) in the drive circuit. The duty cycle, frequency, and phase of the PWM signals can be precisely adjusted based on the motor's operating requirements. For example, in a three-phase motor drive, the MCU outputs three different PWM signals to control the upper and lower bridge switches (G4, G5, and G6) of the three-phase bridge arms, creating different conduction combinations and achieving different drive modes for the motor. The step of adjusting the conduction state of the drive circuit using the control signals generated by the MCU may include: controlling the MCU to generate a 50% duty cycle PWM signal, sending the PWM signal to the three lower bridge electronic switches to turn on the three lower bridge arms in the drive circuit.

[0055] Further, Figure 2 G1-G6 in it are used to receive control signals from the MCU, which determine the on and off states of the corresponding MOSFETs. O1-O3 are inverter output signals, which are used to connect to the motor, so as to output the three-phase AC voltage after inverter inversion to the motor to drive the motor to operate. The parameters such as the frequency, amplitude and phase of the output three-phase AC voltage can be adjusted according to the control signal of the MCU, so as to achieve flexible control of the operating states such as the motor speed and torque. RA and RB are current sampling resistors. Specifically, RA and RB can be connected in series in the lower bridge arm to sample the phase current of the motor. When the motor is running, the phase current will flow through these sampling resistors, and a voltage drop proportional to the current will be generated across the resistors. By measuring the voltage across the sampling resistors and combining the resistance value of the resistors, the current flowing through the resistors, that is, the phase current of the motor, can be calculated. These sampled current signals (that is Figure 2 CurrA and CurrB in the current are transmitted to the MCU, which uses this current information to implement closed-loop control, condition monitoring, and protection functions for the motor. This drive circuit architecture is primarily used to convert DC power into three-phase AC power to drive a three-phase motor.

[0056] 102. Calculate a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current.

[0057] In one embodiment, based on the electrical characteristics and circuit principles of the motor, once the collected phase current information represented by CurrA and CurrB is known, the first, second, and third voltage values ​​of the three-phase motor can be calculated using a specific formula. For example, Va=-CurrA, Vb=-CurrB, and Vc=-Va–Vb.

[0058] In one embodiment, the voltage calculation also takes into account the motor's operating state and circuit nonlinearities. For example, the resistance and inductance of a motor's windings may vary when the motor is running at high and low speeds due to phenomena such as the skin effect and magnetic saturation. Therefore, in actual algorithm implementation, this embodiment also requires determining whether the motor is in a high-speed state. For example, a preset value can be set according to the acquisition range of the ADC in the drive circuit, and then a determination is made as to whether the first voltage value, the second voltage value, or the third voltage value exceeds the preset value. If so, it is determined that the motor is currently in a high-speed state; if not, it is determined that the motor is currently in a low-speed state. At this time, the MCU can be controlled to generate a PWM signal with a 50% duty cycle and send the PWM signal to all electronic switches (G1, G2, G3, G4, G5, G6) to cause the three upper bridge arms and the three lower bridge arms in the drive circuit to be complementary conductive. At this time, the inertial operation of the motor will generate a back electromotive force, which will generate a phase current through the three lower arms of the electronic switch. The current back electromotive force state is determined by the MCU collecting signals CurrA and CurrB. Since the upper and lower arms are complementary conductive at this time, the back electromotive force at this time will generate a larger phase current, thereby compensating for the low back electromotive force at low speed.

[0059] 103. Calculate motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value.

[0060] The motor state value is an indicator that comprehensively reflects the motor's operating status and is closely related to the calculated first, second, and third voltage values. In this embodiment, the motor state value can be defined based on the positive or negative status of the first, second, and third voltage values. In other embodiments, the calculation can also be performed based on the motor's power equation and efficiency model. For example, the motor's input power can be calculated based on the three-phase power formula P = 3VphIphcosφ (where Vph is the phase voltage, Iph is the phase current, and cosφ is the power factor). The motor's state can then be comprehensively assessed by combining the relationship between the motor's output power and input power (efficiency η = Pout / Pin) and the motor's torque-speed characteristics (e.g., for a brushless DC motor, electromagnetic torque T = Kt*Ia, where Kt is the torque constant and Ia is the phase current). These calculations can provide information such as the motor's load level, efficiency, and whether it is within the normal operating range. This information can be integrated into the motor state value, and this will not be further described in this embodiment.

[0061] 104. Determine the rotor position and rotation direction of the three-phase motor based on the motor state value, and calculate the speed of the three-phase motor.

[0062] In one embodiment, the rotor position of a three-phase motor is determined based on a calculated motor state value. Different motor state values ​​correspond to different rotor position ranges. For example, when Section = 2, the rotor position is between 0 and 60 degrees; when Section = 3, the rotor position is between 60 and 120 degrees. This determination method based on the relationship between voltage and rotor position utilizes the variation of the back electromotive force during the rotation of the motor and the phase relationship of the three-phase voltage. In practical applications, to improve the accuracy of the rotor position, the electromagnetic parameters of the motor can also be precisely calibrated, and dynamic compensation can be performed based on the motor's speed and load conditions.

[0063] Accordingly, the motor's rotation direction can be determined based on the changing pattern of the motor state value. By monitoring the sequence of consecutive changes in the Section value, the motor's rotation direction can be accurately determined. Regarding speed calculation, this embodiment uses a timed measurement method to calculate the time required for the rotor to complete one rotation, thereby calculating the speed of the three-phase motor based on this time.

[0064] In one embodiment, the method may further include: using the rotor position in the three-phase motor as the initial position, setting the initial voltage of the three-phase motor according to the rotation speed of the three-phase motor, and driving the three-phase motor to operate according to the rotation direction, the initial position, and the initial voltage. Specifically, in the drive of a permanent magnet motor, closed-loop operation requires accurate knowledge of the rotor position, which determines the commutation moment and phase of the current in the motor winding, thereby affecting the torque and speed output of the motor. If the rotor position is unknown, the operating state of the motor cannot be accurately controlled. Therefore, this embodiment can also directly switch to the closed-loop operation of the motor after knowing that the motor is rotating forward, and give the measured rotor position as the initial position to the internal algorithm. This achieves smooth switching of the motor, that is, allows the motor to smoothly transition from the current state to the closed-loop control state, avoiding unstable motor operation due to sudden switching of the control mode, such as jitter, loss of step, and the like.

[0065] Furthermore, the aforementioned speed can be fed into a phase-locked loop (PLL). This allows the characteristics of the PLL to be utilized to more quickly converge the speed estimate to the actual value, improving the accuracy and speed of speed estimation. Furthermore, when entering closed-loop operation or switching other operating states, the initial values ​​of the three-phase voltages can be determined based on the current speed. This is because the internal electromagnetic relationships and operating characteristics of the motor vary at different speeds. If the initial voltage is not set properly, it may cause the motor to run unsteadily or even cause faults such as overcurrent or overvoltage.

[0066] As described above, the current-based motor state detection method proposed in the embodiment of the present application can adjust the conduction state of the drive circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the drive circuit, calculate the first voltage value, the second voltage value, and the third voltage value in the three-phase motor based on the first phase current and the second phase current, calculate the motor state value corresponding to the first voltage value, the second voltage value, and the third voltage value, determine the rotor position and rotation direction in the three-phase motor based on the motor state value, and calculate the speed of the three-phase motor. The present application calculates the motor state value by detecting the phase current in the drive circuit, thereby determining the various state parameters of the motor, without adding additional circuits or hardware, which can effectively reduce costs and improve the degree of integration.

[0067] The method described in the above embodiment will be further described below.

[0068] See also Figure 3 , Figure 3 This is a second flow chart of the current-based motor state detection method provided in an embodiment of the present application. The method includes:

[0069] 201. Adjust the conduction state of the driving circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the driving circuit.

[0070] In one embodiment, the MCU, as the core control unit, generates a specific control signal according to the preset program logic and the motor operation requirements, which can be a PWM signal with a 50% duty cycle. Figure 2 In a three-phase inverter circuit architecture, this signal is sent to G4 / G5 / G6 (corresponding to the control terminals of the lower three-arm switches). When these control signals act on electronic switches (such as MOSFETs), they turn the lower three-arm switches on or off according to a specific timing sequence. This change in conduction state is the basis for motor control. Different conduction combinations can guide the flow of current in the motor windings, thereby generating different magnetic field effects, driving the motor or affecting its electrical state during inertial operation.

[0071] It's important to note that during the motor's coasting cycle, electromagnetic induction within the motor generates a back EMF. This back EMF drives current through the circuit. When current passes through the series resistors in the lower bridge arm (micro-current sampling resistors RA and RB), a voltage drop forms across the resistors. Using the aforementioned circuit connection, this voltage drop is converted into CurrA and CurrB signals and transmitted to the MCU. The analog-to-digital conversion module within the MCU converts these analog signals into digital quantities, enabling accurate acquisition of the motor phase currents. During this process, factors such as the sampling resistor's precision, the circuit's interference immunity, and the MCU's sampling frequency all affect the accuracy of the acquired results. For example, a high-precision sampling resistor can more accurately reflect the current magnitude, while a higher MCU sampling frequency can capture faster current changes, ensuring accurate subsequent calculations.

[0072] 202. Calculate a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current.

[0073] In one embodiment, based on the electrical characteristics and circuit principles of the motor, after knowing the collected phase current information represented by CurrA and CurrB, the first voltage value, the second voltage value, and the third voltage value of the three-phase motor can be calculated using a specific formula. For example, Va=-CurrA, Vb=-CurrB, and Vc=-Va-Vb. The waveforms of Va, Vb, and Vc obtained can be found in Figure 4The calculation principle here is based on the motor's equivalent circuit model and the law of electromagnetic induction. During the operation of a three-phase motor, there is a close coupling relationship between the phase current and the phase voltage. By measuring the current and performing specific mathematical transformations, the corresponding voltage value can be inferred. The accuracy of this calculation method depends on the accuracy of the motor parameters, such as the resistance and inductance of the motor windings. In practical applications, motor parameter identification or the use of empirical values ​​can be used to improve calculation accuracy.

[0074] 203. Determine a first state value according to the first voltage value, determine a second state value according to the second voltage value, and determine a third state value according to the third voltage value.

[0075] 204. Calculate the sum of the first state value, the second state value, and the third state value as the motor state value.

[0076] Specifically, the specific process of calculating the motor state value according to the first voltage value (Va), the second voltage value (Vb) and the third voltage value (Vc) in this embodiment is as follows: First, the positive and negative conditions of Va, Vb and Vc are judged. If Va>0, let a=4; otherwise, a=0. If Vb>0, then b=2; otherwise, b=0. If Vc>0, then c=1; otherwise, c=0. Then, the motor state value is calculated by the formula Section=a+b+c. For example, when a=0, b=2, c=0, Section=2, this Section value represents the specific operating state information of the motor under the current electrical state, as the values ​​of Va, Vb and Vc mentioned above change, such as Figure 4 As shown, the motor state value is intrinsically linked to parameters such as the motor's rotor position, rotation direction, and speed. Different motor state value combinations correspond to different motor operating conditions. These motor state values ​​can then be used to further determine the precise operating state of the motor, providing critical state feedback information for the entire motor control system, enabling effective control and monitoring of the motor.

[0077] 205. Determine the electrical angle interval of the current rotor corresponding to the motor state value.

[0078] This embodiment introduces Section as the motor state value, and calculates the Section value by judging the positive and negative conditions of Va, Vb, and Vc. Different Section values ​​correspond to different rotor position ranges. For example, when Section=2, the rotor position is between 0-60 degrees; when Section=3, the rotor position is between 60-120 degrees; when Section=1, the rotor position is between 120-180 degrees; when Section=6, the rotor position is between 180-240 degrees; when Section=4, the rotor position is between 240-300 degrees; when Section=5, the rotor position is between 200-360 degrees.

[0079] 206. Sequentially obtain multiple motor state values ​​within one rotation cycle of the rotor, and determine the rotation direction of the three-phase motor according to a transformation method of the multiple motor state values.

[0080] Furthermore, the motor's rotation direction can be determined based on the changing pattern of the Section value. For example, when the motor rotates forward, the Section value changes in the following order: 2 → 3 → 1 → 5 → 4 → 6 → ...; when the motor rotates reverse, the Section value changes in the following order: 6 → 4 → 5 → 1 → 3 → 2 → .... Therefore, this embodiment can accurately determine the motor's rotation direction by monitoring the continuous change sequence of the Section value.

[0081] 207. Obtain the individual durations and the total duration of the six motor state values ​​in sequence through a timer, and calculate the rotation speed of the three-phase motor according to the individual durations or the total durations.

[0082] Among them, for the calculation of the rotational speed, this embodiment can adopt a timing measurement method. Specifically, when it is determined that the motor is in a high-speed state, the change of six consecutive Sections is used as a sign that the motor has run one circle. The total time T_total of these six intervals is recorded by the timer inside the MCU, and then the rotational speed of the motor is calculated according to the formula Speed(hz)=1 / T_total. In addition, only a single time length or multiple single time lengths (such as 2-5) can be used to deduce the total time T_total required for the motor to run one circle, and then calculate the rotational speed of the motor. This embodiment does not further limit this.

[0083] As described above, the current-based motor state detection method proposed in the embodiment of the present application can adjust the conduction state of the drive circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the drive circuit, calculate the first voltage value, the second voltage value and the third voltage value in the three-phase motor according to the first phase current and the second phase current, determine the first state value according to the first voltage value, determine the second state value according to the second voltage value, determine the third state value according to the third voltage value, calculate the sum of the first state value, the second state value and the third state value as the motor state value, determine the electrical angle interval of the motor state value corresponding to the current rotor, obtain multiple motor state values ​​in sequence within one rotation cycle of the rotor, determine the rotation direction in the three-phase motor according to the transformation method of the multiple motor state values, obtain the total time length of the six motor state values ​​in sequence through the timer, and calculate the speed of the three-phase motor according to the total time length. The present application calculates the motor state value by detecting the phase current in the drive circuit, thereby determining the various state parameters of the motor, without adding additional circuits or hardware, which can effectively reduce costs and improve the degree of integration.

[0084] In order to implement the above method, an embodiment of the present application further provides a current-based motor state detection device, which can be integrated into terminal devices such as mobile phones, tablet computers, and the like.

[0085] For example, Figure 5 FIG. 1 is a schematic diagram of a first structure of a current-based motor state detection device according to an embodiment of the present application. The current-based motor state detection device may include:

[0086] An acquisition module 301 is configured to adjust the conduction state of the drive circuit using a control signal generated by the MCU, and to acquire a first-phase current and a second-phase current in the drive circuit;

[0087] A first calculation module 302 is configured to calculate a first voltage value, a second voltage value, and a third voltage value of the three-phase motor according to the first phase current and the second phase current;

[0088] A second calculation module 303 is used to calculate the motor state value corresponding to the first voltage value, the second voltage value and the third voltage value;

[0089] The determination module 304 is configured to determine the rotor position and rotation direction of the three-phase motor according to the motor state value, and calculate the rotation speed of the three-phase motor.

[0090] As can be seen from the above, the current-based motor state detection device proposed in the embodiment of the present application can adjust the conduction state of the drive circuit through the control signal generated by the MCU, and collect the first phase current and the second phase current in the drive circuit, calculate the first voltage value, the second voltage value and the third voltage value in the three-phase motor based on the first phase current and the second phase current, calculate the motor state value corresponding to the first voltage value, the second voltage value and the third voltage value, determine the rotor position and rotation direction in the three-phase motor based on the motor state value, and calculate the speed of the three-phase motor. The present application calculates the motor state value by detecting the phase current in the drive circuit, thereby determining the various state parameters of the motor, without adding additional circuits or hardware, which can effectively reduce costs and improve the degree of integration.

[0091] All of the above technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0092] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0093] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute the steps of any of the current-based motor state detection methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0094] Adjusting the conduction state of the driving circuit through a control signal generated by the MCU, and collecting the first phase current and the second phase current in the driving circuit;

[0095] Calculating a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current;

[0096] Calculating motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value;

[0097] The rotor position and rotation direction of the three-phase motor are determined according to the motor state value, and the rotation speed of the three-phase motor is calculated.

[0098] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0099] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0100] Since the computer program stored in the storage medium can execute the steps of any current-based motor state detection method provided in the embodiments of the present application, the beneficial effects that can be achieved by any current-based motor state detection method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0101] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the device equipped with the chip executes the methods in various possible implementation modes as described above.

[0102] For example, the computer device mentioned above can be a terminal device with corresponding functions such as a mobile phone, tablet computer, personal computer, cloud computer, etc. Figure 6 , Figure 6 A schematic diagram of the structure of a computer provided in an embodiment of the present application.

[0103] The computer device 400 may include components such as a memory 401 and a processor 402. Those skilled in the art will appreciate that Figure 6 The computer device structure shown in the figure does not constitute a limitation to the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0104] Memory 401 can be used to store applications and data. The applications stored in memory 401 include executable code. Applications can be composed of various functional modules. Processor 402 executes various functional applications and data processing by running the applications stored in memory 401.

[0105] The processor 402 is the control center of the computer device. It uses various interfaces and lines to connect the various parts of the entire computer device. By running or executing applications stored in the memory 401 and calling data stored in the memory 401, it performs various functions of the computer device and processes data, thereby monitoring the computer device as a whole.

[0106] In this embodiment, the processor 402 in the computer device loads the executable code corresponding to one or more application processes into the memory 401 according to the following instructions, and the processor 402 runs the application stored in the memory 401 to execute:

[0107] Adjusting the conduction state of the driving circuit through a control signal generated by the MCU, and collecting the first phase current and the second phase current in the driving circuit;

[0108] Calculating a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current;

[0109] Calculating motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value;

[0110] The rotor position and rotation direction of the three-phase motor are determined according to the motor state value, and the rotation speed of the three-phase motor is calculated.

[0111] It is understood that the above scenarios are merely examples and do not limit the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, those skilled in the art will appreciate that with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application will also be applicable to similar technical problems.

[0112] The steps in the method of the embodiment of the present application can be adjusted in order, combined, or deleted according to actual needs. The modules in the device of the embodiment of the present application can be combined, divided, or deleted according to actual needs.

[0113] In this application, the same or similar terminology, technical solutions and / or application scenario descriptions are generally only described in detail the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, for the same or similar terminology, technical solutions and / or application scenario descriptions that are not described in detail later, you can refer to the previous relevant detailed descriptions.

[0114] In this application, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0115] The various technical features of the technical solution of this application can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0116] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. A computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. Available media can include magnetic media (e.g., floppy disks, storage disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks).

[0117] The above is a detailed introduction to the current-based motor state detection method, device, equipment and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A motor state detection method based on current, applied to a three-phase motor, wherein the three-phase motor includes an MCU and a drive circuit, characterized in that: include: Adjusting the conduction state of the drive circuit through the control signal generated by the MCU, and collecting the first phase current and the second phase current in the drive circuit; Calculating a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current; Calculating motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value; Determining the rotor position and rotation direction of the three-phase motor according to the motor state value, and calculating the rotation speed of the three-phase motor; The drive circuit includes six electronic switches, namely three upper bridge arm electronic switches and three lower bridge arm electronic switches. The control signal generated by the MCU is used to adjust the conduction state of the drive circuit, including: controlling the MCU to generate a PWM signal with a preset duty cycle; sending the PWM signal to the three lower bridge arm electronic switches to turn on the three lower bridge arms in the drive circuit; After calculating the first voltage value, the second voltage value, and the third voltage value in the three-phase motor, the method further includes: setting a preset value according to the acquisition range of the ADC in the drive circuit; determining whether the first voltage value, the second voltage value, or the third voltage value exceeds the preset value; if not, controlling the MCU to generate a PWM signal with a preset duty cycle, and sending the PWM signal to all electronic switches to enable the three upper bridge arms and the three lower bridge arms in the drive circuit to be complementary turned on.

2. The motor state detection method based on current according to claim 1, characterized in that: The calculating the motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value includes: Determine a first state value according to the first voltage value, determine a second state value according to the second voltage value, and determine a third state value according to the third voltage value; The sum of the first state value, the second state value, and the third state value is calculated as the motor state value.

3. The motor state detection method based on current according to claim 1, characterized in that: Determining the rotor position and rotation direction of the three-phase motor according to the motor state value includes: Determining the electrical angle interval of the motor state value corresponding to the current rotor; Sequentially acquiring multiple motor state values ​​within one rotation cycle of the rotor; The rotation direction of the three-phase motor is determined according to the transformation mode of the plurality of motor state values.

4. The motor state detection method based on current according to claim 1, characterized in that: The calculating the rotational speed of the three-phase motor includes: The individual duration and total duration of the six motor status values ​​are obtained in sequence through the timer; The rotational speed of the three-phase motor is calculated according to the single duration or the total duration.

5. The motor state detection method based on current according to any one of claims 1 to 4, characterized in that: The method further comprises: Taking the rotor position of the three-phase motor as the initial position and setting the initial voltage of the three-phase motor according to the rotation speed of the three-phase motor; The three-phase motor is driven to operate according to the rotation direction, initial position and initial voltage.

6. A current-based motor state detection device, applied to a three-phase motor, wherein the three-phase motor includes an MCU and a drive circuit, characterized in that: include: an acquisition module, configured to adjust the conduction state of the drive circuit according to the control signal generated by the MCU, and to acquire the first phase current and the second phase current in the drive circuit; a first calculation module, configured to calculate a first voltage value, a second voltage value, and a third voltage value in the three-phase motor according to the first phase current and the second phase current; a second calculation module, configured to calculate motor state values ​​corresponding to the first voltage value, the second voltage value, and the third voltage value; a determination module, configured to determine a rotor position and a rotation direction of the three-phase motor according to the motor state value, and calculate a rotation speed of the three-phase motor; The drive circuit includes six electronic switches, namely three upper bridge arm electronic switches and three lower bridge arm electronic switches. The control signal generated by the MCU is used to adjust the conduction state of the drive circuit, including: controlling the MCU to generate a PWM signal with a preset duty cycle; sending the PWM signal to the three lower bridge arm electronic switches to turn on the three lower bridge arms in the drive circuit; After calculating the first voltage value, the second voltage value, and the third voltage value in the three-phase motor, a preset value is set according to the acquisition range of the ADC in the drive circuit; it is determined whether the first voltage value, the second voltage value, or the third voltage value exceeds the preset value; if not, the MCU is controlled to generate a PWM signal with a preset duty cycle, and the PWM signal is sent to all electronic switches to make the three upper bridge arms and the three lower bridge arms in the drive circuit complementary conductive.

7. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the current-based motor state detection method according to any one of claims 1 to 5 by calling the computer program stored in the memory.

8. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the current-based motor state detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor rotation speed tracking method and device and computer readable storage medium

    CN109495030A

  • Rotor position detection method and device, computer equipment and storage medium

    CN117792160A