Cam profile curve optimization method and device for high-speed cam mechanism
By using non-uniform rational B-spline curves and DQN algorithms to optimize the cam profile curve in high-speed cam mechanisms, the problem of neglecting the contact collision characteristics between the roller and the cam in the prior art is solved, and more efficient motion stability and optimization effects are achieved.
Patent Information
- Application Number
- CN202311793393.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
When optimizing the dynamic characteristics of high-speed cam mechanisms, the contact collision characteristics between the roller and the cam are rarely considered, resulting in poor optimization results.
The cam profile curve is reconstructed using the non-uniform rational B-spline equation, and a dynamic model with gap is constructed. The cam profile curve is optimized based on the DQN algorithm of the fully connected neural network framework to reduce output acceleration and contact force jitter.
By optimizing the cam profile curve, the contact force jitter and output acceleration jitter between the roller and the cam are significantly reduced, and the motion stability and optimization effect of the cam mechanism are improved.
Smart Images

Figure CN120217565A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of mechanical design and computer software, and particularly relates to a method and device for optimizing the cam profile curve of a high-speed cam mechanism. Background Art
[0002] Modern machinery is increasingly developing towards high speed and precision, and the requirements for the precision of transmission and the reliability of motion are also getting higher and higher. The cam mechanism is widely used in various mechanical systems due to its unique structural characteristics and advantages. However, in actual mechanisms, due to the need for moving fits, manufacturing errors, friction and wear, etc., the clearance of kinematic pairs in the mechanism is inevitable. The existence of the clearance will increase the collision force between the roller and the cam, resulting in deviation of the output motion of the cam mechanism. The motion law of the follower will deviate far from the theoretical motion law given by the cam profile, generating strong vibrations, noises and wear, thus reducing the motion stability of the mechanism, especially having a greater impact on high-speed cam mechanisms. Therefore, in order to obtain an ideal output motion and reduce the error of the follower motion, it is necessary to optimize the dynamic characteristics of the high-speed cam mechanism.
[0003] Patent document CN115186415A discloses a cam optimization design method and device. This method sets the constraint factors of the cam curve according to the established cam curve equation of the curved stroke of the cam groove surface, wherein the constraint factors include that the cam curve passes through the set end points, the angular velocity of the piston rod, the angular acceleration of the piston rod, and the force state of the cam roller; adjusts the constraint factors to obtain at least one adjusted cam curve equation; substitutes the motion parameters of the piston rod into the adjusted cam curve equation to obtain the performance parameters of the corresponding cam curve, and determines the optimal cam curve according to a plurality of the performance parameters. In this solution, the cam curve equation is established based on a polynomial function, and the unknown parameters in the equation are solved through the kinematic constraints of the cam curve to obtain the cam curve equation, without considering the dynamic performance of the cam mechanism.
[0004] Patent Document CN113836662B discloses a method for dynamically identifying and de-featuring the design defects of a cam curve groove mechanism. The method includes: establishing a mapping model between the output motion accuracy of the cam curve groove mechanism and the design parameters; extracting the design parameters, analyzing and sorting the sensitivity of the design parameters to the output motion accuracy of the cam curve groove mechanism; according to the design parameters of the cam curve groove mechanism, obtaining the expected output motion accuracy of the cam curve groove mechanism from the mapping model between the output motion accuracy of the cam curve groove mechanism and the design parameters, and defining the norm of the vector difference between the expected output motion accuracy vector of the cam curve groove mechanism and the allowable motion accuracy design index vector as the accuracy design defect discrimination index; according to the accuracy design defect discrimination index, if it is identified that the cam curve groove mechanism has an accuracy design defect, taking the main design parameters as independent variables and the accuracy design defect discrimination index as the objective function, considering various constraint conditions, and using an intelligent algorithm to calculate the design parameter combination that makes the expected motion accuracy meet the design index requirements, so as to repair the accuracy design defect existing in the design of the cam curve groove mechanism. In this solution, the motion error model of the cam curve groove mechanism is established through three kinematic parameters of displacement, velocity and acceleration, without considering the dynamic characteristics of the contact collision between the roller and the cam in the cam curve groove mechanism, and is not applicable to the optimization of the contour curve of a high-speed cam mechanism. Summary of the Invention
[0005] The purpose of the present invention is to provide a method and device for optimizing the cam contour curve of a high-speed cam mechanism, which can overcome the problem that the influence of the contact collision characteristics between the roller and the cam is rarely considered in the existing cam contour curve optimization design, thereby improving the design efficiency and optimization effect of the cam contour curve optimization design.
[0006] To achieve the first object of the present invention, a method for optimizing the cam contour curve of a high-speed cam mechanism is provided, which includes the following steps:
[0007] Step 1: Reconstruct the cam contour curve using the non-uniform rational B-spline curve equation to construct the corresponding cam contour curve function;
[0008] Step 2: Construct the dynamic model of the cam mechanism with clearance, and solve the contact force between the roller and the cam based on the acceleration at the output end of the cam mechanism with clearance to construct the objective function;
[0009] Step 3: Introduce the cam contour curve function and the objective function into the fully connected neural network framework to construct the corresponding DQN algorithm. The DQN algorithm takes reducing the output acceleration and the jitter of the contact force between the roller and the cam as the optimization goal, adjusts the weights of each control point in the cam contour curve function, and optimizes the cam contour curve based on the weights in the optimization result.
[0010] Based on a high-speed cam mechanism, starting from the dynamic performance and contact performance, the present invention constructs a corresponding objective function and optimizes the objective function by means of reinforcement learning, so as to obtain an optimal cam profile curve optimization scheme.
[0011] Specifically, the process of reconstructing the cam profile curve by using non-uniform rational B-spline curve in step 1 is as follows:
[0012] Step 1-1: Regard the cam contour as a discrete data point sequence to be approximated, and select interpolation points from the discrete data point sequence to construct a corresponding interpolation data point sequence;
[0013] Step 1-2: Parametrize the interpolation data point sequence by using the chord length parameterization method to obtain a knot vector;
[0014] Step 1-3: Initialize the curve degree and the weights of the control points of the non-uniform rational B-spline curve equation, and substitute the obtained interpolation data point sequence and knot vector into the initialized non-uniform rational B-spline curve equation to construct a corresponding cam profile curve function.
[0015] Specifically, the expression of the non-uniform rational B-spline curve equation is as follows:
[0016]
[0017] Among them, {d i} are the control vertices of the curve C(u), {w i} are the weight values, N i,k (u) is the basis function, and k is the curve degree.
[0018] Specifically, the dynamic model of the cam mechanism with clearance is based on the contact collision contact force between the roller and the cam, the curvature radii of the roller and the cam at the contact point, and the relative sliding speed between the roller and the cam at the contact point, and is constructed by using the second type of Lagrange equation.
[0019] Specifically, the specific construction process of the dynamic model is as follows:
[0020] During the operation of the cam mechanism, the contact collision contact force F c between the roller and the cam can be expressed as the sum of the normal force F n and the tangential force F t :
[0021] F c =F n +F t
[0022] According to the Hertz contact force model, the normal force F nis:
[0023]
[0024] where δ is the penetration depth, D is the damping coefficient, is the penetration speed, n is the power exponent, the value of which depends on the collision material. Generally, for metal materials, it is taken as 1.5, and K n is the stiffness coefficient, and the expression is:
[0025]
[0026]
[0027] where R i and R j are the curvature radii of the roller and the cam at the contact point respectively, and v k and E k are the Poisson's ratio and Young's modulus of the k-th contact component respectively.
[0028] According to Coulomb's friction law, the tangential force F t when the roller contacts the cam is:
[0029]
[0030] where v t is the relative sliding speed of the roller and the cam at the contact point, and μ(v t ) is the friction coefficient, and its expression is:
[0031]
[0032] where μ d is the dynamic friction coefficient, μ s is the static friction coefficient, v s is the critical speed of static friction, and v d is the maximum critical speed of dynamic friction.
[0033] Using the second kind of Lagrange equation to carry out dynamic modeling of the cam mechanism, the dynamic equation of the cam mechanism with clearance is obtained as:
[0034]
[0035] where M, C, and K are the generalized mass matrix, damping matrix, and stiffness matrix of the mechanism respectively, is the column array of generalized accelerations, is the Jacobian matrix of the constraint equation, λ is the Lagrange multiplier matrix, F is the generalized active force of the system, and F c is the contact force between the roller and the cam during contact and collision.
[0036] Specifically, the DQN algorithm includes constructing a state space, an action space, and a reward function;
[0037] The state space: s t =(w1, w2,..., w n , acc, force), where w1, w2,..., w n are the weight values of n control points of the NURBS curve in sequence, acc is the acceleration of the follower of the cam mechanism, and force is the contact force between the roller and the cam;
[0038] The action space: A t =[a 1,t ,..., a k,t ,..., a n,t , a k,t ∈{0, 1, 2}, where a k,t is a binary vector, its length is the number n of adjustable control points of the NURBS curve, and the values are 0, 1, and 2. a k,t =0 means that the weight of the kth control point remains unchanged at time t + 1, a k,t =1 means that the weight of the kth control point increases by one step at time t + 1, a k,t =2 means that the weight of the kth control point decreases by one step at time t + 1;
[0039] The reward function: R t =(rew - pen)*weight, where rew represents the positive reward, pen represents the penalty term, and weight represents the weight value corresponding to the eigenvalue. The eigenvalue includes the contact collision force between the roller and the cam or the acceleration at the contact point between the roller and the cam.
[0040] Specifically, the expression of the positive reward is as follows:
[0041] rew = C req - C
[0042] The expression of the penalty term is as follows:
[0043]
[0044] where C req is the target value of the acceleration or contact force, and C is the current value of the acceleration or contact force.
[0045] Specifically, the fully connected neural network framework includes a policy network Q and a target network Q'. The policy network Q is a fully connected neural network with multiple hidden layers, and the target network Q' has the same configuration as the policy network Q;
[0046] The expression for the parameter update process of the policy network Q is as follows:
[0047] Q(s t , a t ) ← Q(s t , a t ) + α[r t + γmaxQ(s t+1 , a t ) - Q(s t , a t )]
[0048] In the formula, α represents the learning rate, γ represents the discount factor, a t represents the action selected by the agent according to the current policy, s t represents the state at time t, s t+1 represents the next state, r t represents the immediate reward value.
[0049] Specifically, in the DQN algorithm based on the fully connected neural network, the experience replay technique is introduced. For each time step, a quadruple (s1, a1, r1, s2) generated by the agent is stored in a data structure called the experience replay buffer. Among them, s1 represents the current state, a1 represents the action, r1 represents the reward, and s2 represents the next state.
[0050] Train the DQN model:
[0051] Randomly initialize the parameters of the policy network Q and copy them to the target network Q'. At the same time, initialize the experience replay pool. Input the initial state s1, and the agent selects the action a t , and obtain the immediate reward value r t and the next state s t+1 , store the trajectory (s t , a t , r t , s t+1 ) into the experience replay pool. After executing M episode loops, randomly sample n trajectories from the experience replay pool and input them into the policy network Q and the target network Q' for training. The estimate of the Q value by the policy network is y = Q(s t , a t ), and the estimate of the Q value by the target network Q' is With the goal of minimizing and the error between y, update the parameters of the policy network through the following formula:
[0052] Q(s t , a t ) ← Q(s t , a t ) + α[rt +γmaxQ(s t+1 ,a t )-Q(s t ,a t )]
[0053] In the formula, α is the learning rate and γ is the discount factor. After training for a certain number of time steps, the parameters of the policy network are synchronized to the target network.
[0054] To achieve the second object of the present invention, a cam profile curve optimization device is provided, including a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor. The computer memory adopts the above-mentioned cam profile curve optimization method for a high-speed cam mechanism;
[0055] When the computer processor executes the computer program, the following steps are implemented: obtaining the working data of the high-speed cam mechanism to be optimized, and optimizing it through the cam profile curve optimization method to reduce the jitter of the cam output acceleration and the contact force between the roller and the cam.
[0056] Compared with the prior art, the beneficial effects of the present invention:
[0057] The NURBS curve is used to reconstruct the cam contour, and the DQN algorithm is used to optimize the weights of the control points, improving the contact state between the roller and the cam, and greatly reducing the jitter of the cam output acceleration and the contact force between the roller and the cam.
[0058] At the same time, the DQN model trained at a specific clearance value can make the model converge faster at different clearance values, reduce the training time, and the model has strong transferability. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a schematic flow chart of the cam profile curve optimization method for a high-speed cam mechanism provided in this embodiment;
[0060] Figure 2 is a schematic structural diagram of the cam mechanism provided in this embodiment;
[0061] Figure 3 is a schematic diagram of the adjustment of the weights of the control points of the NURBS curve provided in this embodiment;
[0062] Figure 4 is the reward mean curve of the DQN algorithm under 20 random seeds and different initial states provided in this embodiment;
[0063] Figure 5 is the curve of the collision intrusion depth between the roller and the cam before and after the cam contour optimization provided in this embodiment;
[0064] Figure 6 The curves of the intrusion speed of the roller and the cam before and after the optimization of the cam contour provided in this embodiment;
[0065] Figure 7 The output acceleration curves before and after the optimization of the cam contour provided in this embodiment;
[0066] Figure 8 The contact force curves of the roller and the cam before and after the optimization of the cam contour provided in this embodiment; In the figure, 1. Cam; 2. First connecting rod; 3. Second connecting rod; 4. Third connecting rod; 5. Roller; 6. Follower; 11. Theoretical contour; 12. Actual contour. Detailed implementation manners
[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Usually, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0068] As Figure 1 shown, the cam contour curve optimization method for a high-speed cam mechanism provided in this embodiment includes:
[0069] Step 1: Reconstruction of the cam contour curve, including inputting value points, calculating the knot vector, determining the control point weights, inverse-solving the control points, and outputting the NURBS curve;
[0070] More specifically, a k-th order NURBS curve is defined as:
[0071]
[0072] where {d i} are the control vertices of the curve C(u), {w i} are the weight values, N i,k (u) is the basis function, k is the curve order, and the non-periodic knot vector U is defined as:
[0073]
[0074]
[0075]
[0076] Let the known convex contour line be a sequence of discrete data points {p i , i = 0, …, m} to be approximated, and select a series of interpolation points from it
[0077] Use the chord length parameterization method to parameterize the discrete data points to be interpolated to obtain the knot vector U:
[0078]
[0079] where is the distance norm of the discrete points;
[0080] Determine the curve degree k, and set the initial weights of the control points to {w i = 1, i = 0, …, n};
[0081] Substitute the curve degree k, weights {w i}, knot vector U, and the data points to be interpolated into the NURBS curve equation to obtain the control points d i :
[0082]
[0083] Step 2: Solve the dynamic characteristics, including establishing the collision contact force model between the roller and the cam, establishing the dynamic equation with clearance, solving the output acceleration and the contact force between the roller and the cam;
[0084] Step 3: Optimize the strategy learning, including establishing the state space, establishing the action space, designing the reward function, establishing the policy and target neural networks, and learning the control point weight adjustment strategy.
[0085] More specifically, the cam mechanism referred to in this embodiment is as Figure 2 shown. First, according to the boundary conditions during the operation of the cam mechanism, determine the profile points on the theoretical profile 11, set the NURBS curve order to 5, calculate the knot vector, set the initial weights of all control points to 1, and inversely calculate the control points C0, C1, …, C 15 , to obtain the theoretical profile 11 reconstructed by the NURBS curve. Represent the weight values of C5 and C6 with the parameter w0, the weight values of C7, C8, and C9 with the parameter w1, C 10 , C 11 , C 12The weight value is represented by the parameter w2. By changing the magnitudes of w0, w1, and w2, the local characteristics of the theoretical profile 11 can be altered. Then, the theoretical profile 11 is offset equidistantly to both sides to obtain the actual cam profile 12. A collision contact force model between the roller 5 and the actual profile 12 is established, and further a dynamic equation with clearances for the cam mechanism is established and solved in Adams to obtain the acceleration curve acc of the follower 6 and the contact force curve force between the roller 5 and the actual profile 12.
[0086] As Figure 3 shown, a state space s = (w0, w1, w2, acc, force) is established. The value ranges of w0, w1, and w2 are between -1 and 1, with a step size of 0.02. An action space a = [a0, a1, a2] is established. The values of a0, a1, and a2 are 0, 1, or 2. 0 indicates that the weight value of this control point remains unchanged, 1 indicates that the weight value of this control point increases by one step size, and 2 indicates that the weight value of this control point decreases by one step size. With the acc and force when the values of w0, w1, and w2 are all 1 as the maximum target values, a reward function is designed. The policy network Q and the target network Q' are set as fully connected neural networks with 3 hidden layers and 256 neurons in each hidden layer. After 30,000 iterations, the model converges to the optimal policy.
[0087] As Figure 4 shown, the reward mean curves of the DQN algorithm under 20 random seeds and different initial states are presented to prove that the convergence of the DQN algorithm is not affected by random seeds and initial states.
[0088] As Figure 5 and Figure 6 shown, where Figure 5 in (a) and Figure 6 in (a) are the test results of unoptimized contact collisions, Figure 5 in (b) and Figure 6 in (b) are the high-speed cam mechanisms optimized by the method provided in the above embodiments. It can be clearly found that the penetration depth and the jitter of the penetration speed when the roller contacts and collides with the actual profile are reduced, thus improving the contact state between the roller and the actual profile.
[0089] As Figure 7 shown, where Figure 7 (a) is the acceleration curve of the follower before optimization, Figure 7 (b) is the acceleration curve of the follower after optimization. It can be clearly seen that the jitter amplitude of its curve is significantly reduced.
[0090] As Figure 8 described, where Figure 8 (a) is the contact force curve between the roller and the cam before optimization, Figure 8(b) is the contact force curve between the optimized roller and the cam, and it can also be clearly seen that the amplitude of its jitter decreases significantly.
[0091] This embodiment also provides a cam profile curve optimization device, which is implemented by using the cam profile curve optimization method for high-speed cam mechanisms provided in the above embodiment in a computer memory.
[0092] When the computer processor executes the computer program, the following steps are implemented: obtaining the working data of the high-speed cam mechanism to be optimized, and optimizing it through the cam profile curve optimization method to reduce the jitter of the cam output acceleration and the contact force between the roller and the cam.
[0093] To sum up, optimizing the cam profile based on the kinematic performance of the output end and considering its collision impact can effectively improve the working quality of the cam mechanism, that is, optimizing the cam profile based on dynamics and tribology is of great significance for improving the R & D level of the cam mechanism.
Claims
1. A method for optimizing the cam profile curve of a high-speed cam mechanism, characterized in that, It includes the following steps: Step 1: Reconstruct the cam profile curve using the non-uniform rational B-spline curve equation to construct the corresponding cam profile curve function; Step 2: Construct the dynamic model of the cam mechanism with clearance, and solve the contact force between the roller and the cam based on the acceleration at the output end of the cam mechanism with clearance to construct the objective function; Step 3: Introduce the cam profile curve function and the objective function into the fully connected neural network framework to construct the corresponding DQN algorithm. The DQN algorithm aims to reduce the jitter of the output acceleration and the contact force between the roller and the cam, adjust the weights of each control point in the cam profile curve function, and optimize the cam profile curve based on the weights in the optimization results.
2. The cam profile curve optimization method for a high-speed cam mechanism according to claim 1, characterized in that, The process of reconstructing the cam profile curve using the non-uniform rational B-spline curve in Step 1 is as follows: Step 1-1: Regard the cam contour as a discrete data point sequence to be approximated, and select interpolation points from the discrete data point sequence to construct the corresponding interpolation data point sequence; Step 1-2: Parametrize the interpolation data point sequence using the chord length parameterization method to obtain the knot vector; Step 1-3: Initialize the curve degree and the weights of the control points of the non-uniform rational B-spline curve equation, and substitute the obtained interpolation data point sequence and knot vector into the initialized non-uniform rational B-spline curve equation to construct the corresponding cam profile curve function.
3. The cam profile curve optimization method for a high-speed cam mechanism according to claim 1 or 2, characterized in that The expression of the non-uniform rational B-spline curve equation is as follows: where {d i} are the control vertices of the curve C(u), {w i} are the weight values, N i,k (u) is the basis function, and k is the degree of the curve.
4. The cam profile curve optimization method for a high-speed cam mechanism according to claim 1, characterized in that, The dynamic model of the cam mechanism with clearance is constructed based on the contact collision contact force between the roller and the cam, the curvature radii of the roller and the cam at the contact point, and the relative sliding speed between the roller and the cam at the contact point, and is constructed using the second type of Lagrange equation.
5. The cam profile curve optimization method for a high-speed cam mechanism according to claim 1 or 4, characterized in that, The expression of the dynamic model is as follows: where M, C, and K are the generalized mass matrix, damping matrix, and stiffness matrix of the mechanism, respectively, is the column array of generalized accelerations, is the Jacobian matrix of the constraint equations, λ is the Lagrange multiplier matrix, F is the generalized active force of the system, and F c is the contact force between the roller and the cam during contact and collision.
6. The cam profile curve optimization method for a high-speed cam mechanism according to claim 1, characterized in that The DQN algorithm includes constructing a state space, an action space, and a reward function; The state space: s t =(w1, w2,..., w n , acc, force), where w1, w2,..., w n are the weight values of n control points of the NURBS curve in sequence, acc is the acceleration of the follower of the cam mechanism, and force is the contact force between the roller and the cam; The action space: A t = [a 1,t , …, a k,t , …, a n,t , a k,t ∈ {0, 1, 2}, where a k,t is a binary vector, the length of which is the number n of adjustable control points of the NURBS curve, taking values of 0, 1, and 2. a k,t = 0 means that the weight of the k-th control point remains unchanged at time t + 1. a k,t = 1 means that the weight of the k-th control point increases by one step at time t + 1. a k,t = 2 means that the weight of the k-th control point decreases by one step at time t + 1; The reward function: R t = (rew - pen) * weight, where rew represents the positive reward, pen represents the penalty term, and weight represents the weight value corresponding to the eigenvalue. The eigenvalue includes the contact collision force between the roller and the cam or the acceleration of the roller and the cam at the contact point.
7. The cam profile curve optimization method for a high-speed cam mechanism according to claim 6, characterized in that The expression of the positive reward is as follows: rew = C req -C The expression of the penalty term is as follows: Where, C req is the target value of the acceleration or contact force, and C is the current value of the acceleration or contact force.
8. The cam profile curve optimization method for a high-speed cam mechanism according to claim 1, characterized in that The fully connected neural network framework includes a policy network Q and a target network Q'. The policy network Q is a fully connected neural network with multiple hidden layers, and the target network Q' has the same configuration as the policy network Q; The expression of the parameter update process of the policy network Q is as follows: Q(s t ,a t ) ← Q(s t ,a t ) + α[r t + γ max Q(s t+1 ,a t ) - Q(s t ,a t )] where α represents the learning rate, γ represents the discount factor, a t represents the action selected by the agent according to the current policy, s t represents the state at time t, s t+1 represents the next state, r t represents the immediate reward value.
9. A cam profile curve optimization device, comprising a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor, characterized in that, The cam profile curve optimization method for a high-speed cam mechanism according to any one of claims 1 to 8 is adopted in the computer memory; when the computer processor executes the computer program, the following steps are implemented: obtaining the cam profile curve of the high-speed cam mechanism to be optimized, and optimizing it through the cam profile curve optimization method to reduce the jitter of the cam output acceleration and the contact force between the roller and the cam.
Citation Information
Patent Citations
Dynamic identification and feature removal repair method for design defects in cam groove mechanisms
CN113836662B
Cam optimization design method and device
CN115186415A