Motor control method and device

By optimizing the motor speed gradient through fuzzy control method, the problem of sudden acceleration change in motor control is solved and smooth adjustment of motor speed is achieved.

CN118413151BActive Publication Date: 2025-10-17BYD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410385217.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-10-17
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

In existing motor control methods, overshoot often occurs when the motor reaches the target speed, resulting in a sudden change in acceleration.

Method used

Through the fuzzy control method, the speed change gradient corresponding to the motor control instruction is determined, and the speed change is optimized using fuzzy quantity and membership function, and the motor speed is gradually adjusted to reduce acceleration mutations.

Benefits of technology

It effectively improves the overshoot phenomenon of motor control, realizes the smooth start and maintenance of motor speed, and reduces acceleration mutation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118413151B_ABST
    Figure CN118413151B_ABST
Patent Text Reader

Abstract

The application provides a motor control method and device, the method comprises the following steps: fuzzy control is carried out based on control parameters; a fuzzy corresponding rule between the control parameters and the speed change gradient in a speed change curve is established, so that the speed change gradient corresponding to different control parameters is optimized, and finally the control process is optimized, and the situation of acceleration mutation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of motor control, and particularly relates to a motor control method and device. BACKGROUND

[0002] At present, when a motor is controlled, direct control is mostly used, that is, a target rotating speed of the motor is given, and the motor is accelerated to the target rotating speed under the action of a magnetic field; in this way, the motor will still maintain a large acceleration when the motor is about to reach the target rotating speed, and thus an overshoot phenomenon will occur when the motor reaches the target rotating speed. SUMMARY

[0003] The application provides a motor control method and device, so as to improve the overshoot phenomenon of motor control.

[0004] In a first aspect, the application provides a motor control method, comprising:

[0005] obtaining a control parameter corresponding to a motor control instruction;

[0006] determining a fuzzy quantity of a rotating speed change gradient according to the control parameter, the rotating speed change gradient being used to indicate a change condition of a motor rotating speed corresponding to the control parameter, and the fuzzy quantity being a fuzzy parameter of a fuzzy set of a universe of discourse division of the rotating speed change gradient under a fuzzy control model;

[0007] processing the fuzzy quantity to obtain the rotating speed change gradient;

[0008] adjusting the rotating speed of the motor according to the rotating speed change gradient.

[0009] In a second aspect, the application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, and the program comprising instructions for executing the steps of the first aspect to the application.

[0010] In a third aspect, the application provides a motor control device, comprising a motor and a control module, and the control module controls the motor by executing the instructions of the steps in the method of the first aspect.

[0011] In a fourth aspect, the application provides a computer readable storage medium, which stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps described in the first aspect of the application.

[0012] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of the method described in the first aspect of the embodiments of the present application. The computer program product can be a software installation package.

[0013] It can be seen that, in the present application, fuzzy control is performed based on the control parameter, fuzzy corresponding rules between the control parameter and the speed change gradient in the speed change curve are established, the speed change gradient corresponding to different control parameters is selected, and finally the control process is optimized, the situation of sudden change of acceleration is improved, and the overshoot phenomenon of motor control is improved. BRIEF DESCRIPTION OF DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0015] Figure 1 is a structural schematic diagram of a motor control device provided by an embodiment of the present application;

[0016] Figure 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0017] Figure 3 is a flowchart of a motor control method provided by an embodiment of the present application;

[0018] Figure 4 is a schematic diagram of membership functions of three difference types provided by an embodiment of the present application;

[0019] Figure 5 is a schematic diagram of membership functions of control time provided by an embodiment of the present application;

[0020] Figure 6 is a schematic diagram of membership functions of change gradient provided by an embodiment of the present application;

[0021] Figure 7 is a schematic diagram of a target function determination process provided by an embodiment of the present application;

[0022] Figure 8 is a schematic diagram of a fuzzy quantity provided by an embodiment of the present application;

[0023] Figure 9 is a comparison diagram before and after speed adjustment provided by an embodiment of the present application;

[0024] Figure 10 It is a structural diagram of another motor control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, system, product, or apparatus.

[0027] 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.

[0028] The following is an introduction to the relevant terms involved in this application.

[0029] Fuzzy control: A control method that utilizes the fundamental concepts and theories of fuzzy mathematics. In traditional control, the accuracy of a control system's dynamic model is the most crucial factor affecting control quality. The more detailed the system's dynamic information, the more precise the control. However, for complex systems, due to the large number of variables, it is often difficult to accurately describe the system's dynamics. Therefore, engineers use various methods to simplify the system's dynamics to achieve control goals, but these methods are not always ideal. In other words, traditional control theory has strong control capabilities for well-defined systems, but it is powerless for systems that are too complex or difficult to accurately describe. Therefore, attempts have been made to address these control problems using fuzzy mathematics. "Fuzziness" is a key characteristic of human perception, knowledge acquisition, reasoning, and decision-making. Compared to "clarity," "fuzziness" possesses greater information capacity, richer connotations, and is more consistent with the objective world.

[0030] Currently, direct control is mostly used when controlling motors. That is, the motor is given a target speed, and the motor is quickly accelerated to the target speed under the action of the magnetic field. This will cause the motor to maintain a large acceleration when it is about to reach the target speed, so there will be more or less overshoot when the motor reaches the target speed.

[0031] To solve the above problems, an embodiment of the present application provides a motor control method. The motor control method can be applied to motor control scenarios. The second speed and control time corresponding to the motor control instruction can be determined; then the speed change gradient of the motor can be determined based on the first speed, the second speed and the control time; finally, the first speed of the motor is adjusted to the second speed based on the speed change gradient. In this way, by gradually adjusting the speed according to the change gradient, the degree of acceleration mutation during the speed regulation process can be reduced, thereby improving the overshoot phenomenon of motor control. This solution can be applied to a variety of scenarios, including but not limited to the application scenarios mentioned above.

[0032] The following introduces the system architecture involved in the embodiments of this application.

[0033] This application provides a motor control device 100, such as Figure 1 As shown, the control module 110 includes a control module 110 and a motor 120, and the control module 110 is connected to the motor 120. The control module 110 includes a fuzzy controller 111 and a control unit 112. After determining the second speed and control time corresponding to the motor control instruction, the fuzzy controller 111 determines the speed change gradient of the motor 120 according to the first speed, the second speed and the control time. Finally, the control unit 112 adjusts the first speed of the motor 120 to the second speed according to the speed change gradient.

[0034] The present application also provides an electronic device 10, such as Figure 2As shown, it comprises at least one processor 11, a display screen 12, and a memory 13, and can further comprise a communications interface 15 and a bus 14. The processor 11, the display screen 12, the memory 13 and the communications interface 15 can communicate with each other through the bus 14. The display screen 12 is configured to display a preset user guide interface in the initial setting mode. The communications interface 15 can transmit information. The processor 11 can call the logical instructions in the memory 13 to execute the method in the above embodiments.

[0035] Optionally, the electronic device 10 can be a mobile electronic device, or an electronic device or other device, which is not limited herein.

[0036] In addition, when the logical instructions in the memory 13 described above are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer readable storage medium.

[0037] The memory 13, as a computer readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the method in the embodiments of the present disclosure. The processor 11 executes the functions and data processing by running the software programs, instructions or modules stored in the memory 13, that is, implements the method in the above embodiments.

[0038] The memory 13 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the electronic device 10, etc. In addition, the memory 13 can include a high-speed random access memory, and can further include a non-volatile memory. For example, a variety of media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., can also be a transitory storage medium.

[0039] The specific method will be described in detail below.

[0040] Please refer to Figure 3 The present application also provides a motor control method applied to the control module, and the motor control method comprises the following steps:

[0041] Step S201, obtaining a control parameter corresponding to a motor control instruction.

[0042] In a specific implementation, the motor control instruction is input by a user or automatically generated by a control program. In this embodiment, the motor control instruction is obtained and corresponding control parameters are parsed to perform subsequent motor control steps based on the control parameters.

[0043] In step S202, a fuzzy amount of the rotational speed change gradient is determined according to the control parameters.

[0044] The rotational speed change gradient is used to indicate the change condition of the rotational speed corresponding to the control parameters.

[0045] In one possible embodiment, the control parameters include a target difference value and a control time. The target difference value is the difference between a second rotational speed and a first rotational speed. The first rotational speed refers to the initial rotational speed of the motor before the control instruction is executed. The second rotational speed refers to the rotational speed that the motor needs to reach. The control time refers to the time required to adjust the first rotational speed to the second rotational speed. Specifically, the fuzzy amount of the rotational speed change gradient is determined according to the control time and the target difference value.

[0046] The fuzzy control is performed based on the target rotational speed and the control time to establish a fuzzy corresponding rule between the control time, the target rotational speed, and the speed change gradient in the speed change curve. Thus, the speed change gradient corresponding to different control times and target rotational speeds is optimized, and the control process is finally optimized, and the acceleration mutation condition is improved.

[0047] In a specific implementation, the setting of the second rotational speed needs to comply with the rotational speed characteristics of the motor. The control time can be obtained by inputting the motor control instruction by a user or can be preset. In this embodiment, the second rotational speed and the control time are input to the fuzzy controller, and the second rotational speed and the control time are fuzzified by the fuzzy controller to establish a functional mapping relationship between the control time, the second rotational speed, and the rotational speed change gradient. Specifically, the difference between the second rotational speed and the first rotational speed is determined, that is, the speed required to increase from the current rotational speed of the motor to the target rotational speed is determined. It can be understood that the difference can be positive or negative. In this embodiment, threshold ranges of the first rotational speed, the second rotational speed, the difference, and the control time are preset, where the second rotational speed (V_target) ∈ [-V_max, V_max ], the first rotational speed (V_start) ∈ [-V_max, V_max ], and the control time (Control_time) ∈ (0, T_max ]. The difference between the second rotational speed (V_target) and the first rotational speed (V_start) is calculated to be ∈ [-2V_max, 2V_max ].

[0048] In this embodiment, the difference value type set corresponding to the difference value and the control time type set corresponding to the control time are established according to the threshold range, each difference value type set is divided into a plurality of sub-threshold ranges according to the threshold range, each sub-threshold range corresponds to a difference value type, that is, the difference value type set includes a plurality of difference value types. Similarly, the plurality of control time types in the control time type set are determined according to the threshold range of the control time. In addition, the threshold range of the speed change gradient is preset, and the plurality of change gradient types in the change gradient type set corresponding to the speed change gradient are determined based on the threshold range. Each difference value type, each control time type, and each change gradient type are obtained by a corresponding membership function. The membership function can adjust different membership function forms (such as bell-shaped, trapezoidal, Gaussian, etc.) according to the application environment and emphasis tendency of the motor.

[0049] Specifically, after determining the target difference value of the second speed and the first speed, the actual values of the second speed and the target difference value are obtained, and the actual values need to be fuzzified, and then the fuzzy amount of the speed change gradient is determined according to the parameters after the fuzzification, and finally the fuzzy amount is de-fuzzified to obtain the speed change gradient.

[0050] It can be seen that in this embodiment, the speed change gradient in the control process is calculated according to the given speed and control time by means of fuzzy control, without knowing the mathematical model of the controlled object, and the robustness of the system is improved.

[0051] In one possible embodiment, the fuzzy amount of the speed change gradient is determined according to the control time and the target difference value, including: determining at least one target difference value type and at least one first weight corresponding to the target difference value; determining at least one target control time type and at least one second weight corresponding to the control time; determining at least one target change gradient type of the speed change gradient according to the at least one target difference value type and the at least one target control time type; determining the fuzzy amount of the speed change gradient according to the at least one first weight, the at least one second weight, and the at least one target change gradient type.

[0052] In a specific implementation, it is assumed that the difference value type set includes three difference value types, the control time type set includes three control time types, and the change gradient type set includes five change gradient types. This embodiment is described by taking this as an example.

[0053] The three difference value types are respectively small speed difference value, medium speed difference value and large speed difference value, the three control time types are respectively short control time, medium control time and long control time, and the five change gradient types are respectively very small change gradient, small change gradient, medium change gradient, large change gradient and very large change gradient. The correspondence among the three difference value types, the three control times and the five change gradient types is stored in the form of a table in the pre-set simulation control rule library, that is, the control rule table shown in Table 1.

[0054] Table 1: Fuzzy control rule table

[0055]

[0056] In actual application, one difference value type and one control time constitute a query parameter pair to determine one change gradient type. Taking the above three difference value types and three control times as examples, nine query parameter pairs can be obtained, which are: (1) small speed difference value-short control time; (2) small speed difference value-medium control time; (3) small speed difference value-long control time; (4) medium speed difference value-short control time; (5) medium speed difference value-medium control time; (6) medium speed difference value-long control time; (7) large speed difference value-short control time; (8) large speed difference value-medium control time; (9) large speed difference value-long control time.

[0057] Among them, the change gradient type determined according to the query parameter pair (1) is very small change gradient ①, the change gradient type determined according to the query parameter pair (2) is very small change gradient ②, the change gradient type determined according to the query parameter pair (3) is medium change gradient ③, the change gradient type determined according to the query parameter pair (4) is medium change gradient ④, the change gradient type determined according to the query parameter pair (5) is medium change gradient ⑤, the change gradient type determined according to the query parameter pair (6) is large change gradient ⑥, the change gradient type determined according to the query parameter pair (7) is large change gradient ⑦, the change gradient type determined according to the query parameter pair (8) is large change gradient ⑧, and the change gradient type determined according to the query parameter pair (9) is very large change gradient ⑨.

[0058] Specifically, determining at least one target difference value type corresponding to the target difference value and at least one first weight comprises: determining at least one target difference value type of the target difference value from the difference value type set; and determining the weight corresponding to the target difference value in each target difference value type to obtain at least one first weight, wherein the at least one first weight corresponds to the at least one target difference value type in a one-to-one manner.

[0059] In a specific implementation, taking a triangular membership function as an example, a membership function of the three difference value types is generated as shown in Table 2 based on the above-mentioned membership functions of the three difference value types. Figure 4The schematic diagram shown in FIG. 1 includes three graphs, each corresponding to a membership function of three difference types, namely, a small speed difference, a medium speed difference, and a large speed difference. The ratio of the speed difference to the threshold range of the speed difference is used as the independent variable of the corresponding membership function, and the weight is used as the dependent variable of the corresponding membership function. In this embodiment, the ratio of the target difference to the threshold range of the speed difference is first determined, and the three weights corresponding to the ratio are determined based on the ratio and the membership functions of the three difference types, and then the weight of 0 is removed from the three weights. Figure 4 As shown, taking the target difference ratio of 70% as an example, when the target difference ratio is 70%, the three weights obtained according to the three membership functions of small speed difference, medium speed difference and large speed difference are [0, 0.6, 0.4] respectively. After removing the weight 0 corresponding to the small speed difference, it can be determined that the first weight of the target difference in the membership function of the medium speed difference is 0.6, and the first weight of the target difference in the first membership function of the large speed difference is 0.4.

[0060] It can be seen that the difference type and the first weight corresponding to the target difference can be determined based on the membership function, which provides support for the subsequent determination of the speed change gradient and improves the reliability of the system.

[0061] Furthermore, determining at least one target control time type and at least one second weight corresponding to the control time includes: determining at least one target control time type corresponding to the control time from a set of control time types; determining the weight corresponding to the control time in each target control time type, and obtaining at least one second weight, wherein the at least one second weight corresponds one-to-one to the at least one target control time type.

[0062] In the specific implementation, taking the triangle membership function as an example, the membership functions of the three control time types mentioned above are generated as follows: Figure 5 The schematic diagram shown in FIG. 1 includes three graphs, each corresponding to the membership functions of three control time types, namely, short control time, medium control time, and long control time. The proportion of the control time to the threshold range of the control time is used as the independent variable of the corresponding membership function, and the weight is used as the dependent variable of the corresponding membership function. In this embodiment, the proportion of the control time to the threshold range of the control time is first determined, and the three weights corresponding to the proportion are determined based on the proportion and the membership functions of the three control time types, and then the weight of 0 is removed from the three weights. Figure 5As shown, taking the control time ratio of 60% as an example, when the control time ratio is 60%, the three weights obtained according to the three membership functions of the short control time, the medium control time and the long control time are [0, 0.8, 0.2] respectively, the weight corresponding to the short control time is removed, the second weight of the short control time in the second membership function of the medium control time is 0.8, and the second weight of the short control time in the second membership function of the long control time is 0.2.

[0063] It can be seen that the control time type and the second weight corresponding to the control time can be determined based on the membership function, which supports the subsequent determination of the speed change gradient, and improves the reliability of the system.

[0064] Further, according to the at least one target difference type and the at least one target control time type, at least one target change gradient type of the speed change gradient is determined, including: combining the at least one target difference type and the at least one target control time type to obtain at least one query parameter pair; determining at least one target change gradient type according to the target control time type and the target difference type in each of the query parameter pairs in the fuzzy control rule base, the at least one query parameter pair corresponds to the at least one target change gradient type one by one, and the fuzzy control rule base includes the corresponding relationship between the control time type, the difference type and the change gradient type.

[0065] In a specific implementation, taking a triangular membership function as an example, a membership function diagram as shown in Figure 6 is generated based on the above five change gradient types. The value of the speed change gradient is taken as the independent variable, and the weight is taken as the dependent variable. Based on the above Figure 4 and Figure 5 two embodiments, four parameters of the medium speed difference, the large speed difference, the medium control time and the long control time have been obtained, and the query parameter pairs that can be composed of the four parameters are: (5) medium speed difference-medium control time; (6) medium speed difference-long control time; (8) large speed difference-medium control time; (9) large speed difference-long control time.

[0066] According to the query parameter pairs (5), (6), (8) and (9), the control rule base can be queried to obtain four target change gradient types of the medium change gradient ⑤, the large change gradient ⑥, the large change gradient ⑧ and the very large change gradient ⑨.

[0067] Specifically, the at least one first weight, the at least one second weight and the at least one target change gradient type determine the fuzzy quantity of the change gradient of the rotating speed, including: determining a membership function corresponding to each target change gradient type to obtain at least one third membership function corresponding to the at least one target change gradient type; processing each third membership function according to a first weight and a second weight corresponding to the third membership function to obtain at least one target function; the first weight and the second weight corresponding to the third membership function are respectively a first weight and a second weight corresponding to a target difference type and a target control time type in a query parameter pair corresponding to the target change gradient type corresponding to the third membership function; and obtaining the fuzzy quantity according to the at least one target function.

[0068] In a specific implementation, taking the above embodiment as an example, after determining the four target change gradient types, a membership function corresponding to each target change gradient type is determined to obtain four third membership functions. Taking the rotating speed difference and the control time as an example, a first weight of 0.6 and a second weight of 0.8 can be obtained, and the corresponding target change gradient type is change gradient medium ⑤. Based on the first weight, the second weight and the third membership function corresponding to the change gradient medium ⑤, a schematic diagram as shown in A1 of FIG. 10 is generated, the minimum value of the first weight and the second weight is determined to be 0.6, and the third membership function corresponding to the change gradient medium ⑤ is processed by taking the smaller value based on 0.6 to obtain a corresponding target function, and a schematic diagram of the target function is as shown in A2 of FIG. 10. Similarly, the target functions corresponding to change gradient large ⑥, change gradient large ⑧ and change gradient very large ⑨ are respectively determined in the same way, and finally four target functions are obtained. The four target functions are combined to obtain a fuzzy quantity as shown in the graph in the schematic diagram of FIG. 10. Figure 7 Figure 7 Figure 8

[0069] It can be seen that in the embodiment, the fuzzy quantity of the change gradient of the rotating speed is determined by the control time and the target difference, which improves the support for subsequent determination of the change gradient of the rotating speed and improves the reliability of the system.

[0070] In step S203, the fuzzy quantity is processed to obtain the change gradient of the rotating speed.

[0071] In a specific implementation, after obtaining the fuzzy quantity of the change gradient of the rotating speed, the fuzzy quantity is processed to obtain the corresponding change gradient of the rotating speed. Specifically, there are many ways of processing, including area center method, area division method, maximum membership degree method (maximum value, minimum value, average value method, etc.), gravity center method, etc. Taking the area division method as an example, the fuzzy quantity is processed to obtain the change gradient of the rotating speed. Figure 8 ​​​The area of the middle graph is determined, a straight line perpendicular to the horizontal axis (change gradient) is determined so that the areas on both sides of the straight line are equal, and the intersection point of the straight line and the horizontal axis corresponds to the actual value of the change gradient of the rotating speed.

[0072] In step S204, the rotating speed of the motor is adjusted according to the change gradient of the rotating speed.

[0073] In one possible embodiment, the control parameter includes a target difference value, the target difference value being a difference value between a second rotating speed and a first rotating speed, the first rotating speed being an initial rotating speed before the motor executes the control instruction, and the second rotating speed being a rotating speed required to be reached by the motor; and adjusting the rotating speed of the motor according to the change gradient of the rotating speed includes: adjusting the first rotating speed according to the change gradient of the rotating speed to obtain an adjusted rotating speed; and when the adjusted rotating speed is less than the second rotating speed, continuing to adjust the adjusted rotating speed according to the change gradient of the rotating speed until the adjusted rotating speed reaches the second rotating speed.

[0074] Specifically, adjusting the first rotating speed according to the change gradient of the rotating speed to obtain an adjusted rotating speed includes: determining a current first execution step number; calculating a first speed adjustment amount corresponding to the first execution step number according to the change gradient of the rotating speed; and increasing the first rotating speed by the speed adjustment amount to obtain the adjusted rotating speed. Further, when the adjusted rotating speed is less than the first rotating speed, continuing to adjust the adjusted rotating speed according to the change gradient of the rotating speed until the adjusted rotating speed reaches the second rotating speed includes: when the adjusted rotating speed is less than the first rotating speed, setting the first execution step number = the first execution step number + 1; and continuing the steps in the above method until the adjusted rotating speed reaches the second rotating speed.

[0075] In a specific implementation, the adjusted rotating speed can be calculated according to formula 1, and formula 1 is as follows:

[0076] ;

[0077] wherein V is the adjusted rotating speed, V_start is the first rotating speed, V_target is the second rotating speed, a is the change gradient of the rotating speed, and T is a discrete time corresponding to a control time (Control_time), The corresponding relationship between T and / is 0≤i≤n, i and n are positive integers. Step_Length is the calculation step length of the algorithm in the computer after discretization, n is the execution step number after discretization, and Control_time is the control time. T is the total duration when the i th step is executed. That is T changes linearly with the execution step number, and T is a preset value.

[0078] Specifically, after determining the speed change gradient, the first speed, the second speed, and the speed change gradient are substituted into Formula 1, and the motor speed is gradually adjusted from the first speed to the second speed according to the number of execution steps. For example, when executing the first step, the motor speed is adjusted from the first speed to the first target sub-speed corresponding to the first step; at this time, the first target sub-speed is compared with the target speed. If the first target sub-speed is less than the target speed, V_start is set equal to the first target sub-speed. The first target sub-speed and the target speed are substituted into Formula 1 to continue executing the second step, adjusting the motor speed from the first target sub-speed to the second target sub-speed... Then, the second target sub-speed is compared with the target speed. If the second target sub-speed is less than the target speed, V_start is continued to be set equal to the second target sub-speed. The above operation is repeated until the adjusted i-th target sub-speed is equal to the target speed, completing the speed adjustment operation. It can be understood that when a motor control instruction is received once, the speed change rate a remains unchanged during the process of adjusting the first speed to the target speed; if a motor control instruction is received again, the speed change rate is recalculated.

[0079] like Figure 9 As shown, Figure 9 B1 is the control curve of the motor target speed control command before adjustment by the method of this application. Figure 9 B2 in the figure represents the curve of the actual motor speed after adjustment using the method of the present application. The adjusted curve is smooth, reducing the degree of acceleration jitter. It can be seen that the speed command output by the present invention can achieve smooth startup and smooth maintenance when the motor starts and approaches the target speed, eliminating the acceleration jitter caused by the motor speed change. Furthermore, when the speed command interval is less than the control time (Control_time), the output speed command can also achieve a smooth transition without speed jitter.

[0080] It can be seen that in this embodiment, the motor speed is adjusted step by step from the first speed to the second speed through uninterrupted cyclic control. This adjustment method ensures that the acceleration of the motor will not be too large when it is about to reach the second speed, effectively improving the overshoot phenomenon of the motor speed and improving the motor control effect.

[0081] The above describes the scheme of the embodiments of the present application mainly from the perspective of executing the process. It can be understood that the mobile electronic device includes hardware structures and / or software modules corresponding to the execution of each function in order to implement the above functions. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in the form of hardware or computer software driven hardware depends on the specific application of the technical solution and the design constraint conditions. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0082] The embodiments of the present application can divide the functional units of the electronic device according to the above method examples. For example, each functional unit can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical functional division. Actual implementation can have another division manner.

[0083] Please refer to Figure 10 The present application also provides a motor control device 1000, comprising:

[0084] The acquisition unit 1100 is configured to acquire a control parameter corresponding to a motor control instruction.

[0085] The determination unit 1200 is configured to determine a fuzzy quantity of a rotation speed change gradient according to the control parameter, the rotation speed change gradient being used to indicate a change condition of a motor rotation speed corresponding to the control parameter, and the fuzzy quantity being a fuzzy parameter of a fuzzy set of a universe of discourse division of the rotation speed change gradient under a fuzzy control model.

[0086] The processing unit 1300 is configured to process the fuzzy quantity to obtain the rotation speed change gradient.

[0087] The adjustment unit 1400 is configured to adjust the rotation speed of the motor according to the rotation speed change gradient.

[0088] It can be seen that, in the present application, the fuzzy control is performed based on the control parameter, the fuzzy corresponding rule between the control parameter and the speed change gradient in the speed change curve is established, the speed change gradient corresponding to different control parameters is optimized, and finally the control process is optimized, the acceleration mutation condition is improved, and the overshoot phenomenon of motor control is improved.

[0089] In a possible embodiment, the control parameter comprises a target difference value and a control time, the target difference value being a difference between a second rotating speed and a first rotating speed, the first rotating speed being an initial rotating speed before the motor executes the control instruction, the second rotating speed being a rotating speed required to be reached by the motor, and the control time being a time required for adjusting from the first rotating speed to the second rotating speed; and the determining, according to the control parameter, of the fuzzy quantity of the rotating speed change gradient comprises: determining, according to the control time and the target difference value, of the fuzzy quantity of the rotating speed change gradient.

[0090] In a possible embodiment, according to the aspect of determining the fuzzy quantity of the rotating speed change gradient according to the second rotating speed and the target difference value, the determining unit 1200 is specifically configured to: determine at least one target difference value type and at least one first weight corresponding to the target difference value; determine at least one target control time type and at least one second weight corresponding to the control time; determine at least one target change gradient type of the rotating speed change gradient according to the at least one target difference value type and the at least one target control time type; and the at least one first weight, the at least one second weight, and the at least one target change gradient type determine the fuzzy quantity of the rotating speed change gradient.

[0091] In a possible embodiment, according to the aspect of determining the at least one target difference value type and the at least one first weight corresponding to the target difference value, the determining unit 1200 is specifically configured to: determine at least one target difference value type of the target difference value from a difference value type set; and determine a weight corresponding to the target difference value in a first membership function of each target difference value type, to obtain at least one first weight, the at least one first weight corresponding to the at least one target difference value type in a one-to-one manner.

[0092] In a possible embodiment, according to the aspect of determining the at least one target control time type and the at least one second weight corresponding to the control time, the determining unit 1200 is specifically configured to: determine at least one target control time type corresponding to the control time from a control time type set; and determine a weight corresponding to the control time in a second membership function of each target control time type, to obtain at least one second weight, the at least one second weight corresponding to the at least one target control time type in a one-to-one manner.

[0093] In a possible embodiment, the determining unit 1200 is specifically configured to: combine the at least one target difference type and the at least one target control time type in pairs to obtain at least one query parameter pair; query a fuzzy control rule base according to the target control time type and the target difference type in each of the query parameter pairs to obtain at least one target change gradient type, the at least one query parameter pair corresponding to the at least one target change gradient type in a one-to-one manner, and the fuzzy control rule base including a corresponding relationship between a control time type, a difference type, and a change gradient type.

[0094] In a possible embodiment, the determining unit 1200 is specifically configured to: determine a membership function corresponding to each target change gradient type to obtain at least one third membership function corresponding to the at least one target change gradient type; process each third membership function according to a minimum value of a first weight and a second weight corresponding to the third membership function to obtain at least one target function, the first weight and the second weight corresponding to each third membership function being a first weight and a second weight corresponding to a target difference type and a target control time type in a query parameter pair corresponding to a target change gradient type corresponding to the third membership function; and perform merging processing on the at least one target function to obtain the fuzzy amount.

[0095] In a possible embodiment, the control parameter includes a target difference, the target difference being a difference between a second speed and a first speed, the first speed being an initial speed of the motor before the motor executes the control instruction, and the second speed being a speed that the motor needs to reach; and the adjusting unit 1400 is specifically configured to: adjust the first speed based on the change gradient of the speed to obtain an adjusted speed; and continue to adjust the adjusted speed based on the change gradient of the speed until the adjusted speed reaches the second speed, when the adjusted speed is less than the second speed.

[0096] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired or wireless manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, or the like, which includes one or more available medium collections. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.

[0097] The embodiments of the present application also provide a computer storage medium, which stores a computer program for electronic data exchange, and the computer program causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer includes an electronic device.

[0098] The embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product can be a software installation package, and the computer includes an electronic device.

[0099] It should be understood that, in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0100] In several embodiments provided in the present application, it should be understood that the disclosed method, device and system can be implemented in other manners. For example, the described device embodiments are merely illustrative; for example, the division of the units is merely logical function division; and there can be another division manner in actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0101] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.

[0102] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can be a separate physical unit, or two or more units can be integrated in a unit. The integrated unit can be implemented in the form of hardware, or in the form of hardware plus software function units.

[0103] The integrated unit in the form of software function unit can be stored in a computer readable storage medium. The software function unit is stored in a storage medium, including a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute part of steps of the method according to various embodiments of the present application. The storage medium includes a U disk, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) can be used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM) and direct rambus random access memory (DR RAM). Various media that can store program codes.

[0104] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can easily conceive variations or substitutions without departing from the spirit and scope of the present application, and can make various changes and modifications, including combinations of different functions and implementation steps, including software and hardware implementations, which are all within the scope of the present application.

Claims

1. A motor control method, characterized in that: include: Obtaining control parameters corresponding to the motor control instruction, the control parameters including a target difference and a control time, the target difference being the difference between the second speed and the first speed, the first speed being the initial speed of the motor before executing the control instruction, the second speed being the speed the motor needs to reach, and the control time being the time required to adjust from the first speed to the second speed; Determining a fuzzy value of a speed change gradient according to the control parameter, wherein the speed change gradient is used to indicate a change in the motor speed corresponding to the control parameter, and the fuzzy value refers to a fuzzified parameter of a fuzzy set of a domain partition of the speed change gradient under a fuzzy control model; Processing the fuzzy value to obtain the speed change gradient; The speed of the motor is adjusted according to the speed change gradient.

2. The method according to claim 1, characterized in that Determining the fuzzy value of the speed change gradient according to the control parameter includes: The fuzzy amount of the speed change gradient is determined according to the control time and the target difference.

3. The method according to claim 2, characterized in that Determining a fuzzy value of the speed change gradient according to the control time and the target difference includes: determining at least one target difference type and at least one first weight corresponding to the target difference; determining at least one target control time type and at least one second weight corresponding to the control time; determining at least one target change gradient type of the speed change gradient according to the at least one target difference type and the at least one target control time type; A fuzzy amount of the rotation speed change gradient is determined according to the at least one first weight, the at least one second weight, and the at least one target change gradient type.

4. The method according to claim 3, characterized in that Determining at least one target difference type and at least one first weight corresponding to the target difference includes: determining at least one target difference type for the target difference from a set of difference types; A weight corresponding to the target difference in each target difference type is determined to obtain at least one first weight, where the at least one first weight corresponds one-to-one to the at least one target difference type.

5. The method according to claim 3, characterized in that Determining at least one target control time type and at least one second weight corresponding to the control time includes: Determining at least one target control time type corresponding to the control time from a set of control time types; A weight corresponding to the control time in each target control time type is determined to obtain at least one second weight, where the at least one second weight corresponds one-to-one to the at least one target control time type.

6. The method according to claim 3, characterized in that Determining at least one target change gradient type of the speed change gradient according to the at least one target difference type and the at least one target control time type includes: combining the at least one target difference type and the at least one target control time type to obtain at least one query parameter pair; At least one target change gradient type is determined in a fuzzy control rule base according to the target control time type and the target difference type in each query parameter pair, wherein the at least one query parameter pair corresponds one-to-one to the at least one target change gradient type, and the fuzzy control rule base includes a correspondence between the control time type and the difference type and the change gradient type.

7. The method according to claim 6, characterized in that Determining a fuzzy amount of the rotation speed change gradient according to the at least one first weight, the at least one second weight, and the at least one target change gradient type includes: Determining a membership function corresponding to each target change gradient type to obtain at least one third membership function corresponding to the at least one target change gradient type; Processing each of the third membership functions according to the first weight and the second weight corresponding to each of the third membership functions to obtain at least one objective function; the first weight and the second weight corresponding to each of the third membership functions are the first weight and the second weight corresponding to the target difference type and the target control time type, respectively, in the query parameter pair corresponding to the target change gradient type corresponding to the third membership function; The blur amount is obtained according to the at least one objective function.

8. The method according to any one of claims 1 to 7, characterized in that The adjusting the speed of the motor according to the speed change gradient includes: adjusting the first speed according to the speed change gradient to obtain an adjusted speed; When the adjusted speed is less than the second speed, the adjusted speed continues to be adjusted according to the speed change gradient until the adjusted speed reaches the second speed.

9. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 8.

10. A motor control device, characterized in that: The method comprises a motor and a control module, wherein the control module controls the motor by executing instructions of the steps in the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that A computer program for electronic data exchange is stored, wherein the computer program causes a computer to execute instructions of the steps in the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that A non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Motor control method and system and vehicle

    CN113131802A

  • Motor control method and system based on distributed preset time gradient descent method

    CN116991068A