A method for optimizing electronic cam position curve based on motion controller

By optimizing the fifth-order polynomial and double harmonic generation of motion curves, the overshoot and impact problems of electronic cam curves at key points were solved, achieving smooth motion control and improving control accuracy.

CN122172716APending Publication Date: 2026-06-09SHANGHAI ANPU MINGZHI AUTOMATION EQUIP
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI ANPU MINGZHI AUTOMATION EQUIP
Filing Date
2022-12-15
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing electronic cam curves suffer from position overshoot and acceleration impact at key points, leading to decreased motion control accuracy. Traditional optimization methods are computationally intensive and inconvenient to operate.

Method used

The motion curve is generated by using an optimized fifth-order polynomial algorithm and biharmonic or inverse biharmonic generation. By selecting the electronic cam curve segment and key points to be optimized, and inputting the key point information, new optimized key points are generated to form a new optimized curve.

Benefits of technology

It achieves zero acceleration impact and position overshoot at key points of the electronic cam, ensuring smooth and continuous motion and improving control accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122172716A_ABST
    Figure CN122172716A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of based on motion controller electronic cam position curve optimization method, the method includes the following steps: 1) selecting the electronic cam curve segment needing optimization, and selecting the key point needing optimization;2) input the key point information to be optimized;3) using optimization quintic polynomial algorithm to optimize key point;4) output the key point of newly added cam after optimization;5) all the key point of newly added cam after optimization is added to the original cam curve, and constitutes new optimized curve.Compared with prior art, the present application has the advantages of directly connecting at the key point of electronic cam and no acceleration impact.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for optimizing the position curve of an electronic cam based on a motion controller. Background Technology

[0002] In recent years, Codesys has provided motion controller manufacturers with an open, modular platform compliant with the IEC 61131-3 international standard, and an increasing number of manufacturers are developing controllers based on this platform. The general-purpose controller platform offers electronic cam functionality, which is widely used in industries such as packaging and printing. These industries require multi-axis linkage and real-time synchronization. Traditional equipment uses mechanical cams, but due to the complexity of the mechanical cam mechanism and inconvenient maintenance, it is inconvenient to operate in many situations. The electronic cam function can perfectly solve the corresponding problems of mechanical cams.

[0003] Currently, electronic cam key point position curve generation only offers two algorithms: linear and fifth-order polynomial. In applications such as shearing, the linear algorithm results in significant acceleration impacts, causing substantial vibrations during operation. The fifth-order polynomial algorithm suffers from target position overshoot, affecting position control accuracy. Therefore, existing general-purpose algorithms often fail to meet actual process requirements. To satisfy these requirements, numerous auxiliary key points need to be added before the existing key points, but this approach is computationally intensive, inconvenient to operate, and difficult to implement in practice.

[0004] Patent CN201610304902, "Electronic Cam Control Device and Electronic Cam Curve Generation Method Thereof," only describes the generation method of the axis position curve and cannot optimize the velocity and acceleration to reduce the system's flexible impact. Patent CN201910044807, "An Electronic Cam Curve Generation Method and Related Device," mainly establishes the use of trigonometric functions and first / second-order homogeneous equations to construct the position curve. Although the algorithm complexity is reduced, it cannot solve the impact problem caused by sudden acceleration changes near key points. Patent CN201310740913, "An Electronic Cam Curve Generation Method," uses cubic spline curves to generate cam curves, but does not consider the position overshoot and system flexible impact problems of the generated curve.

[0005] like Figure 1 As shown, the general quintic polynomial is often used in algorithms to generate electronic cam curves. Therefore, the general quintic polynomial algorithm is used as an example, and its motion law diagram (progress segment) is shown. Its motion expression is as follows: Let s, v, a, and j represent position, velocity, acceleration, and jerk, respectively. Under the boundary conditions of the acceleration segment, t = 0, s = 0, v = 0, and a = 0. When t = t1, s = h, v = 0, and a = 0, then we can obtain: However, the electronic cam curves generated by simply applying a fifth-order polynomial often have overshoot in position or impacts in velocity or acceleration, resulting in discontinuities in the actual trajectory of the slave axis.

[0006] Therefore, how to solve the problems of position overshoot and speed or acceleration impact in the existing electronic cam curve has become a technical problem that needs to be solved. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method for optimizing the position curve of an electronic cam based on a motion controller.

[0008] The objective of this invention can be achieved through the following technical solutions: According to one aspect of the present invention, a method for optimizing the position curve of an electronic cam based on a motion controller is provided, the method comprising the following steps: 1) Select the electronic cam curve segment that needs to be optimized, and select the key points that need to be optimized; 2) Input the key information to be optimized; 3) Key point optimization is performed using an optimized fifth-order polynomial algorithm; 4) Output the key points after the optimization of the newly added cam; 5) Add all the optimized key points of the newly added cams to the original cam curve to form a new optimized curve.

[0009] As a preferred technical solution, the selection of the electronic cam curve segment to be optimized specifically refers to: Select the electronic cam curve segment that needs to move at a constant speed from the axis during operation.

[0010] As a preferred technical solution, the key points to be optimized are the start and end points of the electronic cam curve segment to be optimized.

[0011] As a preferred technical solution, the input key point information to be optimized includes the master axis position, slave axis position, slave axis velocity, and slave axis acceleration at the key point.

[0012] As a preferred technical solution, the algorithm for optimizing the fifth-degree polynomial is specifically as follows: For the optimized thrust curve, the optimized equation of motion for the acceleration segment is obtained: Optimized equations of motion for the uniform velocity segment: Optimized equation of motion for the deceleration phase: Where s, v, a, and j are position, velocity, acceleration, and jerk, respectively; T is the total stroke of the selected curve's main axis; t is the main axis position variable; t1 is the execution time of the acceleration segment; t2 is the execution time of the deceleration segment; h1 is the distance traveled in the acceleration segment; h2 is the distance traveled in the deceleration segment; and h is the distance traveled in the acceleration, uniform acceleration, and deceleration segments.

[0013] As a preferred technical solution, after running the optimized fifth-order polynomial algorithm, the optimized new key point information within the selected first and last points can be obtained.

[0014] As a preferred technical solution, this method uses motion curves generated by double harmonics and inverse double harmonics to optimize the original cam curve.

[0015] As a preferred technical solution, the derivation of the double harmonic motion equation is as follows: Where s, v, a, and j are position, velocity, acceleration, and jerk, respectively; T is the total stroke of the selected curve's main axis; t is the independent variable of the main axis position; h is the stroke of the double harmonic or inverse double harmonic acceleration or deceleration segment; and π is the conversion constant between radians and degrees, 3.1415926.

[0016] As a preferred technical solution, the specific derivation of the motion formula equation for the inverse double harmonic is as follows: Where s, v, a, and j represent position, velocity, acceleration, and jerk, respectively; T represents the total stroke of the selected curve's main axis; t represents the main axis position; and h represents the stroke of the double harmonic or inverse double harmonic acceleration or deceleration segment.

[0017] As a preferred technical solution, this method selects other cam curve segments that need to be optimized. In the fifth-order polynomial curve segment, the positional relationship between each two points conforms to the expression of a certain fifth-order polynomial. The information of the first and last points is extracted and input into the optimization algorithm in step 3). The optimization algorithm is then executed to optimize the segment.

[0018] Compared with the prior art, the present invention has the following advantages: 1) The method provided by this invention can directly connect at key points of the electronic cam without acceleration impact; 2) The method of the present invention does not have overshoot at key points of the cam position and has a good acceleration response. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the existing general fifth-order polynomial motion law; Figure 2 (a) is a schematic diagram of the slave axis position curve before optimization; Figure 2 (b) is a schematic diagram of the optimized new Cam curve; Figure 3 (a) is a schematic diagram of the push stroke optimization curve; Figure 3 (b) is a schematic diagram of the return trip optimization curve; Figure 4 This is a flowchart illustrating the specific process of the method of the present invention; Figure 5 The diagrams illustrate the classification at different speeds. (a), (b), (c), and (d) show the smooth transition from variable speed to constant speed to variable speed by adding two key points at the starting point (x1, y1, v1, a1) and the end point (x2, y2, v2, a2). (e) and (f) show the smooth transition from variable speed to constant speed or constant speed to variable speed by adding one key point.

[0020] Figure 6 This is a schematic diagram comparing the cam curve before and after the curve is smoothed. Figure 7 This is a diagram of the entire optimization process and system block. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] This invention addresses the shortcomings of existing general algorithms for electronic cam controllers, proposing an optimization method that ensures zero acceleration impact and zero position overshoot during key point connections. The original cam curve is optimized to form a new electronic cam curve, achieving zero position overshoot and smooth impact vibration during key point connections.

[0023] Taking shearing motion as an example, it is required that the curve from the axis position is as follows: Figure 2 As shown in (a), the new Cam curve generated after optimization is as follows: Figure 2 (b). A comparison of the two figures reveals that, in Figure 2 (b) Add corresponding key points, but the original ones Figure 2(a) The key point information remains unchanged, thus accurately meeting the original requirements for the position, velocity, and acceleration of the key points. At the same time, due to the addition of the new optimization points, there is no overshoot in the position of the slave axis, and the velocity and acceleration are continuous.

[0024] To address the issues of position overshoot and velocity or acceleration impacts in the electronic cam curve under the original algorithm, the above-mentioned... Figure 2 (a) shows the curve scheme for optimization. The curve between key point 1 and key point 2 is selected for optimization. The initial and final segments of the selected curve are optimized using a fifth-order polynomial. While ensuring the original key point information remains unchanged, new key points 3 and 4 are added. The optimized electronic cam curve can eliminate the corresponding flexible impact and minimize position overshoot. Its motion law is as follows: Figure 3 As shown.

[0025] in, Figure 3 (a) shows the push-stroke optimization curve. Figure 3 (b) is the return stroke optimization curve, which is a mirror image of the other two. Taking the forward stroke optimization curve as an example, the optimized acceleration segment motion equation can be obtained: Optimized equations of motion for the uniform velocity segment: Optimized equation of motion for the deceleration phase: In the above formula, the parameters t1, t2, h1, h2, h, etc. are as follows: Figure 2 (b) Figure 3 As shown, T represents the total travel of the selected curve's principal axis, and t is the independent variable for the principal axis position. Using the optimized fifth-order polynomial algorithm effectively reduces overshoot of the original keypoint positions while ensuring smooth operation. Some return curves can be used... Figure 3 (b) is used for optimization. Specific Implementation The specific process of this invention is as follows: 1. Algorithm Usage Basis (Selecting the Curve Segment to be Optimized) In theory, any segment of an electronic cam profile can be optimized, but in practical engineering, it's not necessary to optimize every segment. If uniform speed movement along the axis is required during a certain segment, the traditional fifth-order polynomial + linear algorithm can lead to significant position overshoot. In such cases, optimization algorithms can be used to achieve overshoot-free operation. For specific classifications, please refer to [reference needed]. Figure 5The new velocity curves generated under different speed requirements allow for the acquisition of information from two key points in the unoptimized cam curve. The algorithm determines the velocity and acceleration values ​​of the driven shaft at these key points. Based on the actual acquired values, the algorithm selects the optimized velocity and acceleration trends, such as... Figure 5 ; 2: Execute optimization algorithms like Figure 3 After optimizing the fifth-order polynomial algorithm as shown, input the XYVA (i.e., master and slave shaft positions, slave shaft velocity, and slave shaft acceleration) information of the first and last points of the cam curve segment to be optimized, and select the optimization algorithm type, set the scaling factor, and the slave shaft running direction, etc. After running the optimization fifth-order polynomial algorithm, the newly added key point information within the selected first and last points can be obtained. The input and output parameters of the optimization fifth-order polynomial algorithm are listed in Table 1.

[0027] The interval scaling factor determines the proportion of the initial and final segments to be optimized within the selected curve segment; Table 1 To meet the needs of various applications, this optimization algorithm, in addition to using an optimized fifth-order polynomial to optimize the selected electronic cam curve, also supports using motion curves generated by biharmonic wave and inverse biharmonic wave to optimize the original cam curve. The main references are the following derivation formulas, where T, h, and Figure 3 Consistent with the above The equations of motion for double harmonics can be derived as follows: The equations of motion are derived from the inverse double harmonic wave: Third: Select other key points that need optimization and optimize them. Select other cam curve segments that need to be optimized, such as the fifth-degree polynomial curve segment, where the positional relationship between each two points conforms to the expression of a certain fifth-degree polynomial. Now extract the information of the first and last points and input it into the optimization algorithm as shown in step three. Execute the algorithm to optimize the segment. 4. Generate and add optimized key points If the algorithm executes without error, all optimized curve segments will output the newly added key points of the cam after optimization. All the new points will be added to the original cam curve to form a new optimized curve, thus completing the optimization work.

[0028] Figure 6 The curves shown are those before and after optimization of the cam push stroke period.

[0029] Add the cam key point optimization process to the existing system. Figure 7The diagram shows the entire optimization process and system block diagram. The optimized control system can optimize the settings of key points of the cam, and the new system can ensure that the expected effect can be achieved when the master and slave shaft cams are executed.

[0030] In summary, by using optimization algorithms to refine the key points of the unoptimized cam profile, optimized new key point data can be obtained, ultimately leading to a new electronic cam profile. During the cam push-off or return stroke, an optimized fifth-order polynomial motion formula is used for calculation to obtain the optimized supplementary key points, significantly reducing position overshoot during steering and minimizing acceleration impact.

[0031] In addition to using an optimized fifth-order polynomial to modify the original cam curve, optimization can also be achieved using biharmonic or inverse biharmonic laws.

[0032] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for optimizing the position curve of an electronic cam based on a motion controller, characterized in that, The method includes the following steps: 1) Select the electronic cam curve segment that needs to be optimized, and select the key points that need to be optimized; 2) Input the key information to be optimized; 3) Optimize the original cam curve using motion curves generated by double harmonics and inverse double harmonics; 4) Output the key points after the optimization of the newly added cam; 5) Add all the optimized key points of the newly added cams to the original cam curve to form a new optimized curve; The derivation of the double harmonic motion equation is as follows: Where s, v, a, and j are position, velocity, acceleration, and jerk, respectively; T is the total stroke of the selected curve's main axis; t is the independent variable of the main axis position; and h is the stroke of the double harmonic or inverse double harmonic acceleration or deceleration segment. The specific equations for deriving the motion formula from the inverse double harmonic are as follows: Where s, v, a, and j represent position, velocity, acceleration, and jerk, respectively; T represents the total stroke of the selected curve's main axis; t represents the main axis position; and h represents the stroke of the double harmonic or inverse double harmonic acceleration or deceleration segment.

2. The method for optimizing the position curve of an electronic cam based on a motion controller according to claim 1, characterized in that, The specific electronic cam curve segment to be optimized is as follows: Select the electronic cam curve segment that needs to move at a constant speed from the axis during operation.

3. The method for optimizing the position curve of an electronic cam based on a motion controller according to claim 1, characterized in that, The key points to be optimized are the start and end points of the electronic cam curve segment to be optimized.

4. The method for optimizing the position curve of an electronic cam based on a motion controller according to claim 1, characterized in that, The input key point information to be optimized includes the master axis position, slave axis position, slave axis velocity, and slave axis acceleration at the key point.

5. The method for optimizing the position curve of an electronic cam based on a motion controller according to claim 1, characterized in that, This method selects other cam curve segments that need to be optimized. In the fifth-order polynomial curve segment, the positional relationship between each two points conforms to the expression of a certain fifth-order polynomial. The information of the first and last points is extracted and input into the optimization algorithm in step 3). The optimization algorithm is then executed to optimize the segment.

Citation Information

Patent Citations

  • A method for generating electronic cam curves

    CN103744346B

  • Electronic cam control device and electronic cam curve generation method thereof

    CN105739430A

  • A method and related apparatus for generating electronic cam curves

    CN109799778B