An electronic cam device and an electronic cam curve generation method

The generation of electronic cam curves through deep reinforcement learning algorithms solves the problem of inaccurate simulation in the existing technology, realizes a more efficient and flexible cutting process, and improves production efficiency and equipment life.

CN119379846BActive Publication Date: 2025-07-22扬州大祺自动化技术有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411406817.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-07-22
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The existing electronic cam curve generation technology lacks accurate simulation of actual dynamic processes, which leads to the optimization results deviating from the actual optimal solution, and slow reactions when dealing with complex working conditions, affecting production efficiency and equipment wear.

Method used

A deep reinforcement learning algorithm is used to build a policy network. By building state space and action space, the policy network is trained to generate electronic cam curves that adapt to different material characteristics and cutting requirements, and combined with the reward function to optimize the knife head movement to reduce empty row distance and equipment wear.

Benefits of technology

Improves cutting accuracy and production flexibility, reduces material waste and equipment wear, reduces operating costs, and enhances the responsiveness and production efficiency of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379846B_ABST
    Figure CN119379846B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electronic cams, and discloses an electronic cam device and an electronic cam curve generation method. The method includes the following steps: S1: Construct the state space and action space of the chasing and cutting task; construct a policy network and initialize its parameters; S2: Train the policy network and save the trained policy network; S3: Obtain the chasing and cutting task list, and reset the action space and state space; S4: Select an action from the action space through the policy network, and update the action space and state space; S5: Generate a tool head motion curve for the chasing and cutting task included in the selected action; S6: Repeat steps S4 - S5 until the tool head motion curves of all chasing and cutting tasks are generated, and an electronic cam curve composed of the tool head motion curves of all chasing and cutting tasks is obtained. Through the intelligent generation of the electronic cam curve, the present invention improves the quality and efficiency of chasing and cutting processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic cams, and particularly to an electronic cam device and an electronic cam curve generation method. Background Art

[0002] As an important part of material processing, the chasing cutting technology plays a crucial role in industries such as automobile manufacturing, aerospace, precision instruments, and textile and clothing. In recent years, with the rapid progress of computer science, artificial intelligence, and machine learning technologies, the intelligent chasing technology has emerged and gradually replaced the traditional manual operation mode. The application of these technologies has significantly improved the cutting accuracy and production efficiency, reduced the labor cost and scrap rate. Especially the breakthroughs in deep learning algorithms in aspects such as image recognition and path planning enable the machine to analyze the shape of the workpiece in real time, adaptively adjust the cutting path, and meet the needs of personalized and diversified production. However, most of the existing intelligent chasing solutions focus on visual guidance and path optimization, and the degree of intelligence of the tool head control strategy is relatively low. Generally, after a cutting is completed, the tool head needs to return to the initial position to prepare for the next operation. This process not only consumes time, but also may increase mechanical wear due to frequent start and stop, affecting the overall production efficiency. In addition, when dealing with continuously changing tasks, the existing systems often lack an effective strategy adjustment mechanism, resulting in slow response when facing complex working conditions or emergencies, and unable to ensure a continuous and stable operation process. The frequent tool head return and acceleration and deceleration processes exacerbate the wear of the equipment, increase the maintenance cost and equipment downtime, and affect the continuity and stability of the production line.

[0003] The existing electronic cam curve generation technologies generally rely on preset mathematical models or fixed curve libraries. These models are often designed for specific materials, speeds, and cutting requirements, lacking accurate simulation of the actual dynamic process. The optimization results may deviate from the actual optimal solution. Especially during high-speed continuous cutting, it is difficult to achieve the best balance between efficiency and accuracy. When dealing with highly complex chasing tasks, the existing calculation methods may encounter problems such as large computational amount and long processing time, which not only affect the response speed of the production line, but also may sacrifice the accuracy of the curve due to limited computing resources.

[0004] In summary, although the current intelligent chasing technology has made certain progress, there is still much room for improvement in aspects such as improving production efficiency, enhancing system flexibility, deepening intelligent applications, and reducing comprehensive costs. Especially in the intelligence of the tool head control strategy and the efficient execution of continuous chasing tasks, technological innovation is needed to meet the growing needs of personalized customization and high-quality production. This not only requires achieving a higher level of autonomous learning and decision-making ability at the algorithm level, but also seeking a better integration solution in system design to ensure the efficiency, stability, and intelligence of the entire chasing process.

[0005] As disclosed in the Chinese patent with the authorization announcement number CN105739430B, an electronic cam control device and an electronic cam curve generation method are provided. The device includes an information reading unit for reading and parsing the position setting file of the follower shaft; an electronic cam curve generation unit for generating an electronic cam curve according to the limiting conditions set by the user; an electronic cam curve memory unit for storing the generated electronic cam curve; a position command generation unit for referring to the position feedback of the driving shaft and converting the stroke planning of the electronic cam curve into a position command; and a command output unit for outputting the position command to the follower shaft driving unit, and the follower shaft driving unit operates according to the received position command. When performing stroke planning, according to the limiting conditions and the result of the previous solution, a solver that meets the conditions is selected until a solution that meets the limiting conditions is found. During the solution process, factors such as speed, acceleration, and jerk are considered, which has the function of protecting the machine.

[0006] As disclosed in the patent application with the publication number CN114967590A, a control method for a chasing and cutting mechanism is provided. The chasing and cutting mechanism includes an electronic cam. This control method includes: providing a first number of points to establish a first straight line segment in a coordinate system through the first number of points; providing a second number of points to establish a first cam control curve in the above coordinate system through the second number of points, where the first cam control curve includes a first curve segment and a second curve segment, and the ordinates of the first curve segment are all 0; multiplying the first cam control curve by -1 and superimposing it with the first straight line segment to obtain a second cam control curve; the second cam control curve includes a third curve segment and a fourth curve segment, and translating the fourth curve segment of the second cam control curve along the horizontal axis of the above coordinate system until the end point of the fourth curve segment coincides with the starting point of the third curve segment to obtain a third cam control curve for controlling the electronic cam. The technical solution of the invention can make the machine operate more smoothly and the chasing and cutting more accurate.

[0007] The above patents all have the problems raised in this background technology: the generation of the electronic cam curve lacks accurate simulation of the actual dynamic process, and the optimization result may deviate from the actual optimal solution.

[0008] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the present invention, and should not be regarded as an admission or any form of implication that this information constitutes the prior art already known to those of ordinary skill in the art. Summary of the Invention

[0009] The technical problem to be solved by the present invention is to overcome the defects of the prior art, and provide an electronic cam device and an electronic cam curve generation method, which improve the quality and efficiency of chasing and cutting processing through intelligent generation of electronic cam curves, and promote the development of the production mode towards a more intelligent, flexible, and environmentally friendly direction.

[0010] To solve the above technical problems, the present invention provides the following technical solutions:

[0011] On the one hand, the present invention provides an electronic cam curve generation method, including the following steps:

[0012] S1: Construct the state space and action space of the chasing and cutting task; construct a policy network and initialize its parameters;

[0013] S2: Train the policy network and save the trained policy network;

[0014] S3: Obtain the chasing and cutting task list and reset the action space and state space;

[0015] S4: Select an action from the action space through the policy network and update the action space and state space;

[0016] S5: Generate a tool head motion curve for the chasing and cutting task included in the selected action;

[0017] S6: Repeat steps S4 - S5 until the tool head motion curves of all chasing and cutting tasks are generated, and an electronic cam curve composed of the tool head motion curves of all chasing and cutting tasks is obtained.

[0018] As a preferred solution of the electronic cam curve generation method of the present invention, wherein: the action space is a set composed of actions; any action includes a chasing and cutting task and a tool head control strategy;

[0019] Any chasing and cutting task includes length data of a material to be cut; any tool head control strategy includes a first tool head displacement l1, a first material displacement L1, a second tool head displacement l2, a second material displacement L2, a third material displacement L3, a fourth tool head displacement l4, and a fourth material displacement L4; the constraint conditions followed by the tool head control strategy are as follows:

[0020]

[0021] Wherein, L0 represents the length of the material corresponding to the tool head control strategy; y3 represents the ordinate of the third feature point in the coordinate axis of the electronic cam curve; v k represents the maximum speed of the tool head; v max represents the threshold speed of the tool head; a k represents the maximum acceleration of the tool head; a max represents the threshold acceleration of the tool head.

[0022] As a preferred solution of the electronic cam curve generation method of the present invention, wherein: the tool head control strategy is used to control the work of the tool head in completing the chasing and cutting task, and the method is as follows:

[0023] S100: The chasing and cutting task starts. The material continues to move at a constant speed, and the cutter head starts to decelerate. When the chasing and cutting task starts, the position where the cutter head is located is the first feature point.

[0024] S200: When the moving distance of the material reaches the first material displacement L1, the speed of the cutter head decreases to 0 and starts to move in the reverse direction. The position where the cutter head stops decelerating is the second feature point. During the deceleration process, the moving distance of the cutter head is the first cutter head displacement l1.

[0025] S300: When the moving distance of the material reaches the second material displacement L2, the cutter head stops moving in the reverse direction and starts to wait statically. The position where the cutter head stops moving in the reverse direction is the third feature point. During the reverse movement process, the moving distance of the cutter head is the second cutter head displacement l2.

[0026] S400: When the moving distance of the material reaches the third material displacement L3, the cutter head stops waiting statically and starts to chase the material. The position where the cutter head stops waiting statically is the fourth feature point.

[0027] S500: When the moving distance of the material reaches the fourth material displacement L4, the cutter head stops chasing the material, maintains relative static with the material and starts to cut the material. The position where the cutter head stops chasing the material is the fifth feature point. During the process of chasing the material, the moving distance of the cutter head is the fourth cutter head displacement l4.

[0028] S600: When the cutter head completes the cutting of the material, the chasing and cutting task is completed. The position where the cutter head completes the cutting of the material is the sixth feature point. During the process of cutting the material, the moving distance of the cutter head is the fifth cutter head displacement l5.

[0029] As a preferred solution of the electronic cam curve generation method described in the present invention, wherein: the state space includes the cumulative feeding distance, the cutter head position, the length of the tool rest shaft, and the material moving speed; wherein, the cumulative feeding distance is the cumulative length of the material transported by the feeding shaft, and is calculated by summing the lengths of all the materials that have been cut; the cutter head position is represented by the distance between the real-time position of the cutter head and the initial position; the length of the tool rest shaft is the distance between the initial position of the cutter head and the end of the tool rest shaft; the material moving speed is the speed at which the material moves at a constant speed during the chasing and cutting process.

[0030] As a preferred solution of the electronic cam curve generation method described in the present invention, wherein: the policy network includes an input layer, a hidden layer, and an output layer; wherein, the input layer is used to input the feature vector of the state space; the hidden layer is used to further extract the features of the state space; the output layer is used to output the selection probability of each action in the action space; the training method of the policy network is as follows:

[0031] S201: Calculate the selection probability of each action in the action space through the policy network.

[0032] S202: Select an action from the action space based on the selection probability;

[0033] S203: Update the state space and the action space, and calculate the reward value of the selected action based on the reward function;

[0034] S204: Calculate the cumulative reward value and update the parameters of the policy network according to the cumulative reward value;

[0035] S205: Repeat steps S203 to S204 until the cumulative reward value converges, and complete the training of the policy network.

[0036] As a preferred embodiment of the electronic cam curve generation method of the present invention, wherein: the calculation formula of the reward function is as follows:

[0037] R(s j ,a j ) = D j ·(1 + w·α j );

[0038] Wherein, R(s j ,a j ) represents the reward value of selecting action a j when the state space is s j ; D j represents the blank line distance of the jth selected action; w represents the weight parameter; α j represents the over-travel penalty factor of the jth selected action;

[0039] The calculation formula of the blank line distance is as follows:

[0040] D j = l 1j + l 2j + l 4j ;

[0041] Wherein, l 1j represents the first tool head displacement in the tool head control strategy included in the jth selected action; l 2j represents the second tool head displacement in the tool head control strategy included in the jth selected action; l 4j represents the fourth tool head displacement in the tool head control strategy included in the jth selected action;

[0042] The assignment method of the over-travel penalty factor is as follows:

[0043]

[0044] Wherein, l 0jdenotes the distance between the real-time position and the initial position of the tool head before the j-th selection action; l d denotes the length of the turret axis; l5 denotes the fifth tool head displacement in the tool head control strategy included in any action; l s denotes the safety reserved distance.

[0045] As a preferred embodiment of the electronic cam curve generation method described in the present invention, wherein: the chasing and trimming task list contains all chasing and trimming tasks; the method for resetting the action space and the state space is as follows: set M tool head control strategies for each chasing and trimming task in the chasing and trimming task list; form an action by combining each tool head control strategy with the corresponding chasing and trimming task, and all actions constitute the reset action space; set the cumulative feeding distance to 0, initialize the tool head position, and the initialized tool head position is at a distance of 0 from the initial position; collect the actual turret axis length and the material moving speed and input them into the state space.

[0046] As a preferred embodiment of the electronic cam curve generation method described in the present invention, wherein: the method for generating the tool head motion curve is as follows:

[0047] S501: Calculate the coordinates of each feature point in the coordinate axes of the electronic cam curve based on the tool head control strategy; the abscissa of the coordinate axes of the electronic cam curve is the cumulative material movement distance, and the ordinate is the distance of the tool head from the starting position;

[0048] S502: Construct the equation of the motion curve segment between any two adjacent feature points, and solve the equation of the motion curve segment through the coordinates of each feature point and the tool head moving speed;

[0049] S503: Draw the motion curve segment between any two adjacent feature points through the equation of the motion curve segment, and form the tool head motion curve of the chasing and trimming task.

[0050] As a preferred embodiment of the electronic cam curve generation method described in the present invention, wherein: the equation of the motion curve segment is a cubic polynomial curve equation, and the solution method is as follows:

[0051] Substitute x = vt into the equation of the motion curve segment to obtain the displacement-time equation of the motion curve segment; where, x represents the abscissa of any feature point; t represents time; perform a first derivative on the displacement-time equation to obtain the velocity-time equation of the motion curve segment;

[0052] Substitute the coordinates of two adjacent feature points into the displacement-time equation, and substitute the tool head moving speeds of two adjacent feature points into the velocity-time equation to obtain a linear equation system of the motion curve segment; solve the linear equation system to obtain the values of the parameters in the equation of the motion curve segment;

[0053] The moving speed of the tool head at the first characteristic point is v, where v represents the moving speed of the material; the moving speed of the tool head at the second characteristic point is 0, the moving speed of the tool head at the third characteristic point is 0, the moving speed of the tool head at the fourth characteristic point is 0, the moving speed of the tool head at the fifth characteristic point is v, and the moving speed of the tool head at the sixth characteristic point is v.

[0054] In a second aspect, the present invention provides an electronic cam device, including a task acquisition module, a control strategy module, a reinforcement learning module, a data processing module, a curve generation module, and an output display module;

[0055] The task acquisition module is used to acquire a chasing and cutting task list;

[0056] The control strategy module is used to set a tool head control strategy for each task in the chasing and cutting task list;

[0057] The reinforcement learning module is used to construct an action space based on the chasing and cutting task list and the tool head control strategy; it is also used to construct a state space, a policy network, and train the policy network;

[0058] The data processing module is used to calculate the coordinates of each characteristic point after executing each action based on the tool head control strategy;

[0059] The curve generation module is used to generate an electronic cam curve based on the control strategies included in all the chasing and cutting tasks in the chasing and cutting task list;

[0060] The output display module is used to visually display the electronic cam curve and support the export of the electronic cam curve.

[0061] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0062] By introducing an advanced deep reinforcement learning algorithm, the present invention can automatically generate electronic cam curves for different material characteristics and cutting requirements, improving the adaptability of the system. When the material changes or the processing requirements are adjusted, the system can optimize itself faster, reducing manual intervention and enhancing production flexibility.

[0063] The present invention can more accurately simulate the cutting process, and the generated electronic cam curve is more in line with the actual working conditions, improving the cutting accuracy and surface quality, and reducing material waste. The present invention simulates and monitors the interaction state between the tool head and the material during the cutting process, and dynamically adjusts the electronic cam curve accordingly to effectively cope with the uncertainties in the processing process and ensure the stable and efficient cutting process.

[0064] Guided by the reward function, the present invention reduces the idle travel distance of the tool head, which can not only save energy consumption, but also reduce the wear of the equipment and extend the service life of the equipment, thereby reducing the maintenance cost and operation cost in the long run; at the same time, it shortens the generation time of the electronic cam curve, accelerates the production preparation process, and enhances the response ability of the production line. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:

[0066] Figure 1 is a flowchart of the method for generating an electronic cam curve provided by the present invention;

[0067] Figure 2 is a schematic structural diagram of the electronic cam device provided by the present invention;

[0068] Figure 3 is a flowchart of the method for controlling the operation of the tool head in completing the chasing and shearing task provided by the present invention;

[0069] Figure 4 is a tool head motion curve diagram of any chasing and shearing task provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0070] The following will describe the technical solutions of the present invention in detail through the drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations on the technical solutions of the present invention. Without conflict, the technical features in the embodiments of the present invention and the embodiments can be combined with each other.

[0071] Embodiment 1

[0072] This embodiment introduces a method for generating an electronic cam curve. Referring to Figure 1 , the method includes the following steps:

[0073] S1: Construct the state space and action space of the chasing and shearing task; construct a policy network and initialize the parameters;

[0074] The state space includes the cumulative feeding distance, the cutter head position, the length of the tool rest shaft, and the material moving speed. Among them, the cumulative feeding distance is the cumulative length of the material transported by the feeding shaft, which is calculated by summing the lengths of all the materials that have been sheared. The cutter head position is represented by the distance between the real-time position and the initial position of the cutter head. For example, the cutter head position is 50 cm from the initial position. The length of the tool rest shaft is the distance between the initial position of the cutter head and the end of the tool rest shaft. The material moving speed v is the speed at which the material moves at a constant speed during the chasing and shearing process.

[0075] The action space is a set composed of actions. Any action includes a chasing and shearing task and a cutter head control strategy.

[0076] Any chasing and shearing task includes the length data of a material to be sheared. By selecting an action corresponding to a material to be sheared with an appropriate length, it is possible to avoid shearing accidents caused by the material being too long or too short in the next chasing and shearing task, such as the cutter head not completing the shearing of the material when it reaches the end of the tool rest shaft.

[0077] Any cutter head control strategy includes the first cutter head displacement l1, the first material displacement L1, the second cutter head displacement l2, the second material displacement L2, the third material displacement L3, the fourth cutter head displacement l4, and the fourth material displacement L4. The constraint conditions followed by the cutter head control strategy are as follows:

[0078]

[0079] Among them, L0 represents the length of the material corresponding to the cutter head control strategy; y3 represents the ordinate of the third feature point in the coordinate axis of the electronic cam curve; v k represents the maximum speed of the cutter head; v max represents the threshold speed of the cutter head, which is set by those skilled in the art according to actual needs; a k represents the maximum acceleration of the cutter head; a max represents the threshold acceleration of the cutter head, which is set by those skilled in the art according to actual needs;

[0080] Substitute x = vt into the equation of the cutter head displacement curve to obtain the displacement-time equation of the cutter head. Among them, x represents the abscissa of any point on the cutter head displacement curve; t represents time;

[0081] Differentiate the displacement-time equation once to obtain the speed-time equation of the cutter head; differentiate the displacement-time equation twice to obtain the acceleration-time equation of the cutter head; calculate the maximum speed v of the cutter head through the speed-time equation of the cutter head k ; calculate the maximum acceleration a of the cutter head through the acceleration-time equation of the cutter head k ;

[0082] The cutter head control strategy is used to control the operation of the cutter head in completing the pursuit and cutting task, and the method refers to Figure 3 , and the steps are as follows:

[0083] S100: When the pursuit and cutting task starts, the material continues to move at a constant speed, and the cutter head starts to decelerate; when the pursuit and cutting task starts, the position where the cutter head is located is the first feature point;

[0084] S200: When the moving distance of the material reaches the first material displacement L1, the speed of the cutter head decreases to 0 and starts to move in the reverse direction; the position where the cutter head stops decelerating is the second feature point; during the deceleration process, the moving distance of the cutter head is the first cutter head displacement l1;

[0085] S300: When the moving distance of the material reaches the second material displacement L2, the cutter head stops moving in the reverse direction and starts to wait statically; the position where the cutter head stops moving in the reverse direction is the third feature point; during the reverse movement process, the moving distance of the cutter head is the second cutter head displacement l2;

[0086] S400: When the moving distance of the material reaches the third material displacement L3, the cutter head stops waiting statically and starts to chase the material; the position where the cutter head stops waiting statically is the fourth feature point; since the moving distance of the cutter head is 0 during the static waiting process, the "third cutter head displacement" corresponding to the third material displacement is not set in this embodiment.

[0087] S500: When the moving distance of the material reaches the fourth material displacement L4, the cutter head stops chasing the material, keeps relative static with the material and starts to cut the material; the position where the cutter head stops chasing the material is the fifth feature point; during the process of chasing the material, the moving distance of the cutter head is the fourth cutter head displacement l4;

[0088] S600: When the cutter head completes the cutting of the material, the pursuit and cutting task is completed; the position where the cutter head completes the cutting of the material is the sixth feature point; during the process of cutting the material, the moving distance of the cutter head is the fifth cutter head displacement l5.

[0089] For the same kind of material, the time of the cutting process is fixed, and the moving speed of the material is constant. Therefore, the fifth cutter head displacement l5 is a fixed value, which is obtained by those skilled in the art through experiments. For a series of continuous pursuit and cutting tasks, in the first pursuit and cutting task, the values of L1, L2, l1, and l2 are all 0, and the coordinates of the first feature point are (0, 0), and the cumulative feeding distance is also 0.

[0090] The policy network includes an input layer, a hidden layer, and an output layer; among them, the input layer is used to input the feature vector of the state space; the hidden layer is used to further extract the features of the state space; the output layer is used to output the selection probability of each action in the action space;

[0091] S2: Train the policy network and save the trained policy network;

[0092] The training method of the policy network is as follows:

[0093] S201: Calculate the selection probability of each action in the action space through the policy network;

[0094] S202: Select an action from the action space based on the selection probability; the method is as follows:

[0095] Set a threshold parameter ε, and the value range is (0, 0.2];

[0096] Generate a random number r, and the value range is (0, 1]; if r is greater than or equal to ε, the selected action is the action with the highest selection probability; if r is less than ε, randomly select an action from the action space;

[0097] S203: Update the state space and the action space, and calculate the reward value of the selected action based on the reward function;

[0098] The calculation formula of the reward function is as follows:

[0099] R(s j ,a j )=D j ·(1+w·α j );

[0100] Among them, R(s j ,a j ) represents the reward value of selecting action a j when the state space is s j ; D j represents the blank line distance of the jth selected action; w represents the weight parameter, which is set by those skilled in the art according to actual needs; α j represents the overstep penalty factor of the jth selected action;

[0101] The calculation formula of the blank line distance is as follows:

[0102] D j =l 1j +l 2j +l 4j ;

[0103] Among them, l 1j represents the first tool head displacement in the tool head control strategy included in the jth selected action; l 2j represents the second tool head displacement in the tool head control strategy included in the jth selected action; l 4j represents the fourth tool head displacement in the tool head control strategy included in the jth selected action;

[0104] The assignment method of the over-distance penalty factor is as follows:

[0105]

[0106] where l 0j represents the distance between the real-time position and the initial position of the tool head before the j-th selection action; l d represents the length of the tool rest axis; l5 represents the displacement of the fifth tool head in the tool head control strategy included in any action; l s represents the safety reserved distance, which is set by those skilled in the art according to actual requirements.

[0107] Through the above reward function, the policy network can select the action with the smallest empty-line distance and the lowest over-distance penalty, which not only reduces unnecessary energy consumption but also avoids the risk of shearing failure caused by improper tool head position. On the tool rest axis, the position with a distance of l5 + l s from the end of the tool rest axis is the shearing cut-off point; when the tool head moves to the shearing cut-off point, the shearing of the material is immediately stopped and the next chasing shearing task is started.

[0108] S204: Calculate the cumulative reward value and update the parameters of the policy network according to the cumulative reward value;

[0109] The calculation formula of the cumulative reward value is as follows:

[0110]

[0111] where R N represents the cumulative reward value; N represents the number of actions that have been selected; β represents the discount factor, and its value range is (0, 1], and β j represents the j-th power of the discount factor β;

[0112] The method for updating the parameters of the policy network is as follows:

[0113] The calculation formula for updating the parameters of the policy network is as follows:

[0114]

[0115] where δ represents any parameter in the policy network; represents the gradient of the function in the parentheses with respect to δ; η is the learning rate; L SN is the loss function, and its calculation formula is as follows:

[0116]

[0117] where p(s j ,a j ) represents that in the state space sj Selection probability of action a at time j ;

[0118] After the above parameter update, the policy network will assign a greater selection probability to the action with a shorter empty travel distance of the tool head; such an update process is continuously repeated, and the policy network will gradually learn the optimal probability distribution of all selectable actions in different state spaces.

[0119] S205: Repeat steps S203 - S204 until the cumulative reward value converges, and complete the training of the policy network;

[0120] After repeating steps S203 - S204 multiple times, the cumulative reward value tends to be stable and no longer shows significant fluctuations, that is, it is considered that the cumulative reward value converges, and the policy network has been able to make a decision to minimize the empty travel distance of the tool head.

[0121] S3: Obtain the chasing and cutting task list, and reset the action space and state space;

[0122] The chasing and cutting task list contains all chasing and cutting tasks; the method for resetting the action space and state space is as follows: set M tool head control strategies for each chasing and cutting task in the chasing and cutting task list; form an action by combining each tool head control strategy with the corresponding chasing and cutting task, and all actions constitute the reset action space; set the cumulative feeding distance to 0, initialize the tool head position, and the initialized tool head position is at a distance of 0 from the initial position; collect the actual tool rest axis length and material moving speed and input them into the state space.

[0123] S4: Select an action from the action space through the policy network and execute it, and update the action space and state space; the method is as follows:

[0124] Encode the state space into a feature vector and input it into the policy network, output the selection probability of each action in the action space, and execute the action with the highest selection probability;

[0125] Mark the material to be sheared corresponding to the selected action as the material that has been sheared, and recalculate the cumulative feeding distance; calculate the position of the sixth feature point based on the tool head control strategy included in the selected action as the current position of the tool head, and recalculate the tool head position;

[0126] Extract the chasing and cutting task included in the selected action as the task to be removed, and remove all actions containing the task to be removed from the action space.

[0127] S5: Generate a tool head motion curve for the chasing and cutting task included in the selected action; the method is as follows:

[0128] S501: Calculate the coordinates of each feature point in the coordinate axes of the electronic cam curve based on the tool head control strategy; the abscissa of the coordinate axes of the electronic cam curve is the cumulative material movement distance, and the ordinate is the distance of the tool head from the starting position;

[0129] Among them, the calculation formula for the abscissa x1 of the first feature point is as follows:

[0130] x1 = x'6;

[0131] Among them, x'6 represents the abscissa of the sixth feature point of the previous chasing and cutting task;

[0132] The calculation formula for the ordinate y1 of the first feature point is as follows:

[0133] y1 = y'6;

[0134] Among them, y'6 represents the ordinate of the sixth feature point of the previous chasing and cutting task;

[0135] The calculation formula for the abscissa x2 of the second feature point is as follows:

[0136] x2 = y1 + ∑L + L1;

[0137] Among them, ∑L represents the cumulative feeding distance before the execution of the action selected this time;

[0138] The calculation formula for the ordinate y2 of the second feature point is as follows:

[0139] y2 = y1 + l1;

[0140] The calculation formula for the abscissa x3 of the third feature point is as follows:

[0141] x3 = y1 + ∑L + L2;

[0142] The calculation formula for the ordinate y3 of the third feature point is as follows:

[0143] y3 = y2 - l2;

[0144] The calculation formula for the abscissa x4 of the fourth feature point is as follows:

[0145] x4 = y1 + ∑L + L3;

[0146] The calculation formula for the ordinate y4 of the fourth feature point is as follows:

[0147] y4 = y3;

[0148] The calculation formula for the abscissa x5 of the fifth feature point is as follows:

[0149] x5 = y1 + ∑L + L4;

[0150] The calculation formula for the ordinate y5 of the fifth feature point is as follows:

[0151] y5 = y4 + l4;

[0152] The calculation formula for the abscissa x6 of the sixth feature point is as follows:

[0153] x6 = x5 + l5;

[0154] The calculation formula for the ordinate y6 of the sixth feature point is as follows:

[0155] y6 = y5 + l5;

[0156] S502: Construct the equation of the motion curve segment between any two adjacent feature points, and solve the equation of the motion curve segment through the coordinates of each feature point and the cutting tool head movement speed;

[0157] The equation of the motion curve segment is a cubic polynomial curve equation, and the solution method is as follows:

[0158] Substitute x = vt into the equation of the motion curve segment to obtain the displacement-time equation of the motion curve segment; where, x represents the abscissa of any feature point; t represents time; perform a first-order differentiation on the displacement-time equation to obtain the velocity-time equation of the motion curve segment;

[0159] Substitute the coordinates of two adjacent feature points into the displacement-time equation, and substitute the cutting tool head movement speeds of two adjacent feature points into the velocity-time equation to obtain a system of linear equations for the motion curve segment; solve the system of linear equations by methods such as Gaussian elimination to obtain the values of the parameters in the equation of the motion curve segment.

[0160] The cutting tool head movement speed at the first feature point is v, where v represents the material movement speed; the cutting tool head movement speed at the second feature point is 0, the cutting tool head movement speed at the third feature point is 0, the cutting tool head movement speed at the fourth feature point is 0, the cutting tool head movement speed at the fifth feature point is v, and the cutting tool head movement speed at the sixth feature point is v.

[0161] The cutting tool head motion curve of any chasing and cutting task is as Figure 4 shown.

[0162] Fitting the motion curve segment between any two adjacent feature points with a cubic polynomial curve ensures the continuity and smoothness of the displacement-time curve, velocity-time curve, and acceleration-time curve of the cutting tool head, and can ensure that the movement of the cutting tool head not only meets the production requirements but also maintains the fluency and coherence of the movement, avoiding mechanical shocks and energy consumption caused by sharp acceleration or deceleration.

[0163] S503: Draw the motion curve segment between any two adjacent feature points through the equation of the motion curve segment, and form the cutting tool head motion curve of the chasing and cutting task.

[0164] S6: Repeat steps S4 - S5 until the tool head motion curves for all chasing and cutting tasks are generated, obtaining an electronic cam curve composed of the tool head motion curves for all chasing and cutting tasks.

[0165] The electronic cam curve visually demonstrates the connection between the tool head motion and the feeding process, making the entire motion trajectory of the tool head clear at a glance. Through the precise control of the electronic cam curve, it is possible to reduce shearing waste caused by factors such as mechanical wear and speed mismatch, improve the accuracy of shearing, and at the same time maintain the continuous operation of the production line, greatly enhancing the efficiency and product quality of chasing and cutting production.

[0166] Embodiment 2

[0167] This embodiment is the second embodiment of the present invention; based on the same inventive concept as Embodiment 1, referring to Figure 2 , this embodiment introduces an electronic cam device, including a task acquisition module, a control strategy module, a reinforcement learning module, a data processing module, a curve generation module, and an output display module;

[0168] The task acquisition module is used to obtain a chasing and cutting task list; this module can also automatically simulate and generate a chasing and cutting task list and transmit the chasing and cutting task list to the reinforcement learning module;

[0169] The control strategy module is used to set a tool head control strategy for each task in the chasing and cutting task list;

[0170] The reinforcement learning module is used to construct an action space based on the chasing and cutting task list and the tool head control strategy; it is also used to construct a state space, a policy network, and perform training of the policy network; this module is also used for updating the state space and the action space, and calculating the selection probability of each action in the action space through the policy network and making a selection of actions;

[0171] The data processing module is used to calculate the coordinates of each feature point after executing each action based on the tool head control strategy; this module is also used during the training process of the policy network to calculate the empty line distance and the over - distance penalty factor, and calculate the cumulative feeding distance;

[0172] The curve generation module is used to generate an electronic cam curve based on the control strategies included in all chasing and cutting tasks in the chasing and cutting task list; first, construct and solve the equation of the motion curve segment between any two adjacent feature points, draw the motion curve segment between any two adjacent feature points, and the motion curve segments of a chasing and cutting task form a tool head motion curve, and the tool head motion curves of all chasing and cutting tasks together constitute the electronic cam curve.

[0173] The output display module is used to visually display the electronic cam curve and provide an export function for the electronic cam curve; it allows users to export the electronic cam curve diagram into common image or vector graphics formats, and supports the export of relevant data reports, such as the cam table and the name or number of the cam table, curve key point data such as the coordinates of feature points and the speed and acceleration of the tool head, etc.

[0174] The specific function implementation of each of the above modules refers to the relevant content in the electronic cam curve generation method described in Embodiment 1, and will not be elaborated here.

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

[0176] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the purpose and scope of the present invention. These all fall within the protection scope of the present invention.

Claims

1. An electronic cam curve generation method, characterized in that: It includes the following steps: S1: Construct the state space and action space of the pursuit cutting task; construct a policy network and initialize its parameters; S2: Train the policy network and save the trained policy network; S3: Obtain the pursuit cutting task list and reset the action space and state space; The action space is a set composed of actions; any action includes a pursuit cutting task and a tool head control strategy; Any pursuit cutting task includes the length data of the material to be cut; any tool head control strategy includes the first tool head displacement l1, the first material displacement L1, the second tool head displacement l2, the second material displacement L2, the third material displacement L3, the fourth tool head displacement l4, and the fourth material displacement L4; The tool head control strategy is used to control the work of the tool head in completing the pursuit cutting task, and the method is as follows: S100: The pursuit cutting task starts, the material continues to move at a constant speed, and the tool head starts to decelerate; when the pursuit cutting task starts, the position where the tool head is located is the first feature point; S200: When the material moves a distance of the first material displacement L1, the speed of the tool head decreases to 0 and starts to move in the reverse direction; the position where the tool head stops decelerating is the second feature point; during the deceleration process, the moving distance of the tool head is the first tool head displacement l1; S300: When the material moves a distance of the second material displacement L2, the tool head stops moving in the reverse direction and starts to wait statically; the position where the tool head stops moving in the reverse direction is the third feature point; during the reverse movement process, the moving distance of the tool head is the second tool head displacement l2; S400: When the material moves a distance of the third material displacement L3, the tool head stops waiting statically and starts to chase the material; the position where the tool head stops waiting statically is the fourth feature point; S500: When the material moves a distance of the fourth material displacement L4, the tool head stops chasing the material, keeps relatively static with the material and starts to cut the material; the position where the tool head stops chasing the material is the fifth feature point; during the process of chasing the material, the moving distance of the tool head is the fourth tool head displacement l4; S600: When the tool head completes the cutting of the material, the pursuit cutting task is completed; the position where the tool head completes the cutting of the material is the sixth feature point; during the process of cutting the material, the moving distance of the tool head is the fifth tool head displacement l5; S4: Select an action from the action space through the policy network and update the action space and state space; The training method of the policy network is as follows: S201: Calculate the selection probability of each action in the action space through the policy network; S202: Select an action from the action space based on the selection probability; S203: Update the state space and action space, and calculate the reward value of the selected action based on the reward function; S204: Calculate the cumulative reward value and update the parameters of the policy network according to the cumulative reward value; S205: Repeat steps S203 - S204 until the cumulative reward value converges, and complete the training of the policy network; The calculation formula of the reward function is as follows: R(s j ,a j ) = D j ·(1 + w·α j ); Among them, R(s j ,a j ) means that in the state space s j When selecting action a j The reward value of D j represents the empty row distance of the jth selected action; w represents the weight parameter; α j represents the over-distance penalty factor for the j-th selected action; The calculation formula of the blank line distance is as follows: D j =l 1j +l 2j +l 4j ; where, l 1j represents the first cutter head displacement in the cutter head control strategy included in the action selected for the j-th time; l 2j represents the second cutter head displacement in the cutter head control strategy included in the action selected for the j-th time; l 4j represents the fourth cutter head displacement in the cutter head control strategy included in the action selected for the j-th time; The assignment method of the overrun penalty factor is as follows: Among them, l 0j represents the distance between the real-time position of the tool head and the initial position before the j-th selection action; l d represents the length of the turret axis; l5 represents the fifth tool head displacement in the tool head control strategy included in any action; l s represents the safety reserve distance; S5: Generate a tool head motion curve for the pursuit cutting task included in the selected action; S6: Repeat steps S4 - S5 until the tool head motion curves for all chasing and cutting tasks are generated, obtaining an electronic cam curve composed of the tool head motion curves for all chasing and cutting tasks.

2. The electronic cam curve generation method according to claim 1, wherein: The constraint conditions followed by the tool head control strategy are as follows: Among them, L0 represents the length of the material corresponding to the tool head control strategy; y3 represents the ordinate of the third characteristic point in the coordinate axis of the electronic cam curve; v k represents the maximum speed of the tool head; v max represents the threshold speed of the tool head; a k represents the maximum acceleration of the tool head; a max represents the threshold acceleration of the tool head.

3. The electronic cam curve generation method according to claim 2, characterized in that: The state space includes the cumulative feeding distance, the tool head position, the length of the tool rest axis, and the material moving speed; among them, the cumulative feeding distance is the cumulative length of the material transported by the feeding axis, calculated by summing the lengths of all the materials that have been cut; the tool head position is represented by the distance between the real-time position of the tool head and the initial position; the length of the tool rest axis is the distance between the initial position of the tool head and the end of the tool rest axis; the material moving speed is the speed at which the material moves at a constant speed during the chasing and cutting process.

4. The electronic cam curve generation method according to claim 3, characterized in that: The policy network includes an input layer, a hidden layer, and an output layer; among them, the input layer is used to input the feature vector of the state space; the hidden layer is used to further extract the features of the state space; the output layer is used to output the selection probability of each action in the action space.

5. The electronic cam curve generation method according to claim 4, characterized in that: The chasing and cutting task list contains all chasing and cutting tasks. The method for resetting the action space and the state space is as follows: Set M tool head control strategies for each chasing and cutting task in the chasing and cutting task list; form an action by combining each tool head control strategy with the corresponding chasing and cutting task, and all actions constitute the reset action space; set the cumulative feeding distance to 0, initialize the tool head position, and the initialized tool head position is at a distance of 0 from the initial position; collect the actual length of the tool rest axis and the material moving speed and input them into the state space.

6. The electronic cam curve generation method according to claim 5, characterized in that: The method for generating the tool head motion curve is as follows: S501: Calculate the coordinates of each feature point in the coordinate axes of the electronic cam curve based on the tool head control strategy; the abscissa of the coordinate axes of the electronic cam curve is the cumulative moving distance of the material, and the ordinate is the distance of the tool head from the starting position. S502: Construct the equation of the motion curve segment between any two adjacent feature points, and solve the equation of the motion curve segment through the coordinates of each feature point and the tool head moving speed. S503: Draw the motion curve segment between any two adjacent feature points through the equation of the motion curve segment, and form the tool head motion curve of the chasing and cutting task.

7. The electronic cam curve generation method according to claim 6, wherein: The equation of the motion curve segment is a cubic polynomial curve equation, and the solution method is as follows: Substitute x = vt into the equation of the motion curve segment to obtain the displacement-time equation of the motion curve segment; where x represents the abscissa of any feature point; t represents time; perform a first derivative on the displacement-time equation to obtain the velocity-time equation of the motion curve segment. Substitute the coordinates of two adjacent feature points into the displacement-time equation, and substitute the tool head moving speeds of two adjacent feature points into the velocity-time equation to obtain a system of linear equations for the motion curve segment; solve the system of linear equations to obtain the values of the parameters in the equation of the motion curve segment. The tool head moving speed at the first feature point is v, where v represents the material moving speed; the tool head moving speed at the second feature point is 0, the tool head moving speed at the third feature point is 0, the tool head moving speed at the fourth feature point is 0, the tool head moving speed at the fifth feature point is v, and the tool head moving speed at the sixth feature point is v.

8. An electronic cam device for implementing an electronic cam curve generation method according to any one of claims 1-7, characterized in that: It includes a task acquisition module, a control strategy module, a reinforcement learning module, a data processing module, a curve generation module, and an output display module; The task acquisition module is used to acquire a chasing and trimming task list; The control strategy module is used to set a tool head control strategy for each task in the chasing and trimming task list; The reinforcement learning module is used to construct an action space based on the chasing and trimming task list and the tool head control strategy; It is also used to construct a state space, a policy network, and train the policy network; The data processing module is used to calculate the coordinates of each feature point after executing each action based on the tool head control strategy; The curve generation module is used to generate an electronic cam curve based on the control strategies included in all the chasing and trimming tasks in the chasing and trimming task list; The output display module is used to visually display the electronic cam curve and support the export of the electronic cam curve.

Citation Information

Patent Citations

  • Electronic cam control device and method for generating electronic cam curve

    CN105739430B

  • Control method of topdressing shearing mechanism

    CN114967590A

  • Drive command generation device, synchronous control system and learning device

    JP2022102921A