Motor driving method, device, equipment and system
By performing secondary speed planning and smooth correction of the first speed control signal of the traditional DC servo motor, the traction force during the motor operation is reduced, the problem of motor shaft wear is solved, and the effect of protecting the motor shaft is achieved.
Patent Information
- Application Number
- CN202211163427.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-09-23
AI Technical Summary
The larger the torque of the traditional DC servo motor, the greater the acceleration generated, the greater the external force brought to the motor shaft, and it is easy to wear the motor shaft.
By acquiring the first speed control signal output by the upper computer, the traction force data is obtained. If a speed secondary planning is required, the first speed control signal is smoothly corrected to obtain the second speed control signal to reduce the traction force during the motor operation.
It effectively reduces the traction force generated when the motor torque is too high, protects the motor shaft, and slows down the frequency and loss of repairs and replacements.
Smart Images

Figure CN115469691B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of motor motion control, and in particular to a motor driving method, device, equipment and system. Background Art
[0002] With the development of industrial automation technology, unmanned vehicles with front and rear dual drives using multiple DC servo motors have emerged, which can be widely used in various fields such as industrial manufacturing, logistics warehousing, and intelligent transportation. The existing DC servo motors used to drive unmanned vehicles generally include stators, rotor cores, motor shafts, and other necessary components. Among them, the rotor core is composed of silicon steel punchings stacked and fixed on the motor shaft. It is an indirect speed change device that can control the motor by converting the received electrical signal into a torque speed signal, and the speed control is relatively accurate and stable.
[0003] However, when the torque of a traditional DC servo motor is greater, the acceleration it produces is greater, and the external force it brings to the motor shaft is greater, which makes the motor shaft very easy to wear out. Summary of the invention
[0004] Based on this, it is necessary to provide a motor driving method, device, equipment and system that can effectively protect the motor shaft and reduce the wear of the motor shaft in response to the above technical problems.
[0005] A motor driving method, the method comprising:
[0006] Acquire a first speed control signal output by the host computer, and obtain traction force data according to analysis of the first speed control signal;
[0007] If it is determined according to the traction force data that speed secondary planning is required, the first speed control signal is smoothed and corrected, and a target speed control signal is determined according to the obtained second speed control signal; wherein the speed secondary planning is used to reduce the traction force generated when the motor runs according to the first speed control signal;
[0008] If it is determined according to the traction force data that secondary speed planning is not required, using the first speed control signal as a target speed control signal;
[0009] The motor is driven according to the target speed control signal to control the operation of the target device.
[0010] In one embodiment, determining that secondary speed planning is required according to the traction force data includes:
[0011] If the traction force data is greater than a first traction force threshold, it is determined that secondary speed planning is required; wherein the first traction force threshold is obtained according to the traction force generated by the maximum torque of the motor.
[0012] In one embodiment, smoothing and correcting the speed control signal to obtain a second speed control signal includes:
[0013] Performing speed smoothing on the speed control signal using an S-shaped speed curve function to obtain a smoothed speed control signal;
[0014] Obtaining smoothed traction force data according to the smoothed speed control signal analysis;
[0015] If the smoothed traction force data is still greater than the first traction force threshold, correcting the smoothed traction force data to the first traction force threshold, and determining the speed control signal corresponding to the first traction force threshold as the second speed control signal;
[0016] If the smoothed traction force data is less than or equal to the first traction force threshold, the speed control signal corresponding to the smoothed traction force data is determined as the second speed control signal.
[0017] In one embodiment, determining the target speed control signal according to the obtained second speed control signal includes:
[0018] If the traction force data corresponding to the second speed control signal is overloaded, controlling the overload counter to record the number of overloads;
[0019] If the overload number is less than or equal to the preset overload number, the second speed control signal is used as the target speed control signal.
[0020] In one of the embodiments, after controlling the overload counter to record the number of overloads if the traction force data corresponding to the second speed control signal is overloaded, the method further includes:
[0021] If the number of overload times is greater than the preset number of overload times, the speed control signal corresponding to the second traction force threshold is used as the target speed control signal, and the cool-down counter is controlled to record the number of cool-down times; wherein the second traction force threshold is less than the first traction force threshold, and the second traction force threshold is used to characterize the traction force generated by the rated torque of the motor.
[0022] In one embodiment, after the control cool-down counter records the number of cool-down times, the method further includes:
[0023] After the cool-down times are greater than a preset cool-down times, the overload counter and the cool-down counter are controlled to be cleared.
[0024] In one embodiment, before obtaining the first speed control signal output by the upper speed planning module, the method further includes:
[0025] The current actual speed information of the motor is obtained, and the current actual speed information is sent to a host computer; the current actual speed information is used by the host computer to predict and output the first speed control signal.
[0026] In one embodiment, a motor driving device is also provided, the device comprising:
[0027] An acquisition module, used for acquiring a first speed control signal output by a host computer, and obtaining traction force data according to analysis of the first speed control signal;
[0028] a smoothing correction module, for determining that secondary speed planning is required according to the traction force data, performing smoothing correction on the speed control signal, and determining a target speed control signal according to the obtained second speed control signal; wherein the secondary speed planning is used to reduce the traction force generated when the motor runs according to the first speed control signal;
[0029] A determination module, configured to determine the first speed control signal as a target speed control signal when it is determined that no secondary speed planning is required according to the traction force data;
[0030] The driving module is used to drive the motor to control the operation of the target device according to the target speed control signal.
[0031] In one of the embodiments, a motor drive device is further provided, comprising a lower speed planning module and a first communication module, wherein the lower speed planning module is connected to a host computer via the first communication module, and the lower speed planning module is also connected to a motor;
[0032] The lower-level speed planning module is used to obtain the first speed control signal output by the upper computer through the first communication module, and obtain traction data based on the analysis of the first speed control signal; if it is determined according to the traction data that speed secondary planning is required, the first speed control signal is smoothed and corrected, and a target speed control signal is determined based on the obtained second speed control signal; wherein, the speed secondary planning is used to reduce the traction generated when the motor runs according to the first speed control signal; if it is determined according to the traction data that speed secondary planning is not required, the first speed control signal is used as the target speed control signal; the lower-level speed planning module is also used to drive the motor according to the target speed control signal to control the operation of the target device.
[0033] In one of the embodiments, a motor drive system is further provided, including a host computer and the above-mentioned motor drive device, wherein the host computer is connected to the motor drive device, and the motor drive device is connected to a target device through the motor.
[0034] The above-mentioned motor driving method, device, equipment and system, by smoothly correcting the first speed control signal when the traction force data corresponding to the first speed control signal needs to perform secondary speed planning, effectively reduces the traction force generated by the motor operation when the torque corresponding to the first speed control signal is too large, and drives the motor to operate according to the reduced speed control signal, so that the motor will not generate excessive traction force to wear the motor shaft, effectively protecting the motor shaft and reducing the frequency of repair and replacement and loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a schematic flow chart of a motor driving method in one embodiment;
[0036] Figure 2 is a flow chart of a second speed control signal determination step in one embodiment;
[0037] Figure 3 A schematic diagram of a flow chart of overload mode and cool-down mode steps in one embodiment;
[0038] Figure 4 is a schematic flow chart of a motor driving method in another embodiment;
[0039] Figure 5 FIG. 4 is a structural block diagram of a motor driving device in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] With the development of industrial automation technology, unmanned vehicles with front and rear dual drive using multiple DC servo motors have emerged, which can be widely used in various fields such as industrial manufacturing, logistics warehousing, and intelligent transportation. The existing DC servo motors used to drive unmanned vehicles generally include stators, rotor cores, motor shafts, and other necessary components. Among them, the rotor core is composed of silicon steel punchings laminated and fixed on the motor shaft. It is an indirect speed change device that can control the motor by converting the received electrical signal into a torque speed signal, and the speed control is relatively accurate and stable. However, the greater the torque of the traditional DC servo motor, the greater the acceleration generated, the greater the external force brought to the motor shaft, and it is very easy to wear the motor shaft. And for the method of using multiple DC servo motors to drive the front and rear of the unmanned vehicle, multiple servo motors are prone to torque conflicts due to signal delay problems, and the motor shaft is easily damaged or even broken when the external force on the motor shaft is large. In order to make the speed control between the DC servo motor and the unmanned vehicle more compatible, enterprises and research institutes will invest a lot of money to independently develop servos. However, for small-scale engineering companies, factories and unmanned vehicle research institutes, developing single or multiple DC servo motors to adapt to unmanned vehicles requires high costs and risks.
[0042] Based on this, the present application provides a motor driving method, device, equipment and system, which smoothly corrects the first speed control signal when the traction data corresponding to the first speed control signal needs to perform speed secondary planning, thereby effectively reducing the traction generated by the motor when the torque corresponding to the first speed control signal is too large, and drives the motor to operate according to the reduced speed control signal, so that the motor will not generate excessive traction to wear the motor shaft, effectively protecting the motor shaft and reducing the frequency and loss of repairs and replacements.
[0043] In one embodiment, Figure 1 As shown, a motor driving method is provided, including the following steps 102 to 108. Among them:
[0044] Step 102: Obtain a first speed control signal output by the host computer, and obtain traction force data F according to analysis of the first speed control signal.
[0045] Among them, the first speed control signal is the speed control signal predicted and output by the first-level speed planning module in the host computer, which can be used to drive the motor to control the operation of the target device (unmanned vehicle). The speed planning algorithm adopted by the first-level speed planning module of the host computer is not unique, and can be a time-optimal trajectory parameterization algorithm, an iterative spline trajectory parameterization algorithm, or an iterative parabolic time parameterization algorithm. When the host computer predicts and outputs the first speed control signal, it can be obtained by analyzing the current actual speed information of the motor and the target speed information expected by the user. The target speed information expected by the user can be set by the user through the input device of the host computer. The current actual speed information of the motor is not uniquely obtained, and can be obtained by detection by the detection device in the unmanned vehicle, or the motor can actively collect the current actual speed information and then feed it back to the host computer. In one embodiment, before step 102, the motor driving method also includes: obtaining the current actual speed information of the motor, and sending the current actual speed information to the host computer; the current actual speed information is used by the host computer to predict and output the first speed control signal.
[0046] Specifically, the first speed control signal can drive the motor shaft to rotate at a speed corresponding to the first speed control signal, and further enable the unmanned vehicle to run at the speed information corresponding to the first speed control signal. Correspondingly, the first speed control signal can be an electrical signal. Therefore, after connecting to the host computer through the first communication module and obtaining the first speed control signal, the traction force data can be obtained according to the analysis of the first speed control signal, which is used to characterize the magnitude of the force generated by the motor rotor torque when the motor runs according to the first speed control signal.
[0047] It can be understood that the traction data F can be obtained by the formula F = μmg + ma. Among them, μ is the friction coefficient, which can be obtained according to the actual situation. The default value is set to the friction coefficient of normal dry concrete road surface 0.6; m is the mass of the unmanned vehicle (unit: kg); g is the acceleration of gravity 9.80m / s 2 ; a is the acceleration corresponding to the first speed control signal (unit: m / s2).
[0048] In addition, the frequency of the first speed control signal output by the host computer based on the actual speed information of the motor is not fixed, and can be set according to the actual speed control requirements of the unmanned vehicle. Each time the speed is controlled, the host computer outputs a first speed control signal to achieve continuous operation of the unmanned vehicle by driving the motor.
[0049] Step 104: If it is determined that secondary speed planning is required based on the traction force data F, the first speed control signal is smoothed and corrected, and the target speed control signal is determined based on the obtained second speed control signal; wherein, the secondary speed planning is used to reduce the traction force generated when the motor runs according to the first speed control signal.
[0050] Among them, each time the speed is controlled, after obtaining the first speed control signal, it is necessary to determine whether speed secondary planning is required according to the corresponding traction force data F, so as to ensure that when the torque is large, the traction force generated when the motor runs according to the first speed control signal is reduced to protect the motor from damage. It can be understood that the target speed control signal is the speed control signal that is ultimately used to drive the motor to run during each speed control, which can be the first speed control signal output by the host computer, or the second speed control signal after speed secondary planning, or the speed control signal determined according to the second speed control signal after speed secondary planning.
[0051] Specifically, if it is determined that speed secondary planning is required according to the traction force data F, the first speed control signal is smoothed and corrected to obtain the second speed control signal. There are many ways to smooth the first speed control signal, for example, an S-type speed curve function, a T-type curve function, or a sinusoidal acceleration and deceleration control algorithm may be used. In this embodiment, an S-type speed curve function is used to smooth the first speed control signal.
[0052] Furthermore, after obtaining the second speed control signal, the target speed control signal can be determined according to the second speed control signal. First, determine whether the motor is overloaded when running according to the second speed control signal based on the traction data corresponding to the second speed control signal. If overloaded, it is necessary to determine whether the second speed control signal can continue to be used as the target speed control signal for overload operation based on the number of overloads. If overload operation is no longer possible, the speed control signal corresponding to the traction data generated by the rated torque of the motor is used as the target speed control signal. It can be understood that the second speed control signal is a speed control signal after smoothing and correcting the first speed control signal. When the second speed control signal is used for overload operation and the number of overloads does not exceed the preset number, the speed increase of the unmanned vehicle can be guaranteed to the greatest extent, and the motor can be protected from damage to a certain extent.
[0053] In addition, in one embodiment, the step 104 of determining that secondary speed planning is required based on the traction force data F includes: if the traction force data F is greater than a first traction force threshold F0, determining that secondary speed planning is required; wherein the first traction force threshold F0 is based on the traction force F generated by the maximum torque of the motor. max It can be understood that the first traction force threshold F0 is used to determine whether the traction force data F will damage the motor. When the traction force data F is greater than the first traction force threshold F0, the motor is driven to operate according to the first speed control signal corresponding to the traction force data F, which is likely to damage the motor and requires secondary speed planning.
[0054] According to the traction force F generated by the maximum torque of the motor max The first traction force threshold F0 is obtained in various ways. The traction force F generated by the maximum torque of the motor can be directly used. max As the first traction force threshold F0, the traction force F generated by the maximum torque of the motor can also be used. max For example, in this embodiment, the first traction force threshold F0 is set to be the traction force F generated by the maximum torque of the motor at a preset ratio. max , to minimize the loss of the motor during speed control. The preset ratio can be set to 70%, 75%, 80%, 85% or 90%, etc., according to actual needs. The traction force F generated by the maximum torque of the motor max The formula F max =T max / r is calculated, where T max (unit: N·m) is the maximum torque of the motor, and r (unit: m) is the radius of the motor. Both can be obtained by referring to the parameter manual corresponding to the actual motor model used, without limitation.
[0055] Step 106: If it is determined that secondary speed planning is not necessary based on the traction data, the first speed control signal is used as the target speed control signal. Specifically, if the traction data F is less than or equal to the first traction threshold F0, it can be understood that the traction data F belongs to the tolerable traction range of the motor shaft, and the traction data F can be driven by the first speed control signal corresponding to the traction data F to work normally for a long time. Correspondingly, when the traction data F is less than or equal to the first traction threshold F0, the first speed control signal can be directly used as the target speed control signal to drive the motor to control the operation of the unmanned vehicle.
[0056] Step 108: driving the motor to control the target device to operate according to the target speed control signal.
[0057] The target device may be a machine tool, industrial production equipment, a robot or a vehicle, etc. In the embodiments of the present application, an unmanned vehicle is used as an example for explanation. Specifically, the motor is a speed position controller in the target device, and the motion module in the target device is used as the control object. After the motor receives the target speed control signal input by the motor drive device, it converts the electrical signal into the torque and speed of the rotor, and controls the operation module in the target device to realize the movement with the corresponding speed and displacement.
[0058] The above-mentioned motor driving method, by smoothly correcting the first speed control signal when the traction force data corresponding to the first speed control signal needs to perform secondary speed planning, effectively reduces the traction force generated by the motor operation when the torque corresponding to the first speed control signal is too large, and drives the motor to operate according to the reduced speed control signal, so that the motor will not generate excessive traction force to wear the motor shaft, effectively protecting the motor shaft and reducing the frequency of repair and replacement and loss.
[0059] In one embodiment, Figure 2 As shown, step 104 performs smoothing correction on the first speed control signal to obtain a second speed control signal, including steps 202 to 208. Among them:
[0060] Step 202: Use an S-shaped speed curve function to perform speed smoothing on the first speed control signal to obtain a smoothed speed control signal.
[0061] Among them, the S-type speed curve function is divided into seven stages, namely, acceleration section, uniform acceleration section, deceleration section, uniform speed section, acceleration and deceleration section, uniform deceleration section and deceleration and deceleration section. When connected in different stages, the acceleration is continuous and very smooth, and there will be no points of acceleration mutation similar to those in the T-type speed curve function. Moreover, the amplitude of the acceleration change in the S-type speed curve function is also controllable, and can be changed independently through the stretching coefficient f. The smaller f is, the smoother the speed regulation process in the middle of the curve will become, and the speed regulation at both ends will become steeper; the larger f is, the speed regulation process in the middle of the curve will become steeper, and the speed regulation process at both ends will become smoother. The stretching coefficient f can be adjusted according to actual needs to reduce the traction generated when the motor is driven according to the first speed control signal.
[0062] Specifically, the smoothed target speed V1 is first obtained by the following formula:
[0063]
[0064] Among them, V current is the smoothed velocity, V start is the speed before smoothing, V target is the target speed expected by the user. The speed information corresponding to the first speed control signal can be used as V start After substituting into the above formula, the calculated V current As the smoothed target speed V1.
[0065] Furthermore, after subtracting the smoothed target speed V1 from the current actual speed V0 of the motor, a smoothed acceleration a1 is obtained as a smoothed speed control signal.
[0066] Step 204: Obtain smoothed traction data based on the smoothed speed control signal. Specifically, the smoothed traction data can be obtained based on the smoothed acceleration a1, which is used to determine whether the traction data corresponding to the speed control signal is still too large after speed smoothing, which will cause damage to the motor shaft. The process of analyzing and obtaining the traction data is similar to that in step 102, and will not be described in detail.
[0067] Step 206: If the smoothed traction data is still greater than the first traction threshold F0, the smoothed traction data is corrected to the first traction threshold F0, and the speed control signal corresponding to the first traction threshold F0 is determined as the second speed control signal. It can be understood that if the corresponding traction data is still greater than the first traction threshold F0 after speed smoothing, the speed control signal corresponding to the first traction threshold F0 can be directly determined as the second speed control signal, so as to maximize the speed adjustment of the unmanned vehicle and reduce the loss of the motor shaft.
[0068] Step 208: If the smoothed traction force data is less than or equal to the first traction force threshold, the speed control signal corresponding to the smoothed traction force data is determined as the second speed control signal. It can be understood that if the corresponding traction force data is reduced to a data value less than or equal to the first traction force threshold F0 after speed smoothing, the speed control signal corresponding to the smoothed traction force data can be directly determined as the second speed control signal for subsequent determination of the target speed control signal.
[0069] In one embodiment, Figure 3 As shown, step 104 determines the target speed control signal according to the obtained second speed control signal, including steps 302 to 304. Among them:
[0070] Step 302: If the traction force data corresponding to the second speed control signal is overloaded, control the overload counter to record the overload times t.
[0071] According to the motor control principle, it is known that the traction force data is overloaded, that is, whether the traction force data exceeds the traction force data F generated under the rated torque of the motor. e Correspondingly, if the traction force data corresponding to the second speed control signal is greater than the traction force data F generated under the rated torque of the motor e , which means that the traction data corresponding to the second speed control signal has been overloaded, and the corresponding overload times t need to be recorded to determine whether the second speed control signal can be used as the target speed control signal. If the traction data corresponding to the second speed control signal is not overloaded, the second speed control signal can be directly determined as the target speed control signal without recording the overload times t, which is used to drive the motor to control the operation of the unmanned vehicle.
[0072] Specifically, the second speed control signal is a speed control signal after speed smoothing correction. In this embodiment, the first traction force threshold F0 is the traction force data F generated under the rated torque of the motor. e Under different speed smoothing correction conditions, the traction force data corresponding to the second speed control signal may be equal to the first traction force threshold F0, or may be less than the first traction force threshold F0 but greater than the traction force data F generated under the rated torque of the motor. e , and it is also possible that the speed is directly smoothed to a value less than the traction force data F generated by the motor rated torque. e Correspondingly, when the traction force data corresponding to the second speed control signal is greater than the traction force data F generated under the rated torque of the motor, e When the overload counter is controlled, it records the overload times t.
[0073] Among them, the traction data F generated by the motor under rated torque e The formula F e =T e / r calculated, T e is the rated torque, r is the motor radius, both of which can be obtained from the corresponding parameter manual of the actual motor model used (regardless of the reduction ratio, the default is 1:1).
[0074] Step 304: If the overload number t is less than or equal to the preset overload number, the second speed control signal is used as the target speed control signal. It can be understood that the preset overload number is used to limit the number of times the motor enters overload operation through speed control, so as to protect the motor shaft from damage as much as possible. The value of the preset overload number is not limited and can be set according to actual needs. For example, in this embodiment, it is set to 5 times.
[0075] In one embodiment, after step 302 , the step 104 of determining the target speed control signal according to the obtained second speed control signal further includes step 306 .
[0076] Step 306: If the overload number t is greater than the preset overload number, the speed control signal corresponding to the second traction force threshold is used as the target speed control signal, and the cool-down counter is controlled to record the cool-down number k; wherein the second traction force threshold is less than the first traction force threshold, and the second traction force threshold is used to characterize the traction generated by the rated torque of the motor.
[0077] It can be understood that when the overload times t exceeds the preset overload times, it indicates that the motor has exceeded the number of times it can withstand overload operation, and it is necessary to stop overload operation and enter the cool-down mode. At this time, the target speed control signal can be set to the speed control signal corresponding to the second traction force threshold. Among them, the second traction force threshold can correspond to the traction force data selected without overload. In order to adjust the vehicle speed to the greatest extent, in this embodiment, the second traction force threshold is set to the traction force data F generated under the rated torque of the motor. e .
[0078] Specifically, the traction force data F generated under the rated torque of the motor is e After the corresponding speed control signal is used as the target speed control signal, the cooling-down counter needs to be controlled to record the cooling-down times k, which is used to determine whether the motor can be released from the cooling-down mode and enter normal operation.
[0079] In one embodiment, Figure 3 As shown, after the control cooling counter in step 306 records the cooling times, the step 104 of determining the target speed control signal according to the obtained second speed control signal further includes step 308 .
[0080] Step 308: After the number of cool-down times k is greater than the preset number of cool-down times, the control overload counter and the cool-down counter are cleared. The value of the preset number of cool-down times is not limited and can be set according to actual needs. For example, in this embodiment, it is set to 20 times. Specifically, the control overload counter and the cool-down counter are cleared, indicating that the overload operation can be re-entered in the next speed control.
[0081] In one embodiment, Figure 4 Taking the flowchart shown as an example, the principle of the motor driving method provided in the present application is explained, including steps 1 to 11.
[0082] Step 1: Get the real-time acceleration of the unmanned vehicle, and use the real-time acceleration to perform speed integration to obtain the current actual vehicle speed, and send the current actual vehicle speed to the host computer;
[0083] Step 2: Obtain a first speed control signal output by the host computer according to the current actual vehicle speed and the target vehicle speed expected by the user;
[0084] Step 3: First, determine whether p is true. If it is false, it indicates that it does not participate in the subsequent smooth speed calculation, and then calculate the force F generated by the current torque. If p is true, there is no need to calculate F again, and the threshold judgment can be performed directly, and then p is set to false. If F>F e , go to step 4, otherwise go to step 11;
[0085] Step 4: Continue to judge the relationship between F and F0. Among them, F0 is 85%*F max , F max is the force generated by the maximum torque of the motor. If F>F0, go to step 5, otherwise go to step 7;
[0086] Step 5: Perform speed smoothing, use the S-curve function to smooth the speed, set the variable p to true after smoothing the speed to indicate that smoothing is involved, and then obtain the target speed V1 after smoothing in this stage, and calculate the predicted acceleration a1 by subtracting the smoothed target speed V1 from the current actual speed. Use this acceleration to calculate the force F expected to be generated by the motor, and then proceed to step 6;
[0087] Step 6: Continue to correct F, because after using the S-shaped speed curve for smoothing once, the expected force F may still be large. Determine whether F still exceeds F0. If it exceeds F0, it means that the force is too large. Correct F to F0 and go to step 3.
[0088] Step 7: Set counters t and k to count, and their initial values are both 0. Counter t is used to record the time when the motor is overloaded, and counter k is used to record the time when the motor enters the cooling mode after being overloaded.
[0089] Go to step 8;
[0090] Step 8: Determine whether t is greater than 5. If t>5, it means that the motor has exceeded the overload time and cannot be overloaded any more. It can only enter the cooling mode and go to step 9. If t<5, it means that the motor can still be overloaded and go to step 10.
[0091] Step 9: When the motor enters the cool-down mode, it can no longer work under overload. Therefore, the motor is allowed to work at rated torque without damaging the motor as much as possible, so that the vehicle speed can be adjusted to the greatest extent, and F = F e , at this time F is the force generated by the rated torque; k++ is used to count the continuous cooling time of the motor;
[0092] Step 10: Let the motor enter the overload mode. At this time, the torque generated by the motor has exceeded the rated torque, but the maximum will not exceed 85% of the maximum torque. While making the motor work in overload mode, it can also protect the motor to a certain extent. t++ is used to count the continuous overload time of the motor. k-- is because the motor is working in overload mode instead of in cool mode, so it needs to be subtracted this time. And since the overload can be performed this time, F does not need to be corrected. Go to step 11;
[0093] Step 11: In this stage, the expected acceleration needs to be calculated, and F=ma is used to predict the acceleration, and the upcoming acceleration a1 is predicted. The sum of the current actual vehicle speed and the expected acceleration a1 is the target speed V1 of this stage, and then the target speed V1 of this stage is used for real-time control of the motor. At the same time, if k>20, set k=0 and t=0.
[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0095] Based on the same inventive concept, the embodiment of the present application also provides a motor drive device for implementing the motor drive method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more motor drive device embodiments provided below can refer to the limitations of the motor drive method above, and will not be repeated here.
[0096] In one embodiment, Figure 5 As shown, a motor driving device is provided, the device includes: an acquisition module 510, a smoothing correction module 520, a determination module 530 and a driving module 540, wherein:
[0097] An acquisition module 510 is used to acquire a first speed control signal output by a host computer, and obtain traction force data according to analysis of the first speed control signal;
[0098] The smoothing correction module 520 is used to determine the need for speed secondary planning according to the traction force data, to smooth the speed control signal, and to determine the target speed control signal according to the obtained second speed control signal; wherein the speed secondary planning is used to reduce the traction force generated when the motor runs according to the first speed control signal;
[0099] A determination module 530, configured to determine the first speed control signal as a target speed control signal when it is determined that no secondary speed planning is required according to the traction force data;
[0100] The driving module 540 is used to drive the motor to control the operation of the target device according to the target speed control signal.
[0101] In one embodiment, the smoothing correction module 520 is further used to determine that speed secondary planning is required when the traction force data is greater than a first traction force threshold; wherein the first traction force threshold is obtained according to the traction force generated by the maximum torque of the motor.
[0102] In one embodiment, the smoothing correction module 520 is further used to perform speed smoothing on the speed control signal using an S-shaped speed curve function to obtain a smoothed speed control signal; obtain smoothed traction data based on the smoothed speed control signal analysis; if the smoothed traction data is still greater than the first traction threshold, correct the smoothed traction data to the first traction threshold, and determine the speed control signal corresponding to the first traction threshold as the second speed control signal; if the smoothed traction data is less than or equal to the first traction threshold, determine the speed control signal corresponding to the smoothed traction data as the second speed control signal.
[0103] In one embodiment, the smoothing correction module 520 is further used to control the overload counter to record the number of overloads when the traction data corresponding to the second speed control signal is overloaded; if the number of overloads is less than or equal to the preset number of overloads, the second speed control signal is used as the target speed control signal.
[0104] In one embodiment, the smoothing correction module 520 is also used to use the speed control signal corresponding to the second traction force threshold as the target speed control signal when the overload number is greater than the preset overload number, and control the cool-down counter to record the cool-down number; wherein the second traction force threshold is less than the first traction force threshold, and the second traction force threshold is used to characterize the traction generated by the rated torque of the motor.
[0105] In one embodiment, the smoothing correction module 520 is further configured to control the overload counter and the cool-down counter to be cleared after the cool-down times are greater than a preset cool-down times.
[0106] In one embodiment, the device further includes a speed acquisition module 510 for acquiring current actual speed information of the motor and sending the current actual speed information to a host computer; the current actual speed information is used by the host computer to predict and output a first speed control signal.
[0107] Each module in the above motor drive device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0108] In one embodiment, as shown in the figure, a motor drive device is provided, including a lower speed planning module and a first communication module, the lower speed planning module is connected to the upper computer through the first communication module, and the lower speed planning module is also connected to the motor; the lower speed planning module is used to obtain the first speed control signal output by the upper computer through the first communication module, and obtain traction data according to the analysis of the first speed control signal; if it is determined according to the traction data that speed secondary planning is required, the first speed control signal is smoothed and corrected, and the target speed control signal is determined according to the obtained second speed control signal; wherein, the speed secondary planning is used to reduce the traction generated when the motor runs according to the first speed control signal; if it is determined according to the traction data that speed secondary planning is not required, the first speed control signal is used as the target speed control signal; the lower speed planning module is also used to drive the motor to control the target device to run according to the target speed control signal.
[0109] Specifically, the lower speed planning module is a control circuit board in the motor drive device, including a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface, etc. Among them, the processor, the memory and the input / output interface can be connected through a system bus, and the communication interface is connected to the system bus through the input / output interface.
[0110] Furthermore, the processor of the lower speed planning module adopts the nuttx system, and the first communication module adopts the PX4 communication module. When the upper computer uses the ros2 system, the communication between ros2 and px4 can be used to transmit messages. The communication can be completed by sending and receiving messages between the uORB topic in the PX4 communication module and the microRPTS client. Between the PX4 communication module and the communication module of the upper computer, the m3icroRPTS client and the microRPTS agent are used to complete the sending and receiving of messages in the form of serial port or network port communication. The microRPTS agent in the upper computer communicates with the ros2 node to complete the two-way communication and message conversion of the message format.
[0111] In this embodiment, using ros2 and nuttx to establish communication can bring the advantage of high real-time performance, effectively reduce the loss of motor shaft caused by the uncoordinated torque direction or size between multiple servo motors when the response time is different, and effectively save resources and costs.
[0112] The implementation solution provided by the motor drive device to solve the problem is similar to the implementation solution recorded in the above-mentioned motor drive method. Therefore, the specific limitations in one or more motor drive device embodiments provided below can be referred to the limitations on the motor drive method above, and will not be repeated here.
[0113] In one embodiment, a motor drive system is also provided, including a host computer and the above-mentioned motor drive device, the host computer is connected to the motor drive device, and the motor drive device is connected to the target device through the motor. Specifically, the motor drive device is used to obtain the current real-time speed of the motor and send it to the host computer. The host computer obtains a first speed control signal through a preset speed planning algorithm analysis based on the received current real-time speed of the motor and the target speed expected by the user, and outputs it to the motor drive device. Furthermore, the motor drive device implements steps such as speed secondary planning and driving the motor to run according to the first speed control signal.
[0114] The implementation solution provided by the motor drive system to solve the problem is similar to the implementation solution recorded in the above-mentioned motor drive method. Therefore, the specific limitations in the provided motor drive system embodiment can be found in the above-mentioned limitations on the motor drive method, which will not be repeated here.
[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A motor driving method, characterized in that: The method comprises: Acquire a first speed control signal output by the host computer, and obtain traction force data according to analysis of the first speed control signal; If the traction force data is greater than a first traction force threshold, it is determined that secondary speed planning is required, the first speed control signal is smoothed and corrected, and a target speed control signal is determined according to the obtained second speed control signal; wherein the first traction force threshold is obtained according to the traction force generated by the maximum torque of the motor, and the secondary speed planning is used to reduce the traction force generated by the motor when it runs according to the first speed control signal; If it is determined according to the traction force data that secondary speed planning is not required, using the first speed control signal as a target speed control signal; The motor is driven according to the target speed control signal to control the operation of the target device.
2. The method according to claim 1, characterized in that The first traction force threshold is a preset ratio of the traction force generated by the maximum torque of the motor.
3. The method according to claim 2, characterized in that Smoothing and correcting the first speed control signal to obtain a second speed control signal includes: Performing speed smoothing on the first speed control signal using an S-shaped speed curve function to obtain a smoothed speed control signal; Obtaining smoothed traction force data according to the smoothed speed control signal analysis; If the smoothed traction force data is still greater than the first traction force threshold, correcting the smoothed traction force data to the first traction force threshold, and determining the speed control signal corresponding to the first traction force threshold as the second speed control signal; If the smoothed traction force data is less than or equal to the first traction force threshold, the speed control signal corresponding to the smoothed traction force data is determined as the second speed control signal.
4. The method according to claim 2, characterized in that: Determining a target speed control signal according to the obtained second speed control signal includes: If the traction force data corresponding to the second speed control signal is overloaded, controlling the overload counter to record the number of overloads; If the overload number is less than or equal to the preset overload number, the second speed control signal is used as the target speed control signal.
5. The method according to claim 4, characterized in that After the overload counter is controlled to record the number of overloads if the traction force data corresponding to the second speed control signal is overloaded, the method further includes: If the number of overload times is greater than the preset number of overload times, the speed control signal corresponding to the second traction force threshold is used as the target speed control signal, and the cool-down counter is controlled to record the number of cool-down times; wherein the second traction force threshold is less than the first traction force threshold, and the second traction force threshold is used to characterize the traction force generated by the rated torque of the motor.
6. The method according to claim 5, characterized in that After the control cool-down counter records the number of cool-down times, the method further includes: After the cool-down number is greater than a preset cool-down number, the overload counter and the cool-down counter are controlled to be cleared.
7. The method according to any one of claims 1 to 6, characterized in that: Before obtaining the first speed control signal output by the host computer, the method further includes: The current actual speed information of the motor is obtained, and the current actual speed information is sent to a host computer; the current actual speed information is used by the host computer to predict and output the first speed control signal.
8. A motor drive device, characterized in that: The device comprises: An acquisition module, used for acquiring a first speed control signal output by a host computer, and obtaining traction force data according to analysis of the first speed control signal; a smoothing correction module, configured to determine that speed secondary planning is required when the traction force data is greater than a first traction force threshold, perform smoothing correction on the first speed control signal, and determine a target speed control signal according to the obtained second speed control signal; wherein the first traction force threshold is obtained according to the traction force generated by the maximum torque of the motor, and the speed secondary planning is used to reduce the traction force generated by the motor when it runs according to the first speed control signal; A determination module, configured to determine that no secondary speed planning is required according to the traction force data, and use the first speed control signal as a target speed control signal; The driving module is used to drive the motor to control the operation of the target device according to the target speed control signal.
9. A motor drive device, characterized in that: It includes a lower speed planning module and a first communication module, wherein the lower speed planning module is connected to the upper computer through the first communication module, and the lower speed planning module is also connected to the motor; The lower-level speed planning module is used to obtain the first speed control signal output by the upper computer through the first communication module, and obtain traction data based on the analysis of the first speed control signal; if the traction data is greater than the first traction threshold, it is determined that secondary speed planning is required, the first speed control signal is smoothed and corrected, and the target speed control signal is determined based on the second speed control signal; wherein, the first traction threshold is obtained based on the traction generated by the maximum torque of the motor, and the secondary speed planning is used to reduce the traction generated when the motor runs according to the first speed control signal; if it is determined based on the traction data that secondary speed planning is not required, the first speed control signal is used as the target speed control signal; the lower-level speed planning module is also used to drive the motor to control the operation of the target device according to the target speed control signal.
10. A motor drive system, characterized in that: It comprises a host computer and the motor driving device according to claim 9, wherein the host computer is connected to the motor driving device, and the motor driving device is connected to the motor.
Citation Information
Patent Citations
Train speed automatic control method based on PID and filtering algorithm
CN108153145A
Motor vehicle braking and driving control method and system, intelligent terminal and storage medium
CN112248988A