Motor torque compensation method and device, computer equipment and storage medium

By obtaining the current temperature of the motor and finding the torque coefficient compensation amount, and updating the motor torque coefficient in real time, the problem of torque output deviation of the motor at different temperatures is solved, and servo accuracy and motor performance are improved.

CN120263000APending Publication Date: 2025-07-04CHINA LEADSHINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510555831.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The motor's torque output deviates from the expected value under different temperature environments, affecting performance such as servo accuracy.

Method used

By obtaining the current temperature of the motor, use the mapping relationship table between the preset torque coefficient compensation amount and the motor temperature to find the corresponding torque coefficient compensation amount, and update the torque coefficient of the motor to achieve real-time compensation.

Benefits of technology

It improves the accuracy and performance of motor torque control, meets the needs of high-precision application scenarios, and protects the motor from damage caused by temperature changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263000A_ABST
    Figure CN120263000A_ABST
Patent Text Reader

Abstract

The invention discloses a motor torque compensation method and device, computer equipment and a storage medium. The method comprises the steps that the current temperature of a motor is acquired; searching a torque coefficient compensation amount corresponding to the current temperature from a mapping relation table of a preset torque coefficient compensation amount and a motor temperature according to the current temperature of the motor; and updating the torque coefficient of the motor according to the torque coefficient compensation amount corresponding to the current temperature. According to the method, the torque coefficient of the motor can be compensated in real time according to the temperature of the motor, the torque control precision of the motor can be effectively improved, the performance of the motor in different temperature environments is improved, and the requirements of various high-precision application scenes are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of motor control, and in particular, to a method, device, computer device, and storage medium for compensating motor torque. Background Art

[0002] In a motor control system, temperature change has a significant impact on the torque output of the motor. The essence is that the resistance of the motor winding increases with the increase of temperature, resulting in a decrease in the torque coefficient of the motor. Then, under the same current, the torque output by the motor will decrease. Traditional torque control methods usually assume that the motor operates at a constant temperature, ignoring the influence of temperature change on torque. In practical applications, the operating temperature of the motor may change significantly due to environmental conditions, load changes, or long-term operation, resulting in a certain deviation between the actual torque output of the motor and the expected value, thus affecting performance such as servo accuracy, and the performance of the motor in actual applications is poor. Summary of the Invention

[0003] The present invention provides a method, device, computer device, and storage medium for compensating motor torque, aiming to solve the problem that the actual torque output deviates from the expected value due to temperature change during the operation of the motor, which affects performance such as servo accuracy.

[0004] In a first aspect, an embodiment of the present invention provides a method for compensating motor torque, the method including: obtaining the current temperature of the motor; looking up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relationship table between the torque coefficient compensation amount and the motor temperature; updating the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature.

[0005] Further, after looking up the torque coefficient compensation amount corresponding to the current temperature from the preset mapping relationship table between the torque coefficient compensation amount and the motor temperature, it includes: if there is no temperature value corresponding to the current temperature in the mapping relationship table, inputting the current temperature of the motor into a torque coefficient compensation curve to calculate the torque coefficient compensation amount corresponding to the current temperature, where the torque coefficient compensation curve is obtained by pre-fitting the torque coefficient compensation amounts of the motor at different preset temperatures.

[0006] Further, the equation of the torque coefficient compensation curve includes: y = a·x 2 +b·x + c, where y is the torque coefficient compensation amount of the motor at the current temperature, x is the current temperature of the motor, and a, b, and c are all constants.

[0007] Further, the preset mapping relationship table between the torque coefficient compensation amount and the motor temperature is obtained through the formula Kt comp =(Kt T_ref-Kt T_now ) / Kt ref is obtained, where Kt comp is the torque coefficient compensation amount, and Kt T_now is the torque coefficient at the current temperature, and Kt T_ref is the torque coefficient at the reference temperature.

[0008] Further, the method further includes: obtaining a temperature detection result according to the current temperature of the motor and a preset judgment logic; when the temperature detection result indicates an abnormal temperature, reducing the operating power of the motor and outputting an alarm signal.

[0009] Further, after obtaining the temperature detection result according to the current temperature of the motor and the preset judgment logic, it further includes: when the temperature detection result indicates that the temperature is too high, controlling the motor to stop running and outputting an alarm signal.

[0010] Further, obtaining the temperature detection result according to the current temperature of the motor and the preset judgment logic includes: comparing the current temperature of the motor with a first safety threshold and a second safety threshold, where the second safety threshold is greater than the first safety threshold; determining whether the current temperature of the motor is greater than the first safety threshold or greater than the second safety threshold; if the current temperature of the motor is greater than the first safety threshold and less than the second safety threshold, determining that the temperature detection result is an abnormal temperature; if the current temperature of the motor is greater than the second safety threshold, determining that the temperature detection result is a too high temperature.

[0011] In a second aspect, an embodiment of the present invention further provides a compensation device for motor torque, which includes: an acquisition unit for acquiring the current temperature of the motor; a search unit for searching for the torque coefficient compensation amount corresponding to the current temperature from a mapping relationship table of preset torque coefficient compensation amounts and motor temperatures according to the current temperature of the motor; an update unit for updating the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature.

[0012] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, and a computer program is stored on the memory, and when the processor executes the computer program, the method of the first aspect is implemented.

[0013] In a fourth aspect, an embodiment of the present invention further provides a storage medium, and the storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect can be implemented.

[0014] The present invention provides a method, device, computer equipment and storage medium for compensating motor torque. Among them, the method includes: obtaining the current temperature of the motor; looking up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relationship table between the torque coefficient compensation amount and the motor temperature; and updating the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature. Thus, the torque coefficient of the motor can be compensated in real time according to the temperature of the motor, effectively improving the accuracy of motor torque control, improving the performance of the motor in different temperature environments, and meeting the requirements of various high-precision application scenarios. Description of the Drawings

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 It is a schematic flowchart of the steps of the method provided in an embodiment of the present invention;

[0017] Figure 2 It is a schematic flowchart of the steps of the method provided in another embodiment of the present invention;

[0018] Figure 3 It is a schematic flowchart of the steps of the method provided in yet another embodiment of the present invention;

[0019] Figure 4 It is a schematic flowchart of the steps of the method provided in yet another embodiment of the present invention;

[0020] Figure 5 It is a schematic flowchart of the sub-steps of the method provided in an embodiment of the present invention;

[0021] Figure 6 It is a schematic block diagram of the device for compensating motor torque provided in an embodiment of the present invention;

[0022] Figure 7 It is a schematic block diagram of the device for compensating motor torque provided in another embodiment of the present invention;

[0023] Figure 8 It is a schematic block diagram of the device for compensating motor torque provided in yet another embodiment of the present invention;

[0024] Figure 9 It is a schematic block diagram of the computer equipment provided in the embodiments of the present invention. Detailed Embodiments

[0025] 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. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0026] It should be understood that when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0027] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in this specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.

[0028] It should be further understood that the term " / and" used in this specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0029] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0030] Currently, in a motor system, the operating temperature of the motor may increase due to environmental conditions, load changes, or long-term operation. The winding resistance inside the motor increases with the increase in temperature, causing the torque coefficient of the motor to become smaller. Under the same current, the output torque of the motor becomes smaller. Traditional torque control methods often ignore the influence of temperature changes on torque, resulting in a deviation between the actual torque output and the expected value, thus affecting performance such as servo accuracy and even posing a risk of burning out the motor.

[0031] To solve the above technical problems, this embodiment proposes a method for compensating the torque of a motor. The method can be applied in a motor system to compensate the output torque of the motor under different temperature conditions. Refer to Figure 1 , Figure 1 which is a schematic flow chart of the steps of the method for compensating the torque of the motor provided in this embodiment. As shown in Figure 1 , the method for compensating the torque of the motor includes steps: S110 - S130.

[0032] S110. Obtain the current temperature of the motor.

[0033] In specific implementation, the temperature of the motor is detected and obtained in real time by a temperature sensor. By installing a temperature sensor inside the motor or near the winding, the temperature sensor is connected to the encoder system of the motor. An ADC acquisition module is added to the encoder system of the motor, and the encoder system of the motor is connected to the control system of the motor. During the operation of the motor, the MCU of the encoder system converts the analog signal detected by the temperature sensor into a digital signal and transmits it to the control system. The control system of the motor can thus obtain the current temperature of the motor in real time through the data transmitted back by the encoder.

[0034] S120. Look up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relationship table between the torque coefficient compensation amount and the motor temperature.

[0035] In specific implementation, after the control system of the motor obtains the current temperature of the motor, it looks up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relationship table between the torque coefficient compensation amount and the motor temperature. The mapping relationship table between the torque coefficient compensation amount and the motor temperature is essentially a data group stored in the storage unit of the encoder system or the control system of the motor. It contains the torque coefficient compensation amount data of the motor at different preset temperatures, and these data are measured in a laboratory environment. Specifically, in the experimental environment, the motor is made to output the same torque at different preset temperatures, and then the current value of the motor at each preset temperature is calibrated. For example, the motor outputs a torque of 100 N·m at different preset temperatures such as -20°C, 0°C, 20°C, 40°C, 60°C of the motor, and the current value corresponding to the temperature is calibrated. After measuring the current values of the motor outputting the same torque at different preset temperatures, according to the torque coefficient formula of the motor K = T / I (K is the torque coefficient, T is the torque, and I is the current value), the torque coefficient corresponding to the temperature can be calculated. By comparing and analyzing these torque coefficients with the torque coefficients in the ideal state, the different torque coefficient compensation amounts required at different preset temperatures can be obtained, thereby establishing a preset mapping relationship table between the torque coefficient compensation amount and the motor temperature and storing it in the storage unit of the encoder or the controller. The control system looking up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relationship table between the torque coefficient compensation amount and the motor temperature is essentially a call to data. The control system, according to the received temperature data, retrieves the torque coefficient compensation amount corresponding to the temperature data from the preset mapping relationship table between the torque coefficient compensation amount and the motor temperature stored in the storage unit, and then accurately compensates the torque of the motor.

[0036] In one embodiment, as Figure 2 shown, after step S120, step S121 is further included.

[0037] S121. If there is no temperature value corresponding to the current temperature in the mapping relation table, input the current temperature of the motor into the torque coefficient compensation curve to calculate the torque coefficient compensation amount corresponding to the current temperature, where the torque coefficient compensation curve is obtained by pre-fitting the torque coefficient compensation amounts of the motor at different preset temperatures.

[0038] In specific implementation, in the mapping relation table of the torque coefficient compensation amount and the motor temperature established through experimental measurement, due to the limited temperature samples in the experiment, each torque data compensation amount corresponds to a temperature sample. For example, the temperature sample interval of the experimental measurement is from -20°C to 100°C. If each 1°C is used as a measurement unit, there are 121 temperature samples in total, and a mapping relation table containing 121 torque coefficient compensation amounts can be constructed. In actual application, if the current temperature of the motor transmitted back by the temperature sensor is not within the experimental temperature samples, there will be no temperature value corresponding to the current temperature in the mapping relation table of the torque coefficient compensation amount and the motor temperature, and the corresponding torque coefficient compensation amount cannot be found in the mapping relation table. At this time, data fitting or interpolation method is used to calculate the corresponding torque coefficient compensation amount. Specifically, by pre-fitting the torque coefficient compensation amounts of the motor measured in the experimental environment at different preset temperatures, all possible temperatures that the motor may reach except the experimental measurement temperature samples and the torque coefficient compensation amounts corresponding to these temperatures are obtained, and then the torque coefficient compensation curve is constructed. The torque coefficient compensation curve includes the functional relationship between the temperature data and the torque coefficient compensation amount that do not appear in the mapping relation table of the torque coefficient compensation amount and the motor temperature. When the control system receives the temperature data of the motor that is outside the experimental temperature samples, the torque coefficient compensation amount corresponding to the current temperature is calculated by inputting the current temperature of the motor into the torque data curve, and the torque of the motor can be accurately compensated at any temperature condition.

[0039] S130. Update the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature.

[0040] In specific implementation, the control system obtains the current temperature of the motor through the data transmitted back by the temperature sensor, retrieves the torque coefficient compensation amount corresponding to the current temperature from the storage unit according to the current temperature of the motor, and applies the torque coefficient compensation amount corresponding to the current temperature to the torque control algorithm of the motor, so as to update the torque coefficient of the motor, make the torque coefficient of the motor at the current temperature also approach the torque coefficient in the ideal state, and the torque output by the motor approaches the torque in the ideal state, without deviation due to temperature change, realizing real-time and accurate compensation of torque.

[0041] In one embodiment, the equation of the torque coefficient compensation curve includes: y = a·x 2+ b·x + c, where y is the torque coefficient compensation amount of the motor at the current temperature, x is the current temperature of the motor, and a, b, and c are all constants.

[0042] In specific implementation, after fitting the torque coefficient compensation amounts of the motor at different preset temperatures, the equation of the torque coefficient compensation curve obtained includes the equation y = a·x 2 + b·x + c, that is, the equation of the torque coefficient compensation curve is a quadratic equation, and the actual image is a parabola. Among them, y is the torque coefficient compensation amount of the motor at the current temperature, x is the current temperature of the motor, a, b, and c are all constants, and a, b, and c can be specifically valued according to the design requirements of torque compensation. In practical applications, taking the temperature data transmitted back by the temperature sensor as 0°C as an example, substituting the current temperature x = 0 of the motor into the equation of the torque coefficient compensation curve, y = c can be calculated. Then, the torque coefficient compensation amount corresponding to the current temperature of the motor at 0°C is the constant c. The control system uses the constant c as the torque coefficient compensation amount in the control algorithm of the motor when the current temperature of the motor is 0°C, thereby updating the torque coefficient of the motor. Under other different temperature conditions, by substituting the temperature data into the equation of the torque coefficient compensation curve, the corresponding torque coefficient compensation amount can be obtained, so as to achieve precise torque control under different temperature conditions.

[0043] In one embodiment, the mapping relationship table between the preset torque coefficient compensation amount and the motor temperature is obtained through the formula Kt comp =(Kt T_ref - Kt T_now ) / Kt ref , where Kt comp is the torque coefficient compensation amount, Kt T_now is the torque coefficient at the current temperature, and Kt T_ref is the torque coefficient at the reference temperature.

[0044] In specific implementation, the mapping relationship table between the preset torque coefficient compensation amount and the motor temperature is obtained through the formula Kt comp =(Kt T_ref - Kt T_now ) / Kt ref . In the formula, Kt comp is the torque coefficient compensation amount, Kt T_now is the torque coefficient at the current temperature, and Kt T_ref is the torque coefficient at the reference temperature. Specifically, the torque coefficient of the motor is calculated by the formula torque coefficient formula K = T / I (K is the torque coefficient, T is the torque, and I is the current). Kt T_ref is the torque coefficient at the reference temperature, that is, the torque coefficient of the motor at the ideal temperature, which is the ratio of the torque to the current of the motor at the ideal temperature (such as 20°C). Generally, KtT_ref is a constant. After measuring the torque coefficients at different preset temperatures in the experimental environment, through the formula Kt comp =(Kt T_ref -Kt T_now ) / Kt ref the torque coefficient compensation amount of the motor at each temperature can be calculated, so as to obtain the mapping relationship between the temperature and the torque coefficient compensation amount, construct a mapping relationship table of the preset torque coefficient compensation amount and the motor temperature and store it in the storage unit of the encoder or the controller. For example, taking 20°C as the reference temperature, assuming that in the experimental environment, the torque coefficients of the motor at -20°C, 0°C, 20°C, 40°C, and 60°C are measured to be 10.2, 12.2, 12.6, 9.8, and 9.6 respectively. Through the above formula, the torque coefficient compensation amounts of the motor at "-20°C, 0°C, 20°C, 40°C, 60°C" can be obtained as "-0.19, -0.32, 0, 0.22, 0.24" respectively. The mapping relationship table of the preset torque coefficient compensation amount and the motor temperature can be constructed through the mapping relationship of "-20°C - torque coefficient compensation amount -0.39, 0°C - torque coefficient compensation amount -0.32, 20°C - torque coefficient compensation amount 0, 40°C - torque coefficient compensation amount 0.022, 60°C - torque coefficient compensation amount 0.024".

[0045] In one embodiment, as Figure 3 shown, the method further includes steps S140 - 150.

[0046] S140. Obtain the temperature detection result according to the current temperature of the motor and the preset judgment logic.

[0047] In a specific implementation, during the operation of the motor, its temperature will change. If the temperature of the motor exceeds the safe range or other abnormal conditions, the life of the motor will be reduced or even damaged. In this embodiment, the temperature sensor transmits the current temperature data of the motor to the control system of the motor in real time. After the control system obtains the current temperature of the motor, it makes a judgment according to the preset judgment logic to obtain the temperature detection result, realizing the real-time monitoring of the temperature of the motor so as to take protection measures.

[0048] S150. When the temperature detection result indicates that the temperature is abnormal, reduce the operating power of the motor and output an alarm signal.

[0049] In specific implementation, the control system makes a judgment according to a preset judgment logic to obtain the temperature detection result. The temperature detection result may include two results: the detection result of abnormal temperature and normal temperature. The result of normal temperature indicates that the motor is running normally, and the temperature of the motor has little impact on the performance of the motor. The result of abnormal temperature may be manifested as the motor temperature exceeding the normal temperature range, but it has not reached the level sufficient to demagnetize or burn out the motor. The control system reduces the operating power of the motor to lower the motor temperature, thereby achieving the purpose of protecting the motor. And the control system outputs an alarm signal, which is output in the form of a buzzer sounding or an LED lighting up, to prompt the user that the abnormal temperature of the motor has reduced the power.

[0050] In one embodiment, as Figure 4 shown, after the step S140, there is further a step S160.

[0051] S160. When the temperature detection result is that the temperature is too high, control the motor to stop running and output an alarm signal.

[0052] In specific implementation, the control system makes a judgment according to a preset judgment logic to obtain the temperature detection result. The temperature detection result may further include the result of too high temperature. The result of too high temperature is manifested as the motor temperature exceeding the normal temperature range and has reached the level sufficient to demagnetize or burn out the motor. In this case, the control system controls the motor to stop running, so that there is no current input to the motor, thereby avoiding demagnetization or burning of the motor and protecting the safety of the motor. And the control system also outputs an alarm signal, which is output in the form of a buzzer sounding or an LED lighting up, to prompt the user that the motor has stopped running due to too high temperature.

[0053] In one embodiment, as Figure 5 shown, the step S140 includes steps S141 - S144.

[0054] S141. Compare the current temperature of the motor with a first safety threshold and a second safety threshold, where the second safety threshold is greater than the first safety threshold.

[0055] In specific implementation, the control system of the motor obtains the current temperature of the motor through the temperature data transmitted back by the temperature sensor, and obtains the temperature detection result according to a preset judgment logic. The preset judgment logic is to compare the current temperature of the motor with a first safety threshold and a second safety threshold. The design of the first safety threshold and the second safety threshold represents two different risk levels. The second safety threshold is greater than the first safety threshold, and the risk level for which the second safety threshold is used to judge is greater than the risk level for which the first safety threshold is used to judge. Thus, different protection measures can be taken according to the two different risks.

[0056] S142. Determine whether the current temperature of the motor is greater than the first safety threshold or greater than the second safety threshold.

[0057] In specific implementation, the control system determines whether the current temperature of the motor is greater than the first safety threshold or greater than the second safety threshold according to the preset judgment logic, so as to determine different detection results.

[0058] S143. If the current temperature of the motor is greater than the first safety threshold and less than the second safety threshold, it is determined that the temperature detection result is temperature anomaly.

[0059] In specific implementation, if the current temperature of the motor is less than the first safety threshold, it indicates that the current temperature of the motor is normal. When the current temperature of the motor is greater than the first safety threshold and less than the second safety threshold, the current temperature of the motor is between the first safety threshold and the second safety threshold. The control system determines that the temperature detection result is temperature anomaly. This result shows that the motor temperature exceeds the normal temperature range, but does not reach the level that can demagnetize or burn out the motor. The control system protects the safety of the motor by reducing the operating power of the motor.

[0060] S144. If the current temperature of the motor is greater than the second safety threshold, it is determined that the temperature detection result is too high temperature.

[0061] In specific implementation, when the current temperature of the motor is greater than the second safety threshold, the control system determines that the temperature detection result is too high temperature. This result shows that the motor temperature exceeds the safe temperature range and reaches the level that can demagnetize or burn out the motor. The control system protects the safety of the motor by controlling the motor to stop running.

[0062] In summary, the method provided by the embodiment of the present invention obtains the current temperature of the motor through the temperature sensor installed on the motor, searches the torque coefficient compensation table according to the current temperature of the motor to obtain the torque coefficient compensation amount of the motor at the current temperature, and updates the torque coefficient of the motor with the torque coefficient compensation amount of the motor at the current temperature, thereby realizing the real-time compensation of the torque coefficient of the motor according to the temperature of the motor, which can effectively improve the accuracy of the motor torque control, improve the performance of the motor in different temperature environments, and meet the requirements of various high-precision application scenarios.

[0063] Figure 6 It is a schematic block diagram of the motor torque compensation device 200 provided by the embodiment of the present invention. As Figure 6 shown, the motor torque compensation device 200 corresponds to the above-mentioned motor torque compensation method. The motor torque compensation device 200 can be a motor controller or other devices. Specifically, please refer to Figure 6, the torque compensation device 200 of the motor includes: an acquisition unit 201, a lookup unit 202, and an update unit 203;

[0064] Among them, the acquisition unit 201 is used to acquire the current temperature of the motor; the lookup unit 202 is used to look up the torque coefficient compensation amount corresponding to the current temperature from a pre-set mapping relationship table between the torque coefficient compensation amount and the motor temperature according to the current temperature of the motor; the update unit 203 is used to update the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature.

[0065] In one embodiment, as Figure 7 shown, the torque compensation device 200 of the motor further includes: an input unit 204;

[0066] Among them, the input unit 204 is used to calculate the torque coefficient compensation amount corresponding to the current temperature by inputting the current temperature of the motor into the torque coefficient compensation curve if there is no temperature value corresponding to the current temperature in the mapping relationship table, where the torque coefficient compensation curve is obtained by pre-fitting the torque coefficient compensation amounts of the motor at different preset temperatures.

[0067] In one embodiment, as Figure 8 shown, the torque compensation device 200 of the motor further includes: a judgment unit 205 and an execution unit 206;

[0068] Among them, the judgment unit 205 is used to obtain a temperature detection result according to the current temperature of the motor and a preset judgment logic; the execution unit 206 is used to reduce the operating power of the motor and output an alarm signal when the temperature detection result indicates that the temperature is abnormal, and control the motor to stop running and output an alarm signal when the temperature detection result indicates that the temperature is too high.

[0069] The above-mentioned torque compensation device 200 of the motor can be implemented in the form of a computer program, and this computer program can run on a computer device 500 as Figure 9 shown.

[0070] Please refer to Figure 9 , Figure 9 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal, such as an electronic device with communication functions such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.

[0071] Refer to Figure 9, the computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. Among them, the memory may include a non-volatile storage medium 503 and an internal memory 504.

[0072] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, can cause the processor 502 to execute the method for compensating the motor torque.

[0073] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.

[0074] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, it can cause the processor 502 to execute the above method for compensating the motor torque.

[0075] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that Figure 9 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0076] Among them, the processor 502 is used to run the computer program 5032 stored in the memory to implement the steps of the above method.

[0077] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0078] Those of ordinary skill in the art can understand that all or part of the processes in the methods of implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0079] Therefore, the present invention also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the above method.

[0080] The storage medium can be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc, etc., all kinds of computer-readable storage media that can store program codes.

[0081] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0082] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0083] The steps in the method embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0084] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on such an understanding, the technical solution of the present invention, in essence, 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. The computer software product is stored in a storage medium and includes several instructions for causing a computer device to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0085] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0086] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.

[0087] As described above, the above are only the specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for compensating motor torque, characterized in that The method includes: Obtaining the current temperature of the motor; Looking up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relation table between the torque coefficient compensation amount and the motor temperature according to the current temperature of the motor; Updating the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature.

2. The method according to claim 1, wherein After looking up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relation table between the torque coefficient compensation amount and the motor temperature according to the current temperature of the motor, it includes: If there is no temperature value corresponding to the current temperature in the mapping relation table, inputting the current temperature of the motor into a torque coefficient compensation curve to calculate the torque coefficient compensation amount corresponding to the current temperature, where the torque coefficient compensation curve is obtained by pre-fitting the torque coefficient compensation amounts of the motor at different preset temperatures.

3. The method according to claim 2, characterized in that The equation of the torque coefficient compensation curve includes: y = a·x 2 + b·x + c, where y is the torque coefficient compensation amount of the motor at the current temperature, x is the current temperature of the motor, and a, b, and c are all constants.

4. The method according to claim 1, wherein The mapping relationship table between the preset torque coefficient compensation amount and the motor temperature is obtained through the formula Kt comp =(Kt T_ref -Kt T_now ) / Kt ref , where Kt comp is the torque coefficient compensation amount, Kt T_now is the torque coefficient at the current temperature, and Kt T_ref is the torque coefficient at the reference temperature.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtaining a temperature detection result according to the current temperature of the motor and a preset judgment logic; When the temperature detection result is that the temperature is abnormal, reducing the operating power of the motor and outputting an alarm signal.

6. The method according to claim 5, wherein After obtaining the temperature detection result according to the current temperature of the motor and the preset judgment logic, it further includes: When the temperature detection result is that the temperature is too high, controlling the motor to stop running and outputting an alarm signal.

7. The method according to claim 6, wherein Obtaining the temperature detection result according to the current temperature of the motor and the preset judgment logic includes: Comparing the current temperature of the motor with a first safety threshold and a second safety threshold, where the second safety threshold is greater than the first safety threshold; Judging whether the current temperature of the motor is greater than the first safety threshold or greater than the second safety threshold; If the current temperature of the motor is greater than the first safety threshold and less than the second safety threshold, determining that the temperature detection result is that the temperature is abnormal; If the current temperature of the motor is greater than the second safety threshold, determining that the temperature detection result is that the temperature is too high.

8. A compensation device for motor torque, characterized in that, It includes: An obtaining unit for obtaining the current temperature of the motor; A lookup unit for looking up the torque coefficient compensation amount corresponding to the current temperature from a preset mapping relation table between the torque coefficient compensation amount and the motor temperature according to the current temperature of the motor; An updating unit for updating the torque coefficient of the motor with the torque coefficient compensation amount corresponding to the current temperature.

9. A computer device, characterized in that, The computer device includes a memory and a processor, and a computer program is stored on the memory. When the processor executes the computer program, the method described in any one of claims 1-7 is implemented.

10. A storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-7 can be implemented.