Twin motor multimode configuration curve control method, device, equipment and medium
Through the combination of trapezoidal acceleration and deceleration algorithm and trigonometric function acceleration and deceleration algorithm, the problems of large amount of calculation and sudden change in the starting point and end point in twin motor control are solved, and the effects of high reusability and smooth operation are achieved.
Patent Information
- Application Number
- CN202510075285.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has a large amount of computing in twin motor control, especially in various modes, and there are sudden changes in velocity and acceleration in the starting point and end point, affecting the reusability.
The trapezoidal acceleration and deceleration algorithm is used to determine the maximum operating speed, acceleration period, constant speed period and deceleration period in the twin motor operation curve, and the real-time speed and real-time position are calculated in combination with the trigonometric function acceleration and deceleration algorithm to achieve smooth and non-sudden operation control.
It realizes twin motor control with simple calculation, high reusability and no mutations in the starting point and end point, reducing computing resource consumption and improving operational smoothness and applicability.
Smart Images

Figure CN119882569A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor motion control, and in particular to a method, device, equipment and medium for controlling a multi-mode configuration curve of a twin motor. Background Art
[0002] In industrial digital twin equipment, in order to show the operation process of twin motors, the twin motors are often adjusted and controlled through acceleration and deceleration time to express the effect of physical equipment. In order to make the twin motors have multiple mode configurations and smooth operation trajectories, exponential acceleration and deceleration curves or 7-segment S-shaped acceleration and deceleration curves are often used in the prior art, but the amount of calculation is large, especially in multiple modes. The consumption of computing resources is high. In addition, at the starting point and end point of the exponential acceleration and deceleration curve, there is still a phenomenon of sudden changes in speed and acceleration. Although it is not obvious in a single operation, it may affect its reusability in the actual virtual-real synchronous repetitive operation.
[0003] Therefore, how to achieve twin motor control with simple calculation, high reusability, smooth starting point and no sudden changes is a problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a twin motor multi-mode configuration curve control method for realizing twin motor control with simple calculation, high reusability, smooth starting point and no sudden change. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a twin motor multi-mode configuration curve control method, comprising:
[0006] Get target parameters and system parameters;
[0007] Based on the target parameters and the system parameters, the maximum operating speed, acceleration section time, uniform speed section time and deceleration section time in the operating curve of the twin motor are determined according to a trapezoidal acceleration and deceleration algorithm;
[0008] Determining a configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time;
[0009] Based on the configuration mode boundary, the real-time speed and real-time position of the running curve are determined according to the trigonometric function acceleration and deceleration algorithm, and the displacement of the twin motor in the virtual scene is controlled.
[0010] Optionally, the target parameters include initial velocity, final velocity, acceleration coefficient, deceleration coefficient, target velocity and target distance, and the system parameters include any one or more groups of acceleration and deceleration, acceleration segment time and deceleration segment time, and acceleration segment displacement and deceleration segment displacement.
[0011] Optionally, after acquiring the target parameters and the system parameters, and before determining the maximum operating speed, acceleration section time, uniform speed section time, and deceleration section time in the operating curve according to the trapezoidal acceleration and deceleration algorithm based on the target parameters and the system parameters, the method further includes:
[0012] Obtaining calculation parameters; wherein the calculation parameters include motor power, load mass, and motor efficiency;
[0013] Determining a calculated acceleration based on the motor power, the load mass, the motor efficiency and the target speed;
[0014] Determining an acceleration to be measured based on the target parameter and the system parameter;
[0015] Determining whether the calculated acceleration is greater than the acceleration to be measured;
[0016] If it is greater than, the value of the system parameter is maintained;
[0017] If not, assigning the value of the calculated acceleration to the acceleration to be measured; and updating the value of the system parameter based on the acceleration to be measured.
[0018] Optionally, determining the acceleration to be measured based on the target parameter and the system parameter includes:
[0019] Determining the acceleration to be measured based on the acceleration and the acceleration coefficient;
[0020] or, determining the acceleration to be measured based on the initial velocity, the target velocity, the acceleration period and the acceleration coefficient;
[0021] Or, the acceleration to be measured is determined based on the initial velocity, the target velocity, the acceleration segment displacement and the acceleration coefficient.
[0022] Optionally, the system parameters include the acceleration and the deceleration, and based on the target parameters and the system parameters, determining the maximum operating speed, acceleration segment time, uniform speed segment time, and deceleration segment time in the operating curve according to a trapezoidal acceleration and deceleration algorithm for the operating curve of the twin motor, respectively, includes:
[0023] Based on the target parameter and the system parameter, determining the maximum speed of the operation curve when only the acceleration segment and the deceleration segment exist;
[0024] Determining whether the maximum speed is greater than the target speed;
[0025] If yes, the running curve has the uniform speed segment, and the target speed is determined to be the maximum running speed;
[0026] Obtain the initial speed, the final speed, the maximum operating speed, the acceleration, the deceleration, the acceleration coefficient, and the deceleration coefficient, and determine the acceleration section time, the uniform speed section time, and the deceleration section time for the operating curve of the twin motor according to the trapezoidal acceleration and deceleration algorithm;
[0027] If not, the operation curve does not have the uniform speed segment, and the uniform speed segment time is determined to be 0;
[0028] Determining the maximum speed as the maximum operating speed;
[0029] The initial velocity, the final velocity, the maximum operating speed, the acceleration, the deceleration, the acceleration coefficient and the deceleration coefficient are obtained, and the acceleration section time and the deceleration section time are determined according to the trapezoidal acceleration and deceleration algorithm for the operating curve.
[0030] Optionally, the system parameters include acceleration section time and deceleration section time, and based on the target parameters and the system parameters, the operation curve of the twin motor is determined according to a trapezoidal acceleration and deceleration algorithm to determine the maximum operation distance, acceleration section time, uniform speed section time and deceleration section time in the operation curve, respectively, including:
[0031] Based on the target parameters and the system parameters, determine the acceleration segment displacement and the deceleration segment displacement, and determine the target distance, the acceleration segment time, and the deceleration segment time;
[0032] Determining whether the sum of the acceleration section displacement and the deceleration section displacement is greater than the target distance;
[0033] If not, the operation curve has the uniform speed segment, and the target speed is determined as the maximum operation speed;
[0034] The acceleration section displacement, the deceleration section displacement, the target distance and the target speed are obtained, and the uniform speed section time is determined according to the trapezoidal acceleration and deceleration algorithm for the operation curve of the twin motor;
[0035] If yes, then the running curve does not have a uniform speed segment, and the uniform speed segment time is determined to be 0;
[0036] The target distance, the initial velocity, the final velocity, the acceleration section time, the deceleration section time, the acceleration coefficient and the deceleration coefficient are obtained, and the maximum operating speed is determined according to the trapezoidal acceleration and deceleration algorithm for the operating curve of the twin motor.
[0037] Optionally, the system parameters include the acceleration segment displacement and the deceleration segment displacement, and based on the target parameters and the system parameters, the operation curve of the twin motor is determined according to the trapezoidal acceleration and deceleration algorithm to determine the maximum operating speed, acceleration segment time, uniform speed segment time and deceleration segment time in the operation curve, respectively, including:
[0038] Determining the target distance, the acceleration segment displacement, and the deceleration segment displacement based on the target parameters and the system parameters;
[0039] Determining whether the sum of the acceleration section displacement and the deceleration section displacement is greater than the target distance;
[0040] If not, the running curve has a uniform speed segment, and the target speed is determined to be the maximum running speed;
[0041] The acceleration segment displacement, the deceleration segment displacement, the initial velocity, the final velocity, the target distance, the target velocity, and the acceleration / deceleration coefficient are obtained, and the uniform speed segment time, the acceleration segment time, and the deceleration segment time are determined according to the trapezoidal acceleration / deceleration algorithm for the operation curve of the twin motor;
[0042] If yes, then the running curve does not have a uniform speed segment, and the uniform speed segment time is determined to be 0;
[0043] The initial velocity, the final velocity, the acceleration segment displacement, the deceleration segment displacement, the target distance, the target velocity, the acceleration coefficient and the deceleration coefficient are obtained, and the acceleration segment time and the deceleration segment time are determined according to the trapezoidal acceleration and deceleration algorithm for the operation curve, and the maximum operation speed is determined.
[0044] Optionally, determining the configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time includes:
[0045] The acceleration segment time is taken as the first boundary, the sum of the acceleration segment time and the uniform speed segment time is taken as the second boundary, and the sum of the acceleration segment time, the uniform speed segment time and the deceleration segment time is taken as the third boundary; the configuration mode boundary includes the first boundary, the second boundary and the third boundary.
[0046] Optionally, the determining the real-time speed and real-time position of the running curve based on the configuration mode boundary according to a trigonometric function acceleration and deceleration algorithm includes:
[0047] When the time of the running curve is less than or equal to the first boundary, the maximum running speed, the initial speed, and the acceleration period time are obtained, and the real-time speed and real-time displacement of the acceleration period are determined according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0048] When the time is greater than the first boundary and less than or equal to the second boundary, the maximum running speed, the acceleration segment time and the acceleration segment displacement are obtained, and the real-time speed and real-time displacement of the uniform speed segment are determined according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0049] When the time is greater than the second boundary and less than or equal to the third boundary, the maximum operating speed, the final speed, the acceleration segment time, the uniform speed segment time, the deceleration segment time, the acceleration segment displacement and the uniform speed segment displacement are obtained, and the real-time speed and real-time displacement of the deceleration segment are determined and calculated according to the trigonometric function acceleration and deceleration algorithm for the operating curve.
[0050] In a second aspect, the present application provides a twin motor multi-mode configuration curve control device, comprising:
[0051] Parameter acquisition module, used to obtain target parameters and system parameters;
[0052] A time determination module, configured to determine the maximum operating speed, acceleration time, uniform speed time, and deceleration time in the operating curve of the twin motor according to a trapezoidal acceleration and deceleration algorithm based on the target parameters and the system parameters;
[0053] A boundary determination module, used to determine the configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time;
[0054] The displacement control module is used to determine the real-time speed and real-time position of the running curve based on the configuration mode boundary and control the displacement of the twin motor in the virtual scene according to the trigonometric function acceleration and deceleration algorithm.
[0055] In a third aspect, the present application provides an electronic device, including:
[0056] Memory, used to store computer programs;
[0057] A processor is used to execute the computer program to implement the above-mentioned twin motor multi-mode configuration curve control method.
[0058] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the above-mentioned twin motor multi-mode configuration curve control method is implemented.
[0059] This application uses trapezoidal acceleration and deceleration for planning calculations, uses the calculated time nodes as the configuration mode boundaries, and calls trigonometric acceleration and deceleration at the same time to calculate the real-time speed and real-time position at different times to drive the displacement of the twin motors in the virtual scene. From the above, it can be seen that the amount of calculation is small through the traditional trapezoidal acceleration and deceleration planning calculation. In addition, the real-time speed and real-time position are obtained by trigonometric acceleration and deceleration instead of direct calculation through trapezoidal acceleration and deceleration. Compared with the use of trapezoidal acceleration and deceleration and exponential acceleration and deceleration, trigonometric acceleration and deceleration can make the twin motors show a smooth and smooth operation effect without mutations. No matter which method is used to obtain the configuration mode boundary, trigonometric acceleration and deceleration are used as the operation function to calculate the real-time speed and real-time position, so it has high applicability and reusability. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0061] Figure 1 A flow chart of a twin motor multi-mode configuration curve control method disclosed in this application;
[0062] Figure 2 A graph showing the speed of the twin motors provided in this application changing with time;
[0063] Figure 3 A graph showing the position of the twin motors provided in this application changing over time;
[0064] Figure 4 A flowchart of a specific twin motor multi-mode configuration curve control method disclosed in this application;
[0065] Figure 5 A flowchart of a specific twin motor multi-mode configuration curve control method disclosed in this application;
[0066] Figure 6 A schematic diagram of a twin motor multi-mode configuration curve control device proposed in this application;
[0067] Figure 7 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] In industrial digital twin equipment, in order to show the operation process of twin motors, the twin motors are often adjusted and controlled through acceleration and deceleration time to express the effect of physical equipment. In order to make the twin motors have a smooth operation trajectory, exponential acceleration and deceleration curves or 7-segment S-shaped acceleration and deceleration curves are often used in the prior art, but the amount of calculation is large, especially in multiple modes. The consumption of computing resources is high. In addition, at the starting point and end point of the exponential acceleration and deceleration curve, there is still a phenomenon of sudden changes in speed and acceleration. Although it is not obvious in a single operation, it may affect its reusability in the actual virtual-real synchronous repetitive operation.
[0070] Therefore, how to achieve twin motor control with simple calculation, high reusability and no sudden changes in starting and ending points is a problem that needs to be solved urgently.
[0071] To solve the above problems, see Figure 1 As shown, an embodiment of the present invention discloses a twin motor multi-mode configuration curve control method, including:
[0072] Step S11, obtaining target parameters and system parameters;
[0073] In this embodiment, it is first necessary to obtain the target parameters and system parameters pre-entered in the program. It is understandable that the twin motor can not only run synchronously with the physical device, but also predict the operating state of the physical device by inputting preset parameters. Therefore, the target parameters and system parameters are determined by the operating state of the physical device or the target operating state.
[0074] In this embodiment, the target parameters include initial velocity, final velocity, acceleration coefficient, deceleration coefficient, target velocity and target distance, and the system parameters include any one or more groups of acceleration and deceleration, acceleration section time and deceleration section time, acceleration section displacement and deceleration section displacement, which are determined by the selected configuration mode. It should be noted that the system parameters may include parameters of multiple different groups at the same time. At this time, when setting the parameters of the same group, such as acceleration and deceleration, the two will not affect each other and can be set at will according to specific needs. However, when setting the parameters of different groups, it is necessary to ensure that the parameter settings between groups do not conflict, so that the program can run normally and avoid errors.
[0075] In addition, in this embodiment, based on the different system parameters, there are multiple configuration modes for the operating curve. For example, when the acceleration and deceleration configuration method is selected, the system parameters that need to be set include acceleration and deceleration; when the acceleration and deceleration time configuration method is selected, the system parameters that need to be set include acceleration section time and deceleration section time; when the acceleration and deceleration displacement configuration method is selected, the system parameters that need to be set include acceleration section displacement and deceleration section displacement.
[0076] Step S12, based on the target parameters and the system parameters, according to the trapezoidal acceleration and deceleration algorithm, the maximum operating speed, acceleration section time, uniform speed section time and deceleration section time in the operating curve of the twin motor are determined respectively;
[0077] In this embodiment, after obtaining the target parameters and system parameters, calling the trapezoidal acceleration and deceleration algorithm can calculate the time occupied by the acceleration section, uniform speed section and deceleration section in the operating curve of the twin motor respectively, and can also determine the maximum operating speed that can be achieved during the operation process.
[0078] In this embodiment, the twin motor has the same requirements as the physical device, i.e., it has multi-point single speed and multi-point variable speed. Multi-point single speed means running at a fixed single speed at multiple different positions, while multi-point variable speed means running at different speeds at multiple different positions. Therefore, it is necessary to determine the specific time range of the multi-point single speed and multi-point variable speed in the operation curve of the twin motor, that is, the specific time length of the acceleration section, uniform speed section and deceleration section, for subsequent calculations. It should be noted that in order to achieve the requirement of smoothness and no sudden changes, the operation curve of the twin motor is not a trapezoidal acceleration and deceleration curve. Therefore, only the trapezoidal acceleration and deceleration algorithm is used to simply and quickly determine the acceleration section time, uniform speed section time and deceleration section time of the operation curve, instead of using the trapezoidal acceleration and deceleration algorithm to calculate the real-time speed and implementation position of the operation curve.
[0079] It is understandable that, since the target parameters will not be affected when setting the system parameters, the maximum operating speed in actual operation may not reach the target speed set in the target parameters. Furthermore, when the maximum operating speed cannot reach the target speed, the operating curve at this time only has an acceleration segment and a deceleration segment, but no uniform speed segment. Therefore, it is possible to first determine whether there is a uniform speed segment based on the target parameters and system parameters. If there is no uniform speed segment, a two-stage trapezoidal acceleration and deceleration algorithm is used to calculate the acceleration segment time and the deceleration segment time, and the maximum operating speed is calculated separately. If there is a uniform speed segment, a three-stage trapezoidal acceleration and deceleration algorithm is used to calculate the acceleration segment time, the uniform speed segment time and the deceleration segment time. At this time, the maximum operating speed is the target speed.
[0080] In the first specific embodiment, the system parameters include acceleration and deceleration. After the acceleration and deceleration are set based on the actual needs of the physical device, it is assumed that only acceleration and deceleration segments exist, and the maximum speed at this time is calculated. If the maximum speed is greater than the set target speed, the operating curve has a uniform speed segment. If the maximum speed is not greater than the set target speed, the operating curve does not have a uniform speed segment. At this time, the maximum operating speed of the operating curve is the calculated maximum speed.
[0081] In the second specific implementation, the system parameters include the acceleration section time and the deceleration section time. After the acceleration section time and the deceleration section time are set based on the actual needs of the physical device, the acceleration section displacement and the deceleration section displacement are calculated. By comparing the sum of the acceleration section displacement and the deceleration section displacement with the target displacement, it can be determined whether there is a uniform speed section. The specific calculation formulas for the acceleration section displacement and the deceleration section displacement are as follows:
[0082] ;
[0083] ;
[0084] Among them, S1 is the displacement in the acceleration stage, S3 is the displacement in the deceleration stage, and V c is the target speed, V0 is the initial speed, V e is the final speed, t1 is the acceleration time, t3 is the deceleration time, r1 is the acceleration coefficient, and r2 is the deceleration coefficient.
[0085] When S≤S1+S3, that is, the target displacement S is less than or equal to the sum of the acceleration segment displacement and the deceleration segment displacement, the running curve does not have a uniform speed segment. At this time, the maximum running speed V needs to be additionally calculated. max , the specific formula is as follows:
[0086] ;
[0087] When S>S1+S3, that is, the target displacement S is greater than the sum of the acceleration and deceleration displacements, the running curve has a uniform speed segment. At this time, the uniform speed segment displacement S2 can be calculated first, and then the uniform speed segment time t2 can be calculated. The specific formula is as follows:
[0088] ;
[0089] .
[0090] In a third specific implementation, the system parameters include acceleration segment displacement and deceleration segment displacement. After the acceleration segment displacement and the deceleration segment displacement are set based on the actual needs of the physical device, it is possible to determine whether there is a uniform speed segment by comparing the sum of the acceleration segment displacement and the deceleration segment displacement with the target displacement.
[0091] When S≤S1+S3, that is, the target displacement S is less than or equal to the sum of the acceleration segment displacement and the deceleration segment displacement, the running curve does not have a uniform speed segment. At this time, the maximum running speed V needs to be additionally calculated. max , the specific formula is as follows:
[0092] ;
[0093] When S>S1+S3, that is, the target displacement S is greater than the sum of the displacements in the acceleration section and the deceleration section, the running curve has a uniform speed section. At this time, the uniform speed section displacement S2 can be calculated first, and then the uniform speed section time t2 can be calculated, and the acceleration section displacement and the deceleration section displacement can be calculated at the same time. The specific formula is as follows:
[0094] ;
[0095] ;
[0096] ;
[0097] .
[0098] Step S13, determining the configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time;
[0099] In this embodiment, the nodes of change between the acceleration segment, the uniform speed segment and the deceleration segment, that is, the configuration mode boundary, can be determined by the acceleration segment time, the uniform speed segment time and the deceleration segment time.
[0100] It should be noted that configuration mode refers to the operation trajectory configuration divided according to different physical constraints, performance goals or operation modes. The introduction of multiple configuration modes and boundaries is to adapt to different physical, performance and mission requirements while ensuring the safety and efficiency of the system. These modes are implemented through precise mathematical descriptions and control strategies and can be applied to scenarios such as industrial robots and unmanned vehicles.
[0101] In this embodiment, the twin motor cannot reach the target speed instantly, so the actual limitations of acceleration and deceleration need to be considered. The operation curve has multiple configuration modes, including acceleration segment, uniform speed segment and deceleration segment. The acceleration segment time, uniform speed segment time and deceleration segment time calculated above can determine the configuration mode nodes corresponding to the acceleration segment, uniform speed segment and deceleration segment, respectively, so as to facilitate the subsequent call of different speed functions and position functions in different configuration modes to calculate the real-time speed and real-time position of the twin motor.
[0102] Step S14: Based on the configuration mode boundary, the real-time speed and real-time position of the running curve are determined according to the trigonometric function acceleration and deceleration algorithm, thereby controlling the displacement of the twin motor in the virtual scene.
[0103] In this embodiment, after the configuration mode boundary is determined, in different configuration modes, the corresponding trigonometric function acceleration and deceleration algorithm is called to calculate the real-time speed and real-time position of the twin motor to control the displacement of the twin motor at that time.
[0104] In this embodiment, the trigonometric function acceleration and deceleration algorithm is used to calculate the real-time speed and real-time position of the twin motor. The trigonometric function acceleration and deceleration algorithm is an algorithm that takes into account smoothness and precision in operation control, and is suitable for high-precision application scenarios that are sensitive to acceleration changes. Although its computational complexity is slightly higher than that of linear acceleration and deceleration, its advantage is that it can significantly reduce mechanical shock and vibration, providing a reliable solution for high-precision industrial control. Compared with traditional linear acceleration and deceleration, the trigonometric function acceleration and deceleration algorithm uses a sine function or a cosine function, and uses its smooth characteristics to make the acceleration in the acceleration and deceleration process slowly increase and decrease over time, so as to achieve the continuity and smoothness between acceleration, real-time speed and real-time position, thereby avoiding mechanical shock and vibration caused by sudden acceleration changes. By adjusting the function parameters in the trigonometric function relationship algorithm, the acceleration and deceleration time and speed change amplitude can be flexibly adjusted. In a specific embodiment, a sine function is used to control the acceleration in the acceleration section, the speed is kept constant in the uniform speed section, and a negative sine function is used to control the acceleration in the deceleration section, that is, a sine function is used to control the deceleration.
[0105] like Figure 2 , 3 As shown, curve 1, curve 2 and curve 3 are respectively the speed and position of the twin motor changing with time when the acceleration and deceleration in the system parameters are set, the acceleration section time and the deceleration section time in the system parameters are set, and the acceleration section displacement and the deceleration section displacement in the system parameters are set, that is, the real-time speed and real-time displacement of the twin motor. It can be seen from the figure that no matter which system parameter setting scheme is adopted, the operation curve of the twin motor in this application is always very smooth.
[0106] From the above, it can be seen that the amount of calculation is small through the traditional trapezoidal acceleration and deceleration calculation planning. In addition, the real-time speed and real-time position are obtained by trigonometric function acceleration and deceleration instead of direct calculation through trapezoidal acceleration and deceleration. Compared with trapezoidal acceleration and deceleration and exponential acceleration and deceleration, trigonometric function acceleration and deceleration can make the twin motors show a smooth and seamless operation effect. No matter which method is used to obtain the configuration mode boundary, trigonometric function acceleration and deceleration is used as the operating function to calculate the real-time speed and real-time position, so it has high applicability and reusability.
[0107] To meet the target displacement set in the target parameters, see Figure 4 As shown, the embodiment of the present invention discloses a specific twin motor multi-mode configuration curve control method, including:
[0108] Step S21, based on the target parameter and the system parameter, determining the maximum speed of the operation curve when only the acceleration segment and the deceleration segment exist;
[0109] In this embodiment, the system parameters include acceleration and deceleration. The maximum operating speed that the twin motor can reach at this time can be calculated by the target parameters and the acceleration and deceleration set in the system parameters. The specific formula is as follows:
[0110] ;
[0111] Among them, a1 is acceleration and a2 is deceleration.
[0112] Step S22, determining whether the maximum speed is greater than the target speed;
[0113] In this embodiment, the target speed that the twin motor wants to achieve is obtained from the target parameter, and the maximum speed is compared with the target speed. It can be understood that if the maximum speed is greater than the target speed, it can be explained that there is a uniform speed segment in the operation curve, and if the maximum speed is less than or equal to the target speed, it can be explained that there are only acceleration segments and deceleration segments in the operation curve.
[0114] Step S23: If yes, the operation curve has the uniform speed segment, and the target speed is determined to be the maximum operation speed; the initial speed, the final speed, the maximum operation speed, the acceleration, the deceleration, the acceleration coefficient, and the deceleration coefficient are obtained, and the acceleration segment time, the uniform speed segment time, and the deceleration segment time are determined according to the trapezoidal acceleration and deceleration algorithm for the operation curve of the twin motor;
[0115] In this embodiment, the maximum speed is greater than the target speed, that is, the running curve has a uniform speed segment, and the initial speed, final speed, target speed, acceleration coefficient, deceleration coefficient in the target parameters, as well as the acceleration and deceleration in the system parameters are obtained, and then the trapezoidal acceleration and deceleration algorithm is called to calculate the time occupied by the acceleration segment, uniform speed segment and deceleration segment in the running curve respectively.
[0116] In this embodiment, the specific formula for calculating the acceleration period and the deceleration period is as follows:
[0117] Acceleration time: ;
[0118] Deceleration time: .
[0119] Furthermore, by calculating the difference between the sum of the acceleration segment displacement and the deceleration segment displacement and the target displacement, the uniform speed segment time of the running curve can be determined. The specific formula is as follows:
[0120] Displacement in acceleration section: ;
[0121] Displacement of deceleration section: ;
[0122] Displacement in uniform speed segment: ;
[0123] Uniform speed period: .
[0124] Step S24: If not, the running curve does not have the uniform speed segment, and the uniform speed segment time is determined to be 0; the maximum speed is determined to be the maximum running speed; the initial speed, the final speed, the maximum running speed, the acceleration, the deceleration, the acceleration coefficient and the deceleration coefficient are obtained, and the acceleration segment time and the deceleration segment time are determined according to the trapezoidal acceleration and deceleration algorithm for the running curve.
[0125] In this embodiment, since the maximum speed cannot reach the target speed, there is no uniform speed section in the running curve. After obtaining the initial speed, final speed, acceleration coefficient, deceleration coefficient in the target parameters, and the acceleration and deceleration in the system parameters, it is only necessary to determine the acceleration section time and the deceleration section time through the trapezoidal acceleration and deceleration algorithm. The specific formula is as follows:
[0126] Acceleration time: ;
[0127] Deceleration time: ;
[0128] In addition, the acceleration section displacement and deceleration section displacement can also be determined by the acceleration section time and the deceleration section time. The specific formula is as follows:
[0129] Displacement in acceleration section: ;
[0130] Displacement of deceleration section: ;
[0131] Step S25, taking the acceleration section time as the first boundary, the sum of the acceleration section time and the uniform speed section time as the second boundary, and the sum of the acceleration section time, the uniform speed section time and the deceleration section time as the third boundary; the configuration mode boundary includes the first boundary, the second boundary and the third boundary.
[0132] In this embodiment, the configuration mode boundary includes a first boundary, a second boundary and a third boundary, wherein the first boundary is the acceleration segment time t1, the second boundary is the sum of the acceleration segment time and the uniform speed segment time t1+t2, and the third boundary is t1+t2+t3. It can be understood that the first boundary is the configuration mode boundary corresponding to the acceleration segment, the first boundary and the second boundary are the configuration mode boundaries corresponding to the uniform speed segment, and the second boundary and the third boundary are the configuration boundaries corresponding to the deceleration segment.
[0133] Step S26: when the time of the running curve is less than or equal to the first boundary, the maximum running speed, the initial speed, and the acceleration period time are obtained, and the real-time speed and real-time displacement of the acceleration period are determined according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0134] In this embodiment, the running curve is in the acceleration section, that is, t≤t1, t is the running time of the twin motor, at this time, the speed function and position function of the acceleration section corresponding to the trigonometric function acceleration and deceleration algorithm are called to calculate the real-time speed and real-time displacement of the twin motor at this time. If the sine function acceleration and deceleration algorithm is used, the specific formulas of the speed function and displacement function corresponding to the acceleration section are as follows:
[0135] Real-time speed: ;
[0136] Real-time location: .
[0137] Step S27, when the time is greater than the first boundary and less than or equal to the second boundary, the maximum running speed, the acceleration segment time and the acceleration segment displacement are obtained, and the real-time speed and real-time displacement of the uniform speed segment are determined according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0138] In this embodiment, the running curve is in the uniform speed section, that is, t1<t≤t1+t2. At this time, the speed function and position function of the uniform speed section corresponding to the trigonometric function acceleration and deceleration algorithm are called to calculate the real-time speed and real-time displacement of the twin motor at this time. If the sine function acceleration and deceleration algorithm is used, the specific formulas of the speed function and displacement function corresponding to the uniform speed section are as follows:
[0139] Real-time speed: ;
[0140] Real-time location: .
[0141] It is understandable that the operating curve may have only an acceleration section and a deceleration section. At this time, t2 is 0, the first boundary and the second boundary coincide, and there is no time t1<t≤t1+t2. Therefore, it is only necessary to calculate the real-time speed and real-time position of the twin motor in the acceleration section and the deceleration section.
[0142] Step S28: when the time is greater than the second boundary and less than or equal to the third boundary, the maximum running speed, the final speed, the displacement of the acceleration section and the displacement of the uniform speed section are obtained, and the real-time speed and real-time displacement of the deceleration section are determined and calculated according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0143] In this embodiment, the running curve is in the deceleration section, that is, t1+t2<t≤t1+t2+t3. At this time, the speed function and position function of the deceleration section corresponding to the trigonometric function acceleration and deceleration algorithm are called to calculate the real-time speed and real-time displacement of the twin motor at this time. If the sine function acceleration and deceleration algorithm is used, the specific formulas of the speed function and displacement function corresponding to the deceleration section are as follows:
[0144] Real-time speed:
[0145] ;
[0146] Real-time displacement:
[0147] .
[0148] From the above, it can be concluded that when the system parameters are acceleration and deceleration, since the acceleration segment displacement and the deceleration segment displacement are not limited in the system parameters, and the maximum speed calculated based on the target displacement only exists when the acceleration segment and the deceleration segment exist, and then the acceleration segment time, the uniform speed segment time and the deceleration segment time are calculated, therefore, no matter what the acceleration and deceleration are set to, it can be ensured that the maximum displacement in the operating curve of the twin motor is equal to the target displacement.
[0149] To ensure that the motor meets the acceleration requirements during operation, see Figure 5 As shown, the embodiment of the present invention discloses a specific twin motor multi-mode configuration curve control method, including:
[0150] Step S31, obtaining target parameters and system parameters;
[0151] Step S32, obtaining calculation parameters; wherein the calculation parameters include motor power, load mass, and motor efficiency;
[0152] In this embodiment, the motor power, load mass, and motor efficiency of the motor are obtained to calculate the maximum load acceleration that the motor can support. It can be understood that the motor power is the total energy output provided by the motor, which determines the maximum driving force that the system can apply; the load mass is the size of the inertia that the system needs to overcome; the motor efficiency represents the ratio of input power to output power, so the motor power, load mass, and motor efficiency directly affect the power performance and energy conversion efficiency of the motor, and the maximum load acceleration of the motor needs to be calculated through the above three items.
[0153] Step S33, determining a calculated acceleration based on the motor power, the load mass, the motor efficiency and the target speed;
[0154] In this embodiment, the acceleration a is calculated by calculating the motor power, the load mass, the motor efficiency, and the target speed in the target parameter. m It is understandable that the calculation acceleration a m That is, the maximum load acceleration that the above motor can support. The specific formula is as follows:
[0155] ;
[0156] Among them, p is the motor power, m is the load mass, and η is the motor efficiency.
[0157] It should be noted that the motor efficiency reflects the effectiveness of the motor in converting input energy into output mechanical energy. Therefore, this formula is needed to show that part of the motor output power is used to overcome various losses (reflected by efficiency), and the remaining part is actually used to generate force to drive the load to move at a certain speed.
[0158] Step S34, determining the acceleration to be measured based on the target parameter and the system parameter;
[0159] In this embodiment, the acceleration to be measured is calculated based on the target parameter and the system parameter. It is understandable that since there are multiple combinations of system parameters, the method of calculating the acceleration to be measured is also different as the system parameters change.
[0160] In the first specific embodiment, the system parameters are acceleration and deceleration, and the acceleration to be measured a is determined based on the acceleration and the acceleration coefficient. The specific formula is as follows:
[0161] ;
[0162] In a second specific embodiment, the system parameters are the acceleration time and the acceleration time, and the acceleration to be measured is determined based on the initial velocity, the target velocity, the acceleration time and the acceleration coefficient. The specific formula is as follows:
[0163] ;
[0164] In a third specific embodiment, the system parameters are the acceleration section displacement and the deceleration section displacement, and the acceleration to be measured is determined based on the initial velocity, the target velocity, the acceleration section displacement and the acceleration coefficient.
[0165] ;
[0166] Step S35, determining whether the calculated acceleration is greater than the acceleration to be measured;
[0167] In this embodiment, the calculated acceleration a is determined by m and the magnitude of the acceleration a to be measured to determine whether the current acceleration a to be measured exceeds the maximum load acceleration that the motor can support. According to the judgment result, the operating curve can be adaptively selected by changing the value of the system parameter.
[0168] It should be noted that the motor has an acceleration range. When the acceleration exceeds the acceleration range of the motor, the motor needs to output a force greater than the design value to drive the load. This will change the magnetic field and current distribution inside the motor, resulting in a sharp increase in the copper loss and iron loss of the motor. Therefore, ensuring that the acceleration of the motor is within the acceleration range can reduce the risk of motor damage. Among them, the acceleration range is determined by the maximum load acceleration.
[0169] Step S36: If it is greater than, then keep the value of the system parameter;
[0170] In this embodiment, if the acceleration a is calculated m If it is greater than the acceleration a to be measured, it means that the motor can meet the operating requirements corresponding to the current system parameter setting values. Therefore, there is no need to update the system parameter values. The subsequent calculations are performed directly according to the originally set system parameters to determine the maximum operating speed, acceleration time, uniform speed time, and deceleration time in the operating curve.
[0171] Step S37: If it is not greater than, assigning the value of the calculated acceleration to the acceleration to be measured; and updating the value of the system parameter based on the acceleration to be measured.
[0172] In this embodiment, the acceleration a is calculated m If the value is less than or equal to the acceleration a to be measured, it means that the current acceleration to be measured has exceeded the acceleration range of the motor. Therefore, in order to ensure the normal operation of the motor and avoid motor loss, it is necessary to assign the value of the calculated acceleration to the acceleration to be measured, and update the values of each parameter in the system parameters, so as to determine the maximum operating speed, acceleration time, uniform speed time and deceleration time in the operating curve within the acceleration range in subsequent calculations.
[0173] In the first specific embodiment, the system parameters are acceleration and deceleration. At this time, the value of the calculated acceleration is assigned to the acceleration to be measured, and the value of the acceleration in the system parameters is updated. The specific steps are as follows:
[0174] ;
[0175] .
[0176] In the second specific embodiment, the system parameters are the acceleration time and the deceleration time. At this time, the value of the calculated acceleration is assigned to the acceleration to be measured, and the value of the acceleration time in the system parameters is updated. The specific steps are as follows:
[0177] ;
[0178] .
[0179] In the third specific embodiment, the system parameters are the acceleration segment displacement and the deceleration segment displacement. At this time, the value of the calculated acceleration is assigned to the acceleration to be measured, and the value of the acceleration segment displacement in the system parameters is updated. The specific steps are as follows:
[0180] ;
[0181] .
[0182] The specific implementation process of the above step S31 can refer to the corresponding content disclosed in the above embodiments, which will not be repeated here.
[0183] From the above, it can be concluded that the maximum load acceleration supported by the motor is calculated based on the motor power, load mass and motor efficiency of the motor as the calculated acceleration, and compared with the acceleration to be measured to determine whether the acceleration to be measured determined by the system parameters and the target parameters exceeds the above calculated acceleration. If it exceeds, it means that the motor cannot load the acceleration set by the current system parameters. Therefore, by assigning the value of the calculated acceleration to the acceleration to be measured, the value of the system parameters is updated so that the acceleration of the operation process does not exceed the maximum load acceleration, that is, the motor can meet the acceleration requirements during operation.
[0184] Accordingly, see Figure 6 The embodiment of the present application further provides a twin motor multi-mode configuration curve control device, which may include:
[0185] Parameter acquisition module 11, used to acquire target parameters and system parameters;
[0186] A time determination module 12 is used to determine the maximum operating speed, acceleration section time, uniform speed section time and deceleration section time in the operating curve of the twin motor according to a trapezoidal acceleration and deceleration algorithm based on the target parameters and the system parameters;
[0187] A boundary determination module 13, configured to determine a configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time;
[0188] The displacement control module 14 is used to determine the real-time speed and real-time position of the running curve based on the configuration mode boundary and control the displacement of the twin motor in the virtual scene according to the trigonometric function acceleration and deceleration algorithm.
[0189] From the above, it can be seen that the amount of calculation is small through the traditional trapezoidal acceleration and deceleration calculation planning. In addition, the real-time speed and real-time position are obtained by trigonometric function acceleration and deceleration instead of direct calculation through trapezoidal acceleration and deceleration. Compared with trapezoidal acceleration and deceleration and exponential acceleration and deceleration, trigonometric function acceleration and deceleration can make the twin motors show a smooth and seamless operation effect. No matter which method is used to obtain the configuration mode boundary, trigonometric function acceleration and deceleration is used as the operating function to calculate the real-time speed and real-time position, so it has high applicability and reusability.
[0190] In a specific embodiment, in the parameter acquisition module 11, the target parameters include initial velocity, final velocity, acceleration coefficient, deceleration coefficient, target velocity and target distance, and the system parameters include any one or more groups of acceleration and deceleration, acceleration segment time and deceleration segment time, acceleration segment displacement and deceleration segment displacement.
[0191] In a specific implementation manner, after the parameter acquisition module 11 and before the time determination module 12, the following is further included:
[0192] A parameter acquisition unit, used to acquire calculation parameters; wherein the calculation parameters include motor power, load mass, and motor efficiency;
[0193] A calculated acceleration acquisition unit, configured to determine the calculated acceleration based on the motor power, the load mass, the motor efficiency and the target speed;
[0194] An acceleration to be measured acquisition unit, used to determine the acceleration to be measured based on the target parameter and the system parameter;
[0195] A conditional judgment unit, used to judge whether the calculated acceleration is greater than the acceleration to be measured;
[0196] a first system parameter determination unit, configured to maintain the value of the system parameter if it is greater than ;
[0197] The second system parameter determination unit is used to assign the value of the calculated acceleration to the acceleration to be measured if it is not greater than ; and update the value of the system parameter based on the acceleration to be measured.
[0198] In a specific implementation, the acceleration acquisition unit to be measured includes:
[0199] A first acceleration to be measured acquisition subunit is used to determine the acceleration to be measured based on the acceleration and the acceleration coefficient;
[0200] A second acceleration to be measured acquisition subunit is used to determine the acceleration to be measured based on the initial velocity, the target velocity, the acceleration segment time and the acceleration coefficient;
[0201] The third acceleration to be measured acquisition subunit is used to determine the acceleration to be measured based on the initial velocity, the target velocity, the acceleration segment displacement and the acceleration coefficient.
[0202] In a specific implementation, the time determination module 12 includes:
[0203] a maximum speed calculation unit, configured to determine, based on the target parameter and the system parameter, a maximum speed of the operation curve when only an acceleration segment and a deceleration segment exist;
[0204] A first uniform speed segment judgment unit, used to judge whether the maximum speed is greater than the target speed;
[0205] a first maximum running speed determining unit, configured to determine that if the running curve has the uniform speed segment, the target speed is the maximum running speed;
[0206] A first time determination unit is used to obtain the initial speed, the final speed, the maximum operating speed, the acceleration, the deceleration, the acceleration coefficient and the deceleration coefficient, and determine the acceleration section time, the uniform speed section time and the deceleration section time according to the trapezoidal acceleration and deceleration algorithm for the operating curve of the twin motor;
[0207] A first uniform speed segment time acquisition unit, configured to determine that if no, the uniform speed segment does not exist in the running curve, and the uniform speed segment time is 0;
[0208] a second maximum operating speed determining unit, configured to determine the maximum speed as the maximum operating speed;
[0209] The second time determination unit is used to obtain the initial speed, the final speed, the maximum operating speed, the acceleration, the deceleration, the acceleration coefficient and the deceleration coefficient, and determine the acceleration section time and the deceleration section time according to the trapezoidal acceleration and deceleration algorithm for the operating curve.
[0210] In a specific implementation, the time determination module 12 includes:
[0211] A first displacement determination unit, configured to determine the acceleration segment displacement and the deceleration segment displacement based on the target parameter and the system parameter, and determine the target distance, the acceleration segment time, and the deceleration segment time;
[0212] A second uniform speed segment judgment unit is used to judge whether the sum of the acceleration segment displacement and the deceleration segment displacement is greater than the target distance;
[0213] a third maximum running speed determining unit, configured to determine the target speed as the maximum running speed if no, the running curve has the uniform speed segment;
[0214] A third time determination unit is used to obtain the acceleration section displacement, the deceleration section displacement, the target distance and the target speed, and determine the uniform speed section time according to the trapezoidal acceleration and deceleration algorithm for the operation curve of the twin motor;
[0215] A second uniform speed segment time acquisition unit is used for determining that if the uniform speed segment does not exist in the running curve, the uniform speed segment time is 0;
[0216] The fourth maximum running speed determination unit is used to obtain the target distance, the initial speed, the final speed, the acceleration section time, the deceleration section time, the acceleration coefficient and the deceleration coefficient to determine the maximum running speed.
[0217] In a specific implementation, the time determination module 12 includes:
[0218] A second displacement determination unit, configured to determine the target distance, the acceleration segment displacement, and the deceleration segment displacement based on the target parameter and the system parameter;
[0219] A third uniform speed segment judgment unit is used to judge whether the sum of the acceleration segment displacement and the deceleration segment displacement is greater than the target distance;
[0220] a fifth maximum running speed determining unit, configured to determine the target speed as the maximum running speed if no, then the running curve has a uniform speed segment;
[0221] a fourth time determination unit, configured to obtain the acceleration segment displacement, the deceleration segment displacement, the initial velocity, the final velocity, the target distance, the target velocity, and the acceleration / deceleration coefficient, and determine the uniform speed segment time, the acceleration segment time, and the deceleration segment time according to a trapezoidal acceleration / deceleration algorithm for the operation curve of the twin motor;
[0222] A third uniform speed segment time acquisition unit is used for determining that if the uniform speed segment does not exist in the running curve, the uniform speed segment time is 0;
[0223] The sixth maximum operating speed determination unit is used to obtain the initial speed, the final speed, the acceleration segment displacement, the deceleration segment displacement, the target distance, the target speed, the acceleration coefficient and the deceleration coefficient, and determine the acceleration segment time and the deceleration segment time according to the trapezoidal acceleration and deceleration algorithm for the operating curve, and determine the maximum operating speed.
[0224] In a specific implementation, the boundary determination module 13 includes:
[0225] A boundary determination unit is used to use the acceleration segment time as the first boundary, the sum of the acceleration segment time and the uniform speed segment time as the second boundary, and the sum of the acceleration segment time, the uniform speed segment time and the deceleration segment time as the third boundary; the configuration mode boundary includes the first boundary, the second boundary and the third boundary.
[0226] In a specific implementation, the displacement control module 14 includes:
[0227] A first movement speed determination unit is used to obtain the maximum running speed, the initial speed, and the acceleration section time when the time of the running curve is less than or equal to the first boundary, and determine the real-time speed and real-time displacement of the acceleration section according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0228] A second movement speed determination unit is used to obtain the maximum running speed, the acceleration segment time and the acceleration segment displacement when the time is greater than the first boundary and greater than or equal to the second boundary, and determine the real-time speed and real-time displacement of the uniform speed segment according to the trigonometric function acceleration and deceleration algorithm for the running curve;
[0229] The third movement speed determination unit is used to obtain the maximum running speed, the final speed, the acceleration segment displacement and the uniform speed segment displacement when the time is greater than the second boundary and greater than or equal to the third boundary, and determine and calculate the real-time speed and real-time displacement of the deceleration segment according to the trigonometric function acceleration and deceleration algorithm for the running curve.
[0230] Furthermore, the present application also discloses an electronic device. Figure 7It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input-output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the multi-mode configuration curve control method of the twin motor disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0231] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0232] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0233] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the multi-mode configuration curve control method of the twin motor executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0234] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed twin motor multi-mode configuration curve control method is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0235] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0236] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0237] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0238] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0239] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A twin motor multi-mode configuration curve control method, characterized in that: include: Get target parameters and system parameters; Based on the target parameters and the system parameters, the maximum operating speed, acceleration section time, uniform speed section time and deceleration section time in the operating curve of the twin motor are determined according to a trapezoidal acceleration and deceleration algorithm; Determine the configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time; Based on the configuration mode boundary, the real-time speed and real-time position of the running curve are determined according to the trigonometric function acceleration and deceleration algorithm, and the displacement of the twin motor in the virtual scene is controlled.
2. The twin motor multi-mode configuration curve control method according to claim 1, characterized in that: The target parameters include initial velocity, final velocity, acceleration coefficient, deceleration coefficient, target velocity and target distance, and the system parameters include any one or more of acceleration and deceleration, acceleration section time and deceleration section time, acceleration section displacement and deceleration section displacement.
3. The twin motor multi-mode configuration curve control method according to claim 2, characterized in that: After acquiring the target parameters and the system parameters, and before determining the maximum operating speed, acceleration section time, uniform speed section time and deceleration section time in the operating curve of the twin motor according to the trapezoidal acceleration and deceleration algorithm based on the target parameters and the system parameters, the method further includes: Obtaining calculation parameters; wherein the calculation parameters include motor power, load mass, and motor efficiency; Determining a calculated acceleration based on the motor power, the load mass, the motor efficiency and the target speed; Determining an acceleration to be measured based on the target parameter and the system parameter; Determining whether the calculated acceleration is greater than the acceleration to be measured; If it is greater than, the value of the system parameter is maintained; If not, assigning the value of the calculated acceleration to the acceleration to be measured; and updating the value of the system parameter based on the acceleration to be measured.
4. The twin motor multi-mode configuration curve control method according to claim 3, characterized in that: The step of determining the acceleration to be measured based on the target parameter and the system parameter includes: Determining the acceleration to be measured based on the acceleration and the acceleration coefficient; or, determining the acceleration to be measured based on the initial velocity, the target velocity, the acceleration period and the acceleration coefficient; Or, the acceleration to be measured is determined based on the initial velocity, the target velocity, the acceleration segment displacement and the acceleration coefficient.
5. The twin motor multi-mode configuration curve control method according to claim 3, characterized in that: The system parameters include the acceleration and the deceleration. Based on the target parameters and the system parameters, the operation curve of the twin motor is determined according to the trapezoidal acceleration and deceleration algorithm to determine the maximum operation speed, acceleration section time, uniform speed section time and deceleration section time in the operation curve, respectively, including: Based on the target parameter and the system parameter, determining the maximum speed of the operation curve when only the acceleration segment and the deceleration segment exist; Determining whether the maximum speed is greater than the target speed; If yes, the running curve has the uniform speed segment, and the target speed is determined to be the maximum running speed; Obtain the initial speed, the final speed, the maximum operating speed, the acceleration, the deceleration, the acceleration coefficient, and the deceleration coefficient, and determine the acceleration section time, the uniform speed section time, and the deceleration section time for the operating curve of the twin motor according to the trapezoidal acceleration and deceleration algorithm; If not, the operation curve does not have the uniform speed segment, and the uniform speed segment time is determined to be 0; Determining the maximum speed as the maximum operating speed; The initial velocity, the final velocity, the maximum operating speed, the acceleration, the deceleration, the acceleration coefficient and the deceleration coefficient are obtained, and the acceleration section time and the deceleration section time are determined according to the trapezoidal acceleration and deceleration algorithm for the operating curve.
6. The twin motor multi-mode configuration curve control method according to claim 3, characterized in that: The system parameters include the acceleration section time and the deceleration section time. Based on the target parameters and the system parameters, the operation curve of the twin motor is determined according to the trapezoidal acceleration and deceleration algorithm to determine the maximum operation distance, acceleration section time, uniform speed section time and deceleration section time in the operation curve, respectively, including: Based on the target parameters and the system parameters, determine the acceleration segment displacement and the deceleration segment displacement, and determine the target distance, the acceleration segment time, and the deceleration segment time; Determining whether the sum of the acceleration section displacement and the deceleration section displacement is greater than the target distance; If not, the operation curve has the uniform speed segment, and the target speed is determined as the maximum operation speed; The acceleration section displacement, the deceleration section displacement, the target distance and the target speed are obtained, and the uniform speed section time is determined according to the trapezoidal acceleration and deceleration algorithm for the operation curve of the twin motor; If yes, then the running curve does not have a uniform speed segment, and the uniform speed segment time is determined to be 0; The target distance, the initial velocity, the final velocity, the acceleration section time, the deceleration section time, the acceleration coefficient and the deceleration coefficient are obtained, and the maximum operating speed is determined according to the trapezoidal acceleration and deceleration algorithm for the operating curve of the twin motor.
7. The twin motor multi-mode configuration curve control method according to claim 3, characterized in that: The system parameters include the acceleration segment displacement and the deceleration segment displacement. Based on the target parameters and the system parameters, the operation curve of the twin motor is determined according to the trapezoidal acceleration and deceleration algorithm to determine the maximum operation speed, acceleration segment time, uniform speed segment time and deceleration segment time in the operation curve, respectively, including: Determining the target distance, the acceleration segment displacement, and the deceleration segment displacement based on the target parameters and the system parameters; Determining whether the sum of the acceleration section displacement and the deceleration section displacement is greater than the target distance; If not, the running curve has a uniform speed segment, and the target speed is determined to be the maximum running speed; The acceleration segment displacement, the deceleration segment displacement, the initial velocity, the final velocity, the target distance, the target velocity, and the acceleration / deceleration coefficient are obtained, and the uniform speed segment time, the acceleration segment time, and the deceleration segment time are determined according to the trapezoidal acceleration / deceleration algorithm for the operation curve of the twin motor; If yes, then the running curve does not have a uniform speed segment, and the uniform speed segment time is determined to be 0; The initial velocity, the final velocity, the acceleration segment displacement, the deceleration segment displacement, the target distance, the target velocity, the acceleration coefficient and the deceleration coefficient are obtained, and the acceleration segment time and the deceleration segment time are determined according to the trapezoidal acceleration and deceleration algorithm for the operation curve, and the maximum operation speed is determined.
8. The twin motor multi-mode configuration curve control method according to any one of claims 5 to 7, characterized in that: The step of determining the configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time includes: The acceleration segment time is taken as the first boundary, the sum of the acceleration segment time and the uniform speed segment time is taken as the second boundary, and the sum of the acceleration segment time, the uniform speed segment time and the deceleration segment time is taken as the third boundary; the configuration mode boundary includes the first boundary, the second boundary and the third boundary.
9. The twin motor multi-mode configuration curve control method according to claim 8, characterized in that: The method of determining the real-time speed and the real-time position of the running curve based on the configuration mode boundary according to the trigonometric function acceleration and deceleration algorithm of the running curve comprises: When the time of the running curve is less than or equal to the first boundary, the maximum running speed, the initial speed, and the acceleration period time are obtained, and the real-time speed and real-time displacement of the acceleration period are determined according to the trigonometric function acceleration and deceleration algorithm for the running curve; When the time is greater than the first boundary and less than or equal to the second boundary, the maximum running speed, the acceleration segment time and the acceleration segment displacement are obtained, and the real-time speed and real-time displacement of the uniform speed segment are determined according to the trigonometric function acceleration and deceleration algorithm for the running curve; When the time is greater than the second boundary and less than or equal to the third boundary, the maximum operating speed, the final speed, the acceleration segment time, the uniform speed segment time, the deceleration segment time, the acceleration segment displacement and the uniform speed segment displacement are obtained, and the real-time speed and real-time displacement of the deceleration segment are determined and calculated according to the trigonometric function acceleration and deceleration algorithm for the operating curve.
10. A twin motor multi-mode configuration curve control device, characterized in that: include: Parameter acquisition module, used to obtain target parameters and system parameters; A time determination module, configured to determine the maximum operating speed, acceleration time, uniform speed time, and deceleration time in the operating curve of the twin motor according to a trapezoidal acceleration and deceleration algorithm based on the target parameters and the system parameters; A boundary determination module, used to determine the configuration mode boundary of the operation curve based on the acceleration segment time, the uniform speed segment time and the deceleration segment time; The displacement control module is used to determine the real-time speed and real-time position of the running curve based on the configuration mode boundary and control the displacement of the twin motor in the virtual scene according to the trigonometric function acceleration and deceleration algorithm.
11. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, used to execute the computer program to implement the twin motor multi-mode configuration curve control method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, it implements the twin motor multi-mode configuration curve control method as described in any one of claims 1 to 9.