An electronic cam curve meshing method, system, terminal and storage medium
By obtaining and comparing the actual and theoretical positions and speeds of the master and slave shafts during the start of the electronic cam, and planning the electronic cam curve of the meshing process, the problem of inconsistent with the actual position of the master and slave shafts and the design start point is solved, and the smooth transition and coordination of the motion trajectory are achieved.
Patent Information
- Application Number
- CN202410861400.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2044-06-28
AI Technical Summary
During the start of the electronic cam, the actual position of the master and slave shaft is inconsistent with the designed starting point, and the existing technology is difficult to effectively solve this problem, especially on the premise of ensuring the overlap of the motion trajectory.
By obtaining the actual position and speed of the spindle and slave shaft, calculating their theoretical values and comparing them. If they are inconsistent, divide the meshing process and plan the electronic cam curve to make the main and slave shaft relationship match the design curve when the spindle moves to the target position.
The smooth transition between the position and speed of the master and slave shaft at startup is achieved, ensuring that the main axis position reaches the target value at the end of the meshing process. The relationship between the master and slave shaft is consistent with the design curve, solving the problem of inconsistent with the actual position and the design starting point.
Smart Images

Figure CN118859833B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic cam control, and in particular to an electronic cam curve meshing method, system, terminal and storage medium. Background Art
[0002] With the continuous development of industrial automation technology, the electronic cam, as an important means of motion control, can achieve periodic motion and is widely used in various mechanical equipment. The electronic cam curve defines the position, speed and acceleration relationship between the main shaft and the slave shaft, and is the key to realizing high-precision motion control;
[0003] However, in the actual application process, when starting the electronic cam, the actual positions of the main and slave shafts may be inconsistent with the designed starting points; in response to this situation, there are usually two methods in the prior art: one is that the staff redesigns the starting position of the electronic cam in the first motion cycle, so that the actual motion trajectory of the main and slave shafts approaches the motion trajectory indicated by the electronic cam curve and coincides in the second half; the other is to move the main shaft and the slave shaft to the corresponding starting points of the electronic cam curve in advance, and then start the electronic cam statically;
[0004] However, for the first method above, it is necessary to ensure that the actual motion trajectory of the electronic cam coincides with the trajectory indicated by the electronic cam curve in the second half, which is difficult and the process is relatively cumbersome; the second method cannot be realized in some application scenarios and has limitations. Therefore, it is urgent to design a new solution to solve the problem that the actual positions of the main and slave shafts are inconsistent with the designed starting points. Summary of the Invention
[0005] In order to solve the problem that the actual positions of the main and slave shafts are inconsistent with the designed starting points, the present application provides an electronic cam curve meshing method, system, terminal and storage medium.
[0006] In a first aspect, the present application provides an electronic cam curve meshing method, adopting the following technical solution: The method includes:
[0007] Obtain the current actual position x of the main shaft 实际 and the first electronic cam curve;
[0008] Based on the actual position x of the main shaft 实际 and the first electronic cam curve, calculate the corresponding position and speed of the slave shaft when the position of the main shaft is x 实际 , and respectively denote them as the theoretical position y of the slave shaft 理论 and the theoretical speed v of the slave shaft 理论 ;
[0009] Obtain the current actual position y of the slave shaft 实际and the current actual speed v of the slave shaft 实际 ;
[0010] Compare the actual position y of the slave shaft 实际 with the theoretical position y of the slave shaft 理论 and the actual speed v of the slave shaft 实际 with the theoretical speed v of the slave shaft 理论 ;
[0011] If the actual position y of the slave shaft 实际 is inconsistent with the theoretical position y of the slave shaft 理论 , or the actual speed v of the slave shaft 实际 is inconsistent with the theoretical speed v of the slave shaft 理论 , then based on the actual position x of the main shaft 实际 and the set moving length △x of the main shaft, determine the target position x of the main shaft 目标 ; and mark the process of moving the main shaft from the actual position x 实际 to the target position x 目标 as the meshing process, and plan the electronic cam curve corresponding to the meshing process, so that when the main shaft moves to the target position x 目标 , the relationship among the actual position of the main shaft, the actual position of the slave shaft and the actual speed of the slave shaft coincides with the first electronic cam curve;
[0012] wherein, x 目标 = x 实际 + △x.
[0013] By adopting the above technical solution, by dividing the meshing process and planning the electronic cam curve corresponding to the meshing process, during the meshing process, the speed and position of the slave shaft smoothly change towards the trend that satisfies the master-slave relationship of the first electronic cam curve, and at the end of the meshing process, the position of the main shaft reaches the target value, and the relationship between the master and slave shafts also coincides with the first electronic cam curve, solving the problem that the actual positions of the master and slave shafts are different from the designed starting points; moreover, the present application does not need to redesign the starting position of the electronic cam in the first motion cycle, nor does it need to move the main shaft and the slave shaft to the starting points corresponding to the electronic cam curve in advance. By adopting the new solution and combining with the set first electronic cam curve, during the meshing process, the master and slave shafts still refer to the designed first electronic cam curve, while continuously adjusting and correcting, so that the speed and position of the slave shaft smoothly transition to the values that conform to the master-slave relationship planned by the first electronic cam, the meshing process is simpler and more applicable.
[0014] In a specific feasible implementation, planning the electronic cam curve corresponding to the meshing process specifically includes: obtaining the initial corrected electronic cam curve corresponding to the meshing process; the initial corrected electronic cam curve is an expression containing coefficients;
[0015] Based on the actual speed v of the slave axis 实际 and the theoretical speed v of the slave axis 理论 , calculate the speed offset Δv of the slave axis; based on the speed offset Δv of the slave axis and the set deceleration a of the slave axis 减 , calculate the first position offset Δs1 of the slave axis; based on the actual position x of the main axis 实际 , the target position x of the main axis 目标 , the speed offset Δv of the slave axis and the first position offset Δs1 of the slave axis, construct the first starting condition and the first ending condition for correcting the speed of the slave axis; based on the first starting condition and the first ending condition, solve the values of the coefficients in the initial corrected electronic cam curve to obtain the first corrected electronic cam curve; where, Δv = v 理论 -v 实际 ; Based on the actual position y of the slave axis 实际 and the theoretical position y of the slave axis 理论 , calculate the second position offset Δs2 of the slave axis; based on the actual position x of the main axis 实际 and the target position x of the main axis 目标 , the first position offset Δs1 of the slave axis, the second position offset Δs2 of the slave axis, construct the second starting condition and the second ending condition for correcting the position of the slave axis; based on the second starting condition and the second ending condition, solve the values of the coefficients in the initial corrected electronic cam curve to obtain the second corrected electronic cam curve; where, Δs2 = y 理论 -y 实际 ;
[0016] Superimpose the first electronic cam curve, the first corrected electronic cam curve, and the second corrected electronic cam curve corresponding to the meshing process to obtain the electronic cam curve corresponding to the meshing process.
[0017] By adopting the above technical solution, the original first electronic cam curve is superimposed with the first corrected electronic cam curve obtained by adjusting the speed of the slave axis during the meshing process and the second corrected electronic cam curve obtained by adjusting the position of the slave axis. By applying the two adjustments simultaneously to the meshing process of the electronic cam, it is possible to plan based on the original first electronic cam curve. Even if the current actual position and actual speed of the slave axis do not match the set starting point, the position and speed of the slave axis can be smoothly controlled to transition to a state matching the first electronic cam curve.
[0018] In a specific feasible implementation, the first starting condition includes:
[0019] When the position of the main axis is x 实际 , the position of the slave axis is 0, the speed of the slave axis is Δv, and the acceleration of the slave axis is 0;
[0020] The first termination condition includes:
[0021] When the main shaft position is x 目标 the slave shaft position is △s1, the slave shaft speed is 0, and the slave shaft acceleration is 0.
[0022] In a specific feasible implementation, the second starting condition includes:
[0023] When the main shaft position is x 实际 the slave shaft position is 0, the slave shaft speed is 0, and the slave shaft acceleration is 0;
[0024] The second termination condition includes:
[0025] When the main shaft position is x 目标 the slave shaft position is -△s1 - △s2, the slave shaft speed is 0, and the slave shaft acceleration is 0.
[0026] In a specific feasible implementation, after planning the electronic cam curve corresponding to the meshing process, it further includes: calculating the extreme value a max1 of the slave shaft acceleration and the extreme value v max1 of the slave shaft speed during the meshing process based on the electronic cam curve corresponding to the meshing process;
[0027] Compare the extreme value a max1 of the slave shaft acceleration with the preset acceleration limit value a limits , and compare the extreme value v max1 of the slave shaft speed with the preset speed limit value v limits respectively;
[0028] If the extreme value a max1 of the slave shaft acceleration exceeds the acceleration limit value a limits , or the extreme value v max1 of the slave shaft speed exceeds the speed limit value v limits , a reminder of incorrect electronic cam curve planning is generated.
[0029] By adopting the above technical solution, after planning the first electronic cam curve, the extreme values of the slave shaft acceleration and speed are obtained, and it is judged whether these values are within the set limit values. If they are too high, a reminder is generated in a timely manner, improving the reliability of the first electronic cam curve.
[0030] In a specific feasible implementation, before obtaining the current actual position x 实际 of the main shaft and the first electronic cam curve, it further includes:
[0031] Select multiple key points at the spindle position according to the spindle feed direction, and set the parameter information corresponding to each key point; the parameter information includes the value of the spindle position, the value of the slave axis position, the value of the slave axis speed, and the value of the slave axis acceleration;
[0032] Obtain the initial electronic cam curve, divide the initial electronic cam curve according to the selected key points, and determine an initial electronic cam sub-curve for every two adjacent key points to obtain multiple initial electronic cam sub-curves; wherein, the initial electronic cam curve is an expression containing coefficients;
[0033] For each initial electronic cam sub-curve, substitute the parameter information corresponding to the two endpoints of the initial electronic cam sub-curve into the initial electronic cam sub-curve respectively, and solve the values of the coefficients in each initial electronic cam sub-curve to obtain the first electronic cam sub-curve;
[0034] Construct the first electronic cam curve according to each section of the first electronic cam sub-curve.
[0035] By adopting the above technical solution, when constructing the first electronic cam curve, in the general point-plotting method, the staff can set the values corresponding to some key points by themselves, so as to calculate the electronic cam curve equation corresponding to each small section, realize the coordinated movement of the master and slave axes, and select the corresponding first electronic cam sub-curve for the current section according to the real-time position information of the spindle, then the current slave axis position, slave axis speed and slave axis acceleration information can be calculated in real time.
[0036] In a specific feasible implementation, the first electronic cam curve includes:
[0037] The first position relationship curve between the slave axis position y and the spindle position x: y(x) = D 0 +D 1 x + D 2 x 2 +D 3 x 3 +D 4 x 4 +D 5 x 5 ;
[0038] The first speed relationship curve between the slave axis speed v and the spindle position x: v(x) = D 1 +2D 2 x + 3D 3 x 2 +4D 4 x 3 +5D 5 X 4 ;
[0039] The first acceleration relationship curve between the slave axis acceleration a and the main axis position x: a(x) = 2d 2 +6d 3 X+12d 4 X 2 +20D 5 x 3 。
[0040] In a second aspect, the present application provides an electronic cam curve meshing system that applies the electronic cam curve meshing method in the above first aspect or any one of the implementable embodiments of the first aspect. The system includes an acquisition module and an analysis and calculation module;
[0041] The acquisition module is configured to acquire the current actual position x of the main axis 实际 and the first electronic cam curve;
[0042] The analysis and calculation module is configured to calculate, based on the actual position x of the main axis 实际 and the first electronic cam curve, the corresponding slave axis position and slave axis speed when the main axis position is x 实际 , and respectively denote them as the slave axis theoretical position y 理论 and the slave axis theoretical speed v 理论 ;
[0043] The acquisition module is further configured to acquire the current actual position y of the slave axis 实际 and the current actual speed v of the slave axis 实际 ;
[0044] The analysis and calculation module is further configured to respectively compare the actual position y of the slave axis 实际 with the theoretical position y of the slave axis 理论 , the actual speed v of the slave axis 实际 with the theoretical speed v of the slave axis 理论 ;
[0045] The analysis and calculation module is further configured to, if the actual position y of the slave axis 实际 is inconsistent with the theoretical position y of the slave axis 理论 , or the actual speed v of the slave axis 实际 is inconsistent with the theoretical speed v of the slave axis 理论 , then determine the target position x of the main axis based on the actual position x of the main axis 实际 and the set main axis movement length △x; and mark the process of moving the main axis from the actual position x 目标 to the target position x 实际 as the meshing process, and plan the electronic cam curve corresponding to the meshing process, such that when the main axis moves to the target position x 目标 目标 When the actual position of the main shaft, the actual position of the slave shaft, and the actual speed of the slave shaft are consistent with the first electronic cam curve;
[0046] where x 目标 = x 实际 + Δx.
[0047] In a third aspect, the present application provides a terminal, including: a processor, a memory, and a communication bus; the communication bus is used to implement connection communication between the processor and the memory, and the processor is used to execute one or more programs stored in the memory to implement the electronic cam curve meshing method in the first aspect or any one of the feasible implementation manners of the first aspect.
[0048] In a fourth aspect, the present application provides a computer-readable storage medium, and the computer-readable storage medium stores instructions, and when the instructions are executed, the electronic cam curve meshing method in the first aspect or any one of the feasible implementation manners of the first aspect is executed.
[0049] In summary, the technical solution of the present application at least includes the following beneficial technical effects:
[0050] 1. First, obtain the actual position of the main shaft, and then combine the originally designed first electronic cam curve to calculate the current corresponding theoretical position and theoretical speed of the slave shaft. By comparing the actual position and theoretical position of the slave shaft, and the actual speed and theoretical speed of the slave shaft, when there is an inconsistency, it indicates that there is a deviation between the actual positions of the master and slave shafts and the pre-designed starting point at this time. Therefore, by dividing the meshing process and planning the electronic cam curve corresponding to this meshing process, during the meshing process, the speed and position of the slave shaft smoothly change towards the master-slave relationship corresponding to the first electronic cam curve, and at the end of the meshing process, the position of the main shaft reaches the target value, and the relationship between the master and slave shafts also coincides with the first electronic cam curve, solving the problem that the actual positions of the master and slave shafts are different from the designed starting point;
[0051] 2. The present application does not need to re-design the starting position of the electronic cam in the first motion cycle, nor does it need to move the main shaft and the slave shaft to the starting points corresponding to the electronic cam curve in advance. By adopting a new solution and combining the set first electronic cam curve, during the meshing process, the master and slave shafts still refer to the designed first electronic cam curve, and at the same time, continuously adjust and correct, so that the speed and position of the slave shaft smoothly transition to the values that conform to the master-slave relationship planned by the first electronic cam, and the main shaft also moves to the target value. The meshing process is simpler and has a wide range of applicability. Description of the Drawings
[0052] Figure 1 is the main flowchart of the electronic cam curve meshing method in the embodiment of the present application;
[0053] Figure 2 This is a flowchart for programming the electronic cam curve during the meshing process in an embodiment of the present application. Detailed implementation manners
[0054] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0055] An embodiment of the present application provides an electronic cam curve meshing method. Referring to Figure 1 , the method includes steps S1 - S5.
[0056] S1. Obtain the current actual position x of the main shaft 实际 and the first electronic cam curve;
[0057] Specifically, the first electronic cam curve includes a first position relationship curve between the slave shaft position y and the main shaft position x, a first speed relationship curve between the slave shaft speed v and the main shaft position x, and a first acceleration relationship curve between the slave shaft acceleration a and the main shaft position x.
[0058] Specifically, the first electronic cam curve can adopt a fifth - order polynomial. Among them, the first position relationship curve between the slave shaft position y and the main shaft position x is: y(x) = D 0 +d 1 X + d 2 x 2 +D 3 x 3 +D 4 x 4 +D 5 x 5 ;
[0059] The first speed relationship curve between the slave shaft speed v and the main shaft position x is: v(x) = d 1 +2D 2 x + 3D 3 x 2 +4D 4 x 3 +5D 5 x 4 ;
[0060] The first acceleration relationship curve between the slave shaft acceleration a and the main shaft position x is: a(x) = 2D 2 +6D 3 x + 12D 4 x 2 +20D 5 x 3 ;
[0061] D 0 、D 1 、D2 , D 3 , D 4 , D 5 are all coefficients.
[0062] The relationship between these three relationship curves is as follows: Differentiating the first position relationship curve y(x) can obtain the first velocity relationship curve v(x), and differentiating the first velocity relationship curve v(x) can obtain the first acceleration relationship curve a(x).
[0063] It should be noted that each coefficient D in the above first electronic cam curve 0 , D 1 , D 2 , D 3 , D 4 and D 5 are known values. Here, for the sake of convenient expression, they are represented by letters;
[0064] Furthermore, the above first electronic cam curve includes multiple first electronic cam sub-curves.
[0065] S2. Based on the actual position x of the main shaft 实际 and the first electronic cam curve, calculate the corresponding position and speed of the slave shaft when the position of the main shaft is x 实际 , and record them as the theoretical position y of the slave shaft 理论 and the theoretical speed v of the slave shaft 理论 .
[0066] It can be understood that substituting x = x 实际 into the formulas y(x) and v(x) in the first electronic cam curve respectively can obtain the corresponding position value and speed value of the slave shaft.
[0067] S3. Obtain the current actual position y of the slave shaft 实际 and the current actual speed v of the slave shaft 实际 .
[0068] S4. Compare the actual position y of the slave shaft 实际 with the theoretical position y of the slave shaft 理论 , and compare the actual speed v of the slave shaft 实际 with the theoretical speed v of the slave shaft 理论 ;
[0069] S5. If the actual position y of the slave shaft 实际 is inconsistent with the theoretical position y of the slave shaft 理论 , or the actual speed v of the slave shaft 实际 is inconsistent with the theoretical speed v of the slave shaft 理论 , then based on the actual position x of the main shaft 实际Determine the spindle target position x based on the set spindle movement length △x 目标 ; and move the spindle from the actual position x 实际 to the target position x 目标 . Mark the process as the meshing process, and plan the electronic cam curve corresponding to the meshing process, so that when the spindle moves to the target position x 目标 , the relationship among the actual position of the spindle, the actual position of the slave axis, and the actual speed of the slave axis coincides with the first electronic cam curve; where x 目标 = x 实际 + △x; the meshing process is used to correct the speed and position of the slave axis, so that at the end point of the meshing process, the actual position of the spindle is x 目标 , the actual position of the slave axis is y 目标 , and the actual speed of the slave axis is v 目标 ; and the relationship among the spindle position x 目标 , the slave axis position y 目标 , and the slave axis speed v 目标 satisfies the first electronic cam curve; where y 目标 and v 目标 are both calculated according to the first electronic cam curve when the spindle position is x 目标 .
[0070] It should be noted that for the value of the spindle movement length △x, the larger △x is, the smoother the meshing process of the slave axis speed and position is, but the longer the meshing process is. The smaller △x is, the less smooth the meshing process of the slave axis speed and position is, but the shorter the meshing process is. Those skilled in the art can set it according to actual needs, and this application does not make specific limitations.
[0071] Furthermore, after the meshing process, at the end point of the meshing process, based on the spindle position x 目标 and the first electronic cam curve, the slave axis position y 目标 and the slave axis speed v 目标 at the end point of the meshing process can be obtained; at the end point of the meshing process, the actual position of the spindle, the actual speed of the slave axis, and the actual position of the slave axis can be consistent with the first electronic cam curve. For the movement of the master-slave axes after the meshing process, just move according to the first electronic cam curve, and the movement of the master-slave axes enters the set trajectory after the end point of the meshing process.
[0072] In a possible implementation manner, referring to Figure 2 , step S5, plan the electronic cam curve corresponding to the meshing process, which specifically includes steps S51 - S54.
[0073] S51. Obtain the initial corrected electronic cam curve corresponding to the meshing process; the initial corrected electronic cam curve is an expression containing coefficients; the initial corrected electronic cam curve is pre-constructed.
[0074] In a possible implementation, the initial corrected electronic cam curve also adopts a fifth-degree polynomial. For example, the initial corrected electronic cam curve includes:
[0075] The initial corrected position relationship curve between the follower position y and the main shaft position x is: y(x) = D a + D b x + D c x 2 + D d x 3 + D e x 4 + D f x 5 ;
[0076] The initial corrected speed relationship curve between the follower speed v and the main shaft position x is: v(x) = D b + 2D c x + 3D d x 2 + 4D e x 3 + 5D f x 4 ;
[0077] The initial corrected acceleration relationship curve between the follower acceleration a and the main shaft position x is: a(x) = 2D c + 6D d x + 12D e x 2 + 20D f x 3 ;
[0078] where D a , D b , D c , D d , D e , D f are all coefficients. It should be noted that in this step, the coefficients in the initial corrected electronic cam curve are unknown and the specific values have not been calculated yet.
[0079] S52. Based on the actual follower speed v 实际 and the theoretical follower speed v 理论 , calculate the follower speed offset Δv; based on the follower speed offset Δv and the set follower deceleration a 减 , calculate the first follower position offset Δs1; based on the actual main shaft position x实际 , the target position x of the main shaft 目标 , the slave axis speed offset Δv and the first position offset Δs1 of the slave axis, to construct the first starting condition and the first ending condition for correcting the slave axis speed; based on the first starting condition and the first ending condition, solve for the values of the coefficients in the initial corrected electronic cam curve to obtain the first corrected electronic cam curve; where, Δv = v 理论 - v 实际 ,
[0080] That is to say, in this step, by solving for the values of the coefficients in the initial corrected electronic cam curve and substituting the values of the coefficients into the initial corrected electronic cam curve, the first corrected electronic cam curve can be obtained.
[0081] It should be noted that the above-mentioned deceleration a of the slave axis 减 value, when a 减 is larger, the meshing process of the slave axis speed is less smooth, but the meshing process is faster; when a 减 is smaller, the meshing process of the slave axis speed is smoother, but the meshing process is longer. Those skilled in the art can set it according to actual needs, and this application does not make specific limitations.
[0082] In a possible implementation manner, the first starting condition includes:
[0083] When the main shaft position is x 实际 , the slave axis position is 0, the slave axis speed is Δv, and the slave axis acceleration is 0;
[0084] The first ending condition includes:
[0085] When the main shaft position is x 目标 , the slave axis position is Δs1, the slave axis speed is 0, and the slave axis acceleration is 0.
[0086] Since at the moment when the electronic cam starts meshing, the slave axis speed cannot directly jump from v 实际 to the value v 实际 corresponding to the main shaft position x 理论 , it is necessary to start meshing the electronic cam when the slave axis speed is v 实际 . When the meshing is completed, the actual speed of the slave axis conforms to the first electronic cam curve with the actual position of the main shaft, and the speed needs to be smoothly transitioned. Therefore, through the above first starting condition and the first ending condition, a set of solutions of the coefficients in the initial corrected electronic cam curve can be calculated during the slave axis speed compensation, so as to obtain the corresponding first corrected electronic cam curve.
[0087] S53, based on the actual position y of the slave axis 实际 and the theoretical position y of the slave axis理论 , calculate the offset Δs2 of the slave axis from the second position; based on the actual position x of the main axis 实际 and the target position x of the main axis 目标 , the offset Δs1 of the slave axis from the first position, and the offset Δs2 of the slave axis from the second position, construct the second starting condition and the second ending condition for correcting the position of the slave axis; based on the second starting condition and the second ending condition, solve for the values of the coefficients in the initial corrected electronic cam curve to obtain the second corrected electronic cam curve; where, Δs2 = y 理论 -y 实际 .
[0088] Similarly, in step S53, solve for the values of the coefficients in the initial corrected electronic cam curve, and substitute the values of the coefficients into the initial corrected electronic cam curve, then the second corrected electronic cam curve with known coefficients can be obtained.
[0089] In a possible implementation manner, the second starting condition includes:
[0090] When the position of the main axis is x 实际 , the position of the slave axis is 0, the speed of the slave axis is 0, and the acceleration of the slave axis is 0;
[0091] The second ending condition includes:
[0092] When the position of the main axis is x 目标 , the position of the slave axis is -Δs1 - Δs2, the speed of the slave axis is 0, and the acceleration of the slave axis is 0.
[0093] Since at the moment when the electronic cam starts to engage, the position of the slave axis cannot directly jump from y 实际 to the value y 实际 corresponding to the position x of the main axis 理论 , it is necessary to engage the electronic cam when the position of the slave axis is y 实际 . When the engagement is completed, the actual position of the slave axis conforms to the first electronic cam curve with the main axis actual position, and the position needs to be smoothly transitioned; the above second starting condition and second ending condition, by considering the offset Δs2 of the slave axis generated during the process of the slave axis position reaching y 实际 from y 理论 , combined with the offset Δs1 of the slave axis generated during the process of the slave axis speed reaching v 实际 from v 理论 , it is necessary to eliminate these offsets. Therefore, through the second starting condition and the second ending condition, a set of solutions of the coefficients in the initial corrected electronic cam curve can be calculated during the compensation of the slave axis position, so as to obtain the corresponding second corrected electronic cam curve.
[0094] S54. Superimpose the first electronic cam curve, the first corrected electronic cam curve, and the second corrected electronic cam curve corresponding to the meshing process to obtain the electronic cam curve corresponding to the meshing process.
[0095] Further, after superimposing the first electronic cam curve, the first corrected electronic cam curve, and the second corrected electronic cam curve corresponding to the meshing process, superimpose it with the offset △s2 of the slave shaft second position to obtain the electronic cam curve corresponding to the meshing process.
[0096] It can be understood that based on the first electronic cam curve, select the first electronic cam curve corresponding to the spindle position within the range from x 实际 to x 实际 +△x, which is the first electronic cam curve corresponding to the meshing process.
[0097] Further, the obtained electronic cam curve corresponding to the meshing process includes: the position relationship curve between the slave shaft position y and the spindle position x, the speed relationship curve between the slave shaft speed v and the spindle position x, and the acceleration relationship curve between the slave shaft acceleration a and the spindle position x;
[0098] For example, in the first electronic cam curve, the first position relationship curve between the slave shaft position y and the spindle position x is y m (x), the first speed relationship curve between the slave shaft speed v and the spindle position x is v m (x), and the first acceleration relationship curve between the slave shaft acceleration a and the spindle position x is a m (x); in the first corrected electronic cam curve, the first corrected position relationship curve between the slave shaft position y and the spindle position x is y n (x), the first corrected speed relationship curve between the slave shaft speed v and the spindle position x is v n (x), and the first corrected acceleration relationship curve between the slave shaft acceleration a and the spindle position x is a n (x); in the second corrected electronic cam curve, the second corrected position relationship curve between the slave shaft position y and the spindle position x is y p (x), the second corrected speed relationship curve between the slave shaft speed v and the spindle position x is v p (x), and the second corrected acceleration relationship curve between the slave shaft acceleration a and the spindle position x is a p (x); then, after superimposing the three curves, the position relationship curve between the slave shaft position y and the spindle position x during the meshing process can be obtained as y(x) = y m (x) + y n (x) + y p (x) + △s2;
[0099] Similarly, by using the same method, the velocity relationship curve between the slave axis velocity v and the main axis position x can be obtained as v(x) = v m (x) + v n (x) + v p (x);
[0100] The acceleration relationship curve between the slave axis acceleration a and the main axis position x is a(x) = a m (x) + a n (x) + a p (x), which will not be elaborated here.
[0101] In the implementation manner of the present application, in the electronic cam curve corresponding to the meshing process obtained through calculation, the acceleration relationship curve between the slave axis acceleration a and the main axis position x is a cubic polynomial. By taking the derivative of this cubic polynomial, the jerk relationship curve between the slave axis jerk j and the main axis position x can be obtained, and this jerk relationship curve is a quadratic polynomial.
[0102] Through the above steps S51 - S54, first, by considering the process of the slave axis velocity from v 实际 to v 理论 , the first starting condition and the first ending condition are constructed to obtain the first corrected electronic cam curve; then, by considering the process of the slave axis position from y 实际 to y 理论 , the second starting condition and the second ending condition are constructed to obtain the second corrected electronic cam curve. Finally, the first corrected electronic cam curve and the second corrected electronic cam curve are superimposed on the first electronic cam curve to obtain the electronic cam curve of the meshing process matching the current situation.
[0103] In the above steps S51 - S54, the original first electronic cam curve is superimposed with the first corrected electronic cam curve obtained by adjusting the slave axis velocity during the meshing process and the second corrected electronic cam curve obtained by adjusting the slave axis position. By applying the two adjustments simultaneously to the meshing process of the resistance cam, planning can be carried out on the basis of the original first electronic cam curve. Even if the current actual position and actual velocity of the slave axis do not match the set starting point, the position and velocity of the slave axis can be controlled to smoothly transition to a state matching the first electronic cam curve. During the process of the superimposed motion, it is the meshing process of the electronic cam. After the superimposed motion is completed, the electronic cam meshing is completed.
[0104] Through the above steps S1 - S5, first, the actual position of the main shaft is obtained. Then, in combination with the originally designed first electronic cam curve, the theoretical position and theoretical speed of the slave shaft corresponding at present are calculated. By comparing the actual position and theoretical position of the slave shaft, and the actual speed and theoretical speed of the slave shaft, when there is a discrepancy, it indicates that there is a deviation between the actual positions of the master and slave shafts and the pre - designed starting point at this time. Therefore, by dividing the meshing process and planning the electronic cam curve corresponding to this meshing process, during the meshing process, the actual position and actual speed of the slave shaft gradually tend to conform to the master - slave relationship corresponding to the first electronic cam curve. And at the end of the meshing process, the position of the main shaft reaches the target value, and the relationship between the master and slave shafts also coincides with the first electronic cam curve, solving the problem that the actual positions of the master and slave shafts are different from the designed starting point. Moreover, in this application, there is no need to re - design the starting position of the electronic cam in the first motion cycle, nor to move the main shaft and the slave shaft to the starting points corresponding to the electronic cam curve in advance. By adopting a new scheme and combining the set first electronic cam curve, during the meshing process, the master and slave shafts still refer to the designed first electronic cam curve, while continuously adjusting and correcting, so that the speed and position of the slave shaft smoothly transition to values that conform to the master - slave relationship planned by the first electronic cam. The meshing process is simpler and has a wide range of applicability.
[0105] In a possible implementation manner, after planning the electronic cam curve corresponding to the meshing process, steps A1 - A3 are further included.
[0106] A1. Based on the electronic cam curve corresponding to the meshing process, calculate the extreme value a of the acceleration of the slave shaft during the meshing process max1 and the extreme value v of the speed of the slave shaft max1 .
[0107] Specifically, in this step, the jerk relationship curve between the jerk j of the slave shaft and the position x of the main shaft can be obtained by taking the derivative of the acceleration relationship curve between the acceleration a of the slave shaft and the position x of the main shaft in the electronic cam curve corresponding to the meshing process;
[0108] Exemplarily, if through calculation, the position relationship curve between the position y of the slave shaft and the position x of the main shaft in the electronic cam curve corresponding to the meshing process is y(x) = D′ 0 +d′ 1 x + d′ 2 X 2 +d′ 3 x 3 +D′ 4 x 4 +D′ 5 x 5
[0109] The velocity relationship curve between the slave axis velocity v and the main axis position x is v(x) = D′ 1 + 2d′ 2 x + 3D′ 3 x 2 + 4D′ 4 x 3 + 5D′ 5 X 4 ;
[0110] The acceleration relationship curve between the slave axis acceleration a and the main axis position x is a(x) = 2D′ 2 + 6D′ 3 x + 12D′ 4 x 2 + 20D′ 5 x 3 ; where D′ 0 、D′ 1 、D′ 2 、D′ 3 、D′ 4 、D′ 5 are all coefficients, and in this step, these coefficients are all known values. Here, only for the convenience of expression, letters are used to represent them.
[0111] Then, taking the derivative of a(x), the jerk relationship curve between the slave axis jerk j and the main axis position x is j(x) = 6D′ 3 + 24D′ 4 x + 60D′ 5 x 2 .
[0112] After that, based on the velocity relationship curve between the slave axis velocity v and the main axis position x, the acceleration relationship curve between the slave axis acceleration a and the main axis position x, and the jerk relationship curve between the slave axis jerk j and the main axis position x in the electronic cam curve corresponding to the meshing process, combined with the slave axis velocity extreme value calculation formula and the slave axis acceleration extreme value calculation formula, calculate the slave axis acceleration extreme value a max1 and the slave axis velocity extreme value v max1 .
[0113] Specifically, since the actual velocity and acceleration expressions of the slave axis control actuator are the differentials of the slave axis position with respect to time, the formula for the actual velocity of the slave axis acting on the actuator is: The formula for the actual acceleration of the slave axis is where v feed is the main axis feed velocity;
[0114] Therefore, it can be obtained that the formula for the slave axis velocity extreme value is vmax1 = v feed_max * v(x); The formula for the extreme value of the axis acceleration is a max1 = v feed_max * v feed_max * a(x), where v feed_max is the maximum feed speed of the main shaft;
[0115] Let j(x) = 6D′ 3 + 24D′ 4 x + 60D′ 5 x 2 = 0, the value of the main shaft position x corresponding to the extreme value of the axis acceleration can be calculated. Substituting the value of the main shaft position x into the formula for the extreme value of the axis acceleration, the extreme value of the axis acceleration a max1 ;
[0116] Let a(x) = 2D′ 2 + 6D′ 3 x + 12D′ 4 x 2 + 20D′ 5 x 3 = 0, according to the Shengjin formula, the value of the main shaft position x corresponding to the extreme value of the axis speed can be calculated. Substituting the value of the main shaft position x into the formula for the extreme value of the axis speed, the extreme value of the axis speed v max1 .
[0117] A2, respectively compare the extreme value of the axis acceleration a max1 and the preset acceleration limit value a limits , the extreme value of the axis speed v max1 and the preset speed limit value v limits .
[0118] A3, if the extreme value of the axis acceleration a max1 exceeds the acceleration limit value a limits , or the extreme value of the axis speed v max1 exceeds the speed limit value v limits , it can be determined that the planning of the axis speed and the axis acceleration does not meet the limit conditions, and a reminder of the electronic cam curve planning error is generated.
[0119] It should be noted that the specific values of the speed limit value v limits and the acceleration limit value a limits can be set by those skilled in the art according to the actual mechanical conditions of the electronic cam, such as parameters such as the maximum rotational speed, maximum torque, and maximum acceleration that the electronic cam can bear. This application does not make specific limitations on this.
[0120] Further, after determining that the planning of the slave axis speed and the slave axis acceleration does not meet the limit conditions, the maximum feed speed v of the main axis during the meshing process can be calculated backward feed_max , that is, it is required that the main axis feed speed be within this maximum feed speed v feed_max to perform meshing.
[0121] Through the above steps A1 - A3, after obtaining the electronic cam curve corresponding to the meshing process, the extreme values of the slave axis acceleration and the speed during the meshing process are calculated, and it is judged whether these values are within the set limit values. If they are too high, a reminder is generated in a timely manner, improving the reliability of the electronic cam curve corresponding to the meshing process.
[0122] In a possible implementation manner, before step S1, obtaining the actual position x of the main axis 实际 and the first electronic cam curve, steps B1 - B4 are further included.
[0123] B1, select multiple key points on the main axis position in the main axis feed direction, and set the parameter information corresponding to each key point; the parameter information includes the value of the main axis position, the value of the slave axis position, the value of the slave axis speed, and the value of the slave axis acceleration.
[0124] Specifically, the parameter information corresponding to each key point is the parameter information after unit normalization, that is, the values of the main axis position, the slave axis position, the slave axis speed, and the slave axis acceleration are all values after unit normalization.
[0125] Exemplarily, the number of key points is N + 1, N is a positive integer, and the parameter information corresponding to each key point includes the value of the main axis position x N value, the value of the slave axis position y N value, the value of the slave axis speed v N value, and the value of the slave axis acceleration a N value; where x N represents the value of the main axis position corresponding to the Nth key point, y N represents the value of the slave axis position corresponding to the Nth key point, v N represents the value of the slave axis speed corresponding to the Nth key point, a N represents the value of the slave axis acceleration corresponding to the Nth key point; N = 1, 2, 3...;
[0126] The parameter information of each key point can form a parameter set, that is, {(x 1 , y 1 , v 1 , a 1 ), (x 2 , y 2 , v 2 , a 2 ), (x 3, y 3 , v 3 , a 3 ), ……(x N+1 , y N+1 , v N+1 , a N+1 )}.
[0127] B2. Obtain the initial electronic cam curve, divide the initial electronic cam curve according to the selected key points, and determine an initial electronic cam sub - curve for each adjacent pair of key points, obtaining multiple initial electronic cam sub - curves; wherein, the initial electronic cam curve is a relational expression represented by coefficients.
[0128] Specifically, the initial electronic cam curve includes an initial position relationship curve between the slave - axis position y and the main - axis position x, an initial velocity relationship curve between the slave - axis velocity v and the main - axis position x, and an initial acceleration relationship curve between the slave - axis acceleration a and the main - axis position x.
[0129] Specifically, the initial electronic cam curve can adopt a fifth - order polynomial. Among them, the initial position relationship curve between the slave - axis position y and the main - axis position x is: y(x) = D 0 +D 1 x + D 2 x 2 +D 3 x 3 +D 4 x 4 +D 5 x 5 ;
[0130] The initial velocity relationship curve between the slave - axis velocity v and the main - axis position x is: v(x) = D 1 +2d 2 x + 3D 3 x 2 +4D 4 x 3 +5D 5 x 4 ;
[0131] The initial acceleration relationship curve between the slave - axis acceleration a and the main - axis position x is: a(x) = 2D 2 +6D 3 x + 12D 4 x 2 +20D 5 x 3 ;
[0132] Among them, D 0 , D 1 , D 2 , D 3 , D4 , D 5 are all coefficients. In this step, these coefficients are unknown and their specific values have not been obtained yet.
[0133] The relationship between these three relationship curves is as follows: Differentiating the initial position relationship curve y(x) can obtain the initial velocity relationship curve v(x), and differentiating the initial velocity relationship curve v(x) can obtain the initial acceleration relationship curve a(x), that is
[0134] Exemplarily, dividing the initial electronic cam curve according to the N + 1 key points can obtain N initial electronic cam sub-curves;
[0135] That is, N initial position relationship sub-curves between the follower position y and the main shaft position x can be obtained {Y 1 (x), Y 2 (x), Y 3 (x) …… Y N (x)}; where Y N (x) represents the initial position relationship sub-curve corresponding to the Nth key point to the (N + 1)th key point; N initial velocity relationship sub-curves between the follower velocity v and the main shaft position x can also be obtained {V 1 (x), V 2 (x), V 3 (x) …… V N (x)}; where V N (x) represents the initial velocity relationship sub-curve corresponding to the Nth key point to the (N + 1)th key point; N initial acceleration relationship sub-curves between the follower acceleration a and the main shaft position x can also be obtained {A 1 (x), A 2 (x), A 3 (x) …… A N (x)}; where A N (x) represents the initial acceleration relationship sub-curve corresponding to the Nth key point to the (N + 1)th key point.
[0136] B3. For each initial electronic cam sub-curve, substitute the parameter information corresponding to the two endpoints of the initial electronic cam sub-curve into the initial electronic cam sub-curve respectively, and solve for the values of the coefficients in each segment of the initial electronic cam sub-curve to obtain the first electronic cam sub-curve.
[0137] That is, after solving for the values of the coefficients in each segment of the initial electronic cam sub-curve, substituting the solved values of the coefficients into the corresponding initial electronic cam sub-curve, the first electronic cam sub-curve with known coefficients can be obtained.
[0138] Exemplarily, taking the electronic cam sub-curve corresponding between the first key point and the second key point as an example, the parameter information corresponding to the first key point and the second key point is given by the staff; the parameter information corresponding to the first key point includes x 1 , y 1 , v 1 and a 1 values, and the parameter information corresponding to the second key point includes x 2 , y 2 , v 2 and a 2 values;
[0139] The initial position relationship sub-curve corresponding between the first key point and the second key point is: y 1 (x), the initial velocity relationship sub-curve is: v 1 (x), and the initial acceleration relationship sub-curve is: a 1 (x);
[0140] It is easy to see that between the first key point and the second key point, the value range of the main axis position x is also x 1 ~x 2 ;
[0141] Substitute the values of x 1 , y 1 , v 1 , a 1 , x 2 , y 2 , v 2 and a 2 into the corresponding initial position relationship sub-curve y 1 (x), the initial velocity relationship sub-curve v 1 (x), and the initial acceleration relationship sub-curve a 1 (x), and the following equations can be obtained:
[0142]
[0143] Given the values of x 1 , y 1 , v 1 , a 1 , x 2 , y 2 , v 2 and a 2 values, solve the above equations using the Gaussian elimination method, and the coefficients D 0 , D 1 , D 2 , D 3 , D 4 , D 5For the numerical value, the calculated coefficient values are respectively denoted as D 00 , D 01 , D 02 , D 03 , D 04 , D 05 , and thus the first electronic cam sub - curve corresponding between the first key point and the second key point can be obtained.
[0144] B4. According to each section of the first electronic cam sub - curve, construct the first electronic cam curve.
[0145] Exemplarily, the finally constructed first electronic cam curve is:
[0146]
[0147] In the above - mentioned first electronic cam curve, x 1 , x 2 , …… x N+1 are key points selected in increasing order according to the main - axis feed direction.
[0148] In the above steps B1 - B4, when constructing the first electronic cam curve, by using the general point - plotting method, the staff can set the values corresponding to some key points by themselves, thereby calculating the electronic cam curve equation corresponding to each small section, realizing the coordinated movement of the main and slave axes. According to the real - time position information of the main axis, select the corresponding first electronic cam sub - curve of the current section, and the current slave - axis position, slave - axis speed, and slave - axis acceleration information can be calculated in real time.
[0149] In a possible implementation manner, after step S1, obtaining the actual position x 实际 of the main axis and the first electronic cam curve, steps C1 - C4 are further included.
[0150] C1. Based on the first electronic cam curve, calculate the extreme value a max2 of the slave - axis acceleration and the extreme value v max2 of the slave - axis speed.
[0151] Specifically, in this step, the specific process of calculating the extreme value a max2 of the slave - axis acceleration and the extreme value v max2 of the slave - axis speed can refer to the above - mentioned process of calculating the extreme value a max1 of the slave - axis acceleration and the extreme value v max1 of the slave - axis speed, and will not be elaborated here.
[0152] Furthermore, for each section of the first electronic cam sub - curve, respectively based on the first acceleration relationship sub - curve and the first jerk relationship sub - curve, calculate the corresponding extreme value a max2 of the slave - axis acceleration and the extreme value vmax2 ; C2, respectively compare the extreme value a of the slave axis acceleration max2 with a preset acceleration limit value a limits , the extreme value v of the slave axis speed max2 with a preset speed limit value v limits .
[0153] C3, if the extreme value a of the slave axis acceleration max2 exceeds the acceleration limit value a limits , or the extreme value v of the slave axis speed max2 exceeds the speed limit value v limits , it can be determined that the planning of the slave axis speed and the slave axis acceleration does not meet the limit conditions, and a reminder of the error in the first electronic cam curve planning is generated.
[0154] The staff can, according to this reminder, re-change the parameter information of the key points and re-design the first electronic cam curve.
[0155] Through the above steps C1 - C3, after the first electronic cam curve is planned, the extreme values of the slave axis acceleration and the speed extreme value are obtained, and it is judged whether the values are within the set limit values. If they are too high, a reminder is generated in time, improving the reliability of the first electronic cam curve.
[0156] In this embodiment, the electronic cam curves involved can all adopt a fifth-degree polynomial. Compared with a seventh-degree polynomial, it has the advantages of low computing power requirements and easy calculation of acceleration extreme values and speed extreme values. Since a seventh-degree polynomial needs an algorithm in the field of numerical analysis to obtain extreme values, and it can only approximate infinitely, it is difficult to obtain an accurate value, and the computing power consumption is huge; in addition, the fifth-degree polynomial requires fewer initial conditions and does not require the user to provide the jerk setting value at the end points. Since the jerk setting value is the change rate of acceleration, it is difficult to control in the actual design process, and it is difficult to estimate the impact of changing these values on the curve change;
[0157] Secondly, since the acceleration relationship curve of a third-degree polynomial is not continuously differentiable, that is, the change of the force of the actuator is not gentle enough and has a certain mechanical impact; therefore, the fifth-degree polynomial adopted in this application embodiment has outstanding advantages.
[0158] This application embodiment provides an electronic cam curve meshing system, which applies the electronic cam curve meshing method as described in the above embodiment. The system includes an acquisition module and an analysis and calculation module;
[0159] The acquisition module is used to acquire the current actual position x of the main axis 实际 and the first electronic cam curve;
[0160] The analysis and calculation module is used to be based on the actual position x of the main axis实际 and the first electronic cam curve, calculate the slave axis position and the slave axis speed corresponding to the main axis position being x 实际 and denote them as the theoretical slave axis position y 理论 and the theoretical slave axis speed v 理论 ;
[0161] The obtaining module is further configured to obtain the current actual position y 实际 of the slave axis and the current actual speed v 实际 of the slave axis;
[0162] The analysis and calculation module is further configured to respectively compare the actual position y 实际 of the slave axis with the theoretical position y 理论 of the slave axis, and the actual speed v 实际 of the slave axis with the theoretical speed v 理论 of the slave axis;
[0163] The analysis and calculation module is further configured to, if the actual position y 实际 of the slave axis is inconsistent with the theoretical position y 理论 of the slave axis, or the actual speed v 实际 of the slave axis is inconsistent with the theoretical speed v 理论 of the slave axis, then based on the actual position x 实际 of the main axis and the set movement length △x of the main axis, determine the target position x 目标 of the main axis; and mark the process of the main axis moving from the actual position x 实际 to the target position x 目标 as the meshing process, and plan the electronic cam curve corresponding to the meshing process, so that when the main axis moves to the target position x 目标 the relationship among the actual position of the main axis, the actual position of the slave axis and the actual speed of the slave axis is consistent with the first electronic cam curve;
[0164] wherein, x 目标 = x 实际 + △x.
[0165] An embodiment of the present application provides a terminal, which includes: a processor, a memory and a communication bus; the communication bus is used to realize the connection and communication between the processor and the memory, and the processor is used to execute one or more programs stored in the memory to implement the electronic cam curve meshing method as described in the above embodiment.
[0166] An embodiment of the present application provides a computer-readable storage medium, which stores instructions that, when executed, implement the electronic cam curve meshing method as described in the above embodiment.
[0167] The above are all preferred embodiments of this application, and the protection scope of this application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of this application shall be covered within the protection scope of this application.
Claims
1. An electronic cam curve meshing method, characterized in that: include: Get the current actual position x of the spindle 实际 and a first electronic cam curve; Based on the actual position x of the spindle 实际 The first electronic cam curve calculates when the main axis position is x 实际 The corresponding slave axis position and slave axis speed are recorded as the slave axis theoretical position y 理论 and the theoretical speed v of the slave axis 理论 ; Get the current actual position y of the slave axis 实际 and the current actual speed v of the slave axis 实际 ; Compare the actual position y of the slave axis 实际 The theoretical position y of the slave axis 理论 , the actual speed v of the slave axis 实际 The theoretical speed v of the slave axis 理论 ; If the actual position y of the slave axis 实际 The theoretical position y of the slave axis 理论 inconsistent, or the actual speed v of the slave axis 实际 The theoretical speed v of the slave axis 理论 If it is inconsistent, then based on the actual position x of the spindle 实际 and the set spindle motion length △x, determine the spindle target position x 目标 ; and move the spindle from the actual position x 实际 Move to the target position x 目标 The process is marked as the meshing process, and the electronic cam curve corresponding to the meshing process is planned so that when the spindle moves to the target position x 目标 When x is , the relationship between the actual position of the master axis, the actual position of the slave axis and the actual speed of the slave axis is consistent with the first electronic cam curve; wherein, x 目标 =x 实际 +△x; the value of △x is related to the duration of the meshing process; Wherein, planning the electronic cam curve corresponding to the meshing process specifically includes: Acquire an initial modified electronic cam curve corresponding to the meshing process; the initial modified electronic cam curve is an expression including coefficients; Based on the actual speed v of the slave axis 实际 and the slave axis theoretical speed v 理论 , calculate the slave axis speed offset △v; based on the slave axis speed offset △v and the set slave axis deceleration a 减 , calculate the first position offset of the slave axis △s1; based on the actual position x of the main axis 实际 , spindle target position x 目标 , a slave axis speed offset △v and a slave axis first position offset △s1, constructing a first starting condition and a first ending condition for correcting the slave axis speed; based on the first starting condition and the first ending condition, solving the values of each coefficient in the initial corrected electronic cam curve to obtain a first corrected electronic cam curve; Based on the actual position y of the slave axis 实际 and the theoretical position y of the slave axis 理论 , calculate the second position offset △s2 of the slave axis; based on the actual position x of the main axis 实际 and spindle target position x 目标 , a first position offset △s1 of the slave axis, and a second position offset △s2 of the slave axis, constructing a second starting condition and a second ending condition for correcting the position of the slave axis; based on the second starting condition and the second ending condition, solving the values of each coefficient in the initial corrected electronic cam curve to obtain a second corrected electronic cam curve; The first electronic cam curve, the first corrected electronic cam curve and the second corrected electronic cam curve corresponding to the meshing process are superimposed to obtain the electronic cam curve corresponding to the meshing process; After planning the electronic cam curve corresponding to the meshing process, it also includes: Based on the electronic cam curve corresponding to the meshing process, the acceleration extreme value a of the slave axis is calculated during the meshing process. max1 and the slave axis velocity extreme value v max1 ; Compare the slave axis acceleration extreme value a respectively max1 and the preset acceleration limit value a limits , the slave axis velocity extreme value v max1 and the preset speed limit value v limits ; Wherein, the acceleration limit value a limits and the speed limit value v limits It is set based on one or more of the maximum speed, maximum torque and maximum acceleration of the electronic cam; If the slave axis acceleration extreme value a max1 Exceeding the acceleration limit value a limits , or the slave axis velocity extreme value v max1 Exceeding the speed limit value v limits , a reminder of electronic cam curve planning error will be generated.
2. The electronic cam curve engagement method according to claim 1, characterized in that: △v=v 理论 -v 实际 , △s2=y 理论 -y 实际 。 3. The electronic cam curve engagement method according to claim 1, characterized in that: The first starting condition includes: The spindle position is x 实际 When , the slave axis position is 0, the slave axis velocity is △v, and the slave axis acceleration is 0; The first termination condition includes: The spindle position is x 目标 When , the slave axis position is △s1, the slave axis velocity is 0, and the slave axis acceleration is 0.
4. The electronic cam curve engagement method according to claim 3, characterized in that: The second starting condition includes: The spindle position is x 实际 When , the slave axis position is 0, the slave axis velocity is 0, and the slave axis acceleration is 0; The second termination condition includes: The spindle position is x 目标 When , the slave axis position is -△s1-△s2, the slave axis speed is 0, and the slave axis acceleration is 0.
5. The electronic cam curve engagement method according to claim 1, characterized in that: Get the current actual position x of the spindle 实际 And before the first electronic cam curve, it also includes: According to the spindle feed direction, multiple key points are selected on the spindle position, and parameter information corresponding to each key point is set; the parameter information includes the value of the spindle position, the value of the slave axis position, the value of the slave axis speed, and the value of the slave axis acceleration; Acquire an initial electronic cam curve, divide the initial electronic cam curve according to the selected key points, determine a segment of the initial electronic cam sub-curve by two adjacent key points, and obtain a plurality of initial electronic cam sub-curves; wherein the initial electronic cam curve is an expression including coefficients; For each initial electronic cam sub-curve, the parameter information corresponding to the two endpoints of the initial electronic cam sub-curve is respectively substituted into the initial electronic cam sub-curve, and the value of each coefficient in each section of the initial electronic cam sub-curve is solved to obtain a first electronic cam sub-curve; A first electronic cam curve is constructed according to each segment of the first electronic cam sub-curve.
6. The electronic cam curve engagement method according to claim 1, characterized in that: The first electronic cam curve includes: a first position relationship curve between the slave axis position y and the master axis position x: y(x)=D0+D1x+D2x 2 +D3x 3 +D4x 4 +D5x 5 ; The first speed relationship curve between the slave axis speed v and the master axis position x: v(x)=D1+2D2x+3D3x 2 +4D4x 3 +5D5x 4 ; The first acceleration relationship curve between the slave axis acceleration a and the master axis position x: a(x)=2D2+6D3x+12D4x 2 +20D5x 3 .
7. An electronic cam curve meshing system, characterized in that: It includes an acquisition module and an analysis and calculation module; The acquisition module is used to obtain the current actual position x of the spindle. 实际 and a first electronic cam curve; The analysis and calculation module is used to calculate the actual position x of the spindle based on the actual position x of the spindle. 实际 The first electronic cam curve calculates when the main axis position is x 实际 The corresponding slave axis position and slave axis speed are recorded as the slave axis theoretical position y 理论 and the theoretical speed v of the slave axis 理论 ; The acquisition module is also used to obtain the current actual position y of the slave axis. 实际 and the current actual speed v of the slave axis 实际 ; The analysis and calculation module is also used to compare the actual position y of the slave axis 实际 The theoretical position y of the slave axis 理论 , the actual speed v of the slave axis 实际 The theoretical speed v of the slave axis 理论 ; The analysis and calculation module is also used to determine the actual position y of the slave axis. 实际 The theoretical position y of the slave axis 理论 inconsistent, or the actual speed v of the slave axis 实际 The theoretical speed v of the slave axis 理论 If it is inconsistent, then based on the actual position x of the spindle 实际 and the set spindle motion length △x, determine the spindle target position x 目标 ; and move the spindle from the actual position x 实际 Move to the target position x 目标 The process is marked as the meshing process, and the electronic cam curve corresponding to the meshing process is planned so that when the spindle moves to the target position x 目标 When x is , the relationship between the actual position of the master axis, the actual position of the slave axis and the actual speed of the slave axis is consistent with the first electronic cam curve; wherein, x 目标 =x 实际 +△x; the value of △x is related to the duration of the meshing process; The process of the analysis and calculation module planning the electronic cam curve corresponding to the meshing process specifically includes: Acquire an initial modified electronic cam curve corresponding to the meshing process; the initial modified electronic cam curve is an expression including coefficients; Based on the actual speed v of the slave axis 实际 and the slave axis theoretical speed v 理论 , calculate the slave axis speed offset △v; based on the slave axis speed offset △v and the set slave axis deceleration a 减 , calculate the first position offset of the slave axis △s1; based on the actual position x of the main axis 实际 , spindle target position x 目标 , the slave axis speed offset △v and the slave axis first position offset △s1, construct the first starting condition and the first ending condition for correcting the slave axis speed; based on the first starting condition and the first ending condition, solve the value of each coefficient in the initial corrected electronic cam curve to obtain the first corrected electronic cam curve; based on the actual position y of the slave axis 实际 and the theoretical position y of the slave axis 理论 , calculate the second position offset △s2 of the slave axis; based on the actual position x of the main axis 实际 and spindle target position x 目标 , a first position offset △s1 of the slave axis, and a second position offset △s2 of the slave axis, constructing a second starting condition and a second ending condition for correcting the position of the slave axis; based on the second starting condition and the second ending condition, solving the values of each coefficient in the initial corrected electronic cam curve to obtain a second corrected electronic cam curve; The first electronic cam curve, the first corrected electronic cam curve and the second corrected electronic cam curve corresponding to the meshing process are superimposed to obtain the electronic cam curve corresponding to the meshing process; The analysis and calculation module, after planning the electronic cam curve corresponding to the meshing process, is further used to: Compare the slave axis acceleration extreme value a respectively max1 and the preset acceleration limit value a limits , the slave axis velocity extreme value v max1 and the preset speed limit value v limits ; Wherein, the acceleration limit value a limits and the speed limit value v limits It is set based on one or more of the maximum speed, maximum torque and maximum acceleration of the electronic cam; If the slave axis acceleration extreme value a max1 Exceeding the acceleration limit value a limits , or the slave axis velocity extreme value v max1 Exceeding the speed limit value v limits , a reminder of electronic cam curve planning error will be generated.
8. A terminal, characterized in that: include: A processor, a memory and a communication bus; the communication bus is used to realize the connection and communication between the processor and the memory, and the processor is used to execute one or more programs stored in the memory to realize the electronic cam curve engagement method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the electronic cam curve engagement method according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Smooth cut-in method and system from shaft coupling to cam curve, medium and terminal
CN113468680A