Motor control method and device, equipment and storage medium

By calculating the speed compensation value and current compensation value of the motor using the speed drop diagram and the speed current mapping relationship model, the problem of poor compensation effect when the motor speed drop is solved, and the stability and compensation accuracy of the motor are improved.

CN119652185APending Publication Date: 2025-03-18HONG KONG UNIV OF SCI & TECH (GUANGZHOU)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411676788.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art has poor compensation effect when the motor speed drops, resulting in motor instability and stalling.

Method used

By obtaining the speed error of the motor rotor, the speed compensation value is calculated using the preset speed drop chart, and the current compensation value is calculated based on the speed current mapping relationship model, and the motor is controlled to achieve rapid compensation.

Benefits of technology

Improves the compensation accuracy of the motor when speed drops, reducing the risk of instability and stalling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652185A_ABST
    Figure CN119652185A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a motor control method and device, equipment and a storage medium, and belongs to the technical field of motor control. The method comprises the steps of obtaining a first rotating speed error of a motor rotor at the current moment; the speed compensation value of the motor rotor is obtained according to a preset speed drop diagram, and the speed drop diagram represents a schematic diagram that the speed changes along with time when the speed of the motor rotor drops. And calculating a current compensation value according to the speed compensation value and a preset speed current mapping relation model to obtain the current compensation value. A current reference value at the current moment is obtained, and the current reference value is a current value for controlling the rotating speed of a motor rotor. And if the first rotating speed error is greater than a preset error, controlling the motor according to the current compensation value, otherwise, controlling the motor according to the current reference value. The speed compensation value is calculated through the speed drop diagram, and the corresponding current compensation value is obtained through the speed compensation value to control the motor, so that the accuracy of speed compensation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of motor control technology, and in particular to a motor control method, device, equipment and storage medium. Background Art

[0002] Motors are widely used in electric vehicles, more electric aircraft, unmanned flying cars, drones, and unmanned ships. Usually, during the operation of the motor, a certain degree of speed drop will occur due to sudden changes in the external environment or changes in the sudden state disturbance of the external environment. This drop sometimes causes instability and stalling of the motor. When a speed drop occurs, it is necessary to quickly compensate for the drop speed of the motor. In the related art, compensating for the drop speed of the motor by a load torque observer is an indirect compensation scheme based on a physical model. The physical model is usually a simplified model, and the parameters in the simplified model are not completely determined, resulting in insufficient accuracy of the simplified model and poor compensation effect. Therefore, how to improve the accuracy of compensation when the motor has a speed drop has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a motor control method, device, equipment and storage medium, aiming to improve the accuracy of compensation when the motor has a speed drop.

[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a motor control method, the method comprising:

[0005] Obtaining the speed error of the motor rotor at the current moment to obtain a first speed error;

[0006] Obtaining a speed compensation value of the motor rotor according to a preset speed drop diagram; wherein the speed drop diagram represents a schematic diagram of the speed change of the motor rotor over time when the speed drops;

[0007] Calculate the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value;

[0008] Acquire a current reference value at the current moment; wherein the current reference value is a current value for controlling the motor rotor speed;

[0009] If the first speed error is greater than a preset error, controlling the motor according to the current compensation value;

[0010] If the first speed error is less than or equal to the preset error, the motor is controlled according to the current reference value.

[0011] In some embodiments, the speed drop map includes a speed drop area, and obtaining the speed compensation value of the motor rotor according to the preset speed drop map includes:

[0012] Determine a drop length variable and a drop width variable according to the speed drop area;

[0013] Obtaining a speed error of the motor rotor at a next moment to obtain a second speed error; wherein the next moment is a moment next to the current moment;

[0014] A speed compensation value is calculated according to the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value.

[0015] In some embodiments, the calculating of the speed compensation value according to the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value includes:

[0016] Inputting the first speed error, the second speed error, the drop length variable, and the drop width variable into a preset speed compensation value calculation model to obtain the speed compensation value;

[0017] Wherein, the speed compensation value calculation model is:

[0018]

[0019] in, represents the speed compensation value, σ f represents the drop length variable, l represents the drop width variable, represents the first speed error, represents the second speed error, represents the intermediate parameter, e ω Indicates the speed error of the motor rotor.

[0020] In some embodiments, before inputting the first speed error, the second speed error, the drop length variable, and the drop width variable into a preset speed compensation value calculation model to obtain the speed compensation value, the method further includes:

[0021] Constructing the speed compensation value calculation model specifically includes:

[0022] Acquiring speed drop data according to the speed drop graph, and constructing an equivalent model of the speed drop graph according to the speed drop data;

[0023] converting the equivalent model into an equivalent inverse model;

[0024] The speed compensation value calculation model is constructed according to the equivalent inverse model and the preset speed error model.

[0025] In some embodiments, before calculating the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value, the method further includes:

[0026] Constructing the speed-current mapping relationship model specifically includes:

[0027] Acquire motor parameters and a second actual speed of the motor rotor at a next moment;

[0028] The speed-current mapping relationship model is constructed according to the speed compensation value, the motor parameter, the current reference value, the second actual speed and a preset speed-current relationship function; wherein the speed-current relationship function characterizes the positive correlation between the q-axis current and the motor rotor speed.

[0029] In some embodiments, the motor parameters include pole pairs, flux linkage, inertia, q-axis current at the current moment, d-axis current at the previous moment, d-axis inductance and q-axis inductance, and the speed-current mapping relationship is constructed according to the speed compensation value, the motor parameters, the current reference value and the second actual speed and a preset speed-current relationship function, including:

[0030] The speed-current mapping relationship model is constructed according to the speed compensation value, the pole pair number, the flux linkage, the inertia, the q-axis current at the current moment, the d-axis current at the previous moment, the d-axis inductance and the q-axis inductance, the current reference value, the second actual speed, and a preset speed-current relationship;

[0031] Wherein, the speed current mapping relationship model is:

[0032]

[0033] in, represents the q-axis current at the current moment, ω k+1 represents the second actual speed, p n represents the number of pole pairs, ψ f represents the magnetic linkage, J m represents the inertia, L d Indicates the d-axis inductance, L q represents the q-axis inductance, L d , I d,k-1 represents the d-axis current at the previous moment, T sIndicates the time difference between the next moment and the current moment. represents the current compensation value, represents the speed compensation value, represents the current reference value.

[0034] In some embodiments, the step of obtaining the speed error of the motor rotor at the current moment to obtain the first speed error includes:

[0035] Obtaining the position of the motor rotor at the current moment to obtain a first rotor position;

[0036] Obtaining the position of the motor rotor at the next moment to obtain a second rotor position; wherein the difference between the next moment and the current moment is the target time difference;

[0037] Calculate the rotation speed according to the first rotor position, the second rotor position and the target time difference to obtain a first actual rotation speed of the motor rotor at the current moment;

[0038] Obtaining a first reference speed at the current moment; wherein the first reference speed is the speed corresponding to the motor when the current reference value is applied to the motor;

[0039] The first speed error is obtained by calculating a difference between the first reference speed and the first actual speed.

[0040] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a motor control device, the device comprising:

[0041] A first acquisition module is used to acquire a speed error of the motor rotor at a current moment to obtain a first speed error;

[0042] A second acquisition module is used to acquire a speed compensation value according to a preset speed drop diagram; wherein the speed drop diagram represents a schematic diagram of the speed change over time when the motor rotor speed drops;

[0043] A calculation module, used to calculate the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value;

[0044] A third acquisition module is used to acquire a current reference value at a current moment; wherein the current reference value is a current value for controlling the motor rotor speed;

[0045] a first control module, wherein if the first speed error is greater than a preset error, the first control module is used to control the motor according to the current compensation value;

[0046] The second control module controls the motor according to the current reference value if the first speed error is less than or equal to the preset error.

[0047] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0048] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0049] The motor control method, device, equipment and storage medium proposed in the present application obtain the first speed error by obtaining the speed error of the motor rotor at the current moment. The speed compensation value of the motor rotor is obtained according to a preset speed drop diagram, wherein the speed drop diagram represents a schematic diagram of the speed change over time when the motor rotor speed drops. The current compensation value is calculated according to the speed compensation value and the preset speed-current mapping relationship model to obtain the current compensation value. The current reference value at the current moment is obtained, wherein the current reference value is the current value for controlling the speed of the motor rotor. If the first speed error is greater than the preset error, the motor is controlled according to the current compensation value. If the first speed error is less than or equal to the preset error, the motor is controlled according to the current reference value. The speed compensation value is calculated through the speed drop diagram, and then the corresponding current compensation value is obtained through the speed compensation value to control the motor, thereby improving the accuracy of speed compensation. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is an optional flow chart of the motor control method provided in the embodiment of the present application;

[0051] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0052] Figure 3 is a schematic diagram of a speed drop diagram provided in an embodiment of the present application;

[0053] Figure 4 is a flow chart of a motor control method provided by another embodiment of the present application;

[0054] Figure 5 is an enlarged schematic diagram of a speed drop region provided in an embodiment of the present application;

[0055] Figure 6 is a flow chart of a motor control method provided by a third embodiment of the present application;

[0056] Figure 7 yes Figure 1 Flow chart of step S101 in FIG.

[0057] Figure 8 is a schematic diagram of the structure of a motor control device provided in an embodiment of the present application;

[0058] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0062] During the operation of the motor, a certain degree of speed drop may occur due to sudden changes in the external environment or changes in the external state disturbance. This drop may sometimes cause instability and stalling of the motor. When a speed drop occurs, it is necessary to quickly compensate for the motor's drop speed. In the related art, compensating for the motor's drop speed through a load torque observer is an indirect compensation scheme based on a physical model. The physical model is usually a simplified model, and the parameters in the simplified model are not completely determined, resulting in insufficient accuracy of the simplified model and poor compensation effect.

[0063] Based on this, the embodiments of the present application provide a motor control method, device, equipment and storage medium, which are intended to analyze the speed drop shape after a sudden load is added in the motor speed control curve, design a schematic diagram of the speed change over time when the motor rotor speed drops, and obtain a speed drop diagram. From the speed drop diagram, the control quantity in the opposite direction of the speed drop is obtained to obtain the speed compensation value of the motor rotor, and then obtain the current compensation value corresponding to the speed compensation value. When the speed error of the motor rotor is greater than the preset error at the current moment, the motor is controlled according to the current compensation value, otherwise no compensation is required, and the motor is directly controlled according to the current reference value. The speed compensation value is calculated through the speed drop diagram, and then the corresponding current compensation value is obtained through the speed compensation value to control the motor, thereby improving the accuracy of speed compensation.

[0064] The motor control method, device, equipment and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the motor control method in the embodiments of the present application is described.

[0065] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0066] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0067] The motor control method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the motor control method, etc., but is not limited to the above forms.

[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0069] Please refer to Figure 1 , Figure 1 is an optional flow chart of the motor control method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0070] Step S101, obtaining a speed error of a motor rotor at a current moment to obtain a first speed error;

[0071] Step S102, obtaining a speed compensation value of the motor rotor according to a preset speed drop diagram; wherein the speed drop diagram represents a schematic diagram of the speed change of the motor rotor over time when the speed drops;

[0072] Step S103, calculating the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value;

[0073] Step S104, obtaining a current reference value at the current moment; wherein the current reference value is a current value for controlling the motor rotor speed;

[0074] Step S105, if the first speed error is greater than the preset error, the motor is controlled according to the current compensation value;

[0075] Step S106: If the first speed error is less than or equal to the preset error, the motor is controlled according to the current reference value.

[0076] In step S101 of some embodiments, the current reference value is the current value for controlling the motor rotor speed, and the motor rotor speed corresponding to the current reference value is the speed reference value. When the actual speed of the motor rotor is not equal to the speed reference value, it means that there is an error in the motor rotor speed. When the motor speed drops, the corresponding speed error is greater than the preset error, and speed compensation is required. Therefore, it is necessary to obtain the speed error of the motor rotor at the current moment, obtain the first speed error, and then determine whether speed compensation is required based on the first speed error.

[0077] See also Figure 2 In some embodiments, the speed drop graph includes a speed drop area, and step S102 may include but is not limited to steps S201 to S203:

[0078] Step S201, determining a drop length variable and a drop width variable according to a speed drop region;

[0079] Step S202, obtaining a speed error of the motor rotor at the next moment to obtain a second speed error; wherein the next moment is the next moment of the current moment;

[0080] Step S203, calculating the speed compensation value according to the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value.

[0081] In step S201 of some embodiments, Figure 3 Schematic diagram of the speed drop diagram provided in the embodiment of the present application, such as Figure 3 As shown, A represents the speed drop area, the drop length variable is the length of the speed drop area, and the drop width variable is the width of the speed drop area. The speed drop area can be determined in advance by manually adjusting parameters in the experiment.

[0082] In steps S202 to S203 of some embodiments, the speed error of the motor rotor at the next moment is obtained to obtain a second speed error, wherein the next moment is the next moment of the current moment. The speed compensation value is calculated according to the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value. That is, the first speed error, the second speed error, the drop length variable, and the drop width variable are input into a preset speed compensation value calculation model to obtain the speed compensation value. The speed compensation value calculation model is shown in the following formulas (1)-(2):

[0083]

[0084] in, Indicates the speed compensation value, σ f represents the drop length variable, l represents the drop width variable, represents the first speed error, represents the second speed error, Indicates an intermediate parameter, no specific meaning, e ω Indicates the speed error of the motor rotor.

[0085] In the steps S201 to S203 shown in the embodiment of the present application, the speed compensation value is calculated based on the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value. The speed compensation value is a control amount opposite to the speed drop area, so it can compensate for the speed drop.

[0086] In step S103 of some embodiments, the speed reference value is the theoretical motor speed of the motor rotor when the motor is controlled by the current reference value. Directly compensating the speed compensation value to the speed reference value will cause compensation delay. Therefore, it is necessary to introduce an advance element. Compared with the speed loop, the current loop has a predictive attribute, so it is necessary to calculate the current compensation value according to the speed compensation value and the preset speed-current mapping relationship model to obtain the current compensation value corresponding to the speed compensation value.

[0087] In steps S104 to S106 of some embodiments, the current reference value at the current moment is obtained. When speed compensation is required, that is, the first speed error is greater than the preset error, the motor is controlled according to the current compensation value. If speed compensation is not required, that is, the first speed error is less than or equal to the preset error, the motor is controlled according to the current reference value. The switching control strategy is shown in the following formulas (3)-(4):

[0088]

[0089] in, Indicates the current compensation value at the current moment k, I qk represents the q-axis current at the current moment k, ω k+1 represents the second actual speed of the motor rotor at the next moment k+1, Indicates the speed compensation value, represents the current reference value at the current moment k, Indicates the first speed error of the K motor rotor at the current moment, e thres Indicates the preset error. When the motor is controlled according to formula (3), When , the motor is controlled according to formula (4).

[0090] Steps S101 to S106 shown in the embodiment of the present application are to obtain a first speed error by obtaining the speed error of the motor rotor at the current moment. The speed compensation value of the motor rotor is obtained according to a preset speed drop diagram, wherein the speed drop diagram represents a schematic diagram of the speed change over time when the motor rotor speed drops. The current compensation value is calculated according to the speed compensation value and the preset speed-current mapping relationship model to obtain the current compensation value. The current reference value at the current moment is obtained, wherein the current reference value is the current value for controlling the speed of the motor rotor. If the first speed error is greater than the preset error, the motor is controlled according to the current compensation value. If the first speed error is less than or equal to the preset error, the motor is controlled according to the current reference value. The speed compensation value is calculated through the speed drop diagram, and then the corresponding current compensation value is obtained through the speed compensation value to control the motor, thereby improving the accuracy of speed compensation.

[0091] See also Figure 4 In some embodiments, before inputting the first speed error, the second speed error, the drop length variable, and the drop width variable into a preset speed compensation value calculation model to obtain the speed compensation value, the motor control method further includes constructing a speed compensation value calculation model, specifically including steps S401 to S403:

[0092] Step S401, obtaining speed drop data according to the speed drop graph, and constructing an equivalent model of the speed drop graph according to the speed drop data;

[0093] Step S402, converting the equivalent model into an equivalent inverse model;

[0094] Step S403: constructing a speed compensation value calculation model according to the equivalent inverse model and the preset speed error model.

[0095] In step S401 of some embodiments, the speed drop data includes a drop length variable and a drop width variable. Figure 5 is an enlarged schematic diagram of the speed drop area provided in the embodiment of the present application, such as Figure 5 As shown, The point where the velocity drop reaches its maximum value is recorded as t n , t n It can be regarded as the midpoint value of the negative square exponential equation. Therefore, the equivalent model of the velocity drop diagram is shown in the following formula (5):

[0096]

[0097] Among them, ω drop Indicates the speed of the motor rotor, σ f represents the drop length variable, l represents the drop width variable, σ f , t represents the time variable, tn Indicates the time point when the speed drops to the lowest point, t, In formula (5), different combinations of parameters can form different forms of speed reduction.

[0098] In step S402 of some embodiments, in order to compensate for the speed drop, an inverse formula of formula (5) is designed to convert the equivalent model into an equivalent inverse model. The equivalent inverse model is shown in the following formula (6):

[0099]

[0100] in, Indicates the speed compensation value, σ f represents the drop length variable, l represents the drop width variable, t represents the time variable, t n Indicates the time when the speed drops to the lowest point.

[0101] In step S403 of some embodiments, since the time variable t cannot be used as the input of the compensator, the time t when the speed drops to the lowest point n is a useful variable, so consider each step as t n Therefore, from the perspective of one-dimensional situation, the speed error model is shown in the following formula (7):

[0102]

[0103] in, Indicates the first speed error of the rotor of motor k at the current moment, Indicates the second speed error of the motor rotor at the next moment, △ represents the discrete differential symbol, e ω Indicates the speed error of the motor rotor, represents continuous differentiation. k is the current moment, t k+1 is the next moment, △t=t k -t k+1 , due to t n is considered equal to t k+1 , t is considered equal to t k , therefore, △t=tt n , so we get the following formula (8):

[0104]

[0105] Substituting formula (8) into formula (6), we get the following formula (9):

[0106]

[0107] The following formula (10) is obtained from formula (9):

[0108]

[0109] In formula (10), Moving to the denominator, we can obtain the following formula (11):

[0110]

[0111] when When , formula (11) can be transformed into the following formula (12):

[0112]

[0113] Formula (12) is a speed compensation value calculation model constructed based on the equivalent inverse model and the preset speed error model.

[0114] In the steps S401 to S403 shown in this embodiment, a speed compensation value calculation model is constructed to calculate the speed compensation value based on the speed compensation value calculation model to obtain the speed compensation value.

[0115] See also Figure 6 In some embodiments, before step S103, the motor control method further includes constructing a speed-current mapping relationship model, which may specifically include but is not limited to steps S601 to S602:

[0116] Step S601, obtaining motor parameters and a second actual speed of the motor rotor at the next moment;

[0117] Step S602, constructing a speed-current mapping relationship model according to the speed compensation value, motor parameters, current reference value, second actual speed and a preset speed-current relationship function; wherein the speed-current relationship function represents the positive correlation between the q-axis current and the motor rotor speed.

[0118] In step S601 of some embodiments, the motor parameters include the number of pole pairs, flux linkage, inertia, q-axis current at the current moment, d-axis current at the previous moment, d-axis inductance, and q-axis inductance. In order to incorporate formula (12) into the current, a partial derivative is defined: It can be obtained from the motor parameters.

[0119] In step S602 of some embodiments, the speed-current relationship function characterizes the positive correlation between the q-axis current and the motor rotor speed. Therefore, a speed-current mapping relationship model can be constructed based on the speed compensation value, motor parameters, current reference value, second actual speed and a preset speed-current relationship function.

[0120] Specifically, the speed current mapping relationship model is shown in the following formulas (13)-(14):

[0121]

[0122] Among them, I qk represents the q-axis current at the current moment, ω k+1 Indicates the second actual speed, p n represents the pole pair number, ψ f represents magnetic linkage, J m represents inertia, L d Indicates the d-axis inductance, L q represents the q-axis inductance, L d , I d,k-1 represents the d-axis current at the previous moment, T s Indicates the time difference between the next moment and the current moment. Indicates the current compensation value, Indicates the speed compensation value, Indicates the current reference value.

[0123] In step S601 to step S602 shown in this embodiment, a speed-current mapping relationship model is constructed to obtain a current compensation value based on the speed-current mapping relationship model and the speed compensation value.

[0124] See also Figure 7 In some embodiments, step S101 may include but is not limited to steps S701 to S705:

[0125] Step S701, obtaining the position of the motor rotor at the current moment to obtain a first rotor position;

[0126] Step S702, obtaining the position of the motor rotor at the next moment to obtain a second rotor position; wherein the difference between the next moment and the current moment is the target time difference;

[0127] Step S703, calculating the rotation speed according to the first rotor position, the second rotor position and the target time difference to obtain a first actual rotation speed of the motor rotor at the current moment;

[0128] Step S704, obtaining a first reference speed at the current moment; wherein the first reference speed is a speed corresponding to the motor when a current reference value is applied to the motor;

[0129] Step S705: Calculate the difference between the first reference speed and the first actual speed to obtain a first speed error.

[0130] In some embodiments, in step S701 to step S702, the position of the motor rotor at different times is obtained by the sensor, and the actual speed of the motor rotor can be calculated. Therefore, the position of the motor rotor at the current time is obtained to obtain the first rotor position θ k , and obtain the position of the motor rotor at the next moment, and get the second rotor position θ k+1 .

[0131] In step S703 of some embodiments, the difference between the next moment and the current moment is the target time difference T s , the speed is calculated according to the first rotor position, the second rotor position and the target time difference as shown in the following formula (15):

[0132] ω k =(θ k+1 -θ k ) / T s ,(15)

[0133] Among them, ω k represents the first actual speed, θ k represents the first rotor position, θ k+1 represents the second rotor position, T s Indicates the target time difference.

[0134] In step S704 of some embodiments, the first reference speed is the speed of the motor rotor corresponding to the current reference value controlling the motor at the current moment, that is, the speed of the motor corresponding to the current reference value applied to the motor. The speed of the motor rotor at the current moment should theoretically be the first reference speed, and the actual speed of the motor rotor at the current moment is the first actual speed. When there is a speed drop, the first reference speed and the first actual speed are not equal.

[0135] In step S705 of some embodiments, the first speed error is the difference between the first reference speed and the first actual speed. The second speed error can also be calculated in the above manner, and the specific calculation process is not repeated here.

[0136] In steps S701 to S705 shown in this embodiment, the actual speed of the motor rotor is obtained through the position of the motor rotor at different times, so as to obtain the speed error based on the actual speed of the motor rotor.

[0137] See also Figure 8 The present application also provides a motor control device that can implement the above motor control method. The device includes:

[0138] The first acquisition module 801 is used to acquire the speed error of the motor rotor at the current moment to obtain a first speed error;

[0139] The second acquisition module 802 is used to acquire the speed compensation value according to a preset speed drop diagram; wherein the speed drop diagram represents a schematic diagram of the speed change over time when the motor rotor speed drops;

[0140] A calculation module 803 is used to calculate the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value;

[0141] The third acquisition module 804 is used to acquire the current reference value at the current moment; wherein the current reference value is the current value for controlling the motor rotor speed;

[0142] The first control module 805 is used to control the motor according to the current compensation value if the first speed error is greater than the preset error;

[0143] The second control module 806 controls the motor according to the current reference value if the first speed error is less than or equal to the preset error.

[0144] The specific implementation of the motor control device is basically the same as the specific implementation of the above motor control method, and will not be repeated here.

[0145] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above motor control method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0146] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0147] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0148] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the motor control method of the embodiment of this application;

[0149] Input / output interface 903, used to implement information input and output;

[0150] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0151] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0152] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0153] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned motor control method is implemented.

[0154] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0155] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0156] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0157] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0159] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0160] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0161] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0162] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0163] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0164] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0165] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A motor control method, characterized in that: The method comprises: Obtaining the speed error of the motor rotor at the current moment to obtain a first speed error; Obtaining a speed compensation value of the motor rotor according to a preset speed drop diagram; wherein the speed drop diagram represents a schematic diagram of the speed change of the motor rotor over time when the speed drops; Calculate the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value; Acquire a current reference value at the current moment; wherein the current reference value is a current value for controlling the motor rotor speed; If the first speed error is greater than a preset error, controlling the motor according to the current compensation value; If the first speed error is less than or equal to the preset error, the motor is controlled according to the current reference value.

2. The method according to claim 1, characterized in that: The speed drop diagram includes a speed drop area, and obtaining the speed compensation value of the motor rotor according to the preset speed drop diagram includes: Determine a drop length variable and a drop width variable according to the speed drop area; Obtaining a speed error of the motor rotor at a next moment to obtain a second speed error; wherein the next moment is a moment next to the current moment; A speed compensation value is calculated according to the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value.

3. The method according to claim 2, characterized in that The calculating of the speed compensation value according to the first speed error, the second speed error, the drop length variable, and the drop width variable to obtain the speed compensation value includes: Inputting the first speed error, the second speed error, the drop length variable, and the drop width variable into a preset speed compensation value calculation model to obtain the speed compensation value; Wherein, the speed compensation value calculation model is: in, represents the speed compensation value, σ f represents the drop length variable, l represents the drop width variable, represents the first speed error, represents the second speed error, represents the intermediate parameter, e ω Indicates the speed error of the motor rotor.

4. The method according to claim 3, characterized in that: Before inputting the first speed error, the second speed error, the drop length variable, and the drop width variable into a preset speed compensation value calculation model to obtain the speed compensation value, the method further includes: Constructing the speed compensation value calculation model specifically includes: Acquiring speed drop data according to the speed drop graph, and constructing an equivalent model of the speed drop graph according to the speed drop data; converting the equivalent model into an equivalent inverse model; The speed compensation value calculation model is constructed according to the equivalent inverse model and the preset speed error model.

5. The method according to claim 1, characterized in that Before calculating the current compensation value according to the speed compensation value and the preset speed-current mapping relationship model to obtain the current compensation value, the method further includes: Constructing the speed-current mapping relationship model specifically includes: Acquire motor parameters and a second actual speed of the motor rotor at a next moment; The speed-current mapping relationship model is constructed according to the speed compensation value, the motor parameter, the current reference value, the second actual speed and a preset speed-current relationship function; wherein the speed-current relationship function characterizes the positive correlation between the q-axis current and the motor rotor speed.

6. The method according to claim 5, characterized in that The motor parameters include pole pairs, flux linkage, inertia, q-axis current at the current moment, d-axis current at the previous moment, d-axis inductance and q-axis inductance, and the speed-current mapping relationship is constructed according to the speed compensation value, the motor parameters, the current reference value, the second actual speed and a preset speed-current relationship function, including: The speed-current mapping relationship model is constructed according to the speed compensation value, the pole pair number, the flux linkage, the inertia, the q-axis current at the current moment, the d-axis current at the previous moment, the d-axis inductance and the q-axis inductance, the current reference value, the second actual speed, and a preset speed-current relationship; Wherein, the speed current mapping relationship model is: Among them, I qk represents the q-axis current at the current moment, ω k+1 represents the second actual speed, p n represents the number of pole pairs, ψ f represents the magnetic linkage, J m represents the inertia, L d Indicates the d-axis inductance, L q represents the q-axis inductance, L d , I d,k-1 represents the d-axis current at the previous moment, T s Indicates the time difference between the next moment and the current moment. represents the current compensation value, Indicates the speed compensation value, I qref,k represents the current reference value.

7. The method according to claim 1, characterized in that The step of obtaining the speed error of the motor rotor at the current moment to obtain a first speed error includes: Obtaining the position of the motor rotor at the current moment to obtain a first rotor position; Obtaining the position of the motor rotor at the next moment to obtain a second rotor position; wherein the difference between the next moment and the current moment is the target time difference; Calculate the rotation speed according to the first rotor position, the second rotor position and the target time difference to obtain a first actual rotation speed of the motor rotor at the current moment; Obtaining a first reference speed at the current moment; wherein the first reference speed is the speed corresponding to the motor when the current reference value is applied to the motor; The first speed error is obtained by calculating a difference between the first reference speed and the first actual speed.

8. A motor control device, characterized in that: The device comprises: A first acquisition module is used to acquire a speed error of the motor rotor at a current moment to obtain a first speed error; A second acquisition module is used to acquire a speed compensation value according to a preset speed drop diagram; wherein the speed drop diagram represents a schematic diagram of the speed change over time when the motor rotor speed drops; A calculation module, used to calculate the current compensation value according to the speed compensation value and a preset speed-current mapping relationship model to obtain the current compensation value; A third acquisition module is used to acquire a current reference value at a current moment; wherein the current reference value is a current value for controlling the motor rotor speed; a first control module, wherein if the first speed error is greater than a preset error, the first control module is used to control the motor according to the current compensation value; The second control module controls the motor according to the current reference value if the first speed error is less than or equal to the preset error.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the motor control method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the motor control method according to any one of claims 1 to 7 is implemented.