Motor speed control method and device, equipment and storage medium

By monitoring and adjusting the speed of the target motor in real time, the performance degradation caused by parameter perturbation and nonlinear distortion is solved, real-time closed-loop control of the motor is achieved, tactile feedback effect is improved and user experience is improved.

CN119727512APending Publication Date: 2025-03-28AAC ACOUSTIC TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411578335.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The motor performance is degraded due to motor parameter perturbation and nonlinear distortion, which affects the tactile feedback effect.

Method used

By obtaining the current speed and preset desired speed of the target motor, the target driving voltage value is calculated, and corresponding control instructions are generated to transmit to the motor driving module to adjust the driving voltage of the motor in real time, real-time closed-loop control of the target motor is achieved.

Benefits of technology

By monitoring and adjusting the motor speed in real time, we ensure that the motor always works within a better performance range, effectively improve the tactile feedback effect and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119727512A_ABST
    Figure CN119727512A_ABST
Patent Text Reader

Abstract

The invention provides a motor speed control method and device, equipment and a storage medium. The method comprises the following steps: acquiring a current speed and a preset expected speed of a target motor; calculating a target driving voltage value of the target motor according to a speed difference value between the current speed and the expected speed; generating a corresponding control instruction according to the target driving voltage value and transmitting the control instruction to a corresponding motor driving module; the control instruction is used for indicating the motor driving module to output corresponding driving voltage to the target motor so as to control the speed of the target motor. Through the implementation of the scheme, the current speed of the target motor is monitored in real time, the speed error is calculated in real time, the driving signal of the target motor is corrected, the speed of the target motor can reach the expected speed, real-time closed-loop control over the target motor is achieved, and the control precision of the target motor is improved. The target motor is ensured to always work in a relatively good performance range, so that the tactile feedback effect is effectively improved, and the user experience 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 speed control method, device, equipment and storage medium. [Background technology]

[0002] Linear resonant actuator (LRA), also known as linear motor, is now widely used in a series of consumer electronic products such as smartphones, tablets, VR and smart wearable devices. It can provide tactile feedback, such as vibration prompts, touch feedback, etc. This tactile feedback can enhance the user's interactive experience with the device. Therefore, linear motors are regarded as an important component in these consumer electronic products and play an important role in improving user experience.

[0003] However, in actual applications, motors may have problems such as parameter perturbation and nonlinear distortion due to low manufacturing precision and the motor's own physical characteristics. These problems will affect the experience of tactile feedback from the originally designed drive signal. Therefore, it is necessary to control the motor in real time so that the motor can always work within a good performance range and improve the user experience. [Summary of the invention]

[0004] The main purpose of this application is to provide a motor speed control method, device, equipment and storage medium, which can at least solve the problem in the related art that motor performance is reduced and tactile feedback effect is affected due to motor parameter perturbation and nonlinear distortion.

[0005] To achieve the above-mentioned objectives, the first aspect of the present application provides a motor speed control method, which includes: obtaining a current speed of a target motor and a preset expected speed; calculating a target drive voltage value of the target motor based on a speed difference between the current speed and the expected speed; generating corresponding control instructions based on the target drive voltage value and transmitting them to a corresponding motor drive module; wherein the control instructions are used to instruct the motor drive module to output a corresponding drive voltage to the target motor to control the speed of the target motor.

[0006] A second aspect of the present application provides a motor speed control device, which includes: an acquisition module for acquiring a current speed and a preset expected speed of a target motor; an error calculation module for calculating a target drive voltage value of the target motor based on a speed difference between the current speed and the expected speed; an instruction generation module for generating corresponding control instructions based on the target drive voltage value and transmitting the instructions to a corresponding motor drive module; wherein the control instructions are used to instruct the motor drive module to output a corresponding drive voltage to the target motor to control the speed of the target motor.

[0007] The third aspect of the present application provides an electronic device, comprising: a memory and a processor, wherein the processor is used to execute a computer program stored in the memory, and when the processor executes the computer program, it implements the steps of the motor speed control method provided in the first aspect of the present application.

[0008] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the motor speed control method provided in the first aspect of the present application are implemented.

[0009] As can be seen from the above, according to the motor speed control method, device, equipment and readable storage medium provided by the present application, the current speed of the target motor and the preset expected speed are obtained; the target driving voltage value of the target motor is calculated according to the speed difference between the current speed and the expected speed; the corresponding control instruction is generated according to the target driving voltage value and transmitted to the corresponding motor driving module; wherein the control instruction is used to instruct the motor driving module to output the corresponding driving voltage to the target motor to control the speed of the target motor. Through the implementation of the present application, the current speed of the target motor is monitored in real time and the speed error is calculated in real time, and the driving signal of the target motor is corrected so that the speed of the target motor can reach the expected speed, thereby realizing real-time closed-loop control of the target motor, ensuring that the target motor can always work within a good performance range, thereby effectively improving the tactile feedback effect and enhancing the user experience.

Brief Description of the Drawings

[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0012] Figure 2 A schematic diagram of a basic flow chart of a motor speed control method provided by an embodiment of the present application;

[0013] Figure 3 An input and output schematic diagram of a discrete PID controller provided in one embodiment of the present application;

[0014] Figure 4 A detailed flow chart of a motor speed control method provided in one embodiment of the present application;

[0015] Figure 5 A detailed flowchart of another motor speed control method provided in one embodiment of the present application;

[0016] Figure 6 A schematic diagram of a module of a motor speed control device provided by an embodiment of the present application;

[0017] Figure 7 A schematic diagram of the structure of another electronic device provided in one embodiment of the present application. [Specific implementation method]

[0018] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0019] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0020] In order to solve the problem in the related art that motor performance is reduced and tactile feedback effect is affected due to motor parameter perturbation and nonlinear distortion, the first embodiment of the present application provides a motor speed control method, which is applied to electronic devices, such as Figure 1 The schematic diagram of the structure of an electronic device provided in this embodiment includes a target motor, a motor driving module, a speed acquisition module and a main control module. Figure 2 The basic flow chart of the motor speed control method provided in this embodiment is as follows:

[0021] Step 201: Obtain the current speed and the preset expected speed of the target motor.

[0022] Specifically, in this embodiment, a plurality of linear motors may be provided in the electronic device to provide tactile feedback for different positions of the electronic device, and the linear motor currently providing tactile feedback may be used as the target motor. When there are multiple target motors, the speed of each target motor may be monitored in real time. Among them, the current speed of the target motor may be acquired in real time by the speed acquisition module, and the current speed of the target motor may be transmitted to the main control module. At the same time, the main control module may also acquire the expected speed corresponding to the target motor. At different times, the expected speed corresponding to the target motor may be the same or different. The speed acquisition module in this embodiment may be a speed sensor, and a sensor with corresponding acquisition accuracy may be selected according to actual application requirements; the main control module may be a device with certain computing and processing capabilities such as MCU and DSP.

[0023] In some implementations of this embodiment, before obtaining the current speed and the expected speed of the target motor, the method further includes: establishing a corresponding motor mathematical model according to characteristic parameters of the target motor; and inputting a preset expected voltage value into the motor mathematical model to obtain the expected speed.

[0024] Specifically, in this embodiment, a model can be built based on the physical characteristics of the target motor, the behavior and performance of the target motor can be described in mathematical form, and the motion characteristics of the target motor can be understood and predicted based on the motor mathematical module. The motor mathematical module can be in various forms, such as transfer function, state space model, etc. The characteristic parameters of the motor can be electrical parameters (such as resistance, inductance, capacitance and other parameters related to driving current and voltage), mechanical parameters (such as mass, inertia, damping and other parameters). After the motor mathematical model is established, according to the actual application scenario, a suitable expected voltage signal is selected, and the expected voltage signal is input into the motor mathematical model. The expected speed information of the target motor can be calculated through the module.

[0025] In some other implementations of this embodiment, before obtaining the current speed of the target motor and the preset expected speed, it also includes: based on a preset speed acquisition module, collecting the real-time speed of the target motor multiple times within a preset time length; determining the current speed of the target motor based on multiple real-time speeds.

[0026] Specifically, in the present embodiment, in order to improve the accuracy of the target motor speed judgment, the real-time speed of the target motor can be collected multiple times within a preset time, such as 3 seconds, by a speed acquisition module (such as a speed sensor), so as to determine the current speed of the target motor based on the multiple real-time speeds collected within the time. The average value of the multiple real-time speeds can be calculated or the current speed of the target motor can be determined according to other statistical indicators. This can avoid the problem of low data reliability caused by a single measurement affected by system noise, sensor errors, etc., thereby improving the credibility of the measurement results.

[0027] Step 202: Calculate a target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed.

[0028] Specifically, in this embodiment, after obtaining the current speed of the target motor, the main control module will also calculate the speed difference between the current speed of the target motor and the expected speed, that is, the error between the current speed and the expected speed, and calculate the target driving voltage value required to drive the target motor to the expected speed based on the speed difference.

[0029] In some implementations of the present embodiment, a target driving voltage value of a target motor is calculated based on a speed difference between a current speed and an expected speed, including: obtaining a first historical speed difference corresponding to a first historical moment and a second historical speed difference corresponding to a second historical moment; wherein the first historical moment differs from the current moment by a unit time length, and the second historical moment differs from the first historical moment by a unit time length; performing proportional, integral and differential calculations on the speed difference between the current speed and the expected speed, the first historical speed difference and the second historical speed difference to obtain an incremental voltage value; and summing the historical driving voltage value corresponding to the first historical moment and the incremental voltage value to obtain the target driving voltage value of the target motor.

[0030] Specifically, in this embodiment, the target drive voltage value of the target motor can be calculated based on a PID controller, that is, a proportional-integral-differential controller. The PID controller is an automatic control algorithm that generates a control output based on proportional, integral and differential operations on the system feedback error to achieve stable control of the system. In this embodiment, the incremental voltage value Δu(k) corresponding to the current moment is obtained by performing proportional, integral and differential operations on the speed difference corresponding to the current moment and the historical speed difference corresponding to the previous two historical moments. By adding the incremental voltage value Δu(k) to the target drive voltage value calculated at the previous historical moment (that is, the historical drive voltage value u(k-1)), the target drive voltage value u(k) corresponding to the current moment can be obtained. Among them, the two historical moments are the first historical moment with a unit time interval from the current moment and the second historical moment with a unit time interval from the current moment, and the corresponding two historical speed differences are calculated in the same way as the speed difference corresponding to the current moment. Taking the first historical speed difference as an example, the first historical speed difference is the difference between the actual speed at the first historical moment and the motor expected speed corresponding to the first historical moment. The motor expected speed corresponding to the first historical moment and the motor expected speed corresponding to the current moment may be the same or different.

[0031] Further, in some implementations of the present embodiment, a speed difference between the current speed and the expected speed, a first historical speed difference, and a second historical speed difference are calculated by proportional integral differential to obtain an incremental voltage value, including: performing a discrete proportional integral differential calculation on the speed error between the current speed and the expected speed, the first historical speed difference, and the second historical speed difference according to a discrete proportional integral differential formula to obtain an incremental voltage value; wherein the discrete proportional integral differential formula is: Δu(k)=k p (e(k)-e(k-1))+k i e(k)+k d (e(k)-2e(k-1)+e(k-2)), Δu(k) is the incremental voltage value, k p is the proportional term coefficient, k i is the integral term coefficient, k d is the differential term coefficient, e(k) is the speed difference; e(k-1) is the first historical speed difference, and e(k-2) is the second historical speed difference.

[0032] Specifically, for a PID controller, a common output expression is: u(t) = k P *e(t)+k i *∫e(t)dt+k d *de(t) / dt, where k P is the proportional term coefficient, k i is the integral term coefficient, k d is the differential term coefficient, e(t) is the real-time error, and the PID controller can achieve error control by performing proportional, integral, and differential amplification operations on the error, so that the actual output of the system can continue to track the expected output. In actual control systems, since the processor can only process discrete signals, it is often necessary to discretize continuous systems. Similarly, for PID controllers, discrete methods are often used to control the system in actual applications. Therefore, this embodiment calculates the target drive voltage value of the target motor based on a discrete PID controller. The input and output of the discrete PID controller are as follows: Figure 3 As shown, where z -1 The proportional action (P) of the PID controller can make the PID controller respond quickly and limitedly to the error, the integral action (I) can eliminate the deviation of the system in steady state, so that the system can track the set value more accurately, and the derivative action (D) can predict the future behavior of the system, suppress the change of the error, and accelerate the response of the system.

[0033] In some other implementations of the present embodiment, before calculating the target driving voltage value of the target motor based on the speed difference between the current speed and the expected speed, it also includes: comparing the speed difference between the current speed and the expected speed with a preset error allowable range; if the speed difference does not satisfy the error allowable range, calculating the target driving voltage value of the target motor based on the speed difference between the current speed and the expected speed.

[0034] Specifically, before calculating the target drive voltage, you can also first determine the size of the error between the current speed of the target motor and the expected speed. If the current speed of the target motor is within the allowable error range, it can be determined that the current motor speed can ensure that the motor is in a good performance range and there is no need to correct its speed; otherwise, it is necessary to calculate the target drive voltage value based on the speed difference between the current speed of the motor and the expected speed to correct the motor speed and ensure the stability of the motor performance.

[0035] In some other implementations of the present embodiment, before calculating the target driving voltage value of the target motor based on the speed difference between the current speed and the expected speed, it also includes: obtaining the current output voltage value of the motor driving module; determining the matching relationship between the output voltage value and the current speed based on a preset motor driving speed index table; wherein the motor driving speed index table includes a mapping relationship between the driving voltage range and the motor speed range; if the output voltage value does not match the current speed, calculating the target driving voltage value of the target motor based on the speed difference between the current speed and the expected speed.

[0036] Specifically, in this embodiment, it is also possible to determine whether the motor speed meets the expected speed requirement based on the voltage value currently output by the motor drive module. The constructed motor mathematical model and the motor body can be used to perform simulation tests on the relationship between excitation and speed, and a motor drive speed index table close to the actual working characteristics of the motor can be constructed, in which the corresponding relationship between each drive voltage range and the motor speed range is recorded. If the current speed of the motor does not match the voltage value currently output by the motor drive module, it is determined that the motor performance is affected by parameter perturbations and nonlinear distortions, and the motor speed needs to be controlled.

[0037] Step 203: Generate a corresponding control instruction according to the target driving voltage value and transmit it to the corresponding motor driving module.

[0038] Specifically, in this embodiment, after the main control module calculates the target driving voltage based on the PID controller, it will generate a corresponding control instruction to instruct the motor driving module to output the corresponding driving voltage to the target motor to control the speed of the target motor. The target driving voltage is the corrected driving voltage. After receiving the control instruction, the motor driving module generates the corresponding driving voltage and outputs it to the target motor after power amplification to control the target motor speed to reach the desired speed.

[0039] Based on the technical solution of the embodiment of the present application, the current speed of the target motor and the preset expected speed are obtained; the target driving voltage value of the target motor is calculated according to the speed difference between the current speed and the expected speed; the corresponding control instruction is generated according to the target driving voltage value and transmitted to the corresponding motor driving module; wherein the control instruction is used to instruct the motor driving module to output the corresponding driving voltage to the target motor to control the speed of the target motor. Through the implementation of the solution of the present application, the current speed of the target motor is monitored in real time and the speed error is calculated in real time, and the driving signal of the target motor is corrected by voltage compensation so that the speed of the target motor can reach the expected speed, and the real-time closed-loop control of the target motor is realized, ensuring that the target motor can always work within a good performance range, thereby effectively improving the tactile feedback effect and enhancing the user experience.

[0040] Figure 4 The method in is a refined motor speed control method provided by an embodiment of the present application, and the motor speed control method includes:

[0041] Step 401: Establish a corresponding motor mathematical model according to characteristic parameters of the target motor;

[0042] Step 402, inputting the preset expected voltage value into the motor mathematical model to obtain the expected speed;

[0043] Step 403: Obtain a first historical speed difference value corresponding to the first historical moment and a second historical speed difference value corresponding to the second historical moment;

[0044] Step 404, calculating the speed difference between the current speed and the desired speed of the target motor;

[0045] Step 405, performing proportional-integral-differential calculation on the speed difference, the first historical speed difference and the second historical speed difference to obtain an incremental voltage value;

[0046] Step 406, summing the historical driving voltage value and the incremental voltage value corresponding to the previous adjacent historical moment to obtain a target driving voltage value of the target motor;

[0047] Step 407 : Generate a corresponding control instruction according to the target driving voltage value and transmit it to the corresponding motor driving module.

[0048] Specifically, Figure 5 As shown in the flowchart of the motor speed control method, in order to realize closed-loop tracking control of the motor speed, the model can be firstly built according to the physical characteristics of the target motor. After the motor mathematical model is established, the appropriate expected voltage signal is selected according to the actual application scenario, and the expected voltage signal is input into the motor mathematical model. The expected speed information of the target motor can be calculated through the module. Then the current speed of the target motor is obtained through the speed acquisition module, and the speed difference between the current speed and the expected speed of the target motor is calculated. Then, the target drive voltage value of the target motor is calculated based on the PID controller. Specifically, the incremental voltage value Δu(k) corresponding to the current moment is obtained by performing proportional, integral and differential operations on the speed difference corresponding to the current moment and the historical speed difference corresponding to the previous two historical moments. By adding the incremental voltage value Δu(k) to the target drive voltage value calculated at the previous historical moment (that is, the historical drive voltage value u(k-1)), the target drive voltage value u(k) corresponding to the current moment can be obtained. Among them, the two historical moments are the first historical moment that is one unit time interval from the current moment, and the second historical moment that is two unit time intervals from the current moment, and the calculation method of the corresponding two historical speed differences is the same as the speed difference corresponding to the current moment. Finally, after the main control module calculates the target drive voltage based on the PID controller, it will generate a corresponding control instruction to instruct the motor drive module to output the corresponding drive voltage to the target motor to control the target motor speed to reach the expected speed. This can ensure that the target motor can always operate within a good performance range, thereby effectively improving the tactile feedback effect and enhancing the user experience.

[0049] It should be understood that the size of the serial number of each step in this embodiment does not mean the order of execution of the steps. The execution order of each step should be determined by its function and internal logic, and should not constitute a sole limitation on the implementation process of the embodiment of this application.

[0050] Figure 6 FIG. 1 is a schematic diagram of a motor speed control device provided in one embodiment of the present application. The motor speed control device can be applied to the above-mentioned motor speed control method. Figure 6 As shown, the motor speed control device mainly includes:

[0051] The acquisition module 601 is used to acquire the current speed and the preset expected speed of the target motor.

[0052] The error calculation module 602 is used to calculate the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed;

[0053] The instruction generation module 603 is used to generate corresponding control instructions according to the target driving voltage value and transmit them to the corresponding motor driving module; wherein the control instructions are used to instruct the motor driving module to output the corresponding driving voltage to the target motor to control the speed of the target motor.

[0054] In some implementations of this embodiment, before executing the function of acquiring the current speed and expected speed of the target motor, the acquisition module is also used to establish a corresponding motor mathematical model based on the characteristic parameters of the target motor; a preset expected voltage value is input into the motor mathematical model to obtain the expected speed.

[0055] In some other implementations of this embodiment, before executing the function of acquiring the current speed and the expected speed of the target motor, the acquisition module is also used to acquire the current speed and the preset expected speed of the target motor, and also includes: based on the preset speed acquisition module, acquiring the real-time speed of the target motor multiple times within a preset time length; determining the current speed of the target motor based on multiple real-time speeds.

[0056] In some implementations of the present embodiment, the error calculation module is specifically used to: obtain a first historical speed difference corresponding to a first historical moment and a second historical speed difference corresponding to a second historical moment; wherein the first historical moment differs from the current moment by a unit time length, and the second historical moment differs from the first historical moment by a unit time length; perform proportional, integral and differential calculations on the speed difference between the current speed and the expected speed, the first historical speed difference and the second historical speed difference to obtain an incremental voltage value; sum the historical drive voltage value and the incremental voltage value corresponding to the previous adjacent historical moment to obtain a target drive voltage value for the target motor.

[0057] Further, in some implementations of the present embodiment, when the error calculation module performs a proportional integral differential calculation on the speed difference between the current speed and the expected speed, the first historical speed difference, and the second historical speed difference to obtain the function of the incremental voltage value, it is specifically used to: perform a discrete proportional integral differential calculation on the speed error between the current speed and the expected speed, the first historical speed difference, and the second historical speed difference according to a discrete proportional integral differential formula to obtain the incremental voltage value; wherein the discrete proportional integral differential formula is: Δu(k)=k p (e(k)-e(k-1))+k i e(k)+k d (e(k)-2e(k-1)+e(k-2)), Δu(k) is the incremental voltage value, k p is the proportional term coefficient, k i is the integral term coefficient, k d is the differential term coefficient, e(k) is the speed error; e(k-1) is the first historical speed difference, and e(k-2) is the second historical speed difference.

[0058] In some other implementations of this embodiment, before executing the function of calculating the target driving voltage value of the target motor based on the speed difference between the current speed and the expected speed, the error calculation module is also used to: compare the speed difference between the current speed and the expected speed with a preset error allowable range; if the speed difference does not meet the error allowable range, execute the function of calculating the target driving voltage value of the target motor based on the speed difference between the current speed and the expected speed.

[0059] In some other implementations of the present embodiment, before executing the function of calculating the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed, the error calculation module is also used to: obtain the current output voltage value of the motor driving module; determine the matching relationship between the output voltage value and the current speed based on a preset motor driving speed index table; wherein the motor driving speed index table includes a mapping relationship between the driving voltage range and the motor speed range; if the output voltage value does not match the current speed, execute the function of calculating the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed.

[0060] It should be noted that the motor speed control methods in the aforementioned embodiments can all be implemented based on the motor speed control device provided in this embodiment. Ordinary technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the motor speed control device described in this embodiment can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0061] Based on the technical solution of the above-mentioned embodiment of the present application, the current speed of the target motor and the preset expected speed are obtained; the target driving voltage value of the target motor is calculated according to the speed difference between the current speed and the expected speed; the corresponding control instruction is generated according to the target driving voltage value and transmitted to the corresponding motor driving module; wherein the control instruction is used to instruct the motor driving module to output the corresponding driving voltage to the target motor to control the speed of the target motor. Through the implementation of the solution of the present application, the current speed of the target motor is monitored in real time and the speed error is calculated in real time, and the driving signal of the target motor is corrected by voltage compensation so that the speed of the target motor can reach the expected speed, and the real-time closed-loop control of the target motor is realized, ensuring that the target motor can always work within a good performance range, thereby effectively improving the tactile feedback effect and enhancing the user experience.

[0062] Figure 7 This is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. The electronic device can be used to implement the motor speed control method in the above embodiment, and mainly includes:

[0063] The memory 701, the processor 702, and the computer program 703 stored in the memory 701 and executable on the processor 702, the memory 701 and the processor 702 are connected by communication. When the processor 702 executes the computer program 703, the method in the above-mentioned embodiment 1 or 2 is implemented. The number of processors can be one or more.

[0064] The memory 701 may be a high-speed random access memory (RAM) memory, or a non-volatile memory, such as a disk memory. The memory 701 is used to store executable program codes, and the processor 702 is coupled to the memory 701 .

[0065] Furthermore, the embodiment of the present application also provides a computer-readable storage medium, which may be disposed in the above-mentioned electronic device. The computer-readable storage medium may be the above-mentioned Figure 7 Memory in the illustrated embodiment.

[0066] The computer readable storage medium stores a computer program, and when the program is executed by the processor, the motor speed control method in the aforementioned embodiment is implemented. Furthermore, the computer storable medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.

[0067] 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 modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that 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 modules, which can be electrical, mechanical or other forms.

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

[0069] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0070] If the integrated module is implemented in the form of a software function module 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, which is stored in a readable storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned readable storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0071] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0072] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0073] The above is a description of the motor speed control method, device, equipment and storage medium provided in the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A motor speed control method, characterized in that: include: Get the current speed of the target motor and the preset expected speed; calculating a target driving voltage value of the target motor according to a speed difference between the current speed and the desired speed; A corresponding control instruction is generated according to the target driving voltage value and transmitted to the corresponding motor driving module; wherein the control instruction is used to instruct the motor driving module to output a corresponding driving voltage to the target motor to control the speed of the target motor.

2. The motor speed control method according to claim 1, characterized in that: Before obtaining the current speed of the target motor and presetting the expected speed, the method further includes: Establishing a corresponding motor mathematical model according to the characteristic parameters of the target motor; The preset expected voltage value is input into the motor mathematical model to obtain the expected speed.

3. The motor speed control method according to claim 1, characterized in that: Before obtaining the current speed of the target motor and presetting the expected speed, the method further includes: Based on the preset speed acquisition module, the real-time speed of the target motor is acquired multiple times within a preset time period; The current speed of the target motor is determined according to the plurality of real-time speeds.

4. The motor speed control method according to claim 1, characterized in that: The calculating the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed includes: Obtain a first historical speed difference corresponding to a first historical moment and a second historical speed difference corresponding to a second historical moment; wherein the first historical moment differs from the current moment by a unit time length, and the second historical moment differs from the first historical moment by the unit time length; Performing proportional-integral-differential calculation on the speed difference between the current speed and the expected speed, the first historical speed difference, and the second historical speed difference to obtain an incremental voltage value; The historical driving voltage value corresponding to the first historical moment and the incremental voltage value are summed to obtain a target driving voltage value of the target motor.

5. The motor speed control method according to claim 4, characterized in that: The step of performing proportional-integral-differential calculation on the speed difference between the current speed and the expected speed, the first historical speed difference, and the second historical speed difference to obtain an incremental voltage value includes: Perform discrete proportional integral differential calculation on the speed error between the current speed and the expected speed, the first historical speed difference, and the second historical speed difference according to a discrete proportional integral differential formula to obtain an incremental voltage value; The discrete proportional integral differential formula is: Δu(k)=k p (e(k)-e(k-1))+k i e(k)+k d (e(k)-2e(k-1)+e(k-2)), Δu(k) is the incremental voltage value, k p is the proportional term coefficient, k i is the integral term coefficient, k d is the differential term coefficient, e(k) is the speed error; e(k-1) is the first historical speed difference, and e(k-2) is the second historical speed difference.

6. The motor speed control method according to any one of claims 1 to 5, characterized in that: Before calculating the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed, the method further includes: Comparing the speed difference between the current speed and the expected speed with a preset error tolerance range; If the speed difference does not satisfy the allowable error range, the step of calculating the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed is performed.

7. The motor speed control method according to any one of claims 1 to 5, characterized in that: Before calculating the target driving voltage value of the target motor according to the speed difference between the current speed and the expected speed, the method further includes: Obtaining the current output voltage value of the motor drive module; Determining the matching relationship between the output voltage value and the current speed based on a preset motor drive speed index table; wherein the motor drive speed index table includes a mapping relationship between a drive voltage range and a motor speed range; If the output voltage value does not match the current speed, the target driving voltage value of the target motor is calculated according to the speed difference between the current speed and the expected speed.

8. A motor speed control device, characterized in that: include: An acquisition module is used to acquire the current speed of the target motor and the preset expected speed; an error calculation module, configured to calculate a target driving voltage value of the target motor according to a speed difference between the current speed and the desired speed; An instruction generation module is used to generate corresponding control instructions according to the target driving voltage value and transmit them to the corresponding motor driving module; wherein the control instruction is used to instruct the motor driving module to output the corresponding driving voltage to the target motor to control the speed of the target motor.

9. An electronic device, characterized in that: The device comprises a memory and a processor, wherein: The processor is used to execute the computer program stored in the memory; When the processor executes the computer program, the steps of the motor speed control method according to any one of claims 1 to 7 are implemented.

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