Torque Compensation Method, Device, Storage Medium and Electronic Device for Electric Machine

By obtaining the actual speed and lag time of the motor, determining and filtering the predicted speed, and calculating the torque compensation value using the PID controller, the problem of untimely torque compensation caused by the motor speed signal filtering is solved, and the speed fluctuation suppression effect is improved.

CN116198339BActive Publication Date: 2025-07-18WEICHAI POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310114755.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2025-07-18
Estimated Expiration
2043-02-13

AI Technical Summary

Technical Problem

In the prior art, motor speed signal filtering leads to untimely torque compensation, which affects the speed fluctuation suppression effect and may even aggravate fluctuations.

Method used

By obtaining the actual speed and lag time of the motor, determining the predicted speed, and then filtering and calculating the torque compensation value using the PID controller to compensate the motor torque.

Benefits of technology

It achieves timely torque compensation, reduces speed fluctuations, and improves driving comfort and shift smoothness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116198339B_ABST
    Figure CN116198339B_ABST
Patent Text Reader

Abstract

The present application provides a torque compensation method, device, storage medium and electronic device for a motor. The method includes: a determination step: obtaining the actual speed and lag time of the motor, and determining a predicted speed at least based on the actual speed and lag time; a filtering processing step: performing filtering processing on the predicted speed to obtain a filtered predicted speed; a PID processing step: using a PID controller to process the filtered predicted speed to obtain a torque compensation value; a compensation step: compensating the torque of the motor with the torque compensation value. By performing filtering processing on the predicted speed, due to the delay effect of the first-order low-pass filter, the phase of the filtered predicted speed is nearly the same as the phase of the actual motor speed. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act promptly on the change in the motor speed, thereby solving the problem in the prior art that torque compensation is not timely due to filtering the speed of the motor at the current moment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of torque compensation for motors, and in particular, to a method, device, computer-readable storage medium, and electronic device for torque compensation of a motor. Background Technique

[0002] In order to improve the smoothness of driving and reduce vehicle jitter, active damping control needs to be adopted to suppress the speed fluctuation of the whole vehicle at the motor end. When performing active damping control on the whole vehicle, a series of filtering and other processes need to be performed on the motor speed signal, which will cause the processed speed signal to lag in phase to a certain extent. When the motor performs torque compensation according to the processed speed signal, due to the phase lag, the torque compensation is not timely, and the effect of suppressing speed fluctuation becomes poor. If the torque compensation is at the opposite position, it may even cause the speed fluctuation to intensify. Therefore, it is necessary to compensate for the lagging phase.

[0003] Active damping control means that when the whole vehicle shakes, the control system detects the speed through a torque control algorithm, intelligently identifies abnormal fluctuations and intervenes in a timely manner to suppress the shaking of the whole vehicle, thereby reducing the discomfort of the passengers and drivers caused by the shaking. Summary of the Invention

[0004] The main purpose of the present application is to provide a method, device, computer-readable storage medium, and electronic device for torque compensation of a motor, so as to at least solve the problem that torque compensation is not timely due to filtering the speed of the motor at the current moment in the prior art.

[0005] To achieve the above object, according to one aspect of the present application, a method for torque compensation of a motor is provided. The method includes: a determination step: obtaining the actual speed and the lag time of the motor, and determining a predicted speed at least based on the actual speed and the lag time, where the lag time is used to represent the time period of the lag effect caused by filtering, the predicted speed is used to represent the speed of the motor at the next moment, and the actual speed is used to represent the speed of the motor at the current moment; a filtering processing step: performing filtering processing on the predicted speed to obtain a filtered predicted speed; a PID processing step: using a PID controller to process the filtered predicted speed to obtain a torque compensation value; a compensation step: using the torque compensation value to compensate the torque of the motor.

[0006] Optionally, determining the predicted speed at least based on the actual speed and the lag time includes: determining the predicted speed according to the actual speed, a prediction factor, the lag time, and a control period, where the prediction factor is used to represent the time delay interference factor in the signal acquisition, transmission, and processing process, and the control period is a preset period.

[0007] Optionally, determining the predicted rotational speed according to the actual rotational speed, prediction factor, the lag time, and control period includes: determining the predicted rotational speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual rotational speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted rotational speed, n′(k) is the derivative of the actual rotational speed, and k is the current time.

[0008] Optionally, performing filtering processing on the predicted rotational speed to obtain the filtered predicted rotational speed includes: obtaining the filtered actual rotational speed; determining the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight.

[0009] Optionally, determining the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight includes: according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determining the filtered predicted rotational speed, where k is the current time, n(k + 1) is the predicted rotational speed, n filter (k + 1) is the filtered predicted rotational speed, w is the actual rotational speed weight, n filter (k) is the filtered actual rotational speed.

[0010] Optionally, compensating the torque of the motor using the torque compensation value includes: obtaining a first torque compensation threshold and a second torque compensation threshold, where the first torque compensation threshold is greater than the second torque compensation threshold, the first torque compensation threshold is the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress motor torsional vibration; when the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, compensating the torque of the motor using the torque compensation value.

[0011] Optionally, after obtaining the first torque compensation threshold and the second torque compensation threshold, the method further includes: when the torque compensation value is less than the second torque compensation threshold, or the torque compensation value is greater than the first torque compensation threshold, determining not to compensate the torque of the motor using the torque compensation value; sequentially performing the determining step, the filtering processing step, the PID processing step, and the compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the motor speed fluctuation reaches a preset range, after which the torque compensation is completed.

[0012] According to another aspect of the present application, there is provided a torque compensation device for a motor. The device includes an acquisition unit, a first processing unit, a second processing unit, and a third processing unit. The acquisition unit is configured to perform a determination step: acquire the actual speed and the lag time of the motor, and determine a predicted speed at least based on the actual speed and the lag time. The lag time is used to characterize the time period of the lag effect caused by filtering, the predicted speed is used to characterize the speed of the motor at the next moment, and the actual speed is used to characterize the speed of the motor at the current moment. The first processing unit is configured to perform a filtering process step: perform filtering processing on the predicted speed to obtain a filtered predicted speed. The second processing unit is configured to perform a PID processing step: use a PID controller to process the filtered predicted speed to obtain a torque compensation value. The third processing unit is configured to perform a compensation step: compensate the torque of the motor with the torque compensation value.

[0013] According to another aspect of the present application, there is provided a computer-readable storage medium. The computer-readable storage medium includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute any one of the torque compensation methods for the motor.

[0014] According to another aspect of the present application, there is provided an electronic device. The electronic device includes one or more processors, a memory, and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the one or more processors. The one or more programs include those for executing any one of the torque compensation methods for the motor.

[0015] Applying the technical solution of the present application, by determining the predicted speed at least based on the actual speed and the lag time, and then performing filtering processing on the predicted speed. Due to the delay effect of the first-order low-pass filter, the phase of the filtered predicted speed is nearly the same as the phase of the actual motor speed. By taking the difference between the actual speed and the expected speed to obtain the difference between the actual speed and the expected speed, and inputting the speed difference into the PID controller to obtain the torque compensation value. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act on the change of the motor speed in a timely manner, thereby solving the problem of untimely torque compensation caused by filtering the speed of the motor at the current moment in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The specification drawings forming a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0017] Figure 1The hardware structure block diagram of a mobile terminal for implementing a torque compensation method of a motor according to an embodiment of the present application is shown;

[0018] Figure 2 The flowchart of a torque compensation method for a motor according to an embodiment of the present application is shown;

[0019] Figure 3 The flowchart of step S202 according to an embodiment of the present application is shown;

[0020] Figure 4 The flowchart of step S204 according to an embodiment of the present application is shown;

[0021] Figure 5 The flowchart of another torque compensation method for a motor according to an embodiment of the present application is shown;

[0022] Figure 6 The structure block diagram of a torque compensation device for a motor according to an embodiment of the present application is shown.

[0023] Among them, the above-mentioned drawings include the following reference numerals:

[0024] 102, processor; 104, memory; 106, transmission device; 108, input / output device. Detailed implementation manners

[0025] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so as to implement the embodiments of the present application described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0028] As introduced in the background art, in order to improve the driving smoothness and reduce vehicle vibration, the existing solution needs to adopt active damping control to suppress the speed fluctuation of the whole vehicle at the motor end. When performing active damping control on the whole vehicle, a series of filtering and other processes need to be performed on the motor speed signal, which will cause the processed speed signal to lag in phase to a certain extent. When the motor performs torque compensation according to the processed speed signal, due to the phase lag, the torque compensation is not timely, and the effect of suppressing speed fluctuation becomes worse. If the torque compensation is in the opposite position, it may even cause the speed fluctuation to intensify. Therefore, it is necessary to compensate for the lagged phase. To solve the problem of untimely torque compensation caused by filtering the speed of the motor at the current moment in the prior art, the embodiments of this application provide a torque compensation method, device, computer-readable storage medium and electronic device for the motor.

[0029] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0030] The method embodiments provided in the embodiments of this application can be executed on a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a torque compensation method of a motor according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in Figure 1 a processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1The different configurations shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include the wireless network provided by the communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, a torque compensation method for a motor operating on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0033] Figure 2 is a flowchart diagram of a torque compensation method for a motor provided according to an embodiment of the present application. As Figure 2 shown, the method includes the following steps:

[0034] Step S201, determination step: Obtain the actual speed and lag time of the motor, and determine the predicted speed at least based on the actual speed and the lag time. The lag time is used to characterize the time period of the lag effect brought by filtering, the predicted speed is used to characterize the speed of the motor at the next moment, and the actual speed is used to characterize the speed of the motor at the current moment;

[0035] Step S202, filtering processing step: Perform filtering processing on the predicted speed to obtain the filtered predicted speed;

[0036] Step S203, PID processing step: Use a PID controller to process the predicted speed after the above filtering to obtain a torque compensation value;

[0037] Among them, the current smoothed speed deviation value (i.e., the difference between the actual speed and the predicted speed after filtering) is used as the input of the PID controller, and the torque compensation value of the motor is used as the output of the PID controller. And an appropriate threshold range is set, and torque compensation is only performed when the speed deviation value is within this threshold range. PID is a common feedback loop component in industrial control applications, consisting of a proportional unit P, an integral unit I, and a differential unit D. It adjusts the deviation of the entire control system according to the PID control principle, so that the actual value of the controlled variable is consistent with the predetermined value required by the process, and is applicable to systems with basic linearity and dynamic characteristics that do not change with time.

[0038] Step S204, compensation step: Use the above torque compensation value to compensate the torque of the above motor.

[0039] In the above steps, by determining the predicted speed at least according to the above actual speed and the above lag time, and then performing filtering processing on the predicted speed. Due to the delay effect of the first-order low-pass filter, the phase of the predicted speed after filtering is almost the same as the phase of the actual motor speed. By subtracting the actual speed from the expected speed to obtain the difference between the actual speed and the expected speed, and inputting the speed difference into the PID controller to obtain the torque compensation value. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act on the change of the motor speed in a timely manner, thereby solving the problem of untimely torque compensation caused by the acquisition, transmission, and processing of the motor speed at the current moment in the prior art.

[0040] In an embodiment of the present application, determining the predicted speed at least according to the above actual speed and the above lag time includes: determining the above predicted speed according to the above actual speed, prediction factor, above lag time, and control period. The above prediction factor is used to characterize the time-delay interference factor in the signal acquisition, transmission, and processing process, and the above control period is the scheduling period of the actual program operation. Through the above prediction algorithm, the inevitable time delay in the speed signal acquisition, transmission, and processing process can be effectively compensated, so that the compensation torque obtained according to the actual speed and the predicted speed is consistent with the phase of the current motor actual speed fluctuation, realizing delay-free compensation, thereby suppressing the motor torsional vibration caused by mechanical factors, reducing the speed fluctuation amplitude, and improving the driving comfort and shift smoothness of new energy vehicles.

[0041] In an embodiment of the present application, determining the predicted rotational speed according to the actual rotational speed, prediction factor, lag time, and control period described above includes: determining the predicted rotational speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual rotational speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted rotational speed, n′(k) is the derivative of the actual rotational speed, and k is the current moment.

[0042] Specifically, the predicted rotational speed can also be determined according to n(k + 1) = n(k) + T × n′(k), where n(k) is the actual rotational speed, T is the lag time, and n(k + 1) is the predicted rotational speed;

[0043] However, the effect is worse than that of n(k + 1) = n(k) + A × T × n′(k) × DT.

[0044] In an embodiment of the present application, as Figure 3 shown, filtering the predicted rotational speed to obtain the filtered predicted rotational speed includes:

[0045] Step S2021, obtaining the filtered actual rotational speed;

[0046] Step S2022, determining the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight. The greater the actual rotational speed weight, the worse the smoothing effect, and the selection of the weight should be considered comprehensively in combination with the prediction factor and the control period.

[0047] To obtain a smooth desired motor rotational speed.

[0048] In an embodiment of the present application, determining the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight includes:

[0049] According to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determining the filtered predicted rotational speed, where k is the current moment, n(k + 1) is the predicted rotational speed, n filter (k + 1) is the filtered predicted rotational speed, w is the actual rotational speed weight, and n filter (k) is the filtered actual rotational speed.

[0050] In an embodiment of the present application, as Figure 4 shown, compensating the torque of the motor with the above torque compensation value includes:

[0051] Step S2041: Obtain a first torque compensation threshold and a second torque compensation threshold. The first torque compensation threshold is greater than the second torque compensation threshold. The first torque compensation threshold is the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress the torsional vibration of the motor.

[0052] Step S2042: When the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, use the torque compensation value to compensate the torque of the motor.

[0053] Specifically, for example, if the torque compensation value is 4, the first torque compensation threshold is 8, and the second torque compensation threshold is 2, it means that the compensation value is within the tolerable range of the motor, and the torque of the motor is compensated using the torque compensation value.

[0054] In an embodiment of the present application, after obtaining the first torque compensation threshold and the second torque compensation threshold, the method further includes: when the torque compensation value is less than the second torque compensation threshold, or the torque compensation value is greater than the first torque compensation threshold, determine not to use the torque compensation value to compensate the torque of the motor; sequentially execute the above determination step, the above filtering processing step, the above PID processing step, and the above compensation step at least once until the torque compensation for the last moment of the motor operation is completed. For the purpose of cycling, for example, if the torque compensation value is 1, the first torque compensation threshold is 8, and the second torque compensation threshold is 2, it means that the compensation value is not within the tolerable range of the motor, and the above determination step, the above filtering processing step, the above PID processing step, and the above compensation step need to be sequentially executed until the torsional vibration of the motor caused by mechanical reasons is suppressed and the motor speed fluctuation reaches the preset range, and then the torque compensation is completed.

[0055] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the torque compensation method for the motor of the present application will be described in detail below with specific embodiments.

[0056] This embodiment relates to a specific torque compensation method for a motor, as Figure 5 shown, including the following steps:

[0057] Step S1: Determination step: Obtain the actual speed and lag time of the motor, and determine the predicted speed according to the above actual speed, prediction factor, the above lag time, and the control period. The above prediction factor is used to characterize the time-delay interference factor in the signal acquisition, transmission, and processing process. The above control period is a preset period. The above lag time is used to characterize the time period of the lag effect caused by filtering. The above predicted speed is used to characterize the speed of the above motor at the next moment. The above actual speed is used to characterize the speed of the above motor at the current moment;

[0058] Specifically, determine the above predicted speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the above actual speed, A is the above prediction factor, T is the above lag time, DT is the above control period, n(k + 1) is the above predicted speed, n′(k) is the derivative of the above actual speed, and k is the above current moment;

[0059] Step S2: Filtering processing step: Obtain the above actual speed after filtering, and determine the above predicted speed after filtering according to the above predicted speed, the above actual speed after filtering, and the actual speed weight;

[0060] Specifically, according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determine the above predicted speed after filtering, where k is the above current moment, n(k + 1) is the above predicted speed, n filter (k + 1) is the above predicted speed after filtering, w is the above actual speed weight, n(k) is the above actual speed, n filter (k) is the above actual speed after filtering;

[0061] Step S3: PID processing step: Use a PID controller to process the above predicted speed after filtering to obtain a torque compensation value;

[0062] Step S4: Compensation step: Obtain a first torque compensation threshold and a second torque compensation threshold. The above first torque compensation threshold is greater than the above second torque compensation threshold. The above first torque compensation threshold is the maximum value of the torque compensation value that the above motor can tolerate. The above second torque compensation threshold is the minimum value of the torque compensation value that can suppress the torsional vibration of the motor. When the above torque compensation value is greater than or equal to the above second torque compensation threshold and less than or equal to the above first torque compensation threshold, use the above torque compensation value to compensate the torque of the above motor. When the above torque compensation value is less than the above second torque compensation threshold, or the above torque compensation value is greater than the above first torque compensation threshold, determine not to use the above torque compensation value to compensate the torque of the above motor;

[0063] Step S5, perform the above-mentioned determination step, the above-mentioned filtering processing step, the above-mentioned PID processing step, and the above-mentioned compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the motor speed fluctuation reaches the preset range, and then complete the compensation of the torque.

[0064] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0065] The embodiment of the present application also provides a torque compensation device for a motor. It should be noted that the torque compensation device for a motor in the embodiment of the present application can be used to execute the torque compensation method for a motor provided by the embodiment of the present application. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0066] The following introduces the torque compensation device for a motor provided by the embodiment of the present application.

[0067] Figure 6 is a structural block diagram of a torque compensation device for a motor according to an embodiment of the present application. As Figure 6 shown, the device includes an acquisition unit 61, a first processing unit 62, a second processing unit 63, and a third processing unit 64; the acquisition unit 61 is used to execute the determination step: acquire the actual speed and the lag time of the motor, and determine the predicted speed at least based on the actual speed and the lag time. The lag time is used to characterize the time period of the lag effect brought by filtering, the predicted speed is used to characterize the speed of the motor at the next moment, and the actual speed is used to characterize the speed of the motor at the current moment; the first processing unit 62 is used to execute the filtering processing step: perform filtering processing on the predicted speed to obtain the filtered predicted speed; the second processing unit 63 is used to execute the PID processing step: use a PID controller to process the filtered predicted speed to obtain a torque compensation value; the third processing unit 64 is used to execute the compensation step: use the torque compensation value to compensate the torque of the motor.

[0068] In the above device, the predicted speed is determined at least based on the actual speed and the lag time, and then the predicted speed is filtered. Due to the delay effect of the first-order low-pass filter, the phase of the filtered predicted speed is nearly the same as the phase of the actual motor speed. By subtracting the actual speed from the expected speed, the difference between the actual speed and the expected speed is obtained, and the speed difference is input into the PID controller to obtain the torque compensation value. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act on the change of the motor speed in a timely manner, thereby solving the problem of untimely torque compensation caused by filtering the speed of the motor at the current moment in the prior art.

[0069] In an embodiment of the present application, the acquisition unit includes a first determination module, and the first determination module is used to determine the predicted speed according to the actual speed, the prediction factor, the lag time, and the control period. The prediction factor is used to characterize the time-delay interference factor in the signal acquisition, transmission, and processing process, that is, the time-lag interference factor, and the control period is a preset period.

[0070] In an embodiment of the present application, the determination module includes a first determination sub-module, and the first determination sub-module is used to determine the predicted speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted speed, n′(k) is the derivative of the actual speed, and k is the current moment.

[0071] In an embodiment of the present application, the first processing unit includes a first acquisition module and a second determination module. The first acquisition module is used to acquire the filtered actual speed; the second determination module is used to determine the filtered predicted speed according to the predicted speed, the filtered actual speed, and the actual speed weight.

[0072] In an embodiment of the present application, the second determination module includes a second determination sub-module, and the second determination sub-module is used to determine the filtered predicted speed according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), where k is the current moment, n(k + 1) is the predicted speed, n filter (k + 1) is the filtered predicted speed, w is the actual speed weight, and n filter (k) is the filtered actual speed.

[0073] In an embodiment of the present application, the third processing unit includes a second acquisition module and a first processing module. The second acquisition module is configured to acquire a first torque compensation threshold and a second torque compensation threshold. The first torque compensation threshold is greater than the second torque compensation threshold. The first torque compensation threshold is the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress the torsional vibration of the motor. The first processing module is configured to compensate the torque of the motor with the torque compensation value when the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold.

[0074] In an embodiment of the present application, the third processing unit further includes a second processing module and a third processing module. After acquiring the first torque compensation threshold and the second torque compensation threshold, the second processing module is configured to determine not to compensate the torque of the motor with the torque compensation value when the torque compensation value is less than the second torque compensation threshold or the torque compensation value is greater than the first torque compensation threshold. The third processing module is configured to execute the determination step, the filtering processing step, the PID processing step, and the compensation step at least once in sequence until the torque compensation for the last moment of the motor operation is completed.

[0075] The torque compensation device of the motor includes a processor and a memory. The acquisition unit, the first processing unit, the second processing unit, the third processing unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The above modules are all located in the same processor; or, the above modules are respectively located in different processors in any combination form.

[0076] The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problem of untimely torque compensation caused by filtering the rotational speed of the motor at the current moment in the prior art can be solved.

[0077] The memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one storage chip.

[0078] An embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the torque compensation method of the motor.

[0079] Specifically, the torque compensation method for the motor includes:

[0080] Step S201, determination step: Obtain the actual speed and the lag time of the motor, and determine the predicted speed at least based on the actual speed and the lag time. The lag time is used to represent the time period of the lag effect caused by filtering, the predicted speed is used to represent the speed of the motor at the next moment, and the actual speed is used to represent the speed of the motor at the current moment;

[0081] Step S202, filtering processing step: Perform filtering processing on the predicted speed to obtain the filtered predicted speed;

[0082] Step S203, PID processing step: Use a PID controller to process the filtered predicted speed to obtain a torque compensation value;

[0083] Step S204, compensation step: Compensate the torque of the motor using the torque compensation value.

[0084] Optionally, determining the predicted speed at least based on the actual speed and the lag time includes: determining the predicted speed based on the actual speed, the prediction factor, the lag time, and the control period. The prediction factor is used to represent the time-delay interference factor in the signal acquisition, transmission, and processing process, and the control period is a preset period.

[0085] Optionally, determining the predicted speed based on the actual speed, the prediction factor, the lag time, and the control period includes: determining the predicted speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted speed, n′(k) is the derivative of the actual speed, and k is the current moment.

[0086] Optionally, performing filtering processing on the predicted speed to obtain the filtered predicted speed includes: obtaining the filtered actual speed; determining the filtered predicted speed based on the predicted speed, the filtered actual speed, and the actual speed weight.

[0087] Optionally, determining the filtered predicted speed based on the predicted speed, the filtered actual speed, and the actual speed weight includes: according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determine the filtered predicted speed, where k is the current moment, n(k + 1) is the predicted speed, n filter(k + 1) is the predicted rotational speed after the above filtering, w is the weight of the above actual rotational speed, and n filter (k) is the above actual rotational speed after the above filtering.

[0088] Optionally, compensating the torque of the above motor by using the above torque compensation value includes: obtaining a first torque compensation threshold and a second torque compensation threshold, where the first torque compensation threshold is greater than the second torque compensation threshold, the first torque compensation threshold is the maximum value of the torque compensation value that the above motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress the torsional vibration of the motor; when the above torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, compensating the torque of the above motor by using the above torque compensation value.

[0089] Optionally, after obtaining the first torque compensation threshold and the second torque compensation threshold, the above method further includes: when the above torque compensation value is less than the second torque compensation threshold, or the above torque compensation value is greater than the first torque compensation threshold, determining not to compensate the torque of the above motor by using the above torque compensation value; sequentially performing the above determination step, the above filtering process step, the above PID process step, and the above compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the rotational speed fluctuation of the motor reaches a preset range, and then completing the torque compensation.

[0090] An embodiment of the present invention provides a processor, where the processor is used to run a program, and when the program runs, it executes the torque compensation method of the above motor.

[0091] Specifically, the torque compensation method of the motor includes:

[0092] Step S201, determination step: obtaining the actual rotational speed and the lag time of the motor, and determining the predicted rotational speed at least according to the above actual rotational speed and the above lag time, where the lag time is used to represent the time period of the lag effect caused by filtering, the predicted rotational speed is used to represent the rotational speed of the above motor at the next moment, and the actual rotational speed is used to represent the rotational speed of the above motor at the current moment;

[0093] Step S202, filtering process step: performing filtering processing on the above predicted rotational speed to obtain the filtered predicted rotational speed;

[0094] Step S203, PID process step: using a PID controller to process the above filtered predicted rotational speed to obtain a torque compensation value;

[0095] Step S204, compensation step: compensating the torque of the above motor by using the above torque compensation value.

[0096] Optionally, determine a predicted rotational speed based at least on the actual rotational speed and the lag time described above, including: determining the predicted rotational speed according to the actual rotational speed, a prediction factor, the lag time, and a control period, where the prediction factor is used to characterize the time-delay interference factor in the signal acquisition, transmission, and processing process, and the control period is a preset period.

[0097] Optionally, determine the predicted rotational speed according to the actual rotational speed, a prediction factor, the lag time, and a control period, including: determining the predicted rotational speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual rotational speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted rotational speed, n′(k) is the derivative of the actual rotational speed, and k is the current moment.

[0098] Optionally, perform a filtering process on the predicted rotational speed to obtain a filtered predicted rotational speed, including: obtaining the filtered actual rotational speed; determining the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and an actual rotational speed weight.

[0099] Optionally, determine the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and an actual rotational speed weight, including: according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determine the filtered predicted rotational speed, where k is the current moment, n(k + 1) is the predicted rotational speed, n filter (k + 1) is the filtered predicted rotational speed, w is the actual rotational speed weight, and n filter (k) is the filtered actual rotational speed.

[0100] Optionally, compensate the torque of the motor with the torque compensation value described above, including: obtaining a first torque compensation threshold and a second torque compensation threshold, where the first torque compensation threshold is greater than the second torque compensation threshold, the first torque compensation threshold is the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress the torsional vibration of the motor; when the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, compensate the torque of the motor with the torque compensation value.

[0101] Optionally, after obtaining the first torque compensation threshold and the second torque compensation threshold, the above method further includes: when the torque compensation value is less than the second torque compensation threshold, or when the torque compensation value is greater than the first torque compensation threshold, determining not to compensate the torque of the motor with the torque compensation value; sequentially performing the above determination step, the above filtering processing step, the above PID processing step, and the above compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the motor speed fluctuation reaches a preset range, and then completing the torque compensation.

[0102] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements at least the following steps: a determination step: obtaining the actual speed and the lag time of the motor, and determining a predicted speed at least based on the actual speed and the lag time, where the lag time is used to represent the time period of the lag effect brought by filtering, the predicted speed is used to represent the speed of the motor at the next moment, and the actual speed is used to represent the speed of the motor at the current moment; a filtering processing step: performing filtering processing on the predicted speed to obtain a filtered predicted speed; a PID processing step: using a PID controller to process the filtered predicted speed to obtain a torque compensation value; a compensation step: compensating the torque of the motor with the torque compensation value. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0103] Optionally, determining the predicted speed at least based on the actual speed and the lag time includes: determining the predicted speed according to the actual speed, a prediction factor, the lag time, and a control period, where the prediction factor is used to represent the time-delay interference factor in the signal acquisition, transmission, and processing process, and the control period is a preset period.

[0104] Optionally, determining the predicted speed according to the actual speed, a prediction factor, the lag time, and a control period includes: determining the predicted speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted speed, n′(k) is the derivative of the actual speed, and k is the current moment.

[0105] Optionally, performing filtering processing on the predicted speed to obtain a filtered predicted speed includes: obtaining the filtered actual speed; determining the filtered predicted speed according to the predicted speed, the filtered actual speed, and the actual speed weight.

[0106] Optionally, determining the filtered predicted speed based on the predicted speed, the filtered actual speed, and the actual speed weight as described above includes: according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determining the filtered predicted speed, where k is the current moment, n(k + 1) is the predicted speed, n filter (k + 1) is the filtered predicted speed, w is the actual speed weight, and n filter (k) is the filtered actual speed.

[0107] Optionally, compensating the torque of the motor using the torque compensation value as described above includes: obtaining a first torque compensation threshold and a second torque compensation threshold, the first torque compensation threshold being greater than the second torque compensation threshold, the first torque compensation threshold being the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold being the minimum value of the torque compensation value that can suppress motor torsional vibration; when the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, compensating the torque of the motor using the torque compensation value.

[0108] Optionally, after obtaining the first torque compensation threshold and the second torque compensation threshold, the method further includes: when the torque compensation value is less than the second torque compensation threshold, or when the torque compensation value is greater than the first torque compensation threshold, determining not to compensate the torque of the motor using the torque compensation value; sequentially performing the above determination step, the above filtering process step, the above PID process step, and the above compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the motor speed fluctuation reaches a preset range, and then completing the torque compensation.

[0109] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with at least the following method steps: determination step: obtaining the actual speed and the lag time of the motor, and determining a predicted speed at least based on the actual speed and the lag time, the lag time being used to represent the time period of the lag effect caused by filtering, the predicted speed being used to represent the speed of the motor at the next moment, and the actual speed being used to represent the speed of the motor at the current moment; filtering process step: performing a filtering process on the predicted speed to obtain a filtered predicted speed; PID process step: using a PID controller to process the filtered predicted speed to obtain a torque compensation value; compensation step: compensating the torque of the motor using the torque compensation value.

[0110] Optionally, determine a predicted rotational speed based at least on the actual rotational speed and the lag time described above, including: determining the predicted rotational speed based on the actual rotational speed, a prediction factor, the lag time, and a control period, where the prediction factor is used to characterize the time-delay interference factor in the signal acquisition, transmission, and processing process, and the control period is a preset period.

[0111] Optionally, determine the predicted rotational speed based on the actual rotational speed, a prediction factor, the lag time, and a control period, including: determining the predicted rotational speed according to n(k + 1) = n(k) + A × T × n′(k) × DT, where n(k) is the actual rotational speed, A is the prediction factor, T is the lag time, DT is the control period, n(k + 1) is the predicted rotational speed, n′(k) is the derivative of the actual rotational speed, and k is the current moment.

[0112] Optionally, perform a filtering process on the predicted rotational speed to obtain a filtered predicted rotational speed, including: obtaining the filtered actual rotational speed; determining the filtered predicted rotational speed based on the predicted rotational speed, the filtered actual rotational speed, and an actual rotational speed weight.

[0113] Optionally, determine the filtered predicted rotational speed based on the predicted rotational speed, the filtered actual rotational speed, and an actual rotational speed weight, including: according to n filter (k + 1) = (1 - w) × n filter (k) + w × n(k + 1), determine the filtered predicted rotational speed, where k is the current moment, n(k + 1) is the predicted rotational speed, n filter (k + 1) is the filtered predicted rotational speed, w is the actual rotational speed weight, and n filter (k) is the filtered actual rotational speed.

[0114] Optionally, compensate the torque of the motor using the torque compensation value, including: obtaining a first torque compensation threshold and a second torque compensation threshold, where the first torque compensation threshold is greater than the second torque compensation threshold, the first torque compensation threshold is the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress motor torsional vibration; when the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, compensate the torque of the motor using the torque compensation value.

[0115] Optionally, after obtaining the first torque compensation threshold and the second torque compensation threshold, the above method further includes: when the torque compensation value is less than the second torque compensation threshold, or when the torque compensation value is greater than the first torque compensation threshold, determining not to compensate the torque of the motor with the torque compensation value; sequentially performing the above determination step, the above filtering process step, the above PID process step, and the above compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the motor speed fluctuation reaches a preset range, and then completing the torque compensation.

[0116] The present application further provides an electronic device. The electronic device includes one or more processors, a memory, and one or more programs. Among them, the above one or more programs are stored in the above memory and are configured to be executed by the above one or more processors. The above one or more programs include a method for compensating the torque of any one of the above motors. By at least determining the predicted speed according to the above actual speed and the above lag time, and then performing a filtering process on the predicted speed. Due to the delay effect of the first-order low-pass filter, the phase of the filtered predicted speed is almost the same as the phase of the actual motor speed. By taking the difference between the actual speed and the expected speed to obtain the difference between the actual speed and the expected speed, and inputting the speed difference into the PID controller to obtain the torque compensation value. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act on the change of the motor speed in a timely manner, thereby solving the problem of untimely torque compensation caused by filtering the speed of the motor at the current moment in the prior art.

[0117] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.

[0118] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0119] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, as well as the combination of flows and / or blocks in the flowchart and / or block diagram. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

[0120] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

[0122] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.

[0123] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.

[0124] A computer-readable medium includes permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0125] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0126] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0127] 1), The torque compensation method of the motor of the present application determines the predicted speed by at least according to the actual speed and the lag time, and then filters the predicted speed. Due to the delay effect of the first-order low-pass filter, the phase of the filtered predicted speed is almost the same as the phase of the actual motor speed. By subtracting the actual speed from the expected speed to obtain the difference between the actual speed and the expected speed, and inputting the speed difference into the PID controller to obtain the torque compensation value. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act on the change of the motor speed in a timely manner, thereby solving the problem of untimely torque compensation caused by filtering the speed of the motor at the current moment in the prior art.

[0128] 2) The torque compensation device of the motor in this application determines the predicted speed by at least based on the above actual speed and the above lag time, and then filters the predicted speed. Due to the delay effect of the first-order low-pass filter, the phase of the filtered predicted speed is almost the same as the phase of the actual motor speed. By subtracting the actual speed from the expected speed to obtain the difference between the actual speed and the expected speed, and inputting the speed difference into the PID controller to obtain the torque compensation value. At this time, there is no phase delay in the torque compensation value, which enables the torque compensation value to act on the change of the motor speed in a timely manner, thereby solving the problem of untimely torque compensation caused by filtering the speed of the motor at the current moment in the prior art.

[0129] The above are only the preferred embodiments of this application and are not used to limit this application. For those skilled in the art, this application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. A torque compensation method for a motor, characterized in that, Including: Determination step: Obtain the actual rotational speed and the lag time of the motor, and determine a predicted rotational speed based on at least the actual rotational speed and the lag time. The lag time is used to characterize the time period of the lag effect caused by filtering, the predicted rotational speed is used to characterize the rotational speed of the motor at the next moment, and the actual rotational speed is used to characterize the rotational speed of the motor at the current moment; Filtering processing step: Perform filtering processing on the predicted rotational speed to obtain a filtered predicted rotational speed; PID processing step: Use a PID controller to process the filtered predicted rotational speed to obtain a torque compensation value; Compensation step: Compensate the torque of the motor using the torque compensation value; Performing filtering processing on the predicted rotational speed to obtain a filtered predicted rotational speed includes: Obtaining the filtered actual rotational speed; Determining the filtered predicted rotational speed based on the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight; Determining the filtered predicted rotational speed based on the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight includes: According to , determine the filtered predicted rotational speed; wherein, is the current moment, is the predicted rotational speed, is the filtered predicted rotational speed, is the actual rotational speed weight, is the filtered actual rotational speed.

2. The method according to claim 1, characterized in that, Compensating the torque of the motor using the torque compensation value includes: Obtain a first torque compensation threshold and a second torque compensation threshold. The first torque compensation threshold is greater than the second torque compensation threshold. The first torque compensation threshold is the maximum value of the torque compensation value that the motor can tolerate, and the second torque compensation threshold is the minimum value of the torque compensation value that can suppress the torsional vibration of the motor; When the torque compensation value is greater than or equal to the second torque compensation threshold and less than or equal to the first torque compensation threshold, compensate the torque of the motor using the torque compensation value.

3. The method according to claim 2, wherein After obtaining the first torque compensation threshold and the second torque compensation threshold, the method further includes: When the torque compensation value is less than the second torque compensation threshold, or the torque compensation value is greater than the first torque compensation threshold, determine not to compensate the torque of the motor using the torque compensation value; Sequentially execute the determination step, the filtering processing step, the PID processing step, and the compensation step at least once until the torsional vibration of the motor caused by mechanical reasons is suppressed and the rotational speed fluctuation of the motor reaches a preset range, and then complete the torque compensation.

4. A torque compensation device for a motor, characterized in that Including: An acquisition unit for executing the determination step: Obtain the actual rotational speed and the lag time of the motor, and determine a predicted rotational speed based on at least the actual rotational speed and the lag time. The lag time is used to characterize the time period of the lag effect caused by filtering, the predicted rotational speed is used to characterize the rotational speed of the motor at the next moment, and the actual rotational speed is used to characterize the rotational speed of the motor at the current moment; A first processing unit for executing the filtering processing step: Perform filtering processing on the predicted rotational speed to obtain a filtered predicted rotational speed; A second processing unit for executing the PID processing step: Use a PID controller to process the filtered predicted rotational speed to obtain a torque compensation value; A third processing unit for executing the compensation step: Compensate the torque of the motor using the torque compensation value; The first processing unit includes a first acquisition module and a second determination module. The first acquisition module is used to acquire the filtered actual rotational speed; The second determination module is used to determine the filtered predicted rotational speed according to the predicted rotational speed, the filtered actual rotational speed, and the actual rotational speed weight; The second determination module includes a second determination sub-module, and the second determination sub-module is used to determine the filtered predicted rotational speed according to , and determine the filtered predicted rotational speed; Among them, is the current moment, is the predicted rotational speed, is the filtered predicted rotational speed, is the actual rotational speed weight, is the filtered actual rotational speed.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program. Wherein, when the program runs, it controls the device where the computer-readable storage medium is located to execute the torque compensation method of the motor according to any one of claims 1 to 3.

6. An electronic device, characterized in that, Comprising: One or more processors, a memory, and one or more programs. Wherein, the one or more programs are stored in the memory and are configured to be executed by the one or more processors. The one or more programs include a torque compensation method for the motor according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Adaptive suppression method for rapid acceleration shaking of pure electric vehicle

    CN106915278A

  • Torsional vibration control method based on electric drive system of electric vehicle

    CN113511211A